Environment< T > Struct Template Reference

#include <Environment.hxx>


Public Types

typedef std::map< std::string,
boost::shared_ptr< Binding<
T > > >::iterator 
iterator
typedef std::map< std::string,
boost::shared_ptr< Binding<
T > > >::const_iterator 
const_iterator

Public Member Functions

boost::shared_ptr< Binding<
T > > 
getLatest ()
iterator begin ()
iterator end ()
iterator find (std::string s)
const_iterator find (std::string s) const
const_iterator begin () const
const_iterator end () const
size_t size () const
boost::shared_ptr< Binding<
T > > 
doGetBinding (const std::string &nm, boost::shared_ptr< Environment< T > > outerLimit=boost::GC_NULL) const
 Search recursively upwards for a binding, but not beyond the environment specified by outerLimit.
boost::shared_ptr< Binding<
T > > 
getLocalBinding (const std::string &nm) const
 Environment (std::string _uocName)
 ~Environment ()
void addBinding (const std::string &name, boost::shared_ptr< T > val, bool rebind=false)
void addDefBinding (const std::string &name, boost::shared_ptr< T > val)
void removeBinding (const std::string &name)
void updateKey (const std::string &from, const std::string &to)
boost::shared_ptr< T > getBinding (const std::string &nm, boost::shared_ptr< Environment< T > > outerLimit=boost::GC_NULL) const
unsigned getFlags (const std::string &nm)
void setFlags (const std::string &nm, unsigned long flags)
void mergeBindingsFrom (boost::shared_ptr< Environment< T > > from, bool complete=true)
boost::shared_ptr< Environment<
T > > 
newScope ()
boost::shared_ptr< Environment<
T > > 
newDefScope ()
bool isAncestor (boost::shared_ptr< Environment< T > > env)
std::string asString () const

Static Public Member Functions

static boost::shared_ptr<
Environment
make (std::string _uocName)

Data Fields

std::string uocName
boost::shared_ptr< Environment<
T > > 
parent
boost::shared_ptr< Environment<
T > > 
defEnv
std::map< std::string, boost::shared_ptr<
Binding< T > > > 
bindings


Detailed Description

template<class T>
struct Environment< T >

Definition at line 87 of file Environment.hxx.


Member Typedef Documentation

template<class T>
typedef std::map<std::string, boost::shared_ptr<Binding<T> > >::const_iterator Environment< T >::const_iterator

Definition at line 94 of file Environment.hxx.

template<class T>
typedef std::map<std::string, boost::shared_ptr<Binding<T> > >::iterator Environment< T >::iterator

Definition at line 93 of file Environment.hxx.


Constructor & Destructor Documentation

template<class T>
Environment< T >::Environment ( std::string  _uocName  )  [inline]

Definition at line 136 of file Environment.hxx.

References Environment< T >::defEnv, boost::GC_NULL, Environment< T >::parent, and Environment< T >::uocName.

Referenced by Environment< T >::make().

template<class T>
template InstEnvironment::~Environment (  ) 

Definition at line 210 of file Environment.cxx.


Member Function Documentation

template<class T>
void Environment< T >::addBinding ( const std::string &  name,
boost::shared_ptr< T >  val,
bool  rebind = false 
)

template<class T>
void Environment< T >::addDefBinding ( const std::string &  name,
boost::shared_ptr< T >  val 
) [inline]

Definition at line 154 of file Environment.hxx.

References Environment< T >::defEnv.

template<class T>
template std::string InstEnvironment::asString (  )  const

Definition at line 83 of file Environment.cxx.

References Environment< T >::begin(), Environment< T >::end(), and Environment< T >::parent.

template<class T>
const_iterator Environment< T >::begin (  )  const [inline]

Definition at line 116 of file Environment.hxx.

References Environment< T >::bindings.

template<class T>
iterator Environment< T >::begin (  )  [inline]

Definition at line 104 of file Environment.hxx.

References Environment< T >::bindings.

Referenced by Environment< T >::asString().

template<class T>
boost::shared_ptr< Binding<T> > Environment< T >::doGetBinding ( const std::string &  nm,
boost::shared_ptr< Environment< T > >  outerLimit = boost::GC_NULL 
) const

Search recursively upwards for a binding, but not beyond the environment specified by outerLimit.

Referenced by Environment< T >::getBinding(), Environment< T >::getFlags(), and Environment< T >::setFlags().

template<class T>
const_iterator Environment< T >::end (  )  const [inline]

Definition at line 119 of file Environment.hxx.

References Environment< T >::bindings.

