#include <G4AnyType.hh>
Public Member Functions | |
G4AnyType () | |
template<typename ValueType> | |
G4AnyType (ValueType &value) | |
G4AnyType (const G4AnyType &other) | |
~G4AnyType () | |
operator bool () | |
G4AnyType & | Swap (G4AnyType &rhs) |
template<typename ValueType> | |
G4AnyType & | operator= (const ValueType &rhs) |
G4AnyType & | operator= (const G4AnyType &rhs) |
bool | Empty () const |
const std::type_info & | TypeInfo () const |
void * | Address () const |
std::string | ToString () const |
void | FromString (const std::string &val) |
Friends | |
template<typename ValueType> | |
ValueType * | any_cast (G4AnyType *) |
Data Structures | |
class | Placeholder |
class | Ref |
Definition at line 61 of file G4AnyType.hh.
G4AnyType::G4AnyType | ( | ) | [inline] |
G4AnyType::G4AnyType | ( | ValueType & | value | ) | [inline] |
G4AnyType::G4AnyType | ( | const G4AnyType & | other | ) | [inline] |
G4AnyType::~G4AnyType | ( | ) | [inline] |
void* G4AnyType::Address | ( | ) | const [inline] |
bool G4AnyType::Empty | ( | ) | const [inline] |
void G4AnyType::FromString | ( | const std::string & | val | ) | [inline] |
G4AnyType::operator bool | ( | ) | [inline] |
bool operator
Definition at line 81 of file G4AnyType.hh.
References Empty().
00081 { 00082 return !Empty(); 00083 }
Modifier
Definition at line 95 of file G4AnyType.hh.
References G4AnyType().
00095 { 00096 G4AnyType(rhs).Swap(*this); 00097 return *this; 00098 }
G4AnyType& G4AnyType::operator= | ( | const ValueType & | rhs | ) | [inline] |
Modifier
Definition at line 90 of file G4AnyType.hh.
References G4AnyType().
00090 { 00091 G4AnyType(rhs).Swap(*this); 00092 return *this; 00093 }
Modifier
Definition at line 85 of file G4AnyType.hh.
References fContent.
00085 { 00086 std::swap(fContent, rhs.fContent); 00087 return *this; 00088 }
std::string G4AnyType::ToString | ( | ) | const [inline] |
const std::type_info& G4AnyType::TypeInfo | ( | ) | const [inline] |
Query
Definition at line 104 of file G4AnyType.hh.
Referenced by any_cast(), and G4GenericMessenger::DeclareProperty().
ValueType* any_cast | ( | G4AnyType * | operand | ) | [friend] |
value
Definition at line 201 of file G4AnyType.hh.
00201 { 00202 return operand && operand->TypeInfo() == typeid(ValueType) 00203 ? &static_cast<G4AnyType::Ref<ValueType>*>(operand->fContent)->fRef : 0; 00204 }