104 return (strcmp(n1.
name, n2.
name) == 0);
109 return out << n.
name;
119 return (
name !=
nullptr);
241 assert(
hashtab.get(nam) !=
nullptr);
255 bool has(
const char* str)
const
272 void add(
const char* str);
296 void remove(
const char* str);
302 void remove(
const int nums[],
int n);
316 void reMax(
int newmax = 0);
Generic hash table for data objects.
Entry identifier class for items of a DataSet.
int number(const DataKey &k) const
returns the number of the element with DataKey k in DataSet or -1, if it doesn't exist.
int max() const
returns maximum number of elements that would fit into DataSet.
int num() const
returns number of elements currently in DataSet.
bool has(const DataKey &k) const
Is k a valid DataKey of an element in DataSet?
DataKey key(int n) const
returns DataKey of n 'th element in DataSet.
int size() const
returns the maximum DataKey::idx currently in DataSet.
Handles of names in a NameSet.
Name(const char *str)
implictly constructs a Name out of a C style character string.
bool isConsistent() const
consistency check.
friend std::ostream & operator<<(std::ostream &out, const Name &n)
output operator.
static const char deflt
default zero string.
const char * name
pointer to the name string.
Name(const Name &str)
copy constructor.
friend int operator==(const Name &n1, const Name &n2)
equality operator.
Name()
default constructor.
Name & operator=(const Name &old)
NameSet(int max=10000, int mmax=-1, Real fac=2, Real memFac=2)
default constructor.
void memRemax(int newmax=0)
resets memMax() to newmax.
DataHashTable< Name, DataKey > hashtab
hashtable for names
int memmax
size of string memory
bool isConsistent() const
consistency check.
const char * operator[](const DataKey &pkey) const
returns name for DataKey pkey of NameSet.
int number(const char *str) const
returns number of name str in NameSet.
bool has(int pnum) const
does NameSet has a name with number pnum?
int memSize() const
returns used length of string memory.
Real factor
memory extension factor for entries.
int max() const
returns maximum nr. of names that fit into NameSet.
void remove(const DataKey &key)
removes name with DataKey key from NameSet.
int number(const DataKey &pkey) const
returns number of name with DataKey pkey in NameSet.
int memused
size of used string memory
int memMax() const
returns maximum length of string memory.
int num() const
returns nr. of names in NameSet.
DataKey key(const char *str) const
returns DataKey of name str in NameSet.
NameSet(const NameSet &old)
copy constructor.
NameSet & operator=(const NameSet &rhs)
assignment operator.
void remove(int pnum)
removes pnum 'th name from NameSet.
void reMax(int newmax=0)
resets max() to newmax.
void clear()
removes all names from NameSet.
const char * operator[](int pnum) const
returns num 'th name of NameSet.
bool has(const DataKey &pkey) const
does NameSet has a name with DataKey pkey?
void memPack()
garbage collection.
DataSet< int > set
name set.
Real memFactor
memory extension factor for names.
void add(const char *str)
int size() const
returns maximum DataKey::idx used in NameSet.
DataKey key(int pnum) const
returns DataKey of the pnum 'th name in NameSet.
bool has(const char *str) const
does NameSet has a name str?
Generic hash table for data objects.
Entry identifier class for items of a DataSet.
Everything should be within this namespace.
std::ostream & operator<<(std::ostream &s, const VectorBase< R > &vec)
Output operator.
Debugging, floating point type and parameter definitions.