Geant4  10.00.p02
G4AnyType Class Reference

This class represents any data type. More...

#include <G4AnyType.hh>

+ Collaboration diagram for G4AnyType:

Classes

class  Placeholder
 
class  Ref
 

Public Member Functions

 G4AnyType ()
 Constructor. More...
 
template<typename ValueType >
 G4AnyType (ValueType &value)
 Constructor. More...
 
 G4AnyType (const G4AnyType &other)
 Copy Constructor. More...
 
 ~G4AnyType ()
 Dtor. More...
 
 operator bool ()
 bool operator More...
 
G4AnyTypeSwap (G4AnyType &rhs)
 Modifier. More...
 
template<typename ValueType >
G4AnyTypeoperator= (const ValueType &rhs)
 Modifier. More...
 
G4AnyTypeoperator= (const G4AnyType &rhs)
 Modifier. More...
 
bool Empty () const
 Query. More...
 
const std::type_info & TypeInfo () const
 Query. More...
 
void * Address () const
 Adress. More...
 
std::string ToString () const
 String conversion. More...
 
void FromString (const std::string &val)
 String conversion. More...
 

Private Attributes

PlaceholderfContent
 representation More...
 

Friends

template<typename ValueType >
ValueType * any_cast (G4AnyType *)
 representation More...
 

Detailed Description

This class represents any data type.

The class only holds a reference to the type and not the value.

Definition at line 63 of file G4AnyType.hh.

Constructor & Destructor Documentation

G4AnyType::G4AnyType ( )
inline

Constructor.

Definition at line 66 of file G4AnyType.hh.

Referenced by operator=().

+ Here is the caller graph for this function:

template<typename ValueType >
G4AnyType::G4AnyType ( ValueType &  value)
inline

Constructor.

Definition at line 70 of file G4AnyType.hh.

G4AnyType::G4AnyType ( const G4AnyType other)
inline

Copy Constructor.

Definition at line 74 of file G4AnyType.hh.

G4AnyType::~G4AnyType ( )
inline

Dtor.

Definition at line 78 of file G4AnyType.hh.

References fContent.

Member Function Documentation

void* G4AnyType::Address ( ) const
inline

Adress.

Definition at line 110 of file G4AnyType.hh.

References G4AnyType::Placeholder::Address(), and fContent.

+ Here is the call graph for this function:

bool G4AnyType::Empty ( ) const
inline

Query.

Definition at line 102 of file G4AnyType.hh.

References fContent.

Referenced by operator bool().

+ Here is the caller graph for this function:

void G4AnyType::FromString ( const std::string &  val)
inline

String conversion.

Definition at line 118 of file G4AnyType.hh.

References fContent, and G4AnyType::Placeholder::FromString().

Referenced by G4GenericMessenger::SetNewValue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4AnyType::operator bool ( )
inline

bool operator

Definition at line 83 of file G4AnyType.hh.

References Empty().

+ Here is the call graph for this function:

template<typename ValueType >
G4AnyType& G4AnyType::operator= ( const ValueType &  rhs)
inline

Modifier.

Definition at line 92 of file G4AnyType.hh.

References G4AnyType().

+ Here is the call graph for this function:

G4AnyType& G4AnyType::operator= ( const G4AnyType rhs)
inline

Modifier.

Definition at line 97 of file G4AnyType.hh.

References G4AnyType().

+ Here is the call graph for this function:

G4AnyType& G4AnyType::Swap ( G4AnyType rhs)
inline

Modifier.

Definition at line 87 of file G4AnyType.hh.

References fContent.

std::string G4AnyType::ToString ( ) const
inline

String conversion.

Definition at line 114 of file G4AnyType.hh.

References fContent, and G4AnyType::Placeholder::ToString().

Referenced by G4GenericMessenger::GetCurrentValue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const std::type_info& G4AnyType::TypeInfo ( ) const
inline

Query.

Definition at line 106 of file G4AnyType.hh.

References fContent, and G4AnyType::Placeholder::TypeInfo().

Referenced by any_cast(), G4GenericMessenger::DeclareProperty(), and G4GenericMessenger::DeclarePropertyWithUnit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

template<typename ValueType >
ValueType* any_cast ( G4AnyType operand)
friend

representation

Definition at line 213 of file G4AnyType.hh.

Member Data Documentation

Placeholder* G4AnyType::fContent
private

representation

Definition at line 176 of file G4AnyType.hh.

Referenced by Address(), any_cast(), Empty(), FromString(), Swap(), ToString(), TypeInfo(), and ~G4AnyType().


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