132 virtual const std::type_info&
TypeInfo()
const = 0;
136 virtual void*
Address()
const = 0;
138 virtual std::string
ToString()
const = 0;
140 virtual void FromString(
const std::string& val) = 0;
149 return typeid(ValueType);
157 return (
void*) (&
fRef);
161 std::stringstream
ss;
167 std::stringstream
ss(val);
188 if (val[0] ==
'"' ) fRef = val.substr(1,val.size()-2);
207 virtual const char*
what()
const throw() {
208 return "G4BadAnyCast: failed conversion using any_cast";
214 return operand && operand->
TypeInfo() ==
typeid(ValueType)
std::string ToString() const
friend ValueType * any_cast(G4AnyType *)
G4AnyType & Swap(G4AnyType &rhs)
void FromString(const std::string &val)
virtual std::string ToString() const =0
static G4bool ConvertToBool(const char *st)
virtual std::string ToString() const
virtual void * Address() const =0
G4AnyType(const G4AnyType &other)
virtual Placeholder * Clone() const =0
virtual void FromString(const std::string &val)
G4AnyType(ValueType &value)
ValueType * any_cast(G4AnyType *operand)
virtual Placeholder * Clone() const
const XML_Char int const XML_Char * value
virtual const char * what() const
virtual void * Address() const
virtual const std::type_info & TypeInfo() const =0
static G4ThreeVector ConvertTo3Vector(const char *st)
G4double G4ParticleHPJENDLHEData::G4double result
G4AnyType & operator=(const ValueType &rhs)
const std::type_info & TypeInfo() const
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData
virtual void FromString(const std::string &val)=0
virtual const std::type_info & TypeInfo() const
static int operand(pchar begin, pchar end, double &result, pchar &endp, const dic_type &dictionary)