23 #ifndef _OPENCOG_CLASS_SERVER_H
24 #define _OPENCOG_CLASS_SERVER_H
27 #include <unordered_map>
30 #include <boost/signals2.hpp>
33 #include <opencog/atomspace/atom_types.h>
95 template<
typename OutputIterator>
98 unsigned long n_children = 0;
108 template <
typename OutputIterator>
111 unsigned long n_children = 0;
121 template <
typename Function>
187 bool isDefined(
const std::string& typeName);
212 #endif // _OPENCOG_CLASS_SERVER_H
std::unordered_map< std::string, Type > name2CodeMap
std::vector< std::vector< bool > > recursiveMap
unsigned long getChildrenRecursive(Type type, OutputIterator result)
Type addType(const Type parent, const std::string &name)
ClassServer & classserver(ClassServerFactory *=ClassServer::createInstance)
unsigned long getChildren(Type type, OutputIterator result)
static ClassServer * createInstance(void)
bool isDefined(const std::string &typeName)
Type getNumberOfClasses()
ClassServer * ClassServerFactory(void)
TypeSignal & addTypeSignal()
const std::string & getTypeName(Type type)
bool isA(Type sub, Type super)
void setParentRecursively(Type parent, Type type)
std::unordered_map< Type, const std::string * > code2NameMap
bool isA_non_recursive(Type sub, Type super)
void foreachRecursive(Function func, Type type)
Type getType(const std::string &typeName)
boost::signals2::signal< void(Type)> TypeSignal
unsigned short Type
type of Atoms, represented as short integer (16 bits)
std::vector< std::vector< bool > > inheritanceMap
TypeSignal _addTypeSignal