Moses::ContextScope Class Reference

#include <ContextScope.h>

List of all members.

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


Detailed Description

Definition at line 26 of file ContextScope.h.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

Moses::ContextScope::ContextScope (  )  [inline]

Definition at line 79 of file ContextScope.h.

Moses::ContextScope::ContextScope ( ContextScope const &  other  )  [inline]

Definition at line 81 of file ContextScope.h.

References m_scratchpad.


Member Function Documentation

template<typename T >
boost::shared_ptr<T> const Moses::ContextScope::get ( void const *  key,
bool  CreateNewIfNecessary = false 
) [inline]

Definition at line 51 of file ContextScope.h.

References key, m, m_scratchpad, NULL, and T.

SPTR<std::map<std::string,float> const> Moses::ContextScope::GetContextWeights (  )  [inline]

Definition at line 90 of file ContextScope.h.

References m_context_weights.

template<typename T >
boost::shared_ptr<void> const& Moses::ContextScope::set ( void const *const   key,
boost::shared_ptr< T > const &  val 
) [inline]

Definition at line 42 of file ContextScope.h.

References key, and m_scratchpad.

bool Moses::ContextScope::SetContextWeights ( SPTR< std::map< std::string, float > const > const &  w  )  [inline]

Definition at line 113 of file ContextScope.h.

References m_context_weights.

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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().

Definition at line 33 of file ContextScope.h.

Referenced by ContextScope(), get(), and set().


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

Generated on Thu Jul 6 00:32:56 2017 for Moses by  doxygen 1.5.9