Skip to content

Commit

Permalink
Deprecate MMCore property block functions
Browse files Browse the repository at this point in the history
It is not clear to me what these were intended for, but they are
probably part of a planned but unfinished feature (seeing that it
appears to be tied to an Equipment command in config files, which, as
far as I know, was never supported by the Hardware Configuration
Wizard).

Some of the functions deprecated here may crash when called with
incorrect parameters.
  • Loading branch information
marktsuchida committed Mar 7, 2022
1 parent 9afd47e commit 9cca84e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
10 changes: 10 additions & 0 deletions MMCore/MMCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5635,6 +5635,8 @@ bool CMMCore::isGroupDefined(const char* groupName)
* Defines a reference for the collection of property-value pairs.
* This construct is useful for defining
* interchangeable equipment features, such as objective magnifications, filter wavelengths, etc.
*
* @deprecated Property blocks will not be supported in the future.
*/
void CMMCore::definePropertyBlock(const char* blockName, const char* propertyName, const char* propertyValue)
{
Expand Down Expand Up @@ -5663,6 +5665,8 @@ void CMMCore::definePropertyBlock(const char* blockName, const char* propertyNam

/**
* Returns all defined property block identifiers.
*
* @deprecated Property blocks will not be supported in the future.
*/
std::vector<std::string> CMMCore::getAvailablePropertyBlocks() const
{
Expand All @@ -5676,6 +5680,8 @@ std::vector<std::string> CMMCore::getAvailablePropertyBlocks() const

/**
* Returns the collection of property-value pairs defined in this block.
*
* @deprecated Property blocks will not be supported in the future.
*/
PropertyBlock CMMCore::getPropertyBlockData(const char* blockName)
{
Expand All @@ -5693,6 +5699,8 @@ PropertyBlock CMMCore::getPropertyBlockData(const char* blockName)

/**
* Returns the collection of property-value pairs defined for the specific device and state label.
*
* @deprecated Property blocks will not be supported in the future.
*/
PropertyBlock CMMCore::getStateLabelData(const char* deviceLabel, const char* stateLabel)
{
Expand Down Expand Up @@ -5725,6 +5733,8 @@ PropertyBlock CMMCore::getStateLabelData(const char* deviceLabel, const char* st

/**
* Returns the collection of property-value pairs defined for the current state.
*
* @deprecated Property blocks will not be supported in the future.
*/
PropertyBlock CMMCore::getData(const char* deviceLabel)
{
Expand Down
14 changes: 7 additions & 7 deletions MMCore/MMCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@ class CMMCore

/** \name Property blocks. */
///@{
void definePropertyBlock(const char* blockName, const char* propertyName,
const char* propertyValue);
std::vector<std::string> getAvailablePropertyBlocks() const;
PropertyBlock getPropertyBlockData(const char* blockName);
MMCORE_DEPRECATED(void definePropertyBlock(const char* blockName, const char* propertyName,
const char* propertyValue));
MMCORE_DEPRECATED(std::vector<std::string> getAvailablePropertyBlocks() const);
MMCORE_DEPRECATED(PropertyBlock getPropertyBlockData(const char* blockName));
///@}

/** \name Image acquisition. */
Expand Down Expand Up @@ -464,9 +464,9 @@ class CMMCore
throw (CMMError);
long getStateFromLabel(const char* stateDeviceLabel,
const char* stateLabel) throw (CMMError);
PropertyBlock getStateLabelData(const char* stateDeviceLabel,
const char* stateLabel);
PropertyBlock getData(const char* stateDeviceLabel);
MMCORE_DEPRECATED(PropertyBlock getStateLabelData(const char* stateDeviceLabel,
const char* stateLabel));
MMCORE_DEPRECATED(PropertyBlock getData(const char* stateDeviceLabel));
///@}

/** \name Focus (Z) stage control. */
Expand Down

0 comments on commit 9cca84e

Please sign in to comment.