Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Logic - BindSetBodyC
 

  PUBLIC
BindSetBodyC::BindSetBodyC(void)
BindSetBodyC::BindSetBodyC(const BindSetC &)
BindSetBodyC::BindSetBodyC(const HashC &)
BindSetBodyC::IsBound(const LiteralC &) const
BindSetBodyC::Resolve(const LiteralC &,LiteralC &) const
BindSetBodyC::Resolve(const LiteralC &) const
BindSetBodyC::operator [](const LiteralC &) const
BindSetBodyC::Bind(const LiteralC &,const LiteralC &)
BindSetBodyC::Mark(void) const
BindSetBodyC::Undo(BindMarkT)
BindSetBodyC::Undo(LiteralC)
BindSetBodyC::Size(void) const
BindSetBodyC::Empty(void)
BindSetBodyC::Name(void) const
RCBodyC::References(void) const
RCBodyC::Copy(void) const
RCBodyC::DeepCopy(UIntT) const
RCBodyC::IncRefCounter(void)
RCBodyC::DecRefCounter(void)
HashC::Copy(void) const
HashC::Lookup(const K &) const
HashC::Lookup(const K &)
HashC::Lookup(const K &,T &) const
HashC::Update(const K &,const T &)
HashC::Update(const K &)
HashC::operator [](const K &)
HashC::operator [](const K &) const
HashC::Insert(const K &,const T &)
HashC::Access(const K &,const T &)
HashC::AccessCopy(const K &,const T &)
HashC::Del(const K &,bool)
HashC::Get(const K &,bool)
HashC::IsElm(const K &) const
HashC::Empty(void)
HashC::Bins(void) const
HashC::Resize(SizeT)
HashC::operator =(const HashC &)
HashC::operator ==(const HashC &) const
HashC::operator !=(const HashC &) const
HashC::Hash(void) const
HashC::Move(HashC &)
HashC::AddFrom(HashC &,bool)
HashC::Add(const HashC &,bool)
HashC::Add(const K &,const T &)
HashC::Add(const K &)
HashC::LookupHV(const K &,UIntT &) const
HashC::Del(HashElemC *,bool)
HashC::Count(void) const
HashC::CheckAdd(void)
HashC::CheckDel(bool)
HashC::operator <<(ostream &,const HashC &)
HashC::operator <<(BinOStreamC &,const HashC &)
HashBaseC::IsEmpty(void) const
HashBaseC::Size(void) const
HashBaseC::NextPrime(SizeT)

   BindSetBodyC   
 
Set of bindings.
 
include "Ravl/Logic/BindSet.hh"
Source file:Ravl/Logic/Base/BindSet.hh
User Level:Normal
Library:RavlLogic
In Scope:RavlLogicN

Comments:
Note: This is a small object.

Parent Classes: Variables:
BindMarkT top;

Methods:
BindSetBodyC()
Default constructor.

BindSetBodyC(const BindSetC & oth)
Copy constructor.
Any bind marks in oth will NOT be valid for the new BindSetC.

BindSetBodyC(const HashC<LiteralC,LiteralC> & tab)
Construct from a table of mappings.

bool IsBound(const LiteralC & var) const
Is variable bound ?

bool Resolve(const LiteralC & var,LiteralC & x) const
Resolve value

LiteralC Resolve(const LiteralC & var) const
Resolve a binding.
return the value 'var' is bound to, or if its a free variable 'var' itself.

LiteralC operator [](const LiteralC & var) const
Resolve a binding.

bool Bind(const LiteralC & var,const LiteralC & val)
Attempty to bind a value to var.
Will fail if var is already bound.

BindMarkT Mark() const
Mark the current set of bindings.

void Undo(BindMarkT bm)
Undo bindings to marked place.

void Undo(LiteralC var)
Undo bindings done after and including var.

UIntT Size() const
Get the number of binds in set.

void Empty()
Remove all bindings from set.

StringC Name() const
Bind set as string.

