SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_view_PhraseContent_h
11 #define smtk_view_PhraseContent_h
13 #include "smtk/CoreExports.h"
17 #include "smtk/resource/Component.h"
19 #include "smtk/resource/Resource.h"
21 #include "smtk/model/EntityTypeBits.h"
48 EDITABLE_TITLE = 0x02,
76 return this->relatedResource().get();
82 return this->relatedComponent().get();
90 auto comp = this->relatedComponent();
95 auto rsrc = this->relatedResource();
108 return this->location() == other.
location() && (
typeid(*this) ==
typeid(other));
130 if (!locn || m_location.lock() == locn)
138 virtual bool operator==(
const PhraseContent& other)
const {
return this->equalTo(other); }
141 PhraseContent() =
default;
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
virtual bool editStringValue(ContentType, const std::string &)
Edit the attr value to become the given string (or returns false if no-change/invalid).
Definition: PhraseContent.h:68
An abstract base class for obtaining descriptive phrase information.
Definition: PhraseContent.h:38
smtk::weak_ptr< smtk::view::DescriptivePhrase > WeakDescriptivePhrasePtr
Definition: PublicPointerDefs.h:629
smtk::shared_ptr< smtk::operation::Operation > OperationPtr
Definition: PublicPointerDefs.h:351
bool setLocation(DescriptivePhrasePtr locn)
Set the descriptive phrase that will present this content.
Definition: PhraseContent.h:128
virtual bool editable(ContentType) const
Is attr editable or fixed (for information/display only)?
Definition: PhraseContent.h:60
virtual smtk::resource::PersistentObjectPtr relatedObject() const
Return the persistent object related to this phrase (or nullptr if not well defined).
Definition: PhraseContent.h:88
#define smtkEnableSharedPtr(...)
An abbreviation for enabling shared pointers.
Definition: SharedFromThis.h:214
virtual int flagValue(ContentType) const
Return an integer bit-flag that reflects the given attr value.
Definition: PhraseContent.h:65
ContentType
Accepted types of content.
Definition: PhraseContent.h:45
bool equalTo(const PhraseContent &other) const
Test for use in derived-class equality operators.
Definition: PhraseContent.h:106
virtual smtk::resource::ResourcePtr relatedResource() const
Return the resource related to this phrase (or nullptr if not well defined).
Definition: PhraseContent.h:73
virtual bool displayable(ContentType) const
Should attr be present in the visual display of the phrase?
Definition: PhraseContent.h:58
An abstract base class for SMTK resources.
Definition: Resource.h:72
virtual bool editFlagValue(ContentType, int)
Edit the attr value to become the given flag (or returns false if no-change/invalid).
Definition: PhraseContent.h:70
smtk::shared_ptr< smtk::view::DescriptivePhrase > DescriptivePhrasePtr
Definition: PublicPointerDefs.h:627
virtual std::string stringValue(ContentType) const
Return a string that reflects the given attr value.
Definition: PhraseContent.h:63
Component is the base class for records stored in an smtk::resource::Resource.
Definition: Component.h:43
virtual smtk::resource::ComponentPtr relatedComponent() const
Return the resource component related to this phrase (or nullptr if not well defined).
Definition: PhraseContent.h:79
smtk::shared_ptr< smtk::resource::PersistentObject > PersistentObjectPtr
Definition: PublicPointerDefs.h:292
Macros for dealing with shared-pointer classes.
#define smtkTypeMacroBase(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:131
virtual smtk::operation::OperationPtr relatedOperation() const
Return an operator related to this phrase (or nullptr if not well defined).
Definition: PhraseContent.h:103
smtk::shared_ptr< smtk::resource::Component > ComponentPtr
Definition: PublicPointerDefs.h:304
DescriptivePhrasePtr location() const
Return the location of this content in a DescriptivePhrase hierarchy.
Definition: PhraseContent.h:121
smtk::shared_ptr< smtk::resource::Resource > ResourcePtr
Definition: PublicPointerDefs.h:302