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

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

#include <CopyAssignmentOptions.h>

Public Member Functions

std::string convertToString (const std::string &prefix="") const
 
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...
 

Protected Attributes

bool m_ignoreMissingItems = false
 
bool m_copyAssociations = false
 
bool m_allowPartialAssociations = false
 
bool m_doNotValidateAssociations = false
 

Detailed Description

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.

Member Function Documentation

◆ allowPartialAssociations()

bool smtk::attribute::AttributeAssignmentOptions::allowPartialAssociations ( ) const
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.

◆ copyAssociations()

bool smtk::attribute::AttributeAssignmentOptions::copyAssociations ( ) const
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.

◆ doNotValidateAssociations()

bool smtk::attribute::AttributeAssignmentOptions::doNotValidateAssociations ( ) const
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.

◆ ignoreMissingItems()

bool smtk::attribute::AttributeAssignmentOptions::ignoreMissingItems ( ) const
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.

◆ setAllowPartialAssociations()

void smtk::attribute::AttributeAssignmentOptions::setAllowPartialAssociations ( bool  val)
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.

◆ setCopyAssociations()

void smtk::attribute::AttributeAssignmentOptions::setCopyAssociations ( bool  val)
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.

◆ setDoNotValidateAssociations()

void smtk::attribute::AttributeAssignmentOptions::setDoNotValidateAssociations ( bool  val)
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.

◆ setIgnoreMissingItems()

void smtk::attribute::AttributeAssignmentOptions::setIgnoreMissingItems ( bool  val)
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.


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