C++ API Reference
IndexString Class Reference

Index type which uses a String for the index mapping. More...

#include <adskDataIndexString.h>

+ Inheritance diagram for IndexString:

Public Member Functions

 IndexString (const std::string &stringIndex)
 Conversion constructor. More...
 
 IndexString (const IndexString &rhs)
 Copy constructor, simplest level. More...
 
virtual ~IndexString ()
 Default destructor, nothing to do.
 
virtual IndexStringoperator= (const IndexString &rhs)
 Class assignment operator. More...
 
virtual IndexStringoperator= (const std::string &rhs)
 IndexCount assignment operator. More...
 
std::string indexString () const
 Get the string being used as an index. More...
 
virtual std::string asString () const
 Get the IndexString in string form. More...
 
virtual bool supportsDenseMode () const
 Notifies users that this index type cannot be packed densely. More...
 
virtual IndexCount denseSpaceBetween (const IndexType &rhs) const
 Returns 0 to indicate failure since strings cannot be densely packed. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual bool operator== (const IndexString &rhs) const
 Equality operator, checks if this IndexString is the same as another. More...
 
virtual bool operator!= (const IndexString &rhs) const
 Inequality operator, checks if this IndexString is not the same as another. More...
 
virtual bool operator< (const IndexString &rhs) const
 Less-than operator, checks if this IndexString is less than another. More...
 
virtual bool operator<= (const IndexString &rhs) const
 Less-or-equal operator, checks if this IndexString is <= another. More...
 
virtual bool operator> (const IndexString &rhs) const
 Greater-than operator, checks if this IndexString is greater than another. More...
 
virtual bool operator>= (const IndexString &rhs) const
 Greater-or-equal operator, checks if this IndexString is >= another. More...
 
- Public Member Functions inherited from IndexType
 IndexType (const IndexType &rhs)
 Copy constructor, simplest level. More...
 

Static Public Member Functions

static bool Debug (const IndexString *me, adsk::Debug::Print &request)
 Answer a Print request for an IndexString object. More...
 
static bool Debug (const IndexString *me, adsk::Debug::Footprint &request)
 Answer a footprint request for an IndexString object. More...
 
- Static Public Member Functions inherited from RefCounted
static bool Debug (const RefCounted *me, Debug::Print &request)
 Answer a Print request for a RefCounted object. More...
 
static bool Debug (const RefCounted *me, Debug::Footprint &request)
 Answer a footprint request for a RefCounted object. More...
 

Protected Member Functions

 IndexString ()
 Default constructor, sets to empty string.
 
- Protected Member Functions inherited from IndexType
virtual ~IndexType ()
 Default destructor, nothing to do.
 
 IndexType ()
 Default constructor, should never be used.
 
- Protected Member Functions inherited from RefCounted
 RefCounted ()
 RefCounted default ctor.
 
 RefCounted (const RefCounted &)
 RefCounted copy ctor.
 
virtual ~RefCounted ()
 RefCounted dtor.
 

Static Protected Attributes

static std::string myTypeName = "string"
 Name used to identify this type.
 
static IndexRegistration myRegistration
 Name used to identify this type.
 

Friends

class CRTP_IndexType< IndexString >
 String index used for mapping.
 

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".

Constructor & Destructor Documentation

IndexString ( const std::string &  stringIndex)

Conversion constructor.

Parameters
[in]stringIndexThe string used as an index
IndexString ( const IndexString rhs)

Copy constructor, simplest level.

Parameters
[in]rhsIndexString data to be copied

Member Function Documentation

IndexString & operator= ( const IndexString rhs)
virtual

Class assignment operator.

Parameters
[in]rhsIndexString data to be copied
IndexString & operator= ( const std::string &  rhs)
virtual

IndexCount assignment operator.

Parameters
[in]rhsString to be used as an index
std::string indexString ( ) const

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

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

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

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

Parameters
[in]rhsThe 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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]rhsIndexString 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

Answer a Print request for an IndexString object.

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

Parameters
[in]meObject to debug, NULL means debug static information
[out]requestPrint request object
Returns
True if the request was successfully processed.
bool Debug ( const IndexString me,
adsk::Debug::Footprint request 
)
static

Answer a footprint request for an IndexString object.

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

Parameters
[in]meObject to debug, NULL means debug static information
[out]requestFootprint object to populate
Returns
True if the request was successfully processed. The Footprint object will have all information added to it.

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