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

#include <NodeIndex.h>

Public Member Functions

 NodeIndex ()
 
void insertAtom (Atom *a)
 
void removeAtom (Atom *a)
 
void resize ()
 
size_t size () const
 
AtomgetAtom (Type type, const std::string &str) const
 
UnorderedHandleSet getHandleSet (Type type, const std::string &, bool subclass) const
 
template<typename OutputIterator >
OutputIterator getHandleSet (OutputIterator result, Type type, const std::string &name, bool subclass) const
 

Private Attributes

std::vector< NameIndexidx
 

Detailed Description

Implements an (type, name) index array of RB-trees (C++ set) That is, given only the type and name of an atom, this will return the corresponding handle of that atom.

Definition at line 42 of file NodeIndex.h.

Constructor & Destructor Documentation

NodeIndex::NodeIndex ( )

Definition at line 29 of file NodeIndex.cc.

References resize().

Member Function Documentation

Atom* opencog::NodeIndex::getAtom ( Type  type,
const std::string &  str 
) const
inline

Definition at line 63 of file NodeIndex.h.

References opencog::StringIndex::get(), and idx.

+ Here is the caller graph for this function:

UnorderedHandleSet NodeIndex::getHandleSet ( Type  type,
const std::string &  name,
bool  subclass 
) const
template<typename OutputIterator >
OutputIterator opencog::NodeIndex::getHandleSet ( OutputIterator  result,
Type  type,
const std::string &  name,
bool  subclass 
) const
inline
void opencog::NodeIndex::insertAtom ( Atom a)
inline

Definition at line 50 of file NodeIndex.h.

References opencog::Atom::getType(), idx, and opencog::NameIndex::insertAtom().

+ Here is the caller graph for this function:

void opencog::NodeIndex::removeAtom ( Atom a)
inline

Definition at line 55 of file NodeIndex.h.

References opencog::Atom::getType(), idx, and opencog::NameIndex::removeAtom().

+ Here is the caller graph for this function:

void NodeIndex::resize ( )

Definition at line 34 of file NodeIndex.cc.

References opencog::classserver(), and idx.

+ Here is the caller graph for this function:

size_t NodeIndex::size ( void  ) const

Definition at line 39 of file NodeIndex.cc.

References idx.

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<NameIndex> opencog::NodeIndex::idx
private

Definition at line 45 of file NodeIndex.h.


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