NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TokenArrayObj Class Reference

#include <tarrayobj.h>

Inheritance diagram for TokenArrayObj:
TokenStack

Public Member Functions

 TokenArrayObj (void)
 
 TokenArrayObj (size_t, const Token &=Token(), size_t=0)
 
 TokenArrayObj (const TokenArrayObj &)
 
virtual ~TokenArrayObj ()
 
Tokenbegin () const
 
Tokenend () const
 
size_t size (void) const
 
size_t capacity (void) const
 
Tokenoperator[] (size_t i)
 
const Tokenoperator[] (size_t i) const
 
const Tokenget (long i) const
 
bool index_is_valid (long i) const
 
void rotate (Token *, Token *, Token *)
 
bool shrink (void)
 
bool reserve (size_t)
 
unsigned int references (void)
 
unsigned int remove_reference ()
 
unsigned int add_reference ()
 
void resize (size_t, size_t, const Token &=Token())
 
void resize (size_t, const Token &=Token())
 
void reserve_token (size_t n)
 
void push_back (const Token &t)
 
void push_back_move (Token &t)
 
void push_back_by_ref (const Token &t)
 Push back a reference. More...
 
void push_back_by_pointer (Datum *rhs)
 Push back a datum pointer. More...
 
void assign_move (Token *tp, Token &t)
 
void pop_back (void)
 
void erase (size_t, size_t)
 
void erase (Token *, Token *)
 
void erase (Token *tp)
 
void reduce (Token *, Token *)
 
void reduce (size_t, size_t)
 
void insert (size_t, size_t=1, const Token &=Token())
 
void insert (size_t i, const Token &t)
 
void insert_move (size_t, TokenArrayObj &)
 
void insert_move (size_t, Token &)
 
void assign_move (TokenArrayObj &, size_t, size_t)
 
void assign (const TokenArrayObj &, size_t, size_t)
 
void replace_move (size_t, size_t, TokenArrayObj &)
 
void append_move (TokenArrayObj &)
 
void clear (void)
 
const TokenArrayObjoperator= (const TokenArrayObj &)
 
bool operator== (const TokenArrayObj &) const
 
bool empty (void) const
 
void info (std::ostream &) const
 
bool valid (void) const
 

Static Public Member Functions

static size_t getallocations (void)
 

Private Member Functions

void allocate (size_t, size_t, size_t, const Token &=Token())
 

Private Attributes

Tokenp
 
Tokenbegin_of_free_storage
 
Tokenend_of_free_storage
 
unsigned int alloc_block_size
 
unsigned int refs_
 

Static Private Attributes

static size_t allocations =0
 

Constructor & Destructor Documentation

TokenArrayObj::TokenArrayObj ( void  )
inline
TokenArrayObj::TokenArrayObj ( size_t  s,
const Token t = Token(),
size_t  alloc = 0 
)

References nest::names::a, and resize().

TokenArrayObj::TokenArrayObj ( const TokenArrayObj a)
TokenArrayObj::~TokenArrayObj ( )
virtual

References p.

Member Function Documentation

unsigned int TokenArrayObj::add_reference ( )
inline

References refs_.

Referenced by TokenArray::operator=(), and TokenArray::TokenArray().

void TokenArrayObj::allocate ( size_t  new_s,
size_t  new_c,
size_t  new_a,
const Token t = Token() 
)
private
void TokenArrayObj::append_move ( TokenArrayObj a)
void TokenArrayObj::assign ( const TokenArrayObj a,
size_t  i,
size_t  n 
)
void TokenArrayObj::assign_move ( Token tp,
Token t 
)
inline

Referenced by TokenArray::assign_move().

void TokenArrayObj::assign_move ( TokenArrayObj a,
size_t  i,
size_t  n 
)
Token* TokenArrayObj::begin ( void  ) const
inline
size_t TokenArrayObj::capacity ( void  ) const
inline
void TokenArrayObj::clear ( void  )
bool TokenArrayObj::empty ( void  ) const
inline
Token* TokenArrayObj::end ( void  ) const
inline
void TokenArrayObj::erase ( size_t  i,
size_t  n 
)