template<class T>
iterator Environment< T >::end (  )  [inline]

Definition at line 107 of file Environment.hxx.

References Environment< T >::bindings.

Referenced by Environment< T >::asString().

template<class T>
const_iterator Environment< T >::find ( std::string  s  )  const [inline]

Definition at line 113 of file Environment.hxx.

References Environment< T >::bindings.

template<class T>
iterator Environment< T >::find ( std::string  s  )  [inline]

Definition at line 110 of file Environment.hxx.

References Environment< T >::bindings.

template<class T>
boost::shared_ptr<T> Environment< T >::getBinding ( const std::string &  nm,
boost::shared_ptr< Environment< T > >  outerLimit = boost::GC_NULL 
) const [inline]

Definition at line 165 of file Environment.hxx.

References Environment< T >::doGetBinding(), and boost::GC_NULL.

template<class T>
unsigned Environment< T >::getFlags ( const std::string &  nm  )  [inline]

Definition at line 175 of file Environment.hxx.

References Environment< T >::doGetBinding().

template<class T>
boost::shared_ptr<Binding<T> > Environment< T >::getLatest (  )  [inline]

Definition at line 100 of file Environment.hxx.

template<class T>
template shared_ptr< Binding< InstanceSet > > InstEnvironment::getLocalBinding ( const std::string &  nm  )  const

Definition at line 56 of file Environment.cxx.

References Environment< T >::bindings, and boost::GC_NULL.

template<class T>
bool Environment< T >::isAncestor ( boost::shared_ptr< Environment< T > >  env  ) 

template<class T>
static boost::shared_ptr<Environment> Environment< T >::make ( std::string  _uocName  )  [inline, static]

Definition at line 144 of file Environment.hxx.

References Environment< T >::Environment().

Referenced by UocInfo::DoResolve(), UocInfo::DoTypeCheck(), importIfBinding(), and Environment< T >::newScope().

template<class T>
void Environment< T >::mergeBindingsFrom ( boost::shared_ptr< Environment< T > >  from,
bool  complete = true 
)

template<class T>
template shared_ptr< InstEnvironment > InstEnvironment::newDefScope (  ) 

Definition at line 163 of file Environment.cxx.

References Environment< T >::newScope().

template<class T>
template shared_ptr< InstEnvironment > InstEnvironment::newScope (  ) 

Definition at line 152 of file Environment.cxx.

References Environment< T >::defEnv, Environment< T >::make(), and Environment< T >::uocName.

Referenced by Environment< T >::newDefScope().

template<class T>
template void InstEnvironment::removeBinding ( const std::string &  name  ) 

Definition at line 102 of file Environment.cxx.

References Environment< T >::bindings, and Environment< T >::parent.

template<class T>
void Environment< T >::setFlags ( const std::string &  nm,
unsigned long  flags 
) [inline]

Definition at line 182 of file Environment.hxx.

References Environment< T >::doGetBinding().

template<class T>
size_t Environment< T >::size (  )  const [inline]

Definition at line 122 of file Environment.hxx.

References Environment< T >::bindings.

template<class T>
template void InstEnvironment::updateKey ( const std::string &  from,
const std::string &  to 
)

Definition at line 135 of file Environment.cxx.

References Environment< T >::bindings, and Environment< T >::parent.


Field Documentation

template<class T>
std::map<std::string, boost::shared_ptr<Binding<T> > > Environment< T >::bindings

Definition at line 95 of file Environment.hxx.

Referenced by Environment< T >::begin(), Environment< T >::end(), Environment< T >::find(), Environment< T >::getLocalBinding(), Environment< T >::removeBinding(), Environment< T >::size(), and Environment< T >::updateKey().

template<class T>
boost::shared_ptr<Environment<T> > Environment< T >::defEnv

Definition at line 91 of file Environment.hxx.

Referenced by Environment< T >::addDefBinding(), Environment< T >::Environment(), and Environment< T >::newScope().

template<class T>
boost::shared_ptr<Environment<T> > Environment< T >::parent

Definition at line 90 of file Environment.hxx.

Referenced by Environment< T >::asString(), Environment< T >::Environment(), Environment< T >::removeBinding(), and Environment< T >::updateKey().

template<class T>
std::string Environment< T >::uocName

Definition at line 89 of file Environment.hxx.

Referenced by Environment< T >::Environment(), and Environment< T >::newScope().


The documentation for this struct was generated from the following files:
Generated on Sat Feb 4 23:59:29 2012 for BitC Compiler by  doxygen 1.4.7