SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | Protected Attributes | List of all members
smtk::attribute::ItemAssignmentOptions Class Reference

Class used to control how an item's information is assigned to another item. More...

#include <CopyAssignmentOptions.h>

Inheritance diagram for smtk::attribute::ItemAssignmentOptions:
[legend]
Collaboration diagram for smtk::attribute::ItemAssignmentOptions:
[legend]

Public Member Functions

std::string convertToString (const std::string &prefix="") const override
 Converts the current option state into a string that is prefixed by prefix.
 
bool ignoreMissingChildren () const
 Methods to set and retrieve the ignoreMissingChildren Option. More...
 
void setIgnoreMissingChildren (bool val)
 Methods to set and retrieve the ignoreMissingChildren Option. More...
 
bool allowPartialValues () const
 Methods to set and retrieve the allowPartialValues Option. More...
 
void setAllowPartialValues (bool val)
 Methods to set and retrieve the allowPartialValues Option. More...
 
bool ignoreExpressions () const
 Methods to set and retrieve the ignoreExpressions Option. More...
 
void setIgnoreExpressions (bool val)
 Methods to set and retrieve the ignoreExpressions Option. More...
 
bool ignoreReferenceValues () const
 Methods to set and retrieve the ignoreReferenceValues Option. More...
 
void setIgnoreReferenceValues (bool val)
 Methods to set and retrieve the ignoreReferenceValues Option. More...
 
bool doNotValidateReferenceInfo () const
 Methods to set and retrieve the doNotValidateReferenceInfo Hint Option. More...
 
void setDoNotValidateReferenceInfo (bool val)
 Methods to set and retrieve the doNotValidateReferenceInfo Hint Option. More...
 
bool disableCopyAttributes () const
 Methods to set and retrieve the disableCopyAttributes Option. More...
 
void setDisableCopyAttributes (bool val)
 Methods to set and retrieve the disableCopyAttributes Option. More...
 
- Public Member Functions inherited from smtk::attribute::CommonAssignmentOptions
void setObjectMapping (ObjectMapType *val)
 
const ObjectMapTypeobjectMapping () 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_ignoreMissingChildren = false
 
bool m_allowPartialValues = false
 
bool m_ignoreExpressions = false
 
bool m_ignoreReferenceValues = false
 
bool m_doNotValidateReferenceInfo = false
 
bool m_disableCopyAttributes = false
 
- Protected Attributes inherited from smtk::attribute::CommonAssignmentOptions
ObjectMapTypem_objectMapping = nullptr
 

Additional Inherited Members

- 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.
 

Detailed Description

Class used to control how an item's information is assigned to another item.

This is primarily used by smtk::attribute::Item::assign but can be also indirectly by smtk::attribute::Attribute::assign and smtk::attribute::Resource::copyAttribute.

Member Function Documentation

◆ allowPartialValues()

bool smtk::attribute::ItemAssignmentOptions::allowPartialValues ( ) const
inline

Methods to set and retrieve the allowPartialValues Option.

If set, this indicates that not all of the source item's values must be copied to the target item. If this option ** is not set ** then all of the source item's values must be copied, else the assignment process will return failure.

◆ disableCopyAttributes()

bool smtk::attribute::ItemAssignmentOptions::disableCopyAttributes ( ) const
inline

Methods to set and retrieve the disableCopyAttributes Option.

If set, this indicates that no attributes should be created when doing item assignments. An item assignment can cause an attribute to be created in two situations.

First - A source Value item is set to an expression attribute that resides in the same resource and the target item resides in a different one. In this case the default behavior is to also copy the expression attribute to the target item's resource and assign the copied attribute to the target item.

Second - A source Reference item refers to an attribute that resides in the same resource and the target item resides in a different one. In this case the default behavior is to also copy the referenced attribute to the target item's resource and assign the copied attribute to the target item.

◆ doNotValidateReferenceInfo()

bool smtk::attribute::ItemAssignmentOptions::doNotValidateReferenceInfo ( ) const
inline

Methods to set and retrieve the doNotValidateReferenceInfo Hint Option.

The doNotValidateReferenceInfo hint indicates that if it possible to assign a source Reference item's values to a target item without accessing the corresponding persistent object, then do so without validation.

◆ ignoreExpressions()

bool smtk::attribute::ItemAssignmentOptions::ignoreExpressions ( ) const
inline

Methods to set and retrieve the ignoreExpressions Option.

If set, this indicates that if a source Value item that have been assigned an expression attribute, it's corresponding target item should be left unset.

◆ ignoreMissingChildren()

bool smtk::attribute::ItemAssignmentOptions::ignoreMissingChildren ( ) const
inline

Methods to set and retrieve the ignoreMissingChildren Option.

If set, this indicates that not all of the source item's children items must exist in the target item. This can occur if the target item's definition is a variation of the source item's.

Note : the assignment process will fail if this option is not set and if not all of the source item's children items are not present in the target.

◆ ignoreReferenceValues()

bool smtk::attribute::ItemAssignmentOptions::ignoreReferenceValues ( ) const
inline

Methods to set and retrieve the ignoreReferenceValues Option.

If set, this indicates that a target Reference item should not be assigned the values of the corresponding source item.

◆ setAllowPartialValues()

void smtk::attribute::ItemAssignmentOptions::setAllowPartialValues ( bool  val)
inline

Methods to set and retrieve the allowPartialValues Option.

If set, this indicates that not all of the source item's values must be copied to the target item. If this option ** is not set ** then all of the source item's values must be copied, else the assignment process will return failure.

◆ setDisableCopyAttributes()

void smtk::attribute::ItemAssignmentOptions::setDisableCopyAttributes ( bool  val)
inline

Methods to set and retrieve the disableCopyAttributes Option.

If set, this indicates that no attributes should be created when doing item assignments. An item assignment can cause an attribute to be created in two situations.

First - A source Value item is set to an expression attribute that resides in the same resource and the target item resides in a different one. In this case the default behavior is to also copy the expression attribute to the target item's resource and assign the copied attribute to the target item.

Second - A source Reference item refers to an attribute that resides in the same resource and the target item resides in a different one. In this case the default behavior is to also copy the referenced attribute to the target item's resource and assign the copied attribute to the target item.

◆ setDoNotValidateReferenceInfo()

void smtk::attribute::ItemAssignmentOptions::setDoNotValidateReferenceInfo ( bool  val)
inline

Methods to set and retrieve the doNotValidateReferenceInfo Hint Option.

The doNotValidateReferenceInfo hint indicates that if it possible to assign a source Reference item's values to a target item without accessing the corresponding persistent object, then do so without validation.

◆ setIgnoreExpressions()

void smtk::attribute::ItemAssignmentOptions::setIgnoreExpressions ( bool  val)
inline

Methods to set and retrieve the ignoreExpressions Option.

If set, this indicates that if a source Value item that have been assigned an expression attribute, it's corresponding target item should be left unset.

◆ setIgnoreMissingChildren()

void smtk::attribute::ItemAssignmentOptions::setIgnoreMissingChildren ( bool  val)
inline

Methods to set and retrieve the ignoreMissingChildren Option.

If set, this indicates that not all of the source item's children items must exist in the target item. This can occur if the target item's definition is a variation of the source item's.

Note : the assignment process will fail if this option is not set and if not all of the source item's children items are not present in the target.

◆ setIgnoreReferenceValues()

void smtk::attribute::ItemAssignmentOptions::setIgnoreReferenceValues ( bool  val)
inline

Methods to set and retrieve the ignoreReferenceValues Option.

If set, this indicates that a target Reference item should not be assigned the values of the corresponding source item.


The documentation for this class was generated from the following files: