AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::sina::internal::IDField Class Reference

An object representing a pair of ID fields. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/sina/core/ID.hpp>

Public Member Functions

 IDField (ID value, std::string localName, std::string globalName)
 Construct a new IDField. More...
 
 IDField (conduit::Node const &parentObject, std::string localName, std::string globalName)
 Construct an IDField by looking for its values in a conduit Node. More...
 
ID const & getID () const noexcept
 Get the value of this field. More...
 
std::string const & getLocalName () const noexcept
 Get the name to use for this field when the ID is local. More...
 
std::string const & getGlobalName () const noexcept
 Get the name to use for this field when the ID is global. More...
 
void addTo (conduit::Node &object) const
 Add this field to the given Node. More...
 

Detailed Description

An object representing a pair of ID fields.

IDField instances are used to describe a pair of ID fields in a schema object which correspond to global and local names for the field. For example, the "id" and "local_id" fields in records, or the "subject"/"local_subject" and "object"/"local_object" pairs in relationships.

Constructor & Destructor Documentation

◆ IDField() [1/2]

axom::sina::internal::IDField::IDField ( ID  value,
std::string  localName,
std::string  globalName 
)

Construct a new IDField.

Parameters
valuethe value of the ID
localNamethe name of the local variant of the field
globalNamethe name of the global variant of the field

◆ IDField() [2/2]

axom::sina::internal::IDField::IDField ( conduit::Node const &  parentObject,
std::string  localName,
std::string  globalName 
)

Construct an IDField by looking for its values in a conduit Node.

Parameters
parentObjectthe conduit Node containing the ID field
localNamethe local name of the field
globalNamethe global name of the field

Member Function Documentation

◆ getID()

ID const& axom::sina::internal::IDField::getID ( ) const
inlinenoexcept

Get the value of this field.

Returns
the ID describing the field's value

◆ getLocalName()

std::string const& axom::sina::internal::IDField::getLocalName ( ) const
inlinenoexcept

Get the name to use for this field when the ID is local.

Returns
the name of the local ID field

◆ getGlobalName()

std::string const& axom::sina::internal::IDField::getGlobalName ( ) const
inlinenoexcept

Get the name to use for this field when the ID is global.

Returns
the name of the global ID field

◆ addTo()

void axom::sina::internal::IDField::addTo ( conduit::Node &  object) const

Add this field to the given Node.

Parameters
objectthe Node to which to add the field

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