Represents a set of Analyses defined within an Attribute Resource.
More...
#include <Analyses.h>
Represents a set of Analyses defined within an Attribute Resource.
◆ areTopLevelExclusive()
bool smtk::attribute::Analyses::areTopLevelExclusive |
( |
| ) |
const |
|
inline |
Methods to set and retrieve the exclusivity property pertaining the top level Analysis Instances.
This property behaves similarly to an Analysis's Exclusive property. If true, then only one of the top level Analysis instances can be chosen. Else any combination of top level analysis instances are allowed.
◆ buildAnalysesDefinition()
Create an Attribute Definition to represent the Analysis Instances maintained by the Analyses.
The Definition will be named using type
and will be part of resource
.
If type
already exists in resource
then no Definition will be created and a nullptr will be returned. If the top level exclusive property is false then each top level Analysis's buildAnalysisItem method will be called using the newly created Definition. Else a new StringItemDefinition will be created using label
as its name and each top level Analysis's buildAnalysisItem method will be called using it as its input argument.
The resulting definition will have the following structure:
- Either one item (in the case of Exclusive Top-level Definitions) with a discrete value per top-level Analysis, or one item per top-level Analysis
- Every Analysis with children will generate either a string or group item depending the its Exclusive Property
- Childless Analysis Instances will only generate an item if its parent has Exclusive = false or its a top-level Analysis and Analyses has TopLevelExclusive = false. When Exclusive is true (in ether the Analysis or Analyses case) the resulting String Item will have a set of discrete values (one for either child or top-level Analysis) and optionally an item representing an Analysis' children associated with that discrete value.
◆ create()
Create a new Analysis and return it.
Note that the name must be unique with respects to the other Analysis Instances defined within this Instance. If the name is not unique no Analysis is created and nullptr is returned.
◆ getAnalysisItemCategories()
void Analyses::getAnalysisItemCategories |
( |
ConstItemPtr |
item, |
|
|
std::set< std::string > & |
cats, |
|
|
bool |
itemNotAnalysis |
|
) |
| |
|
protected |
Calculate the set of categories associated with an Analysis Attribute's Item.
itemNotAnalysis indicates if the item does not represent an analysis itself. This occurs only when processing the top level item and m_topLevelExclusive is true.
◆ operator=()
Assign the contents of an Analyses object to this one.
This will copy all of the analysis objects contained in src.
◆ setAnalysisParent()
bool Analyses::setAnalysisParent |
( |
const std::string & |
analysis, |
|
|
const std::string & |
parent |
|
) |
| |
Convenience method that set's an Analysis' Parent by using their names.
If neither name corresponds to an existing Analysis then the method returns false.
◆ setTopLevelExclusive()
void smtk::attribute::Analyses::setTopLevelExclusive |
( |
bool |
mode | ) |
|
|
inline |
Methods to set and retrieve the exclusivity property pertaining the top level Analysis Instances.
This property behaves similarly to an Analysis's Exclusive property. If true, then only one of the top level Analysis instances can be chosen. Else any combination of top level analysis instances are allowed.
◆ m_topLevelExclusive
bool smtk::attribute::Analyses::m_topLevelExclusive |
|
protected |
Initial value:
Indicates if the top level Analysis Instances are exclusive.
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/smtk/checkouts/latest/smtk/attribute/Analyses.h
- /home/docs/checkouts/readthedocs.org/user_builds/smtk/checkouts/latest/smtk/attribute/Analyses.cxx