Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4AnyType.hh File Reference
#include <algorithm>
#include <typeinfo>
#include <iostream>
#include <sstream>
#include "G4UIcommand.hh"
Include dependency graph for G4AnyType.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  G4AnyType
 
class  G4BadAnyCast
 

Namespaces

 CLHEP
 

Functions

template<typename ValueType >
ValueType * any_cast (G4AnyType *operand)
 
template<typename ValueType >
const ValueType * any_cast (const G4AnyType *operand)
 
template<typename ValueType >
ValueType any_cast (const G4AnyType &operand)
 

Function Documentation

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

value

Definition at line 213 of file G4AnyType.hh.

213  {
214  return operand && operand->TypeInfo() == typeid(ValueType)
215  ? &static_cast<G4AnyType::Ref<ValueType>*>(operand->fContent)->fRef : 0;
216 }
const std::type_info & TypeInfo() const
Definition: G4AnyType.hh:106

Here is the call graph for this function:

Here is the caller graph for this function:

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

value

Definition at line 218 of file G4AnyType.hh.

218  {
219  return any_cast<ValueType>(const_cast<G4AnyType*>(operand));
220 }
static int operand(pchar begin, pchar end, double &result, pchar &endp, const dic_type &dictionary)
Definition: Evaluator.cc:162
ValueType * any_cast(G4AnyType *operand)
Definition: G4AnyType.hh:213

Here is the call graph for this function:

template<typename ValueType >
ValueType any_cast ( const G4AnyType operand)

value

Definition at line 222 of file G4AnyType.hh.

222  {
223  const ValueType* result = any_cast<ValueType>(&operand);
224  if (!result) {
225  throw G4BadAnyCast();
226  }
227  return *result;
228 }
G4double G4ParticleHPJENDLHEData::G4double result
static int operand(pchar begin, pchar end, double &result, pchar &endp, const dic_type &dictionary)
Definition: Evaluator.cc:162
ValueType * any_cast(G4AnyType *operand)
Definition: G4AnyType.hh:213

Here is the call graph for this function: