72 template <
typename ValueType>
89 operator bool() {
return !
Empty(); }
99 template <
typename ValueType>
143 virtual const std::type_info&
TypeInfo()
const = 0;
158 template <
typename ValueType>
173 return typeid(ValueType);
188 std::stringstream ss;
197 std::stringstream ss(val);
206 template <
typename ValueType>
226 fRef = val.substr(1, val.size() - 2);
247 virtual const char*
what()
const throw()
249 return "G4BadAnyCast: failed conversion using any_cast";
255template <
typename ValueType>
263template <
typename ValueType>
269template <
typename ValueType>
272 const ValueType* result = any_cast<ValueType>(&
operand);
static int operand(pchar begin, pchar end, double &result, pchar &endp, const dic_type &dictionary)
ValueType * any_cast(G4AnyType *operand)
virtual const std::type_info & TypeInfo() const =0
virtual Placeholder * Clone() const =0
virtual void * Address() const =0
virtual void FromString(const std::string &val)=0
virtual std::string ToString() const =0
virtual void FromString(const std::string &val)
virtual Placeholder * Clone() const
virtual std::string ToString() const
virtual void * Address() const
virtual const std::type_info & TypeInfo() const
void FromString(const std::string &val)
G4AnyType & Swap(G4AnyType &rhs)
G4AnyType(ValueType &value)
G4AnyType & operator=(const G4AnyType &rhs)
const std::type_info & TypeInfo() const
friend ValueType * any_cast(G4AnyType *)
G4AnyType & operator=(const ValueType &rhs)
G4AnyType(const G4AnyType &other)
std::string ToString() const
virtual const char * what() const
static G4ThreeVector ConvertTo3Vector(const char *st)
static G4bool ConvertToBool(const char *st)