| GL Studio C++ Runtime API

Public Member Functions | List of all members
AttributeName Class Reference

`#include <disti_metadata.h>`

## Public Member Functions
| AttributeName (const std::string &name)
| AttributeName (const char *name)
| AttributeName (long stringIndex)
| AttributeName (const AttributeName &other)
AttributeName & | operator= (const AttributeName &other)
long | StringIndex () const
| operator std::string () const
| Defines the cast operator to make this look like a std::string for reading.

## Detailed Description

AttributeName class can be treated like a std::string in some instances It creates static storage for any referenced name. This results in only one copy for each name which saves memory Very fast comparison between references to names

## Constructor & Destructor Documentation

## ◆ AttributeName() [1/4]

AttributeName | ( | const std::string & | name | ) |
| explicit

Constructor Explicit because construction of an AttributeName is an expensive operation. If possible you should use a static AttrbuteName object rather than constructing a new one each time it is needed.

Parameters

  name | The desired name.

## ◆ AttributeName() [2/4]

AttributeName | ( | const char * | name | ) |
| explicit

Constructor See comments on AttributeName(const std::string &name)

Parameters

  name | The desired name.

## ◆ AttributeName() [3/4]

AttributeName | ( | long | stringIndex | ) |
| explicit

Constructor

Parameters

  stringIndex | The index into the string map.

## ◆ AttributeName() [4/4]

AttributeName | ( | const AttributeName & | other | ) |
| inline

Copy constructor

Parameters

  other | The object to copy from.

## Member Function Documentation

## ◆ operator=()

AttributeName & operator= | ( | const AttributeName & | other | ) |
| inline

Copy assignment operator

Parameters

  other | The object to copy from.

Returns
  The resulting object (this).

## ◆ StringIndex()

long StringIndex | ( |  | ) | const
| inline

Returns
  The index to the string associate with this instance.

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

- disti_metadata.h