coan  6.0.1
A C/C++ Configuration Analyzer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
symbol::locator Struct Reference

struct symbol::locator encapsulates a symbol table entry. More...

#include <symbol.h>

Public Member Functions

 locator ()
 The default constructor locates the null symbol.
 
 locator (symbol_table::iterator iter)
 Construct from a symbol table iterator.
 
 locator (std::string const &id)
 Construct a from a name.
 
 locator (std::string const &id, provenance source)
 Construct given a name and a provenance. More...
 
template<class CharSeq >
 locator (chewer< CharSeq > &chew)
 Construct given a chewer<CharSeq> More...
 
bool operator== (locator other) const
 Equality.
 
bool operator!= (locator &other) const
 Inequality.
 
bool null () const
 Say whether this locator is null.
 
 operator bool () const
 Explicit cast to boolean = !null()
 
std::string const & id () const
 Get the name of the symbol.
 
symboloperator* ()
 Defeference.
 
symbol const & operator* () const
 
symboloperator-> ()
 Point.
 
symbol const * operator-> () const
 

Private Attributes

symbol_table::iterator _loc
 Locator of the symbol in the symbol table.
 

Detailed Description

struct symbol::locator encapsulates a symbol table entry.

Definition at line 79 of file symbol.h.

Constructor & Destructor Documentation

symbol::locator::locator ( std::string const &  id,
provenance  source 
)
inline

Construct given a name and a provenance.

Parameters
idThe symbol identifier.
sourceThe provenance of the symbol.

Definition at line 95 of file symbol.h.

template<class CharSeq >
symbol::locator::locator ( chewer< CharSeq > &  chew)
explicit

Construct given a chewer<CharSeq>

Template Parameters
CharSeqA character-sequence type
Parameters
chewOn entry, a chewer<Charseq> positioned at the offset in the associated CharSeq from which to scan for an identifier. On returnchew is positioned to the first offset not consumed.

If no identifier is scanned the null locator results.

Definition at line 642 of file symbol.h.


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