clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | List of all members
ProgramOptions::ValueStore Class Reference

A type that can hold any kind of value type. More...

#include <value_store.h>

Collaboration diagram for ProgramOptions::ValueStore:
Collaboration graph

Public Member Functions

 ValueStore ()
 creates an empty object More...
 
 ValueStore (const ValueStore &other)
 copies the value in other More...
 
template<class T >
 ValueStore (const T &obj)
 stores a copy of obj More...
 
 ~ValueStore ()
 releases any stored value More...
 
ValueStoreoperator= (ValueStore other)
 stores a copy of other releasing any previous value More...
 
template<class T >
ValueStoreoperator= (const T &obj)
 stores a copy of obj releasing any previous value More...
 
template<class T >
ValueStoreassimilate (T *obj)
 stores obj in this and takes over ownership of obj More...
 
void swap (ValueStore &other)
 swaps this with other More...
 
bool empty () const
 Returns true if holder does not contain a value. More...
 
const std::type_info & type () const
 Returns the type of the stored value. More...
 
void clear ()
 destroys and releases any stored value More...
 
void surrender ()
 surrenders any stored value without destroying it More...
 
void * extract_raw () const
 

Detailed Description

A type that can hold any kind of value type.

Constructor & Destructor Documentation

ProgramOptions::ValueStore::ValueStore ( )

creates an empty object

ProgramOptions::ValueStore::ValueStore ( const ValueStore other)

copies the value in other

Here is the call graph for this function:

template<class T >
ProgramOptions::ValueStore::ValueStore ( const T &  obj)
inline

stores a copy of obj

ProgramOptions::ValueStore::~ValueStore ( )

releases any stored value

Here is the call graph for this function:

Member Function Documentation

template<class T >
ValueStore& ProgramOptions::ValueStore::assimilate ( T *  obj)
inline

stores obj in this and takes over ownership of obj

Precondition
delete obj is valid

Here is the call graph for this function:

void ProgramOptions::ValueStore::clear ( )

destroys and releases any stored value

Here is the call graph for this function:

bool ProgramOptions::ValueStore::empty ( ) const
inline

Returns true if holder does not contain a value.

void* ProgramOptions::ValueStore::extract_raw ( ) const
inline

Here is the call graph for this function:

ValueStore & ProgramOptions::ValueStore::operator= ( ValueStore  other)

stores a copy of other releasing any previous value

Here is the call graph for this function:

template<class T >
ValueStore& ProgramOptions::ValueStore::operator= ( const T &  obj)
inline

stores a copy of obj releasing any previous value

Here is the call graph for this function:

void ProgramOptions::ValueStore::surrender ( )

surrenders any stored value without destroying it

void ProgramOptions::ValueStore::swap ( ValueStore other)

swaps this with other

Here is the call graph for this function:

const std::type_info & ProgramOptions::ValueStore::type ( ) const

Returns the type of the stored value.

Here is the call graph for this function:


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