clipsmm - C++ CLIPS Interface Library
Go to the documentation of this file.
55 template<
typename ValueType>
56 any(
const ValueType & value)
57 :
content(new holder<ValueType>(value))
75 std::swap(
content, rhs.content);
79 template<
typename ValueType>
99 const std::type_info &
type()
const
116 virtual const std::type_info &
type()
const = 0;
122 template<
typename ValueType>
123 class holder :
public placeholder
127 holder(
const ValueType & value)
134 virtual const std::type_info &
type()
const
136 return typeid(ValueType);
139 virtual placeholder *
clone()
const
152 template<
typename ValueType>
162 virtual const char *
what()
const throw()
164 return "boost::bad_any_cast: "
165 "failed conversion using boost::any_cast";
169 template<
typename ValueType>
172 return operand && operand->type() ==
typeid(ValueType)
177 template<
typename ValueType>
180 return any_cast<ValueType>(
const_cast<any *
>(operand));
183 template<
typename ValueType>
186 const ValueType * result = any_cast<ValueType>(&operand);
virtual placeholder * clone() const =0
any & operator=(const ValueType &rhs)
Definition: any.h:114
any()
Definition: any.h:84
const std::type_info & type() const
Definition: any.h:133
holder(const ValueType &value)
Definition: any.h:161
virtual ~placeholder()
Definition: any.h:144
ValueType held
Definition: any.h:180
virtual const std::type_info & type() const
Definition: any.h:168
bool empty() const
Definition: any.h:128
any & swap(any &rhs)
Definition: any.h:107
virtual const char * what() const
Definition: any.h:179
~any()
Definition: any.h:100
Definition: activation.cpp:29
virtual placeholder * clone() const
Definition: any.h:173
placeholder * content
Definition: any.h:189
virtual const std::type_info & type() const =0
friend ValueType * any_cast(any *)
Definition: any.h:187
ValueType * any_cast(any *operand)
Definition: any.h:187
Generated on Tue Jan 28 2020 00:00:00 for clipsmm by
1.8.17