PIGALE 1.3.9 Documentation (original) (raw)
P.I.G.A.L.E.
1.3.9
Public Implementation of a Graph Algorithm
Library and Editor
H. de Fraysseix P. Ossona de Mendez
PSet Class Reference
Detailed Description
Set of vector property for scalar types (without constructor or destructor).
A set of vector properties ([PSet](classPSet.html "Set of vector property for scalar types (without constructor or destructor).")) handles like an array of vector properties. All the vector properties in a same set have the same index bound.
A vector property in the set may have several status:
- it may be declared (means a typing has been provided for the property)
- it may be defined (means that the vector has been filled with data)
- it may exist (there is a
[svector](classsvector.html "Dynamic vector with elements of type T.")corresponding to the property)
Public Member Functions
- PSet (int a, int b)
- PSet (int n)
- PSet ()
- PSet (const PSet &P)
- ~PSet ()
- void reg (int num, vProp *pAccess, _svector *pv)
- void reg (int num, vProp *pAccess)
- void dereg (int num)
- void Tswap (PSet &P)
- void load (int num, const _svector &v)
- void swload (int num, _svector &v)
- int start () const
- int finish () const
- void erase (int num)
- void clear ()
- void KeepClear ()
- void reset ()
- bool exist (int num) const
- int declared (int num) const
- int defined (int num) const
- void resize (int a, int b)
- void SwapIndex (int a, int b)
- void CopyIndex (int a, int b)
- int PStart () const
- int PEnd () const
- vProp * operator() (int num) const
- vProp *& operator() (int num)
- _svector * operator[] (int num) const
- _svector *& operator[] (int num)
- int status (int num) const
- int & status (int num)
- void Keep (int num)
- PSet & operator= (const PSet &X)
- tstring Value (int PNum, int index, int *rc=0)
- void affiche (T_STD ostream &out=T_STD cout) const
Protected Member Functions
Protected Attributes
- int _start
- int _finish
- svector< vProp * > vtab
- svector< _svector * > tab
- svector< int > previndx
- svector< int > nextindx
- svector< int > keep
Related Functions
(Note that these are not member functions.)
- T_STD ostream & operator<< (T_STD ostream &out, const PSet &X)
Constructor & Destructor Documentation
| PSet | ( | int | a, |
|---|---|---|---|
| int | b | ||
| ) | [inline] |
Property set with vectors indexed within two bounds.
Parameters:
| a | start index for properties |
|---|---|
| b | last index for properties |
Property set with vectors of a specified size (indexed from 0).
Parameters:
| n | size of the properties (indexed from 0 to n-1) |
|---|
default constructor
The Property set will have to be resized before any use.
Member Function Documentation
| void copy | ( | const PSet & | P | ) | [protected] |
|---|
| void link | ( | int | num | ) | [inline, protected] |
|---|
add in the double linked list of existing properties
| void unlink | ( | int | num | ) | [inline, protected] |
|---|
remove from the double linked list of existing properties
register a property
Parameters:
| num | property number (see propdef.h) |
|---|---|
| pAccess | virtual access point |
| pv | property vector |
| void reg | ( | int | num, |
|---|---|---|---|
| vProp * | pAccess | ||
| ) | [inline] |
register a property (declaration only)
Parameters:
| num | property number (see propdef.h) |
|---|---|
| pAccess | virtual access point |
| void dereg | ( | int | num | ) | [inline] |
|---|
deregister a property
Parameters:
| void Tswap | ( | PSet & | P | ) | [inline] |
|---|
exchange the content of two property sets.
Parameters:
| P | property set to exchange content with. |
|---|
| void load | ( | int | num, |
|---|---|---|---|
| const _svector & | v | ||
| ) | [inline] |
load a property as a copy of a [_svector](class%5F%5Fsvector.html "Simple dynamic scalar vector [start:finish-1].")
Parameters:
| void swload | ( | int | num, |
|---|---|---|---|
| _svector & | v | ||
| ) | [inline] |
load a property by exchange with an [_svector](class%5F%5Fsvector.html "Simple dynamic scalar vector [start:finish-1].")
If no vector have been yet created for the requested property number, an emty vector is created before exchange. This function is usefull for temporay property change.
Parameters:
| int start | ( | | ) | const [inline] | | --------- | - | | - | ---------------- |
starting index for properties
| int finish | ( | | ) | const [inline] | | ---------- | - | | - | ---------------- |
ending index for properties
| void erase | ( | int | num | ) | [inline] |
|---|
erase a property
Parameters:
| void KeepClear | ( | | ) | [inline] | | -------------- | - | | - | ---------- |
clear the keep flag for all the properties.
clear all the properties with no keep flag set.
| bool exist | ( | int | num | ) | const [inline] |
|---|
checks if a property exists
Parameters:
| int declared | ( | int | num | ) | const [inline] |
|---|
checks if a property is declared
Parameters:
| int defined | ( | int | num | ) | const [inline] |
|---|
checks if a property is defined
Parameters:
| void resize | ( | int | a, |
|---|---|---|---|
| int | b | ||
| ) |
resize the property set
Parameters:
| a | start index for properties |
|---|---|
| b | last index for properties |
| void SwapIndex | ( | int | a, |
|---|---|---|---|
| int | b | ||
| ) |
Tswap two elements in all the existing properties.
Parameters:
| a | index of first element |
|---|---|
| b | index of second element |
| void CopyIndex | ( | int | a, |
|---|---|---|---|
| int | b | ||
| ) |
copy an element into another one in all the existing properties
Parameters:
| a | index of source element |
|---|---|
| b | index of target element |
| int PStart | ( | | ) | const [inline] | | ---------- | - | | - | ---------------- |
first index for property numbers
should actualy be 0
| int PEnd | ( | | ) | const [inline] | | -------- | - | | - | ---------------- |
last index for property numbers
should be PSET_SIZE-1
| vProp* operator() | ( | int | num | ) | const [inline] |
|---|
get virtual access point (constant version)
Parameters:
| vProp* & operator() | ( | int | num | ) | [inline] |
|---|
get virtual access point (non constant version)
Parameters:
| _svector* operator[] | ( | int | num | ) | const [inline] |
|---|
get the raw [_svector](class%5F%5Fsvector.html "Simple dynamic scalar vector [start:finish-1].") of a property (constant version)
Parameters:
| _svector* & operator[] | ( | int | num | ) | [inline] |
|---|
get the raw [_svector](class%5F%5Fsvector.html "Simple dynamic scalar vector [start:finish-1].") of a property (constant version)
Parameters:
| int status | ( | int | num | ) | const [inline] |
|---|
get the keep status of a property (non constant version)
Parameters:
Return values:
| status | keep flag 0: don't keep1: keep the returned value may be used as a left value to set the keep flag. |
|---|
| int& status | ( | int | num | ) | [inline] |
|---|
get the keep status of a property (constant version)
Parameters:
Return values:
| status | keep flag 0: don't keep1: keep |
|---|
| void Keep | ( | int | num | ) | [inline] |
|---|
set the keep status of a property
Parameters:
| PSet& operator= | ( | const PSet & | X | ) | [inline] |
|---|
| tstring Value | ( | int | PNum, |
|---|---|---|---|
| int | index, | ||
| int * | rc = 0 | ||
| ) | [inline] |
get the value of an element as a string
| void affiche | ( | T_STD ostream & | out = T_STD cout | ) | const [inline] |
|---|
printing function (debugging purpose)
Parameters:
Friends And Related Function Documentation
| T_STD ostream & operator<< | ( | T_STD ostream & | out, |
|---|---|---|---|
| const PSet & | X | ||
| ) | [related] |
stream printing of a property set
Member Data Documentation
index of first element in vector properties
index of last element in vector properties
back links for double linked list of existing properties
forward links for double linked list of existing properties
array of flags for reset strategy
