Public Member Functions | Public Attributes | List of all members
luwra::GlobalAccessor Struct Reference

Public Member Functions

 GlobalAccessor (State *state, const std::string &key)
 
template<typename V >
GlobalAccessorset (V value)
 
template<typename V >
GlobalAccessoroperator= (V value)
 
template<typename V >
get ()
 
template<typename V >
 operator V ()
 

Public Attributes

Statestate
 
std::string key
 

Detailed Description

Accessor for an entry in the global namespace

Constructor & Destructor Documentation

luwra::GlobalAccessor::GlobalAccessor ( State state,
const std::string &  key 
)
inline

Member Function Documentation

template<typename V >
V luwra::GlobalAccessor::get ( )
inline

Retrieve the associated value.

template<typename V >
luwra::GlobalAccessor::operator V ( )
inline

Shortcut for get()

template<typename V >
GlobalAccessor& luwra::GlobalAccessor::operator= ( value)
inline

Shortcut for set()

template<typename V >
GlobalAccessor& luwra::GlobalAccessor::set ( value)
inline

Assign a new value.

Member Data Documentation

std::string luwra::GlobalAccessor::key
State* luwra::GlobalAccessor::state