56 #ifndef INCL_KNOWLEDGE_CAST_HPP 57 #define INCL_KNOWLEDGE_CAST_HPP 80 return static_cast<float>(in.to_double());
86 return static_cast<double>(in.to_double());
92 return static_cast<long double>(in.to_double());
98 return in.to_integer() ?
true :
false;
104 return static_cast<char>(in.to_integer());
110 return static_cast<unsigned char>(in.to_integer());
116 return static_cast<short>(in.to_integer());
122 return static_cast<unsigned short>(in.to_integer());
128 return static_cast<int>(in.to_integer());
134 return static_cast<unsigned int>(in.to_integer());
140 return static_cast<long int>(in.to_integer());
146 return static_cast<unsigned long int>(in.to_integer());
152 return static_cast<long long int>(in.to_integer());
158 return static_cast<unsigned long long int>(in.to_integer());
164 return in.to_string();
170 return in.to_integers();
176 return in.to_doubles();
This class encapsulates an entry in a KnowledgeBase.
madara::knowledge::KnowledgeRecord KnowledgeRecord
O knowledge_cast(const KnowledgeRecord &in)
By default, call constructor of target class; for other semantics, define specializations.
Provides functions and classes for the distributed knowledge base.
Copyright (c) 2015 Carnegie Mellon University.