#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 |
Definition at line 87 of file Environment.hxx.
| typedef std::map<std::string, boost::shared_ptr<Binding<T> > >::const_iterator Environment< T >::const_iterator |
Definition at line 94 of file Environment.hxx.
| typedef std::map<std::string, boost::shared_ptr<Binding<T> > >::iterator Environment< T >::iterator |
Definition at line 93 of file Environment.hxx.
| 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 InstEnvironment::~Environment | ( | ) |
Definition at line 210 of file Environment.cxx.
| void Environment< T >::addBinding | ( | const std::string & | name, | |
| boost::shared_ptr< T > | val, | |||
| bool | rebind = false | |||
| ) |
| void Environment< T >::addDefBinding | ( | const std::string & | name, | |
| boost::shared_ptr< T > | val | |||
| ) | [inline] |
| 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.
| const_iterator Environment< T >::begin | ( | ) | const [inline] |
| iterator Environment< T >::begin | ( | ) | [inline] |
Definition at line 104 of file Environment.hxx.
References Environment< T >::bindings.
Referenced by Environment< T >::asString().
| 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().
| const_iterator Environment< T >::end | ( | ) | const [inline] |
| iterator Environment< T >::end | ( | ) | [inline] |
Definition at line 107 of file Environment.hxx.
References Environment< T >::bindings.
Referenced by Environment< T >::asString().
| const_iterator Environment< T >::find | ( | std::string | s | ) | const [inline] |
| iterator Environment< T >::find | ( | std::string | s | ) | [inline] |
| 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.
| unsigned Environment< T >::getFlags | ( | const std::string & | nm | ) | [inline] |
| boost::shared_ptr<Binding<T> > Environment< T >::getLatest | ( | ) | [inline] |
Definition at line 100 of file Environment.hxx.
| 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.
| bool Environment< T >::isAncestor | ( | boost::shared_ptr< Environment< T > > | env | ) |
| 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().
| void Environment< T >::mergeBindingsFrom | ( | boost::shared_ptr< Environment< T > > | from, | |
| bool | complete = true | |||
| ) |
| template shared_ptr< InstEnvironment > InstEnvironment::newDefScope | ( | ) |
| 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 void InstEnvironment::removeBinding | ( | const std::string & | name | ) |
Definition at line 102 of file Environment.cxx.
References Environment< T >::bindings, and Environment< T >::parent.
| void Environment< T >::setFlags | ( | const std::string & | nm, | |
| unsigned long | flags | |||
| ) | [inline] |
| size_t Environment< T >::size | ( | ) | const [inline] |
| 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.
| 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().
| 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().
| 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().
| std::string Environment< T >::uocName |
Definition at line 89 of file Environment.hxx.
Referenced by Environment< T >::Environment(), and Environment< T >::newScope().
1.4.7