CRTP_IndexType< Derived > Class Template Reference


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

#include <adskDataIndexType.h>

Inheritance diagram for CRTP_IndexType< Derived >:

List of all members.

Public Member Functions

virtual IndexTypeclone () const
 Create a duplicate of this object.
virtual std::string typeName () const
 Get the unique name of this index type.

Member Function Documentation

virtual IndexType* clone ( ) const [inline, virtual]

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 [inline, virtual]

Get the unique name of this index type.

Returns:
String containing the index type name

Implements IndexType.