References p, and size().

Referenced by TokenStack::clear(), erase(), TokenArray::erase(), and TokenStack::pop().

void TokenArrayObj::erase ( Token first,
Token last 
)
void TokenArrayObj::erase ( Token tp)
inline

References erase().

const Token& TokenArrayObj::get ( long  i) const
inline

References p.

Referenced by TokenArray::get().

static size_t TokenArrayObj::getallocations ( void  )
inlinestatic

References allocations.

Referenced by Allocations_aFunction::execute().

bool TokenArrayObj::index_is_valid ( long  i) const
inline

References begin_of_free_storage, and p.

Referenced by TokenArray::index_is_valid().

void TokenArrayObj::info ( std::ostream &  out) const
void TokenArrayObj::insert ( size_t  i,
size_t  n = 1,
const Token t = Token() 
)

References begin_of_free_storage, nest::names::n, p, reserve(), and size().

Referenced by insert().

void TokenArrayObj::insert ( size_t  i,
const Token t 
)
inline

References insert().

void TokenArrayObj::insert_move ( size_t  i,
TokenArrayObj a 
)
void TokenArrayObj::insert_move ( size_t  i,
Token t 
)
const TokenArrayObj & TokenArrayObj::operator= ( const TokenArrayObj a)
bool TokenArrayObj::operator== ( const TokenArrayObj a) const

References begin(), end(), p, and size().

Token& TokenArrayObj::operator[] ( size_t  i)
inline

References p.

const Token& TokenArrayObj::operator[] ( size_t  i) const
inline

References p.

void TokenArrayObj::pop_back ( void  )
inline
void TokenArrayObj::push_back ( const Token t)
inline
void TokenArrayObj::push_back_by_pointer ( Datum rhs)
inline

Push back a datum pointer.

This function assumes that enough space on the stack has been reserved. This function expects a valid datum pointer and increases the reference count of the datum.

References alloc_block_size, begin_of_free_storage, capacity(), reserve(), and size().

Referenced by TokenStack::push_by_pointer().

void TokenArrayObj::push_back_by_ref ( const Token t)
inline

Push back a reference.

This function expects that enough space on the stack has been reserved and that the token points to a valid datum object.

References alloc_block_size, begin_of_free_storage, capacity(), reserve(), and size().

Referenced by TokenStack::push_by_ref().

void TokenArrayObj::push_back_move ( Token t)
inline
void TokenArrayObj::reduce ( Token first,
Token last 
)

References assert(), begin(), begin_of_free_storage, end(), and p.

Referenced by reduce(), and TokenArray::reduce().

void TokenArrayObj::reduce ( size_t  i,
size_t  n 
)

References p, reduce(), and size().

unsigned int TokenArrayObj::references ( void  )
inline
unsigned int TokenArrayObj::remove_reference ( )
inline
void TokenArrayObj::replace_move ( size_t  i,
size_t  n,
TokenArrayObj a 
)
bool TokenArrayObj::reserve ( size_t  new_capacity)
void TokenArrayObj::reserve_token ( size_t  n)
inline
void TokenArrayObj::resize ( size_t  s,
size_t  alloc,
const Token t = Token() 
)
void TokenArrayObj::resize ( size_t  s,
const Token t = Token() 
)

References alloc_block_size, and resize().

void TokenArrayObj::rotate ( Token first,
Token middle,
Token last 
)
bool TokenArrayObj::shrink ( void  )
size_t TokenArrayObj::size ( void  ) const
inline
bool TokenArrayObj::valid ( void  ) const

Member Data Documentation

unsigned int TokenArrayObj::alloc_block_size
private
size_t TokenArrayObj::allocations =0
staticprivate

Referenced by allocate(), and getallocations().

Token* TokenArrayObj::begin_of_free_storage
private
Token* TokenArrayObj::end_of_free_storage
private
Token* TokenArrayObj::p
private
unsigned int TokenArrayObj::refs_
private

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