Index Class Referenceabstract

A contiguous, one-dimensional array of integers used to represent data structures, rather than numerical data in the arrays themselves. More...

#include <Index.h>

Inheritance diagram for Index:
IndexOf< T > IndexOf< I >

Public Types

enum  Form {
  i8, u8, i32, u32,
  i64, kNumIndexForm
}
 Integer type of an Index, used by ListForm, IndexedForm, etc. More...
 

Public Member Functions

virtual ~Index ()
 Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted. More...
 
virtual const std::shared_ptr< Indexshallow_copy () const =0
 Copies this Index node without copying its buffer. More...
 
virtual IndexOf< int64_t > to64 () const =0
 Converts this Index to an Index64. More...
 
virtual bool iscontiguous () const =0
 Returns true if this index is contiguous false otherwise. More...
 

Static Public Member Functions

static Form str2form (const std::string &str)
 Converts a string into a Form enumeration. More...
 
static const std::string form2str (Form form)
 Converts a Form enumeration into a string. More...
 

Detailed Description

A contiguous, one-dimensional array of integers used to represent data structures, rather than numerical data in the arrays themselves.

The Index superclass abstracts over templated specializations:

Member Enumeration Documentation

◆ Form

enum Form
strong

Integer type of an Index, used by ListForm, IndexedForm, etc.

Enumerator
i8 
u8 
i32 
u32 
i64 
kNumIndexForm 

Constructor & Destructor Documentation

◆ ~Index()

virtual ~Index ( )
virtual

Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted.

Member Function Documentation

◆ form2str()

static const std::string form2str ( Form  form)
static

Converts a Form enumeration into a string.

◆ iscontiguous()

virtual bool iscontiguous ( ) const
pure virtual

Returns true if this index is contiguous false otherwise.

Implemented in IndexOf< T >, and IndexOf< I >.

◆ shallow_copy()

virtual const std::shared_ptr<Index> shallow_copy ( ) const
pure virtual

Copies this Index node without copying its buffer.

See also #deep_copy.

Implemented in IndexOf< T >, and IndexOf< I >.

◆ str2form()

static Form str2form ( const std::string &  str)
static

Converts a string into a Form enumeration.

◆ to64()

virtual IndexOf<int64_t> to64 ( ) const
pure virtual

Converts this Index to an Index64.

Implemented in IndexOf< T >, and IndexOf< I >.


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