104 return (strcmp(n1.
name, n2.
name) == 0);
109 return out << n.
name;
119 return (
name !=
nullptr);
225 return result ==
nullptr ?
DataKey() : *result;
239 return result ==
nullptr ? -1 :
number(*result);
249 bool has(
const char* str)
const
266 void add(
const char* str);
290 void remove(
const char* str);
296 void remove(
const int nums[],
int n);
310 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)
size_t memSize() const
returns used length of string memory.
size_t memmax
size of string memory
size_t memMax() const
returns maximum length of string memory.
DataHashTable< Name, DataKey > hashtab
hashtable for names
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.
void memRemax(size_t newmax=0)
resets memMax() to newmax.
size_t memused
size of used string memory
bool has(int pnum) const
does NameSet has a name with number pnum?
DataSet< size_t > set
name set
Real factor
memory extension factor for entries.
NameSet(int max=10000, size_t mmax=0, Real fac=2, Real memFac=2)
default constructor.
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 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.
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.