GCpp general purpose C++ library  version 1.0
gcollection Namespace Reference

Variables

Iterator flags
static const u_int gDelete = 0x00000001
 
General collections options
static const u_int gDeepCopy = 0x00001000
 
static const u_int gUniqueItem = 0x00002000
 
static const u_int gFixed = 0x00020000
 
static const u_int gIsSortable = 0x00010000
 
static const u_int gAlwaysSorted = 0x00030000
 
static const u_int gReverseSort = 0x00050000
 
Vectors collections options
static const u_int gShiftRemove = 0x00100000
 
static const u_int gAutoResize = 0x00200000
 
static const u_int gDoubleSize = 0x00400000
 
Named objects collections options
static const u_int gUniqueName = 0x01000000
 
static const u_int gNoCaseSensitive = 0x02000000
 
static const u_int gDictSort = 0x04000000
 

Detailed Description

Define values for collections behaviour flags.

Variable Documentation

const u_int gcollection::gAlwaysSorted = 0x00030000
static

The objects are entered sorted and the collection remains sorted (objects cannot be moved).

Referenced by GCollectionT< T >::IsAlwaysSorted().

const u_int gcollection::gAutoResize = 0x00200000
static

For vector collections, indicates that when vector capacity is exceeded, the vector is automatically resized. It is resized only for what is required, except if gcollection::gDoubleSize bit is set.

Referenced by GVectT< T >::__Assign(), and GVectT< T >::__Shift().

const u_int gcollection::gDeepCopy = 0x00001000
static

Indicates that if an object is added to the collection by reference, a copy of the object is made (with Clone() function), and the new object is adopted by the list.

Referenced by GListT< T >::Add(), GVectT< T >::Assign(), and GListT< T >::Insert().

const u_int gcollection::gDelete = 0x00000001
static
const u_int gcollection::gDictSort = 0x04000000
static

For named objects collections, the sorting is based on dictionary sorting, not on ascii codes.

Referenced by GCollectionT< T >::DictSortOption(), and GNamedListT< T >::SetDictSort().

const u_int gcollection::gDoubleSize = 0x00400000
static

For vector collections, indicates that when vector capacity is automatically increased, it is doubled.

Referenced by GVectT< T >::__AutoResize().

const u_int gcollection::gFixed = 0x00020000
static

The position of elements cannot be moved once inserted.

Referenced by GCollectionT< T >::FixPositionOption().

const u_int gcollection::gIsSortable = 0x00010000
static

The collection can be sorted: the comparison function (Compare) must be defined.

Referenced by GCollectionT< T >::IsSortable().

const u_int gcollection::gNoCaseSensitive = 0x02000000
static

For named objects collections, the names comparison is not case sensitive.

Referenced by GCollectionT< T >::IsCaseSensitive(), and GNamedListT< T >::SetCaseSensitive().

const u_int gcollection::gReverseSort = 0x00050000
static

The sorting is done in reverse order.

Referenced by GCollectionT< T >::IsReverseSorted(), and GSortListT< T >::ReverseSort().

const u_int gcollection::gShiftRemove = 0x00100000
static

For vector collections, indicates that when an object is removed the other elements are moved to avoid creating holes (NULL pointers to objects).

Referenced by GVectT< T >::__Shift(), GVectT< T >::__Take(), and GVectT< T >::Empty().

const u_int gcollection::gUniqueItem = 0x00002000
static

An object must not be refered several times in the same collection (default check is based on pointer comparison, but for named objects it may be based on objects names).

Referenced by GListT< T >::__Add(), GVectT< T >::__Assign(), and GListT< T >::__Insert().

const u_int gcollection::gUniqueName = 0x01000000
static

For named objects collections, only one object with a given name can be in the collection.

Referenced by GCollectionT< T >::UniqueNameOption().