Jive reference manual
Classes | Typedefs | Functions
jem::util Namespace Reference

This namespace exports various container classes and an event framework. More...

Classes

class  AbstractDelegate
 Provides a superclass for all delegate types. More...
 
class  ArrayBuffer
 Provides support for creating one-dimensional Array objects. More...
 
class  Barrier
 Synchronizes a group of threads. More...
 
class  BasicScanner
 
class  BitSet
 
class  Calendar
 
class  CppScanner
 
class  CPUTimer
 Measures the elapsed CPU time. More...
 
class  DateException
 
class  Delegate
 Represents a call-back function that will be invoked by an event. More...
 
class  Dictionary
 Implements an associative, heterogeneous collection that maps strings to objects. More...
 
class  DictionaryEnumerator
 Iterates over the key/value pairs in a dictionary. More...
 
class  EmptySequenceException
 
class  Enumerable
 Represents an enumerable set of objects. More...
 
class  Enumerator
 Iterates over a set of objects. More...
 
class  Event
 Encapsulates a list of call-back functions that are invoked when a specific event occurs. More...
 
class  FastAllocator
 Implements a memory allocation algorithm that favors speed above fair memory use. More...
 
class  Flex
 Implements a generic, resizable vector. More...
 
class  HashDictionary
 Implements a dictionary based on a hash table. More...
 
class  HashMap
 
class  HashMapTraits
 
class  HashSet
 
class  HashSetTraits
 
class  HashTable
 
class  HashTableIterator
 
class  HashTableNode
 
class  List
 
class  ListEntry
 
class  ListIterator
 
class  ListNode
 
class  MallocAllocator
 Allocates memory chunks by calling the standard malloc function. More...
 
class  MapEnumerator
 
class  None
 
class  ObjectCollection
 Represents an heterogeneous collection of objects. More...
 
class  ObjectConverter
 
class  ObjectHashMap
 
class  ObjectList
 
class  ObjectMap
 
class  ObjectPair
 
class  ObjectSequence
 
class  ObjFlex
 
class  Pair
 
class  Pattern
 
class  Properties
 Encapsulates an hierarchical database containing name/value pairs. More...
 
class  PropertyException
 Signals an invalid property. More...
 
class  Range
 
class  SequenceEnumerator
 
class  Singleton
 
class  SparseArray
 
class  StdAllocator
 Implements a memory allocation algorithm that balances speed with fair memory use. More...
 
class  StringUtils
 
class  Timer
 Measures the elapsed wall-clock time. More...
 
class  Tokenizer
 
class  WeakHashMap
 

Typedefs

typedef MapEnumerator MapEnum
 
typedef ObjectConverter ObjConverter
 
typedef ObjectHashMap ObjHashMap
 
typedef ObjectList ObjList
 
typedef ObjectMap ObjMap
 
typedef ObjectPair ObjPair
 
typedef ObjectSequence ObjSequence
 
typedef SequenceEnumerator SeqEnum
 
typedef ObjectCollection ObjCollection
 
typedef Dictionary Dict
 
typedef HashDictionary HashDict
 
typedef DictionaryEnumerator DictEnum
 

Functions

void overflowError (const String &where, int dummy)
 
void overflowError (const String &where, lint dummy)
 
template<class Input , class K , class V , class A >
void decode (Input &in, HashMap< K, V, A > &map)
 
template<class Output , class K , class V , class A >
void encode (Output &out, const HashMap< K, V, A > &map)
 
template<class Output , class K , class V , class A >
void print (Output &out, const HashMap< K, V, A > &map)
 
template<class K , class V , class A >
void swap (HashMap< K, V, A > &lhs, HashMap< K, V, A > &rhs)
 
template<class Input , class T , class A >
void decode (Input &in, HashSet< T, A > &set)
 
template<class Output , class T , class A >
void encode (Output &out, const HashSet< T, A > &set)
 
template<class Output , class T , class A >
void print (Output &out, const HashSet< T, A > &set)
 
template<class T , class A >
void swap (HashSet< T, A > &lhs, HashSet< T, A > &rhs)
 
template<class Output , class T >
void print (Output &out, const HashTable< T > &tbl)
 
template<class T >
void swap (HashTable< T > &lhs, HashTable< T > &rhs)
 
template<class Input , class T , class A >
void decode (Input &in, List< T, A > &lst)
 
template<class Output , class T , class A >
void encode (Output &out, const List< T, A > &lst)
 
template<class Output , class T , class A >
void print (Output &out, const List< T, A > &lst)
 
template<class T , class A >
void swap (List< T, A > &lhs, List< T, A > &rhs)
 
bool isNone (const Ref< Object > &obj)
 
void swap (ObjFlex &lhs, ObjFlex &rhs)
 
void decode (io::ObjectInput &in, ObjFlex &ofx)
 
void encode (io::ObjectOutput &out, const ObjFlex &ofx)
 
void merge (const Properties &lhs, const Properties &rhs, bool replace)
 Recursively copies two properties sets. More...
 
void mergeNoReplace (const Properties &lhs, const Properties &rhs)
 Copies two properties sets without replacing existing properties. More...
 
void mergeAndReplace (const Properties &lhs, const Properties &rhs)
 Copies two property sets, replacing existing properties. More...
 