#include "Ravl/RefCounter.hh"
UIntT References() const
Access count of handles open to this object.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void IncRefCounter()
Increment reference counter.

bool DecRefCounter()
Decrement reference counter.

#include "Ravl/Hash.hh"
HashC<LiteralC,BindC> Copy() const
Make a copy of the table.

const BindC * Lookup(const LiteralC & Key) const
Find data matching key.
Do not use, Try Lookup(key,data); Ptr == NULL, if matching key not found.

BindC * Lookup(const LiteralC & Key)
Find data matching key.
Do not use, Try Lookup(key,data); Ptr == NULL, if matching key not found.

bool Lookup(const LiteralC & Key,BindC & data) const
Lookup data for key.
Returns true if entry is found, and is assigned to 'data'.

bool Update(const LiteralC & Key,const BindC & Data)
Update member of hash table, will create new one if it doesn't exist.
Require's a default constructor & a working assigment operator !! Returns: True=Member existed already. False=New one was added.

BindC & Update(const LiteralC & Key)
Get value, add default if its not there. Return reference anyway.

BindC & operator [](const LiteralC & Key)
Associative array style interface.

const BindC & operator [](const LiteralC & Key) const
Associative array style of access.

bool Insert(const LiteralC & Key,const BindC & Data)
Default insertion operation, same as Update(K,T);

BindC & Access(const LiteralC & key,const BindC & def = T ())
Access key, if it does not exist create a new bin with value 'def'
Retuns a reference to the entry.

BindC & AccessCopy(const LiteralC & key,const BindC & def = T ())
Access key, if it does not exist create a new bin with a copy of value 'def'
Retuns a reference to the entry.

bool Del(const LiteralC & Key,bool allowResize = true)
Delete member from table.

BindC Get(const LiteralC & Key,bool allowResize = true)
Get data element from table, and remove it.

bool IsElm(const LiteralC & Key) const
Is key used in the table ?

void Empty(void)
Remove all items from table.

UIntT Bins(void) const
Number of bins in the HashTable.

void Resize(SizeT NewSize)
Resize hash table.

const HashC<LiteralC,BindC> & operator =(const HashC<LiteralC,BindC> & oth)
Assign from another hash table.

bool operator ==(const HashC<LiteralC,BindC> & oth) const
Are two hash tables identical ?

bool operator !=(const HashC<LiteralC,BindC> & oth) const
Are two hash tables different ?

UIntT Hash() const
Compute a hash value for the hash table.

void Move(HashC<LiteralC,BindC> & oth)
Move contents of another table into this one.
leave other empty. The previous contents of this table are removed.

void AddFrom(HashC<LiteralC,BindC> & oth,bool replace = true)
Add contents of another table into this one.
leave other empty. if replace is false the contents of the old table are not replace by the new entries.

void Add(const HashC<LiteralC,BindC> & oth,bool replace = true)
Add contents of another table into this one.
if replace is false the contents of the old table are not replace by the new entries.

BindC & Add(const LiteralC & Key,const BindC & Data)
Add member to table. !! Doesn't check if member already exists !!

BindC & Add(const LiteralC & Key)
Add member created with default constructor. !! Doesn't check if member already exists !!

HashElemC<LiteralC,BindC> * LookupHV(const LiteralC & Value,UIntT & hashVal) const

bool Del(HashElemC<LiteralC,BindC> * Elem,bool allowResize = true)

UIntT Count() const
Do an actual count of elements in the table.
Used in debug only.

void CheckAdd(void)
Need to increase size ?

void CheckDel(bool allowResize = true)
Need to decrease size ?

ostream & operator <<(ostream & out,const HashC<LiteralC,BindC> & obj)

BinOStreamC & operator <<(BinOStreamC & out,const HashC<LiteralC,BindC> & obj)

bool IsEmpty() const
Is the table empty ?

UIntT Size() const
Count number of elements in table.

SizeT NextPrime(SizeT v)
Get the next prime not smaller than v.


Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002