SurgSim::DataStructures::DataGroupBuilder Class Reference

A class that allows you to build a DataGroup structure. More...

`#include <SurgSim/DataStructures/DataGroupBuilder.h>`

## Public Types

typedef DataGroup::PoseType | PoseType
| The type used for poses. More...
typedef DataGroup::VectorType | VectorType
| The type used for vectors. More...
typedef DataGroup::DynamicMatrixType | DynamicMatrixType
| The type used for matrices. More...
typedef DataGroup::ScalarType | ScalarType
| The type used for scalars. More...
typedef DataGroup::IntegerType | IntegerType
| The type used for integers. More...
typedef DataGroup::BooleanType | BooleanType
| The type used for booleans. More...
typedef DataGroup::StringType | StringType
| The type used for strings. More...
typedef Image< float > | ImageType
| The type used for images. More...

## Public Member Functions

| DataGroupBuilder ()
| Constructs an empty builder object. More...
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...

## Private Member Functions

| DataGroupBuilder (const DataGroupBuilder &)
DataGroupBuilder & | operator= (const DataGroupBuilder &)

## Private Attributes

NamedDataBuilder< PoseType > | m_poses
| The subsidiary builder used for pose values. More...
NamedDataBuilder< VectorType > | m_vectors
| The subsidiary builder used for vector values. More...
NamedDataBuilder< DynamicMatrixType > | m_matrices
| The subsidiary builder used for matrix values. More...
NamedDataBuilder< ScalarType > | m_scalars
| The subsidiary builder used for scalar values. More...
NamedDataBuilder< IntegerType > | m_integers
| The subsidiary builder used for integer values. More...
NamedDataBuilder< BooleanType > | m_booleans
| The subsidiary builder used for boolean values. More...
NamedDataBuilder< StringType > | m_strings
| The subsidiary builder used for string values. More...
NamedDataBuilder< ImageType > | m_images
| The subsidiary builder used for image values. More...
NamedVariantDataBuilder | m_customData
| The subsidiary builder used for custom data. More...

## Detailed Description

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

See also
  DataGroup

## Member Typedef Documentation

## BooleanType

typedef DataGroup::BooleanType SurgSim::DataStructures::DataGroupBuilder::BooleanType

The type used for booleans.

## DynamicMatrixType

typedef DataGroup::DynamicMatrixType SurgSim::DataStructures::DataGroupBuilder::DynamicMatrixType

The type used for matrices.

## ImageType

typedef Image<float> SurgSim::DataStructures::DataGroupBuilder::ImageType

The type used for images.

## IntegerType

typedef DataGroup::IntegerType SurgSim::DataStructures::DataGroupBuilder::IntegerType

The type used for integers.

## PoseType

typedef DataGroup::PoseType SurgSim::DataStructures::DataGroupBuilder::PoseType

The type used for poses.

## ScalarType

typedef DataGroup::ScalarType SurgSim::DataStructures::DataGroupBuilder::ScalarType

The type used for scalars.

## StringType

typedef DataGroup::StringType SurgSim::DataStructures::DataGroupBuilder::StringType

The type used for strings.

## VectorType

typedef DataGroup::VectorType SurgSim::DataStructures::DataGroupBuilder::VectorType

The type used for vectors.

## Constructor & Destructor Documentation

## DataGroupBuilder() [1/2]

SurgSim::DataStructures::DataGroupBuilder::DataGroupBuilder | ( |  | ) |

Constructs an empty builder object.

## DataGroupBuilder() [2/2]

SurgSim::DataStructures::DataGroupBuilder::DataGroupBuilder | ( | const DataGroupBuilder & |  | ) |

private

## Member Function Documentation

## addBoolean()

void SurgSim::DataStructures::DataGroupBuilder::addBoolean | ( | const std::string & | name | ) |

A shortcut for adding a named boolean entry.

Identical to `booleans().addEntry(name)`.

## addCustom()

void SurgSim::DataStructures::DataGroupBuilder::addCustom | ( | const std::string & | name | ) |

A shortcut for adding a named custom data entry.

Identical to `customData().addEntry(name)`.

## addEntriesFrom() [1/2]

void SurgSim::DataStructures::DataGroupBuilder::addEntriesFrom | ( | const DataGroupBuilder & | builder | ) |

Create new entries from another DataGroupBuilder.

Parameters

  builder | The other builder.

## addEntriesFrom() [2/2]

void SurgSim::DataStructures::DataGroupBuilder::addEntriesFrom | ( | const DataGroup & | data | ) |

