SourceForge Logo
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

Collaboration diagram for PSet:

Collaboration graph
[legend]

List of all members.


Detailed Description

Set of vector property for scalar types (without constructor or destructor).

A set of vector properties (PSet) 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:

Public Member Functions

Protected Member Functions

Protected Attributes

Related Functions

(Note that these are not member functions.)

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

PSet ( int  n  )  [inline]

Property set with vectors of a specified size (indexed from 0).

Parameters:
n size of the properties (indexed from 0 to n-1)

PSet (  )  [inline]

default constructor

The Property set will have to be resized before any use.

PSet ( const PSet P  )  [inline]

copy constructor

~PSet (  )  [inline]

destructor


Member Function Documentation

void copy ( const PSet P  )  [protected]

copy function

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

void reg ( int  num,
vProp pAccess,
_svector pv 
) [inline]

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:
num property number (see propdef.h)

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

Parameters:
num property number (see propdef.h)
v raw _svector to copy

void swload ( int  num,
_svector v 
) [inline]

load a property by exchange with an _svector

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:
num property number (see propdef.h)
v raw _svector to exchange with

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:
num property number (see propdef.h)

void clear (  ) 

clear all the properties

void KeepClear (  )  [inline]

clear the keep flag for all the properties.

void reset (  ) 

clear all the properties with no keep flag set.

bool exist ( int  num  )  const [inline]

checks if a property exists

Parameters:
num property number (see propdef.h)

int declared ( int  num  )  const [inline]

checks if a property is declared

Parameters:
num property number (see propdef.h)

int defined ( int  num  )  const [inline]

checks if a property is defined

Parameters:
num property number (see propdef.h)

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:
num property number (see propdef.h)

vProp* & operator() ( int  num  )  [inline]

get virtual access point (non constant version)

Parameters:
num property number (see propdef.h)

_svector* operator[] ( int  num  )  const [inline]

get the raw _svector of a property (constant version)

Parameters:
num property number (see propdef.h)

_svector* & operator[] ( int  num  )  [inline]

get the raw _svector of a property (constant version)

Parameters:
num property number (see propdef.h)

int status ( int  num  )  const [inline]

get the keep status of a property (non constant version)

Parameters:
num property number (see propdef.h)
Return values:
status keep flag
  • 0: don't keep
  • 1: 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:
num property number (see propdef.h)
Return values:
status keep flag
  • 0: don't keep
  • 1: keep

void Keep ( int  num  )  [inline]

set the keep status of a property

Parameters:
num property number (see propdef.h)

PSet& operator= ( const PSet X  )  [inline]

copy operator

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:
out output stream


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

int _start [protected]

index of first element in vector properties

int _finish [protected]

index of last element in vector properties

svector<vProp *> vtab [protected]

array of virtual access

svector<_svector *> tab [protected]

array of raw _svector

svector<int> previndx [protected]

back links for double linked list of existing properties

svector<int> nextindx [protected]

forward links for double linked list of existing properties

svector<int> keep [protected]

array of flags for reset strategy


Generated on Thu Jan 31 16:52:02 2008 for Pigale by  doxygen 1.5.4