SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Class used to control how an attribute's information is assigned to another attribute. More...
#include <CopyAssignmentOptions.h>
Public Types | |
using | ObjectMapType = std::unordered_map< smtk::common::UUID, smtk::resource::PersistentObject * > |
A type alias for the container holding the UUID translation table. | |
Public Types inherited from smtk::attribute::CommonAssignmentOptions | |
using | ObjectMapType = std::unordered_map< smtk::common::UUID, smtk::resource::PersistentObject * > |
A type alias for the container holding the UUID translation table. | |
Public Member Functions | |
std::string | convertToString (const std::string &prefix="") const override |
bool | ignoreMissingItems () const |
Methods to set and retrieve the ignoreMissingItems Option. More... | |
void | setIgnoreMissingItems (bool val) |
Methods to set and retrieve the ignoreMissingItems Option. More... | |
bool | copyAssociations () const |
Methods to set and retrieve the copyAssociations Option. More... | |
void | setCopyAssociations (bool val) |
Methods to set and retrieve the copyAssociations Option. More... | |
bool | allowPartialAssociations () const |
Methods to set and retrieve the allowPartialAssociations Option. More... | |
void | setAllowPartialAssociations (bool val) |
Methods to set and retrieve the allowPartialAssociations Option. More... | |
bool | doNotValidateAssociations () const |
Methods to set and retrieve the doNotValidateAssociations Hint Option. More... | |
void | setDoNotValidateAssociations (bool val) |
Methods to set and retrieve the doNotValidateAssociations Hint Option. More... | |
Public Member Functions inherited from smtk::attribute::CommonAssignmentOptions | |
void | setObjectMapping (ObjectMapType *val) |
const ObjectMapType * | objectMapping () const |
template<typename ObjectType > | |
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. More... | |
Protected Attributes | |
bool | m_ignoreMissingItems = false |
bool | m_copyAssociations = false |
bool | m_allowPartialAssociations = false |
bool | m_doNotValidateAssociations = false |
Protected Attributes inherited from smtk::attribute::CommonAssignmentOptions | |
ObjectMapType * | m_objectMapping = nullptr |
Class used to control how an attribute's information is assigned to another attribute.
This is primarily used by smtk::attribute::Attribute::assign but can be also indirectly by smtk::attribute::Resource::copyAttribute and smtk::attribute::Item::assign.
|
inline |
Methods to set and retrieve the allowPartialAssociations Option.
Assuming that copyAssociations option is set, if the allowPartialAssociations ** is not set ** then all of the source's associations must be associated to the target attribute, else the assignment process will return failure.
|
inline |
Methods to set and retrieve the copyAssociations Option.
If set, this indicates that the source attribute's associations should be copied to the target attribute which will also take into consideration allowPartialAssociations and doNotValidateAssociations options.
|
inline |
Methods to set and retrieve the doNotValidateAssociations Hint Option.
Assuming that copyAssociations option is set, the doNotValidateAssociations hint indicates that if it possible to assign the association information without accessing the corresponding persistent object, then do so without validation.
|
inline |
Methods to set and retrieve the ignoreMissingItems Option.
If set, this indicates that not all of the source attribute's items must exist in the target attribute. This can occur if the target attribute's definition is a variation of the source attribute's.
Note : the assignment process will fail if this option is not set and if not all of the source attribute's items are not present in the target.
|
inline |
Methods to set and retrieve the allowPartialAssociations Option.
Assuming that copyAssociations option is set, if the allowPartialAssociations ** is not set ** then all of the source's associations must be associated to the target attribute, else the assignment process will return failure.
|
inline |
Methods to set and retrieve the copyAssociations Option.
If set, this indicates that the source attribute's associations should be copied to the target attribute which will also take into consideration allowPartialAssociations and doNotValidateAssociations options.
|
inline |
Methods to set and retrieve the doNotValidateAssociations Hint Option.
Assuming that copyAssociations option is set, the doNotValidateAssociations hint indicates that if it possible to assign the association information without accessing the corresponding persistent object, then do so without validation.
|
inline |
Methods to set and retrieve the ignoreMissingItems Option.
If set, this indicates that not all of the source attribute's items must exist in the target attribute. This can occur if the target attribute's definition is a variation of the source attribute's.
Note : the assignment process will fail if this option is not set and if not all of the source attribute's items are not present in the target.