opensurgsim
|
A class that allows you to build a DataGroup structure. More...
#include <DataGroupBuilder.h>
Public Types | |
typedef DataGroup::PoseType | PoseType |
The type used for poses. | |
typedef DataGroup::VectorType | VectorType |
The type used for vectors. | |
typedef DataGroup::DynamicMatrixType | DynamicMatrixType |
The type used for matrices. | |
typedef DataGroup::ScalarType | ScalarType |
The type used for scalars. | |
typedef DataGroup::IntegerType | IntegerType |
The type used for integers. | |
typedef DataGroup::BooleanType | BooleanType |
The type used for booleans. | |
typedef DataGroup::StringType | StringType |
The type used for strings. | |
typedef Image< float > | ImageType |
The type used for images. | |
Public Member Functions | |
DataGroupBuilder () | |
Constructs an empty builder object. | |
DataGroup | createData () const |
Produces a DataGroup object with an immutable set of names and indices. More... | |
std::shared_ptr< DataGroup > | createSharedData () const |
Produce a shared pointer to an empty DataGroup object with an immutable set of names and indices. More... | |
NamedDataBuilder< PoseType > & | poses () |
Provides access to the pose value entries. More... | |
const NamedDataBuilder< PoseType > & | poses () const |
Provides access to the pose value entries. More... | |
NamedDataBuilder< VectorType > & | vectors () |
Provides access to the vector value entries. More... | |
const NamedDataBuilder< VectorType > & | vectors () const |
Provides access to the vector value entries. More... | |
NamedDataBuilder< DynamicMatrixType > & | matrices () |
Provides access to the matrix value entries. More... | |
const NamedDataBuilder< DynamicMatrixType > & | matrices () const |
Provides access to the matrix value entries. More... | |
NamedDataBuilder< ScalarType > & | scalars () |
Provides access to the scalar value entries. More... | |
const NamedDataBuilder< ScalarType > & | scalars () const |
Provides access to the scalar value entries. More... | |
NamedDataBuilder< IntegerType > & | integers () |
Provides access to the integer value entries. More... | |
const NamedDataBuilder< IntegerType > & | integers () const |
Provides access to the integer value entries. More... | |
NamedDataBuilder< BooleanType > & | booleans () |
Provides access to the Boolean value entries. More... | |
const NamedDataBuilder< BooleanType > & | booleans () const |
Provides access to the Boolean value entries. More... | |
NamedDataBuilder< StringType > & | strings () |
Provides access to the string value entries. More... | |
const NamedDataBuilder< StringType > & | strings () const |
Provides access to the string value entries. More... | |
NamedDataBuilder< ImageType > & | images () |
Provides access to the image value entries. More... | |
const NamedDataBuilder< ImageType > & | images () const |
Provides access to the image value entries. More... | |
NamedVariantDataBuilder & | customData () |
Provides access to the custom data entries. More... | |
const NamedVariantDataBuilder & | customData () const |
Provides access to the custom data entries. More... | |
void | addPose (const std::string &name) |
A shortcut for adding a named pose entry. More... | |
void | addVector (const std::string &name) |
A shortcut for adding a named vector entry. More... | |
void | addMatrix (const std::string &name) |
A shortcut for adding a named matrix entry. More... | |
void | addScalar (const std::string &name) |
A shortcut for adding a named scalar entry. More... | |
void | addInteger (const std::string &name) |
A shortcut for adding a named integer entry. More... | |
void | addBoolean (const std::string &name) |
A shortcut for adding a named boolean entry. More... | |
void | addString (const std::string &name) |
A shortcut for adding a named string entry. More... | |
void | addImage (const std::string &name) |
A shortcut for adding a named image entry. More... | |
void | addCustom (const std::string &name) |
A shortcut for adding a named custom data entry. More... | |
void | addEntriesFrom (const DataGroupBuilder &builder) |
Create new entries from another DataGroupBuilder. More... | |
void | addEntriesFrom (const DataGroup &data) |
Create new entries from an already initialized DataGroup. More... | |
A class that allows you to build a DataGroup structure.
Since the data layout of a DataGroup object cannot be modified, this class is helpful in initially setting up the names and their corresponding indices. You can add entries to the builder using the addPose, addVector, addScalar, addInteger, addBoolean, addString, and addEntriesFrom calls, or using similar calls on one of the type-specific element groups; and then create the DataGroup instance with createData() or createSharedData().
void SurgSim::DataStructures::DataGroupBuilder::addBoolean | ( | const std::string & | name | ) |
A shortcut for adding a named boolean entry.
Identical to booleans().addEntry(name)
.
void SurgSim::DataStructures::DataGroupBuilder::addCustom | ( | const std::string & | name | ) |
A shortcut for adding a named custom data entry.
Identical to customData().addEntry(name)
.
void SurgSim::DataStructures::DataGroupBuilder::addEntriesFrom | ( | const DataGroupBuilder & | builder | ) |
Create new entries from another DataGroupBuilder.
builder | The other builder. |
void SurgSim::DataStructures::DataGroupBuilder::addEntriesFrom | ( | const DataGroup & | data | ) |
Create new entries from an already initialized DataGroup.
data | The data object. |
void SurgSim::DataStructures::DataGroupBuilder::addImage | ( | const std::string & | name | ) |
A shortcut for adding a named image entry.
Identical to images().addEntry(name)
.
void SurgSim::DataStructures::DataGroupBuilder::addInteger | ( | const std::string & | name | ) |
A shortcut for adding a named integer entry.
Identical to integers().addEntry(name)
.
void SurgSim::DataStructures::DataGroupBuilder::addMatrix | ( | const std::string & | name | ) |
A shortcut for adding a named matrix entry.
Identical to matrices().addEntry(name)
.
void SurgSim::DataStructures::DataGroupBuilder::addPose | ( | const std::string & | name | ) |
A shortcut for adding a named pose entry.
Identical to poses().addEntry(name)
.
void SurgSim::DataStructures::DataGroupBuilder::addScalar | ( | const std::string & | name | ) |
A shortcut for adding a named scalar entry.
Identical to scalars().addEntry(name)
.
void SurgSim::DataStructures::DataGroupBuilder::addString | ( | const std::string & | name | ) |
A shortcut for adding a named string entry.
Identical to strings().addEntry(name)
.
void SurgSim::DataStructures::DataGroupBuilder::addVector | ( | const std::string & | name | ) |
A shortcut for adding a named vector entry.
Identical to vectors().addEntry(name)
.
NamedDataBuilder< DataGroupBuilder::BooleanType > & SurgSim::DataStructures::DataGroupBuilder::booleans | ( | ) |
Provides access to the Boolean value entries.
const NamedDataBuilder< DataGroupBuilder::BooleanType > & SurgSim::DataStructures::DataGroupBuilder::booleans | ( | ) | const |
Provides access to the Boolean value entries.
DataGroup SurgSim::DataStructures::DataGroupBuilder::createData | ( | ) | const |
std::shared_ptr< DataGroup > SurgSim::DataStructures::DataGroupBuilder::createSharedData | ( | ) | const |
NamedVariantDataBuilder & SurgSim::DataStructures::DataGroupBuilder::customData | ( | ) |
Provides access to the custom data entries.
const NamedVariantDataBuilder & SurgSim::DataStructures::DataGroupBuilder::customData | ( | ) | const |
Provides access to the custom data entries.
NamedDataBuilder< DataGroupBuilder::ImageType > & SurgSim::DataStructures::DataGroupBuilder::images | ( | ) |
Provides access to the image value entries.
const NamedDataBuilder< DataGroupBuilder::ImageType > & SurgSim::DataStructures::DataGroupBuilder::images | ( | ) | const |
Provides access to the image value entries.
NamedDataBuilder< DataGroupBuilder::IntegerType > & SurgSim::DataStructures::DataGroupBuilder::integers | ( | ) |
Provides access to the integer value entries.
const NamedDataBuilder< DataGroupBuilder::IntegerType > & SurgSim::DataStructures::DataGroupBuilder::integers | ( | ) | const |
Provides access to the integer value entries.
NamedDataBuilder< DataGroupBuilder::DynamicMatrixType > & SurgSim::DataStructures::DataGroupBuilder::matrices | ( | ) |
Provides access to the matrix value entries.
const NamedDataBuilder< DataGroupBuilder::DynamicMatrixType > & SurgSim::DataStructures::DataGroupBuilder::matrices | ( | ) | const |
Provides access to the matrix value entries.
NamedDataBuilder< DataGroupBuilder::PoseType > & SurgSim::DataStructures::DataGroupBuilder::poses | ( | ) |
Provides access to the pose value entries.
const NamedDataBuilder< DataGroupBuilder::PoseType > & SurgSim::DataStructures::DataGroupBuilder::poses | ( | ) | const |
Provides access to the pose value entries.
NamedDataBuilder< DataGroupBuilder::ScalarType > & SurgSim::DataStructures::DataGroupBuilder::scalars | ( | ) |
Provides access to the scalar value entries.
const NamedDataBuilder< DataGroupBuilder::ScalarType > & SurgSim::DataStructures::DataGroupBuilder::scalars | ( | ) | const |
Provides access to the scalar value entries.
NamedDataBuilder< DataGroupBuilder::StringType > & SurgSim::DataStructures::DataGroupBuilder::strings | ( | ) |
Provides access to the string value entries.
const NamedDataBuilder< DataGroupBuilder::StringType > & SurgSim::DataStructures::DataGroupBuilder::strings | ( | ) | const |
Provides access to the string value entries.
NamedDataBuilder< DataGroupBuilder::VectorType > & SurgSim::DataStructures::DataGroupBuilder::vectors | ( | ) |
Provides access to the vector value entries.
const NamedDataBuilder< DataGroupBuilder::VectorType > & SurgSim::DataStructures::DataGroupBuilder::vectors | ( | ) | const |
Provides access to the vector value entries.