template<class T , int N, class A >
void swap (SparseArray< T, N, A > &lhs, SparseArray< T, N, A > &rhs)
 
template<class Input , class T , int N, class A >
void decode (Input &in, SparseArray< T, N, A > &spa)
 
template<class Output , class T , int N, class A >
void encode (Output &out, const SparseArray< T, N, A > &spa)
 
template<class Output , class T , int N, class A >
void print (Output &out, const SparseArray< T, N, A > &spa)
 
template<class T >
void clamp (T &t, T hi)
 
template<class T >
void clamp (T &t, T lo, T hi)
 
template<class T >
clamped (T t, T hi)
 
template<class T >
clamped (T t, T lo, T hi)
 

Detailed Description

The namespace jem::util exports various container classes and an event framework.

All classes and functions in this namespace can be found in the package jem.util.

Typedef Documentation

Function Documentation

void jem::util::overflowError ( const String where,
int  dummy 
)
void jem::util::overflowError ( const String where,
lint  dummy 
)
template<class Input , class K , class V , class A >
void jem::util::decode ( Input &  in,
HashMap< K, V, A > &  map 
)
template<class Output , class K , class V , class A >
void jem::util::encode ( Output &  out,
const HashMap< K, V, A > &  map 
)
template<class Output , class K , class V , class A >
void jem::util::print ( Output &  out,
const HashMap< K, V, A > &  map 
)
template<class K , class V , class A >
void jem::util::swap ( HashMap< K, V, A > &  lhs,
HashMap< K, V, A > &  rhs 
)
template<class Input , class T , class A >
void jem::util::decode ( Input &  in,
HashSet< T, A > &  set 
)
template<class Output , class T , class A >
void jem::util::encode ( Output &  out,
const HashSet< T, A > &  set 
)
template<class Output , class T , class A >
void jem::util::print ( Output &  out,
const HashSet< T, A > &  set 
)
template<class T , class A >
void jem::util::swap ( HashSet< T, A > &  lhs,
HashSet< T, A > &  rhs 
)
template<class Output , class T >
void jem::util::print ( Output &  out,
const HashTable< T > &  tbl 
)
template<class T >
void jem::util::swap ( HashTable< T > &  lhs,
HashTable< T > &  rhs 
)
template<class Input , class T , class A >
void jem::util::decode ( Input &  in,
List< T, A > &  lst 
)
template<class Output , class T , class A >
void jem::util::encode ( Output &  out,
const List< T, A > &  lst 
)
template<class Output , class T , class A >
void jem::util::print ( Output &  out,
const List< T, A > &  lst 
)
template<class T , class A >
void jem::util::swap ( List< T, A > &  lhs,
List< T, A > &  rhs 
)
bool jem::util::isNone ( const Ref< Object > &  obj)
void jem::util::swap ( ObjFlex lhs,
ObjFlex rhs 
)
void jem::util::decode ( io::ObjectInput in,
ObjFlex ofx 
)
void jem::util::encode ( io::ObjectOutput out,
const ObjFlex ofx 
)
void jem::util::merge ( const Properties lhs,
const Properties rhs,
bool  replace 
)

Copies all properties in the set rhs into the set lhs. If the parameter replace is true, this function will replace all properties in lhs by the properties in rhs with the same name. Otherwise, if replace equals false, the properties in lhs will not be replaced by the properties in rhs with the same name.

The merge function copies properties recursively. That is, if both lhs and rhs contain a nested properties set with the same name, then the merge function will copy all properties in those two nested sets instead of simply replacing the nested property set in lhs by the corresponding properties set in rhs.

Because properties are copied by reference, the properties sets lhs and rhs may contain properties that point to the same object after calling this function.

Parameters
lhs- the destination properties set.
rhs- the source properties set.
replace- a boolean flag that indicates whether properties in lhs should be replaced by the equally named properties in rhs.
void jem::util::mergeNoReplace ( const Properties lhs,
const Properties rhs 
)

Recursively copies all properties in the set rhs that do not exist in the set lhs. This function is equivalent with:

merge ( lhs, rhs, false )

See also
merge()
void jem::util::mergeAndReplace ( const Properties lhs,
const Properties rhs 
)

Recursively copies all properties in the set rhs into the set lhs, replacing properties in lhs by properties in rhs with the same name. This function has the same effect as:

merge ( lhs, rhs, true )

See also
merge()
template<class T , int N, class A >
void jem::util::swap ( SparseArray< T, N, A > &  lhs,
SparseArray< T, N, A > &  rhs 
)
template<class Input , class T , int N, class A >
void jem::util::decode ( Input &  in,
SparseArray< T, N, A > &  spa 
)
template<class Output , class T , int N, class A >
void jem::util::encode ( Output &  out,
const SparseArray< T, N, A > &  spa 
)
template<class Output , class T , int N, class A >
void jem::util::print ( Output &  out,
const SparseArray< T, N, A > &  spa 
)
template<class T >
void jem::util::clamp ( T &  t,
hi 
)
template<class T >
void jem::util::clamp ( T &  t,
lo,
hi 
)
template<class T >
T jem::util::clamped ( t,
hi 
)
template<class T >
T jem::util::clamped ( t,
lo,
hi 
)