GRATgen
Public Member Functions | List of all members
lit_map< T > Class Template Reference

Container class to store a mapping from literals to type T. More...

Public Member Functions

 lit_map (size_t _max_var=0)
 Initialize with fixed variable size. More...
 
 lit_map (lit_map const &lm)
 Copy the mapping, and all values.
 
lit_mapoperator= (lit_map const &lm)
 Assignment, copying the mapping, and all values.
 
void resize_reset (size_t _max_var)
 Resize to new maximal variable number, resetting existing mappings! More...
 
T & operator[] (lit_t l)
 Get reference to mapping for specified literal.
 
const T & operator[] (lit_t l) const
 Get const reference to mapping for specified literal.
 
size_t get_max_var () const
 Get maximum variable number.
 
lit_t lbegin () const
 Get smallest mapped literal. More...
 
lit_t lend () const
 Get largest mapped literal plus one. More...
 

Detailed Description

template<typename T>
class lit_map< T >

Container class to store a mapping from literals to type T.

Constructor & Destructor Documentation

template<typename T>
lit_map< T >::lit_map ( size_t  _max_var = 0)
inline

Initialize with fixed variable size.

Parameters
_max_varMaximum variable number.

Member Function Documentation

template<typename T>
lit_t lit_map< T >::lbegin ( ) const
inline

Get smallest mapped literal.

Used to iterate over all mapped literals:

for (lit_t i=X.lbegin();i<X.lend();++i) ...}
template<typename T>
lit_t lit_map< T >::lend ( ) const
inline

Get largest mapped literal plus one.

Used to iterate over all mapped literals:

for (lit_t i=X.lbegin();i<X.lend();++i) ...}
template<typename T>
void lit_map< T >::resize_reset ( size_t  _max_var)
inline

Resize to new maximal variable number, resetting existing mappings!

Parameters
_max_varMaximum variable number

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