- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Friends

# IndexString Class Reference

Search for all occurrences

## Detailed Description

Index type which uses a String for the index mapping.

This is a more general type of indexing that can only be used in mapping mode since it doesn't make sense to define "all strings between two strings".

`#include <adskDataIndexString.h>`

Inheritance diagram for IndexString:
[legend]

List of all members.

## Public Member Functions
| IndexString (const std::string &stringIndex)
| Conversion constructor.
| IndexString (const IndexString &rhs)
| Copy constructor, simplest level.
virtual | ~IndexString ()
| Default destructor, nothing to do.
virtual IndexString & | operator= (const IndexString &rhs)
| Class assignment operator.
virtual IndexString & | operator= (const std::string &rhs)
| IndexCount assignment operator.
std::string | indexString () const
| Get the string being used as an index.
virtual std::string | asString () const
| Get the IndexString in string form.
virtual bool | supportsDenseMode () const
| Notifies users that this index type cannot be packed densely.
virtual IndexCount | denseSpaceBetween (const IndexType &rhs) const
| Returns 0 to indicate failure since strings cannot be densely packed.
virtual bool | operator== (const IndexType &rhs) const
| Equality operator, checks if this IndexString is the same as another Objects of different types are defined as not equal.
virtual bool | operator!= (const IndexType &rhs) const
| Inequality operator, checks if this IndexString is not the same as another Objects of different types are defined as not equal.
virtual bool | operator< (const IndexType &rhs) const
| Less-than operator, checks if this IndexString is less than another Operator sorts by typeid if the object passed in is not an IndexString.
virtual bool | operator<= (const IndexType &rhs) const
| Less-or-equal operator, checks if this IndexString is <= another Operator sorts by typeid if the object passed in is not an IndexString.
virtual bool | operator> (const IndexType &rhs) const
| Greater-than operator, checks if this IndexString is greater than another Operator sorts by typeid if the object passed in is not an IndexString.
virtual bool | operator>= (const IndexType &rhs) const
| Greater-or-equal operator, checks if this IndexString is >= another Operator sorts by typeid if the object passed in is not an IndexString.
virtual bool | operator== (const IndexString &rhs) const
| Equality operator, checks if this IndexString is the same as another.
virtual bool | operator!= (const IndexString &rhs) const
| Inequality operator, checks if this IndexString is not the same as another.
virtual bool | operator< (const IndexString &rhs) const
| Less-than operator, checks if this IndexString is less than another.
virtual bool | operator<= (const IndexString &rhs) const
| Less-or-equal operator, checks if this IndexString is <= another.
virtual bool | operator> (const IndexString &rhs) const
| Greater-than operator, checks if this IndexString is greater than another.
virtual bool | operator>= (const IndexString &rhs) const
| Greater-or-equal operator, checks if this IndexString is >= another.
## Static Public Member Functions
static bool | Debug (const IndexString *me, adsk::Debug::Print &request)
| Answer a Print request for an IndexString object.
static bool | Debug (const IndexString *me, adsk::Debug::Footprint &request)
| Answer a footprint request for an IndexString object.
## Protected Member Functions
| IndexString ()
| Default constructor, sets to empty string.
## Static Protected Attributes
static std::string | myTypeName = "string"
| Name used to identify this type. Search for all occurrences
static IndexRegistration | myRegistration
| Name used to identify this type.
## Friends Search for all occurrences
class | CRTP_IndexType< IndexString >
| String index used for mapping. Search for all occurrences

## Constructor & Destructor Documentation

IndexString | ( | const std::string & | stringIndex | ) |

Conversion constructor.

Parameters:

  [in] | stringIndex | The string used as an index

IndexString | ( | const IndexString & | rhs | ) |

Copy constructor, simplest level.

Parameters:

  [in] | rhs | IndexString data to be copied

## Member Function Documentation

IndexString & operator= | ( | const IndexString & | rhs | ) | `[virtual]`

Class assignment operator.

Parameters:

  [in] | rhs | IndexString data to be copied

IndexString & operator= | ( | const std::string & | rhs | ) | `[virtual]`

IndexCount assignment operator.

Parameters:

  [in] | rhs | String to be used as an index

std::string indexString | ( |  | ) | const

Search for all occurrences

Get the string being used as an index.

Returns:
  A copy of the string this object uses as an index

std::string asString | ( |  | ) | const`[virtual]`

Search for all occurrences

Get the IndexString in string form.

In the case of this index the string version of the string index is simply itself. This is a duplicate of the indexString() method, but it's virtual and accessible through the base class for generic serialization functions.