Create new entries from an already initialized DataGroup.

Parameters

  data | The data object.

## addImage()

void SurgSim::DataStructures::DataGroupBuilder::addImage | ( | const std::string & | name | ) |

A shortcut for adding a named image entry.

Identical to `images().addEntry(name)`.

## addInteger()

void SurgSim::DataStructures::DataGroupBuilder::addInteger | ( | const std::string & | name | ) |

A shortcut for adding a named integer entry.

Identical to `integers().addEntry(name)`.

## addMatrix()

void SurgSim::DataStructures::DataGroupBuilder::addMatrix | ( | const std::string & | name | ) |

A shortcut for adding a named matrix entry.

Identical to `matrices().addEntry(name)`.

## addPose()

void SurgSim::DataStructures::DataGroupBuilder::addPose | ( | const std::string & | name | ) |

A shortcut for adding a named pose entry.

Identical to `poses().addEntry(name)`.

## addScalar()

void SurgSim::DataStructures::DataGroupBuilder::addScalar | ( | const std::string & | name | ) |

A shortcut for adding a named scalar entry.

Identical to `scalars().addEntry(name)`.

## addString()

void SurgSim::DataStructures::DataGroupBuilder::addString | ( | const std::string & | name | ) |

A shortcut for adding a named string entry.

Identical to `strings().addEntry(name)`.

## addVector()

void SurgSim::DataStructures::DataGroupBuilder::addVector | ( | const std::string & | name | ) |

A shortcut for adding a named vector entry.

Identical to `vectors().addEntry(name)`.

## booleans() [1/2]

NamedDataBuilder< DataGroupBuilder::BooleanType > & SurgSim::DataStructures::DataGroupBuilder::booleans | ( |  | ) |

Provides access to the Boolean value entries.

Returns
  a writable reference to the sub-object that contains Boolean value entries.

## booleans() [2/2]

const NamedDataBuilder< DataGroupBuilder::BooleanType > & SurgSim::DataStructures::DataGroupBuilder::booleans | ( |  | ) | const

Provides access to the Boolean value entries.

Returns
  a read-only reference to the sub-object that contains Boolean value entries.

## createData()

DataGroup SurgSim::DataStructures::DataGroupBuilder::createData | ( |  | ) | const

Produces a DataGroup object with an immutable set of names and indices.

None of the values will contain any current data.

Returns
  the DataGroup object by value.

## createSharedData()

std::shared_ptr< DataGroup > SurgSim::DataStructures::DataGroupBuilder::createSharedData | ( |  | ) | const

Produce a shared pointer to an empty DataGroup object with an immutable set of names and indices.

None of the values will contain any current data.

Returns
  a shared pointer to the DataGroup object.

## customData() [1/2]

NamedVariantDataBuilder & SurgSim::DataStructures::DataGroupBuilder::customData | ( |  | ) |

Provides access to the custom data entries.

Returns
  a writable reference to the sub-object that contains custom data entries.

## customData() [2/2]

const NamedVariantDataBuilder & SurgSim::DataStructures::DataGroupBuilder::customData | ( |  | ) | const

Provides access to the custom data entries.

Returns
  a read-only reference to the sub-object that contains custom data entries.

## images() [1/2]

NamedDataBuilder< DataGroupBuilder::ImageType > & SurgSim::DataStructures::DataGroupBuilder::images | ( |  | ) |

Provides access to the image value entries.

Returns
  a writable reference to the sub-object that contains image value entries.

## images() [2/2]

const NamedDataBuilder< DataGroupBuilder::ImageType > & SurgSim::DataStructures::DataGroupBuilder::images | ( |  | ) | const

Provides access to the image value entries.

Returns
  a read-only reference to the sub-object that contains image value entries.

## integers() [1/2]

NamedDataBuilder< DataGroupBuilder::IntegerType > & SurgSim::DataStructures::DataGroupBuilder::integers | ( |  | ) |

Provides access to the integer value entries.

Returns
  a writable reference to the sub-object that contains integer value entries.

## integers() [2/2]

const NamedDataBuilder< DataGroupBuilder::IntegerType > & SurgSim::DataStructures::DataGroupBuilder::integers | ( |  | ) | const

Provides access to the integer value entries.

Returns
  a read-only reference to the sub-object that contains integer value entries.

## matrices() [1/2]

NamedDataBuilder< DataGroupBuilder::DynamicMatrixType > & SurgSim::DataStructures::DataGroupBuilder::matrices | ( |  | ) |

