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

#include <Handle.h>

+ Collaboration diagram for opencog::Handle:

Public Member Functions

 Handle (const AtomPtr &atom)
 
 Handle (const UUID u)
 
 Handle ()
 
 Handle (const Handle &h)
 
 ~Handle ()
 
UUID value (void) const
 
Handleoperator= (const Handle &h)
 
Handleoperator= (const AtomPtr &a)
 
Atomoperator-> ()
 
Atomoperator-> () const
 
 operator bool () const noexcept
 
bool operator== (std::nullptr_t) const noexcept
 
bool operator!= (std::nullptr_t) const noexcept
 
bool operator== (const Handle &h) const noexcept
 
bool operator!= (const Handle &h) const noexcept
 
bool operator< (const Handle &h) const noexcept
 
bool operator> (const Handle &h) const noexcept
 
bool operator<= (const Handle &h) const noexcept
 
bool operator>= (const Handle &h) const noexcept
 
 operator AtomPtr () const
 
 operator AtomPtr ()
 

Static Public Member Functions

static int compare (const Handle &h1, const Handle &h2)
 

Static Public Attributes

static const Handle UNDEFINED
 

Private Member Functions

Atomresolve ()
 
Atomcresolve () const
 
AtomPtr resolve_ptr ()
 

Static Private Member Functions

static AtomPtr do_res (const Handle *)
 
static void set_resolver (const AtomTable *)
 
static void clear_resolver (const AtomTable *)
 

Private Attributes

UUID _uuid
 
AtomPtr _ptr
 

Static Private Attributes

static std::vector< const
AtomTable * > 
_resolver
 
static const AtomPtr NULL_POINTER
 

Friends

class AtomTable
 
class AtomStorage
 
class AtomspaceHTabler
 

Detailed Description

Definition at line 53 of file Handle.h.

Constructor & Destructor Documentation

Handle::Handle ( const AtomPtr atom)
explicit

Definition at line 37 of file Handle.cc.

opencog::Handle::Handle ( const UUID  u)
inlineexplicit

Definition at line 80 of file Handle.h.

opencog::Handle::Handle ( )
inlineexplicit

Definition at line 81 of file Handle.h.

opencog::Handle::Handle ( const Handle h)
inline

Definition at line 82 of file Handle.h.

opencog::Handle::~Handle ( )
inline

Definition at line 83 of file Handle.h.

Member Function Documentation

void Handle::clear_resolver ( const AtomTable tab)
staticprivate

Definition at line 57 of file Handle.cc.

References _resolver.

+ Here is the caller graph for this function:

static int opencog::Handle::compare ( const Handle h1,
const Handle h2 
)
inlinestatic

Returns a negative value, zero or a positive value if the first argument is respectively smaller than, equal to, or larger than the second argument.

Parameters
Thefirst handle element.
Thesecond handle element.
Returns
A negative value, zero or a positive value if the first argument is respectively smaller than, equal to, or larger then the second argument.

Definition at line 168 of file Handle.h.

+ Here is the caller graph for this function:

Atom * Handle::cresolve ( ) const
private

Definition at line 82 of file Handle.cc.

References do_res().

+ Here is the caller graph for this function:

AtomPtr Handle::do_res ( const Handle hp)
inlinestaticprivate

Definition at line 66 of file Handle.cc.

References _resolver, and python.create_atoms_by_type::a.

+ Here is the caller graph for this function:

opencog::Handle::operator AtomPtr ( ) const
inline

Definition at line 175 of file Handle.h.

References _ptr, _uuid, NULL_POINTER, and resolve_ptr().

opencog::Handle::operator AtomPtr ( )
inline

Definition at line 181 of file Handle.h.

References _ptr, _uuid, NULL_POINTER, and resolve_ptr().

opencog::Handle::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 124 of file Handle.h.

References _ptr, and cresolve().

bool opencog::Handle::operator!= ( std::nullptr_t  ) const
inlinenoexcept

Definition at line 134 of file Handle.h.

References _ptr, and cresolve().

bool opencog::Handle::operator!= ( const Handle h) const
inlinenoexcept

Definition at line 150 of file Handle.h.

References _uuid.

Atom* opencog::Handle::operator-> ( )
inline

Definition at line 109 of file Handle.h.

References _ptr, _uuid, and resolve().

Atom* opencog::Handle::operator-> ( ) const
inline

Definition at line 116 of file Handle.h.

References _ptr, _uuid, and cresolve().

bool opencog::Handle::operator< ( const Handle h) const
inlinenoexcept

Definition at line 151 of file Handle.h.

References _uuid.

bool opencog::Handle::operator<= ( const Handle h) const
inlinenoexcept

Definition at line 153 of file Handle.h.

References _uuid.

Handle& opencog::Handle::operator= ( const Handle h)
inline

Definition at line 89 of file Handle.h.

References _ptr, _uuid, and python.create_atoms_by_type::a.

Handle & Handle::operator= ( const AtomPtr a)

Definition at line 39 of file Handle.cc.

References _ptr, _uuid, and python.create_atoms_by_type::a.

bool opencog::Handle::operator== ( std::nullptr_t  ) const
inlinenoexcept

Definition at line 129 of file Handle.h.

References _ptr, and cresolve().

bool opencog::Handle::operator== ( const Handle h) const
inlinenoexcept

Definition at line 149 of file Handle.h.

References _uuid.

bool opencog::Handle::operator> ( const Handle h) const
inlinenoexcept

Definition at line 152 of file Handle.h.

References _uuid.

bool opencog::Handle::operator>= ( const Handle h) const
inlinenoexcept

Definition at line 154 of file Handle.h.

References _uuid.

Atom * Handle::resolve ( )
private

Definition at line 75 of file Handle.cc.

References _ptr, python.create_atoms_by_type::a, and do_res().

+ Here is the caller graph for this function:

AtomPtr Handle::resolve_ptr ( )
private

Definition at line 87 of file Handle.cc.

References _ptr, python.create_atoms_by_type::a, and do_res().

+ Here is the caller graph for this function:

void Handle::set_resolver ( const AtomTable tab)
staticprivate

Definition at line 52 of file Handle.cc.

References _resolver.

+ Here is the caller graph for this function:

UUID opencog::Handle::value ( void  ) const
inline

Definition at line 85 of file Handle.h.

References _uuid.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class AtomspaceHTabler
friend

Definition at line 58 of file Handle.h.

friend class AtomStorage
friend

Definition at line 57 of file Handle.h.

friend class AtomTable
friend

Definition at line 56 of file Handle.h.

Member Data Documentation

AtomPtr opencog::Handle::_ptr
private

Definition at line 63 of file Handle.h.

std::vector< const AtomTable * > Handle::_resolver
staticprivate

Definition at line 68 of file Handle.h.

UUID opencog::Handle::_uuid
private

Definition at line 62 of file Handle.h.

const AtomPtr Handle::NULL_POINTER
staticprivate

Definition at line 74 of file Handle.h.

const Handle Handle::UNDEFINED
static

Definition at line 77 of file Handle.h.


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