SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_view_NodeGroupPhraseContent_h
11 #define smtk_view_NodeGroupPhraseContent_h
13 #include "smtk/view/PhraseContent.h"
15 #include "smtk/model/Entity.h"
43 std::string
childType()
const {
return m_childType; }
53 const std::string& childType,
54 const std::string& singular = std::string(),
55 const std::string& plural = std::string(),
65 const std::string& childType,
66 const std::string& singular = std::string(),
67 const std::string& plural = std::string(),
73 bool displayable(ContentType attr)
const override;
76 return (m_mutability &
static_cast<int>(attr)) != 0;
79 std::string stringValue(ContentType attr)
const override;
80 int flagValue(ContentType attr)
const override;
82 bool editStringValue(ContentType attr,
const std::string& val)
override;
83 bool editFlagValue(ContentType attr,
int val)
override;
100 auto comps = this->relatedComponents();
101 for (
auto comp : comps)
104 result.end(), std::dynamic_pointer_cast<typename T::value_type::element_type>(comp));
109 void setMutability(
int whatsMutable);
124 void defaultSingularPlural();
125 std::string generateTitle()
const;
127 int m_mutability{ 0 };
128 mutable std::string m_childType;
129 mutable std::string m_singular;
130 mutable std::string m_plural;
131 mutable std::string m_title;
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
An abstract base class for obtaining descriptive phrase information.
Definition: PhraseContent.h:38
bool editable(ContentType attr) const override
Is attr editable or fixed (for information/display only)?
Definition: NodeGroupPhraseContent.h:74
T relatedComponentsAs() const
A convenience method for obtaining related components in a user-specified container.
Definition: NodeGroupPhraseContent.h:97
std::vector< smtk::view::DescriptivePhrasePtr > DescriptivePhrases
Definition: PublicPointerDefs.h:631
std::string childType() const
Return the class type-name of the type of component that should be listed in our subphrases.
Definition: NodeGroupPhraseContent.h:43
ContentType
Accepted types of content.
Definition: PhraseContent.h:45
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:128
void setCustomTitle(const std::string &title)
This method is for subphrase generators that wish to customize the list title.
Definition: NodeGroupPhraseContent.h:117
std::vector< smtk::resource::ComponentPtr > ComponentArray
Definition: PublicPointerDefs.h:320
#define smtkSharedPtrCreateMacro(...)
A convenience macro for declaring shared_from_this and create methods.
Definition: SharedFromThis.h:267
smtk::shared_ptr< smtk::view::DescriptivePhrase > DescriptivePhrasePtr
Definition: PublicPointerDefs.h:627
A phrase whose children are all components of a given type-name.
Definition: NodeGroupPhraseContent.h:36