You are here: Metadata Support > The Metadata Record

## The Metadata Record

A single key/value pair is represented by the `LTIMetadataRecord` class. This class has several properties:

- tag name
- datatype
- dimension information (number of dimensions and dimension array)
- data pointer

The tag name is represented as an ASCII string. The well-known strings (those for common metadata tags) have corresponding values in the `LTIMetadataTag` enum. Either form may be used for most metadata operations.

The dimension information describes the “shape” of the data element(s), which is pointed to with a `void*` pointer.

- If the data is a single value (scalar), the number of dimensions is 1 and the dimension array is a one-element vector whose entry is one, i.e. `int dims[1] = { 1` }.
- If the data is a vector of values, the number of dimensions is 1 and the dimension array is a one-element vector whose entry is the number of the values, i.e.`int dims[1] = { 10 }` for a 10-element data record.
- If the data is an arbitrary vector of values, the number of dimensions is n and the dimension array is an N-element vector whose entries are the lengths of each dimension, i.e. `int dims[2] = { 4,5 }` for a 20-element data record formatted as a 4x5 array of values.

In all cases, the data values will all have the same data type. The `void*` pointer is cast to the appropriate type and dereferenced accordingly to access the true value.

The `LTIMetadataRecord` class contains a number of helper functions to get and set the data values.

The class `LTIMetadataDumper` can be used to pretty print a metadata record as a development and debugging aid.