Skip to content

DemoCamera: Split large file DemoCamera into its individual classes.#809

Merged
marktsuchida merged 3 commits intomicro-manager:mainfrom
nicost:demoSplit
Jan 8, 2026
Merged

DemoCamera: Split large file DemoCamera into its individual classes.#809
marktsuchida merged 3 commits intomicro-manager:mainfrom
nicost:demoSplit

Conversation

@nicost
Copy link
Copy Markdown
Member

@nicost nicost commented Jan 6, 2026

Closes #312

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the DemoCamera device adapter by splitting a large monolithic file into separate files organized by device class. This improves code maintainability and organization.

Key Changes

  • Split DemoCamera.cpp into 12 separate implementation files
  • Added static inline qualifiers to functions in WriteCompactTiffRGB.h to prevent multiple definition errors
  • Updated build configuration files (Makefile.am, .vcxproj, .vcxproj.filters)
  • Converted internal constants to extern declarations in header file

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
WriteCompactTiffRGB.h Added static inline to prevent ODR violations when included in multiple translation units
Makefile.am Added all new .cpp files to build sources
DemoStateDevices.cpp Extracted state device implementations (filter wheel, state device, light path, objective turret)
DemoStages.cpp Extracted stage implementations (Z stage, XY stage)
DemoShutter.cpp Extracted shutter implementation
DemoPumps.cpp Extracted pump device implementations
DemoMagnifier.cpp Extracted magnifier device implementation
DemoImageProcessors.cpp Extracted image processor implementations
DemoImageGeneration.cpp Extracted image generation utility functions
DemoHub.cpp Extracted hub device implementation
DemoGalvo.cpp Extracted galvo device implementation
DemoDA.cpp Extracted DA device implementation
DemoCameraModule.cpp Extracted module initialization and device factory functions
DemoAutoFocus.cpp Extracted autofocus device implementation
DemoCamera.h Updated with extern declarations for constants
DemoCamera.cpp Removed extracted code, added NoHubError definition
DemoCamera.vcxproj Added new files to Visual Studio project
DemoCamera.vcxproj.filters Added new files to VS filters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread DeviceAdapters/DemoCamera/DemoStateDevices.cpp Outdated
Comment thread DeviceAdapters/DemoCamera/DemoImageGeneration.cpp Outdated
Comment thread DeviceAdapters/DemoCamera/DemoImageGeneration.cpp Outdated
@nicost nicost marked this pull request as ready for review January 6, 2026 21:33
@nicost nicost requested a review from marktsuchida January 6, 2026 21:33
@marktsuchida
Copy link
Copy Markdown
Member

Thanks for making this happen! I'll push a minor commit (sort files in Makefile.am) and merge.

@marktsuchida marktsuchida merged commit d7a9e82 into micro-manager:main Jan 8, 2026
2 checks passed
@nicost nicost deleted the demoSplit branch January 8, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate demo devices across individual .cpp files for easier maintenance

3 participants