SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
11 #ifndef smtk_attribute_CopyAssignmentOptions_h
12 #define smtk_attribute_CopyAssignmentOptions_h
14 #include "smtk/CoreExports.h"
15 #include "smtk/common/UUID.h"
18 #include <unordered_map>
25 class PersistentObject;
72 std::string convertToString(
const std::string& prefix =
"")
const;
75 bool m_copyUUID =
false;
76 bool m_copyDefinition =
false;
77 bool m_performAssignment =
true;
89 using ObjectMapType = std::unordered_map<smtk::common::UUID, smtk::resource::PersistentObject*>;
90 void setObjectMapping(
ObjectMapType* val) { m_objectMapping = val; }
91 const ObjectMapType* objectMapping()
const {
return m_objectMapping; }
98 template<
typename ObjectType>
101 if (m_objectMapping ==
nullptr)
105 auto it = m_objectMapping->find(sourceId);
106 if (it == m_objectMapping->end())
110 return dynamic_cast<ObjectType*
>(it->second);
113 virtual std::string convertToString(
const std::string& prefix =
"")
const;
116 ObjectMapType* m_objectMapping =
nullptr;
127 using ObjectMapType = std::unordered_map<smtk::common::UUID, smtk::resource::PersistentObject*>;
173 std::string convertToString(
const std::string& prefix =
"")
const override;
176 bool m_ignoreMissingItems =
false;
177 bool m_copyAssociations =
false;
178 bool m_allowPartialAssociations =
false;
179 bool m_doNotValidateAssociations =
false;
260 std::string convertToString(
const std::string& prefix =
"")
const override;
263 bool m_ignoreMissingChildren =
false;
264 bool m_allowPartialValues =
false;
265 bool m_ignoreExpressions =
false;
266 bool m_ignoreReferenceValues =
false;
267 bool m_doNotValidateReferenceInfo =
false;
268 bool m_disableCopyAttributes =
false;
280 std::string convertToString(
const std::string& prefix =
"")
const;
285 #endif // smtk_attribute_CopyAssignmentOptions_h
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
void setIgnoreReferenceValues(bool val)
Methods to set and retrieve the ignoreReferenceValues Option.
Definition: CopyAssignmentOptions.h:227
void setIgnoreExpressions(bool val)
Methods to set and retrieve the ignoreExpressions Option.
Definition: CopyAssignmentOptions.h:218
Class used to specify copy and assignment options.
Definition: CopyAssignmentOptions.h:272
void setIgnoreMissingItems(bool val)
Methods to set and retrieve the ignoreMissingItems Option.
Definition: CopyAssignmentOptions.h:139
void setIgnoreMissingChildren(bool val)
Methods to set and retrieve the ignoreMissingChildren Option.
Definition: CopyAssignmentOptions.h:199
bool ignoreReferenceValues() const
Methods to set and retrieve the ignoreReferenceValues Option.
Definition: CopyAssignmentOptions.h:226
Class used to control how an item's information is assigned to another item.
Definition: CopyAssignmentOptions.h:186
void setCopyAssociations(bool val)
Methods to set and retrieve the copyAssociations Option.
Definition: CopyAssignmentOptions.h:149
bool ignoreExpressions() const
Methods to set and retrieve the ignoreExpressions Option.
Definition: CopyAssignmentOptions.h:217
void setDisableCopyAttributes(bool val)
Methods to set and retrieve the disableCopyAttributes Option.
Definition: CopyAssignmentOptions.h:256
bool copyDefinition() const
Methods to set and retrieve the copyDefinition Option.
Definition: CopyAssignmentOptions.h:67
bool ignoreMissingItems() const
Methods to set and retrieve the ignoreMissingItems Option.
Definition: CopyAssignmentOptions.h:138
void setAllowPartialAssociations(bool val)
Methods to set and retrieve the allowPartialAssociations Option.
Definition: CopyAssignmentOptions.h:159
bool allowPartialAssociations() const
Methods to set and retrieve the allowPartialAssociations Option.
Definition: CopyAssignmentOptions.h:158
void setDoNotValidateAssociations(bool val)
Methods to set and retrieve the doNotValidateAssociations Hint Option.
Definition: CopyAssignmentOptions.h:170
bool ignoreMissingChildren() const
Methods to set and retrieve the ignoreMissingChildren Option.
Definition: CopyAssignmentOptions.h:198
void setCopyUUID(bool val)
Methods to set and retrieve the copyUUID Option.
Definition: CopyAssignmentOptions.h:56
void setPerformAssignment(bool val)
Methods to set and retrieve the performAssignment Option.
Definition: CopyAssignmentOptions.h:46
void setDoNotValidateReferenceInfo(bool val)
Methods to set and retrieve the doNotValidateReferenceInfo Hint Option.
Definition: CopyAssignmentOptions.h:237
Class used to control how an attribute's information is assigned to another attribute.
Definition: CopyAssignmentOptions.h:123
bool copyAssociations() const
Methods to set and retrieve the copyAssociations Option.
Definition: CopyAssignmentOptions.h:148
std::unordered_map< smtk::common::UUID, smtk::resource::PersistentObject * > ObjectMapType
A type alias for the container holding the UUID translation table.
Definition: CopyAssignmentOptions.h:89
bool performAssignment() const
Methods to set and retrieve the performAssignment Option.
Definition: CopyAssignmentOptions.h:45
bool copyUUID() const
Methods to set and retrieve the copyUUID Option.
Definition: CopyAssignmentOptions.h:55
bool doNotValidateAssociations() const
Methods to set and retrieve the doNotValidateAssociations Hint Option.
Definition: CopyAssignmentOptions.h:169
void setCopyDefinition(bool val)
Methods to set and retrieve the copyDefinition Option.
Definition: CopyAssignmentOptions.h:68
bool disableCopyAttributes() const
Methods to set and retrieve the disableCopyAttributes Option.
Definition: CopyAssignmentOptions.h:255
void setAllowPartialValues(bool val)
Methods to set and retrieve the allowPartialValues Option.
Definition: CopyAssignmentOptions.h:209
Class used to control how an attribute is to be copied.
Definition: CopyAssignmentOptions.h:36
bool allowPartialValues() const
Methods to set and retrieve the allowPartialValues Option.
Definition: CopyAssignmentOptions.h:208
bool doNotValidateReferenceInfo() const
Methods to set and retrieve the doNotValidateReferenceInfo Hint Option.
Definition: CopyAssignmentOptions.h:236
ObjectType * targetObjectFromSourceId(const smtk::common::UUID &sourceId) const
A convenience to fetch an entry from object mapping (if set), casting it to the given type.
Definition: CopyAssignmentOptions.h:99
Class that represents functionality common to both attribute and item assignments.
Definition: CopyAssignmentOptions.h:85