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

#include <triedatum.h>

Inheritance diagram for TrieDatum:
TypedDatum<&SLIInterpreter::Trietype > Datum

Public Member Functions

 TrieDatum (TrieDatum const &fd)
 
 TrieDatum (Name const &n)
 
 TrieDatum (Name const &n, const TokenArray &ta)
 
void print (std::ostream &o) const
 
void pprint (std::ostream &o) const
 
void info (std::ostream &out) const
 
bool equals (Datum const *) const
 
const Namegetname (void) const
 
void insert (const TypeArray &a, const Token &t)
 
void insert_move (const TypeArray &a, Token &t)
 
const Tokenlookup (const TokenStack &s) const
 
TypeTrieget (void)
 
- Public Member Functions inherited from TypedDatum<&SLIInterpreter::Trietype >
 TypedDatum (void)
 
- Public Member Functions inherited from Datum
virtual ~Datum ()
 
void addReference () const
 
void removeReference ()
 
size_t numReferences () const
 
bool is_executable () const
 
void set_executable ()
 
void unset_executable ()
 
virtual void list (std::ostream &o, std::string prefix, int l) const
 
virtual void input_form (std::ostream &o) const
 
const Namegettypename (void) const
 
bool isoftype (SLIType const &t) const
 
void execute (SLIInterpreter *i)
 

Static Public Member Functions

static void * operator new (size_t size)
 
static void operator delete (void *p, size_t size)
 

Static Protected Attributes

static sli::pool memory
 

Private Member Functions

Datumclone (void) const
 Virtual copy constructor. More...
 
Datumget_ptr ()
 Returns a reference counted pointer to the datum, or a new pointer, if the type does not support reference counting. More...
 

Private Attributes

Name name
 
TypeTrie tree
 

Additional Inherited Members

- Protected Member Functions inherited from TypedDatum<&SLIInterpreter::Trietype >
 TypedDatum (const TypedDatum< slt > &d)
 
const TypedDatum< slt > & operator= (const TypedDatum< slt > &)
 
- Protected Member Functions inherited from Datum
 Datum ()
 
 Datum (const SLIType *t)
 
 Datum (const Datum &d)
 
- Protected Attributes inherited from Datum
const SLITypetype
 Pointer to type object. More...
 
const SLIFunctionaction
 Shortcut to the SLIType default action. More...
 
unsigned int reference_count_
 
bool executable_
 

Constructor & Destructor Documentation

TrieDatum::TrieDatum ( TrieDatum const &  fd)
inline

References Datum::set_executable().

Referenced by clone().

TrieDatum::TrieDatum ( Name const &  n)
inline
TrieDatum::TrieDatum ( Name const &  n,
const TokenArray ta 
)
inline

Member Function Documentation

Datum* TrieDatum::clone ( void  ) const
inlineprivatevirtual

Virtual copy constructor.

Use this function to lazily copy a datum.

Implements Datum.

References TrieDatum().

bool TrieDatum::equals ( Datum const *  dat) const
virtual

Reimplemented from Datum.

References tree.

TypeTrie& TrieDatum::get ( void  )
inline
Datum* TrieDatum::get_ptr ( )
inlineprivatevirtual

Returns a reference counted pointer to the datum, or a new pointer, if the type does not support reference counting.

The prefix const indicates that the pointer should be trated as const because changes affect all other references as well.

Reimplemented from Datum.

References Datum::addReference().

const Name& TrieDatum::getname ( void  ) const
inline
void TrieDatum::info ( std::ostream &  out) const
inlinevirtual

Reimplemented from Datum.

References TypeTrie::info(), pprint(), and tree.

void TrieDatum::insert ( const TypeArray a,
const Token t 
)
inline

References TypeTrie::insert(), and tree.

void TrieDatum::insert_move ( const TypeArray a,
Token t 
)
inline
const Token& TrieDatum::lookup ( const TokenStack s) const
inline

References TypeTrie::lookup(), and tree.

Referenced by TrietypeFunction::execute().

static void TrieDatum::operator delete ( void *  p,
size_t  size 
)
inlinestatic
static void* TrieDatum::operator new ( size_t  size)
inlinestatic
void TrieDatum::pprint ( std::ostream &  o) const
inlinevirtual

Implements Datum.

References print().

Referenced by info().

void TrieDatum::print ( std::ostream &  o) const
inlinevirtual

Implements Datum.

References name.

Referenced by pprint(), and SLIInterpreter::stack_backtrace().

Member Data Documentation

sli::pool TrieDatum::memory
staticprotected

Referenced by operator delete(), and operator new().

Name TrieDatum::name
private

Referenced by getname(), and print().

TypeTrie TrieDatum::tree
private

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