Provides access to the matrix value entries.

Returns
  a writable reference to the sub-object that contains matrix value entries.

## matrices() [2/2]

const NamedDataBuilder< DataGroupBuilder::DynamicMatrixType > & SurgSim::DataStructures::DataGroupBuilder::matrices | ( |  | ) | const

Provides access to the matrix value entries.

Returns
  a read-only reference to the sub-object that contains matrix value entries.

## operator=()

DataGroupBuilder& SurgSim::DataStructures::DataGroupBuilder::operator= | ( | const DataGroupBuilder & |  | ) |

private

## poses() [1/2]

NamedDataBuilder< DataGroupBuilder::PoseType > & SurgSim::DataStructures::DataGroupBuilder::poses | ( |  | ) |

Provides access to the pose value entries.

Returns
  a writable reference to the sub-object that contains pose value entries.

## poses() [2/2]

const NamedDataBuilder< DataGroupBuilder::PoseType > & SurgSim::DataStructures::DataGroupBuilder::poses | ( |  | ) | const

Provides access to the pose value entries.

Returns
  a read-only reference to the sub-object that contains pose value entries.

## scalars() [1/2]

NamedDataBuilder< DataGroupBuilder::ScalarType > & SurgSim::DataStructures::DataGroupBuilder::scalars | ( |  | ) |

Provides access to the scalar value entries.

Returns
  a writable reference to the sub-object that contains scalar value entries.

## scalars() [2/2]

const NamedDataBuilder< DataGroupBuilder::ScalarType > & SurgSim::DataStructures::DataGroupBuilder::scalars | ( |  | ) | const

Provides access to the scalar value entries.

Returns
  a read-only reference to the sub-object that contains scalar value entries.

## strings() [1/2]

NamedDataBuilder< DataGroupBuilder::StringType > & SurgSim::DataStructures::DataGroupBuilder::strings | ( |  | ) |

Provides access to the string value entries.

Returns
  a writable reference to the sub-object that contains string value entries.

## strings() [2/2]

const NamedDataBuilder< DataGroupBuilder::StringType > & SurgSim::DataStructures::DataGroupBuilder::strings | ( |  | ) | const

Provides access to the string value entries.

Returns
  a read-only reference to the sub-object that contains string value entries.

## vectors() [1/2]

NamedDataBuilder< DataGroupBuilder::VectorType > & SurgSim::DataStructures::DataGroupBuilder::vectors | ( |  | ) |

Provides access to the vector value entries.

Returns
  a writable reference to the sub-object that contains vector value entries.

## vectors() [2/2]

const NamedDataBuilder< DataGroupBuilder::VectorType > & SurgSim::DataStructures::DataGroupBuilder::vectors | ( |  | ) | const

Provides access to the vector value entries.

Returns
  a read-only reference to the sub-object that contains vector value entries.

## Member Data Documentation

## m_booleans

NamedDataBuilder<BooleanType> SurgSim::DataStructures::DataGroupBuilder::m_booleans

private

The subsidiary builder used for boolean values.

## m_customData

NamedVariantDataBuilder SurgSim::DataStructures::DataGroupBuilder::m_customData

private

The subsidiary builder used for custom data.

## m_images

NamedDataBuilder<ImageType> SurgSim::DataStructures::DataGroupBuilder::m_images

private

The subsidiary builder used for image values.

## m_integers

NamedDataBuilder<IntegerType> SurgSim::DataStructures::DataGroupBuilder::m_integers

private

The subsidiary builder used for integer values.

## m_matrices

NamedDataBuilder<DynamicMatrixType> SurgSim::DataStructures::DataGroupBuilder::m_matrices

private

The subsidiary builder used for matrix values.

## m_poses

NamedDataBuilder<PoseType> SurgSim::DataStructures::DataGroupBuilder::m_poses

private

The subsidiary builder used for pose values.

## m_scalars

NamedDataBuilder<ScalarType> SurgSim::DataStructures::DataGroupBuilder::m_scalars

private

The subsidiary builder used for scalar values.

## m_strings

NamedDataBuilder<StringType> SurgSim::DataStructures::DataGroupBuilder::m_strings

private

The subsidiary builder used for string values.

## m_vectors

NamedDataBuilder<VectorType> SurgSim::DataStructures::DataGroupBuilder::m_vectors

private

The subsidiary builder used for vector values.

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

- SurgSim/DataStructures/DataGroupBuilder.h
- SurgSim/DataStructures/DataGroupBuilder.cpp