20 #ifndef ModelAPI_Folder_H_
21 #define ModelAPI_Folder_H_
24 #include <ModelAPI_Object.h>
38 static const std::string&
ID()
40 static const std::string MY_FOLDER_ID(
"Folder");
45 inline static std::string
group()
47 static std::string MY_GROUP =
"Folders";
60 static const std::string MY_FIRST_FEATURE_ID(
"first_feature");
61 return MY_FIRST_FEATURE_ID;
67 static const std::string MY_LAST_FEATURE_ID(
"last_feature");
68 return MY_LAST_FEATURE_ID;
75 MODELAPI_EXPORT
virtual void execute();
87 return data()->name();
90 inline std::shared_ptr<ModelAPI_AttributeReference>
reference(
const std::string& theID)
92 return data()->reference(theID);
102 MODELAPI_EXPORT
virtual void init();
106 typedef std::shared_ptr<ModelAPI_Folder> FolderPtr;
Folder feature (groups the features).
Definition: ModelAPI_Folder.h:31
static std::string group()
Returns the group identifier of all features.
Definition: ModelAPI_Folder.h:45
static const std::string & FIRST_FEATURE_ID()
Attribute referring first feature in the folder.
Definition: ModelAPI_Folder.h:58
virtual MODELAPI_EXPORT void initAttributes()
Request for initialization of data model of the object: adding all attributes.
Definition: ModelAPI_Folder.cpp:36
static const std::string & LAST_FEATURE_ID()
Attribute referring last feature in the folder.
Definition: ModelAPI_Folder.h:65
virtual MODELAPI_EXPORT void execute()
Computes or recomputes the results.
Definition: ModelAPI_Folder.cpp:42
virtual std::string groupName()
Returns the group identifier of this result.
Definition: ModelAPI_Folder.h:52
static const std::string & ID()
Folder feature ID.
Definition: ModelAPI_Folder.h:38
MODELAPI_EXPORT std::shared_ptr< ModelAPI_Feature > lastVisibleFeature()
Returns the last visible feature in the folder, passing through invisible, that may appear as the las...
Definition: ModelAPI_Folder.cpp:46
std::wstring name()
Returns the name stored in the attribute.
Definition: ModelAPI_Folder.h:85
virtual MODELAPI_EXPORT ~ModelAPI_Folder()
To virtually destroy the fields of successors.
Definition: ModelAPI_Folder.cpp:28
virtual bool isDisabled()
Returns the feature is disabled or not.
Definition: ModelAPI_Folder.h:78
virtual MODELAPI_EXPORT void init()
This method is called just after creation of the object: it must initialize all fields,...
Definition: ModelAPI_Folder.cpp:32
std::shared_ptr< ModelAPI_AttributeReference > reference(const std::string &theID)
Returns the reference attribute by the identifier.
Definition: ModelAPI_Folder.h:90
Represents any object in the data model and in the object browser.
Definition: ModelAPI_Object.h:45
virtual std::shared_ptr< ModelAPI_Data > data() const
Returns the data manager of this object: attributes.
Definition: ModelAPI_Object.cpp:45