CRTP_IndexType< Derived > Class Template Reference

CRTP_IndexType< Derived > Class Template Reference

#include <adskDataIndexType.h>

Class Description

template<typename Derived>
class adsk::Data::CRTP_IndexType< Derived >

This CRTP (Curiously Recurring Template Pattern) class implements some shared methods which all derived classes can use, and for whom the implementations use the same pattern.

For all derived index types use this declaration for the class:

class METADATA_EXPORT MyIndex : public CRTP_IndexType<MyIndex> { ... }

This will automatically instantiate a common clone() method as well as establishing the abstract interface each index type needs to implement.

+ Inheritance diagram for CRTP_IndexType< Derived >:

Public Member Functions

virtual IndexTypeclone () const
 Create a duplicate of this object. More...
 
virtual std::string typeName () const
 Get the unique name of this index type. More...
 
- Public Member Functions inherited from IndexType
 IndexType (const IndexType &rhs)
 Copy constructor, simplest level. More...
 
virtual std::string asString () const =0
 Get this index type value as a string. More...
 
virtual bool supportsDenseMode () const =0
 Check if this object type supports dense packing indexing. More...
 
virtual IndexCount denseSpaceBetween (const IndexType &rhs) const =0
 Calculate the number of elements to be packed between this one and the rhs. More...
 
virtual bool operator== (const IndexType &rhs) const =0
 Equality comparison of this object and the rhs. More...
 
virtual bool operator!= (const IndexType &rhs) const =0
 Unequality comparison of this object and the rhs. More...
 
virtual bool operator< (const IndexType &rhs) const =0
 LT-inequality comparison of this object and the rhs. More...
 
virtual bool operator<= (const IndexType &rhs) const =0
 LE-inequality comparison of this object and the rhs. More...
 

Additional Inherited Members

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

Member Function Documentation

virtual IndexType* clone ( ) const
inlinevirtual

Create a duplicate of this object.

This is virtual so that derived types create the correct type of object.

Returns
Pointer to copy of this object

Implements IndexType.

virtual std::string typeName ( ) const
inlinevirtual

Get the unique name of this index type.

Returns
String containing the index type name

Implements IndexType.


The documentation for this class was generated from the following file:
  • adskDataIndexType.h