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

Class used to control how an attribute is to be copied. More...

#include <CopyAssignmentOptions.h>

Public Member Functions

std::string convertToString (const std::string &prefix="") const
 Converts the current option state into a string that is prefixed by prefix.
 
bool performAssignment () const
 Methods to set and retrieve the performAssignment Option. More...
 
void setPerformAssignment (bool val)
 Methods to set and retrieve the performAssignment Option. More...
 
bool copyUUID () const
 Methods to set and retrieve the copyUUID Option. More...
 
void setCopyUUID (bool val)
 Methods to set and retrieve the copyUUID Option. More...
 
bool copyDefinition () const
 Methods to set and retrieve the copyDefinition Option. More...
 
void setCopyDefinition (bool val)
 Methods to set and retrieve the copyDefinition Option. More...
 

Protected Attributes

bool m_copyUUID = false
 
bool m_copyDefinition = false
 
bool m_performAssignment = true
 

Detailed Description

Class used to control how an attribute is to be copied.

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

Member Function Documentation

◆ copyDefinition()

bool smtk::attribute::AttributeCopyOptions::copyDefinition ( ) const
inline

Methods to set and retrieve the copyDefinition Option.

If set, this indicates that if the source attribute's definition (by typename) does not exist in the resource making the copy, then copy the definition as well. This can recursively cause other definitions to be copied. Note : the copying process will fail if this option is not set and the source attribute definition's typename does not exist in the targeted resource.

◆ copyUUID()

bool smtk::attribute::AttributeCopyOptions::copyUUID ( ) const
inline

Methods to set and retrieve the copyUUID Option.

If set, this indicates that copied attributes should have the same UUID as the original. Note : the copying process will fail if the copied attribute would reside in the same resource as the original.

◆ performAssignment()

bool smtk::attribute::AttributeCopyOptions::performAssignment ( ) const
inline

Methods to set and retrieve the performAssignment Option.

If set, this indicates that copied attributes be assigned the values of the original. Note : If not set then all of the items in the copied Attribute will not be assigned including the Attribute's Associations

◆ setCopyDefinition()

void smtk::attribute::AttributeCopyOptions::setCopyDefinition ( bool  val)
inline

Methods to set and retrieve the copyDefinition Option.

If set, this indicates that if the source attribute's definition (by typename) does not exist in the resource making the copy, then copy the definition as well. This can recursively cause other definitions to be copied. Note : the copying process will fail if this option is not set and the source attribute definition's typename does not exist in the targeted resource.

◆ setCopyUUID()

void smtk::attribute::AttributeCopyOptions::setCopyUUID ( bool  val)
inline

Methods to set and retrieve the copyUUID Option.

If set, this indicates that copied attributes should have the same UUID as the original. Note : the copying process will fail if the copied attribute would reside in the same resource as the original.

◆ setPerformAssignment()

void smtk::attribute::AttributeCopyOptions::setPerformAssignment ( bool  val)
inline

Methods to set and retrieve the performAssignment Option.

If set, this indicates that copied attributes be assigned the values of the original. Note : If not set then all of the items in the copied Attribute will not be assigned including the Attribute's Associations


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