OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
opencog::TypeNode Class Reference

#include <TypeNode.h>

+ Inheritance diagram for opencog::TypeNode:
+ Collaboration diagram for opencog::TypeNode:

Public Member Functions

 TypeNode (const std::string &s, TruthValuePtr tv=TruthValue::DEFAULT_TV(), AttentionValuePtr av=AttentionValue::DEFAULT_AV())
 
 TypeNode (Type t, TruthValuePtr tv=TruthValue::DEFAULT_TV(), AttentionValuePtr av=AttentionValue::DEFAULT_AV())
 
 TypeNode (Node &n)
 
Type get_value (void)
 
- Public Member Functions inherited from opencog::Node
 Node (Type t, const std::string &s, TruthValuePtr tv=TruthValue::DEFAULT_TV(), AttentionValuePtr av=AttentionValue::DEFAULT_AV())
 
 Node (Node &n)
 
const std::string & getName () const
 
std::string toString (std::string indent="")
 
std::string toShortString (std::string indent="")
 
virtual bool operator== (const Atom &) const
 
virtual bool operator!= (const Atom &) const
 
- Public Member Functions inherited from opencog::Atom
virtual ~Atom ()
 
Type getType () const
 
bool isType (Type t, bool subclass) const
 
Handle getHandle ()
 
AttentionValuePtr getAttentionValue ()
 
void setAttentionValue (AttentionValuePtr)
 Sets the AttentionValue object of the atom. More...
 
AttentionValue::sti_t getSTI ()
 Handy-dandy convenience getters for attention values. More...
 
AttentionValue::lti_t getLTI ()
 
AttentionValue::vlti_t getVLTI ()
 
void setSTI (AttentionValue::sti_t stiValue)
 
void setLTI (AttentionValue::lti_t ltiValue)
 
void incVLTI ()
 
void decVLTI ()
 
TruthValuePtr getTruthValue ()
 
void setTruthValue (TruthValuePtr)
 Sets the TruthValue object of the atom. More...
 
void merge (TruthValuePtr)
 
Handle tvmerge (TruthValuePtr tv)
 
size_t getIncomingSetSize ()
 Get the size of the incoming set. More...
 
IncomingSet getIncomingSet ()
 
template<typename OutputIterator >
OutputIterator getIncomingSet (OutputIterator result)
 
template<class T >
bool foreach_incoming (bool(T::*cb)(const Handle &), T *data)
 
template<typename OutputIterator >
OutputIterator getIncomingSetByType (OutputIterator result, Type type, bool subclass=false)
 
IncomingSet getIncomingSetByType (Type type, bool subclass=false)
 

Static Public Member Functions

static void validate (const std::string &str)
 

Protected Attributes

Type value
 
- Protected Attributes inherited from opencog::Node
std::string _name
 
- Protected Attributes inherited from opencog::Atom
UUID _uuid
 
AtomTable_atomTable
 
Type _type
 
char _flags
 
TruthValuePtr _truthValue
 
AttentionValuePtr _attentionValue
 
std::mutex _mtx
 
InSetPtr _incoming_set
 

Additional Inherited Members

- Protected Types inherited from opencog::Atom
typedef std::shared_ptr< InSetInSetPtr
 
- Protected Member Functions inherited from opencog::Node
void init (const std::string &)
 
 Node (const Node &l)
 
- Protected Member Functions inherited from opencog::Atom
 Atom (Type t, TruthValuePtr tv=TruthValue::DEFAULT_TV(), AttentionValuePtr av=AttentionValue::DEFAULT_AV())
 
void keep_incoming_set ()
 
void drop_incoming_set ()
 
void insert_atom (LinkPtr)
 Add an atom to the incoming set. More...
 
void remove_atom (LinkPtr)
 Remove an atom from the incoming set. More...
 

Detailed Description

Definition at line 40 of file TypeNode.h.

Constructor & Destructor Documentation

opencog::TypeNode::TypeNode ( const std::string &  s,
TruthValuePtr  tv = TruthValue::DEFAULT_TV(),
AttentionValuePtr  av = AttentionValue::DEFAULT_AV() 
)
inline

Definition at line 46 of file TypeNode.h.

References value.

opencog::TypeNode::TypeNode ( Type  t,
TruthValuePtr  tv = TruthValue::DEFAULT_TV(),
AttentionValuePtr  av = AttentionValue::DEFAULT_AV() 
)
inline

Definition at line 58 of file TypeNode.h.

opencog::TypeNode::TypeNode ( Node n)
inline

Definition at line 65 of file TypeNode.h.

References opencog::Node::getName(), opencog::Atom::getType(), and value.

Member Function Documentation

Type opencog::TypeNode::get_value ( void  )
inline

Definition at line 84 of file TypeNode.h.

References value.

static void opencog::TypeNode::validate ( const std::string &  str)
inlinestatic

Definition at line 76 of file TypeNode.h.

References opencog::classserver(), and opencog::ClassServer::getType().

+ Here is the caller graph for this function:

Member Data Documentation

Type opencog::TypeNode::value
protected

Definition at line 43 of file TypeNode.h.


The documentation for this class was generated from the following file: