SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
11 #ifndef smtk_attribute_Analyses_h
12 #define smtk_attribute_Analyses_h
14 #include "smtk/CoreExports.h"
45 const std::string&
name()
const {
return m_name; }
48 const std::string&
displayedName()
const {
return (m_label.empty() ? m_name : m_label); }
49 void setLabel(
const std::string& analysisLabel) { m_label = analysisLabel; }
50 const std::string& label()
const {
return m_label; }
51 bool hasLabel()
const {
return !m_label.empty(); }
60 std::set<std::string> categories()
const;
88 const std::vector<Analysis*>&
children()
const {
return m_children; }
102 ~Analysis() =
default;
106 bool m_exclusive{
false };
107 bool m_required{
false };
118 Analysis* create(
const std::string& name);
121 Analysis* find(
const std::string& name)
const;
124 std::vector<Analysis*> topLevel()
const;
127 const std::vector<Analysis*>&
analyses()
const {
return m_analyses; }
130 std::size_t
size()
const {
return m_analyses.size(); }
144 bool setAnalysisParent(
const std::string& analysis,
const std::string& parent);
149 const std::string& type,
150 const std::string& label =
"Analysis")
const;
153 void getAnalysisAttributeCategories(
155 std::set<std::string>& cats);
156 std::set<std::string> getAnalysisAttributeCategories(
169 getAnalysisItemCategories(
ConstItemPtr item, std::set<std::string>& cats,
bool itemNotAnalysis);
171 bool m_topLevelExclusive{
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
std::vector< Analysis * > m_children
Children of the Analysis.
Definition: Analyses.h:110
smtk::shared_ptr< smtk::attribute::Definition > DefinitionPtr
Definition: PublicPointerDefs.h:457
void setTopLevelExclusive(bool mode)
Methods to set and retrieve the exclusivity property pertaining the top level Analysis Instances.
Definition: Analyses.h:137
Analysis * parent() const
Method to retrieve an Analysis' parent Analysis.
Definition: Analyses.h:63
void setRequired(bool mode)
Methods to set and retrieve an Analysis' required property.
Definition: Analyses.h:83
bool isRequired() const
Methods to set and retrieve an Analysis' required property.
Definition: Analyses.h:84
std::string m_label
Optional label to be used for UIs.
Definition: Analyses.h:108
Represents a set of Analyses defined within an Attribute Resource.
Definition: Analyses.h:26
const std::string & name() const
Return the name associated with the Analysis.
Definition: Analyses.h:45
std::set< std::string > m_categories
Categories locally assigned to the analysis.
Definition: Analyses.h:109
bool isExclusive() const
Methods to set and retrieve an Analysis' children exclusivity property.
Definition: Analyses.h:73
const std::set< std::string > & localCategories() const
Methods to set and retrieve the categories locally associated with the Analysis.
Definition: Analyses.h:56
smtk::shared_ptr< smtk::attribute::GroupItemDefinition > GroupItemDefinitionPtr
Definition: PublicPointerDefs.h:517
Represents a single Analysis defined within an Attribute Resource.
Definition: Analyses.h:39
void setExclusive(bool mode)
Methods to set and retrieve an Analysis' children exclusivity property.
Definition: Analyses.h:72
const std::vector< Analysis * > & analyses() const
Return all Analysis Instances.
Definition: Analyses.h:127
const std::string & displayedName() const
Return the string to represent the Analysis in UI's.
Definition: Analyses.h:48
std::vector< Analysis * > m_analyses
Analysis Instances managed by the Analyses Instance.
Definition: Analyses.h:174
bool areTopLevelExclusive() const
Methods to set and retrieve the exclusivity property pertaining the top level Analysis Instances.
Definition: Analyses.h:138
smtk::shared_ptr< const smtk::attribute::Item > ConstItemPtr
Definition: PublicPointerDefs.h:476
smtk::shared_ptr< smtk::attribute::StringItemDefinition > StringItemDefinitionPtr
Definition: PublicPointerDefs.h:525
std::string m_name
Name of the Analysis.
Definition: Analyses.h:104
smtk::shared_ptr< const smtk::attribute::Attribute > ConstAttributePtr
Definition: PublicPointerDefs.h:465
void setLocalCategories(const std::set< std::string > &cats)
Methods to set and retrieve the categories locally associated with the Analysis.
Definition: Analyses.h:55
std::size_t size() const
Return the number of Analysis Instances.
Definition: Analyses.h:130
const std::vector< Analysis * > & children() const
Returns the children Analyses of this Analysis.
Definition: Analyses.h:88
smtk::shared_ptr< smtk::attribute::Resource > ResourcePtr
Definition: PublicPointerDefs.h:611