#include <ContextScope.h>
Public Types | |
typedef boost::shared_ptr < ContextScope > | ptr |
Public Member Functions | |
template<typename T > | |
boost::shared_ptr< void > const & | set (void const *const key, boost::shared_ptr< T > const &val) |
template<typename T > | |
boost::shared_ptr< T > const | get (void const *key, bool CreateNewIfNecessary=false) |
ContextScope () | |
ContextScope (ContextScope const &other) | |
SPTR< std::map< std::string, float > const > | GetContextWeights () |
bool | SetContextWeights (std::string const &spec) |
bool | SetContextWeights (SPTR< std::map< std::string, float > const > const &w) |
Protected Types | |
typedef std::map< void const *, boost::shared_ptr< void > > | scratchpad_t |
typedef scratchpad_t::iterator | iter_t |
typedef scratchpad_t::value_type | entry_t |
typedef scratchpad_t::const_iterator | const_iter_t |
Protected Attributes | |
scratchpad_t | m_scratchpad |
SPTR< std::map< std::string, float > const > | m_context_weights |
Definition at line 26 of file ContextScope.h.
typedef scratchpad_t::const_iterator Moses::ContextScope::const_iter_t [protected] |
Definition at line 32 of file ContextScope.h.
typedef scratchpad_t::value_type Moses::ContextScope::entry_t [protected] |
Definition at line 31 of file ContextScope.h.
typedef scratchpad_t::iterator Moses::ContextScope::iter_t [protected] |
Definition at line 30 of file ContextScope.h.
typedef boost::shared_ptr<ContextScope> Moses::ContextScope::ptr |
Definition at line 39 of file ContextScope.h.
typedef std::map<void const*, boost::shared_ptr<void> > Moses::ContextScope::scratchpad_t [protected] |
Definition at line 29 of file ContextScope.h.
Moses::ContextScope::ContextScope | ( | ) | [inline] |
Definition at line 79 of file ContextScope.h.
Moses::ContextScope::ContextScope | ( | ContextScope const & | other | ) | [inline] |
boost::shared_ptr<T> const Moses::ContextScope::get | ( | void const * | key, | |
bool | CreateNewIfNecessary = false | |||
) | [inline] |
SPTR<std::map<std::string,float> const> Moses::ContextScope::GetContextWeights | ( | ) | [inline] |
boost::shared_ptr<void> const& Moses::ContextScope::set | ( | void const *const | key, | |
boost::shared_ptr< T > const & | val | |||
) | [inline] |
bool Moses::ContextScope::SetContextWeights | ( | SPTR< std::map< std::string, float > const > const & | w | ) | [inline] |
bool Moses::ContextScope::SetContextWeights | ( | std::string const & | spec | ) | [inline] |
Definition at line 95 of file ContextScope.h.
References m_context_weights, and Moses::Tokenize().
Referenced by MosesServer::SetContextWeights().
SPTR<std::map<std::string,float> const> Moses::ContextScope::m_context_weights [protected] |
Definition at line 37 of file ContextScope.h.
Referenced by GetContextWeights(), and SetContextWeights().
scratchpad_t Moses::ContextScope::m_scratchpad [protected] |