Returns:
  String representing the index value (in the same form expected by the creator functions)

Implements IndexType.

bool supportsDenseMode | ( |  | ) | const`[virtual]`

Search for all occurrences

Notifies users that this index type cannot be packed densely.

Returns:
  false, indicating that this index type cannot be used in dense mode

Implements IndexType.

IndexCount denseSpaceBetween | ( | const IndexType & | rhs | ) | const`[virtual]`

Search for all occurrences

Returns 0 to indicate failure since strings cannot be densely packed.

Parameters:

  [in] | rhs | The index from which the density is to be calculated

Returns:
  Returns 0 since the dense packing cannot be supported.

Implements IndexType.

bool operator== | ( | const IndexType & | rhs | ) | const`[virtual]`

Equality operator, checks if this IndexString is the same as another Objects of different types are defined as not equal.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if the two IndexString objects have the same underlying IndexCount

Implements IndexType.

bool operator!= | ( | const IndexType & | rhs | ) | const`[virtual]`

Inequality operator, checks if this IndexString is not the same as another Objects of different types are defined as not equal.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if the two IndexString objects have a different underlying IndexCount

Implements IndexType.

bool operator< | ( | const IndexType & | rhs | ) | const`[virtual]`

Less-than operator, checks if this IndexString is less than another Operator sorts by typeid if the object passed in is not an IndexString.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if this IndexString's counter is less than rhs's

Implements IndexType.

bool operator<= | ( | const IndexType & | rhs | ) | const`[virtual]`

Less-or-equal operator, checks if this IndexString is <= another Operator sorts by typeid if the object passed in is not an IndexString.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if this IndexString's counter is less than or equal to rhs's

Implements IndexType.

bool operator> | ( | const IndexType & | rhs | ) | const`[virtual]`

Greater-than operator, checks if this IndexString is greater than another Operator sorts by typeid if the object passed in is not an IndexString.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if this IndexString's counter is greater than rhs's

Implements IndexType.

bool operator>= | ( | const IndexType & | rhs | ) | const`[virtual]`

Greater-or-equal operator, checks if this IndexString is >= another Operator sorts by typeid if the object passed in is not an IndexString.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if this IndexString's counter is greater than or equal to rhs's

Implements IndexType.

bool operator== | ( | const IndexString & | rhs | ) | const`[virtual]`

Equality operator, checks if this IndexString is the same as another.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if the two IndexString objects have the same underlying string

bool operator!= | ( | const IndexString & | rhs | ) | const`[virtual]`

Inequality operator, checks if this IndexString is not the same as another.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if the two IndexString objects have a different underlying string

bool operator< | ( | const IndexString & | rhs | ) | const`[virtual]`

Less-than operator, checks if this IndexString is less than another.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if this IndexString's string is less than rhs's

bool operator<= | ( | const IndexString & | rhs | ) | const`[virtual]`

Less-or-equal operator, checks if this IndexString is <= another.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if this IndexString is less than or equal to rhs's

bool operator> | ( | const IndexString & | rhs | ) | const`[virtual]`

Greater-than operator, checks if this IndexString is greater than another.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if this IndexString is greater than rhs's

bool operator>= | ( | const IndexString & | rhs | ) | const`[virtual]`

Greater-or-equal operator, checks if this IndexString is >= another.

Parameters:

  [in] | rhs | IndexString to be compared

Returns:
  true if this IndexString is greater than or equal to rhs's

bool Debug | ( | const IndexString * | me,
|  | adsk::Debug::Print & | request
| ) |  | `[static]`

Search for all occurrences

Answer a Print request for an IndexString object.

Use the request object to dump all information on this IndexString,

Parameters:

  [in] | me | Object to debug, NULL means debug static information
  [out] | request | Print request object

Returns:
  True if the request was successfully processed.

bool Debug | ( | const IndexString * | me,
|  | adsk::Debug::Footprint & | request
| ) |  | `[static]`

Search for all occurrences

Answer a footprint request for an IndexString object.

Populate the Footprint request with the information on all data stored within this object.

Parameters:

  [in] | me | Object to debug, NULL means debug static information
  [out] | request | Footprint object to populate

Returns:
  True if the request was successfully processed. The Footprint object will have all information added to it.

IndexString IndexString IndexString IndexString IndexString IndexString IndexString IndexString IndexString IndexString
IndexString IndexString IndexString IndexString IndexString IndexString IndexString IndexString IndexString IndexString