SignallingCircuitRange Class Reference

A circuit range (set of circuits). More...

#include <yatesig.h>

Inheritance diagram for SignallingCircuitRange:

String GenObject

List of all members.

Public Member Functions

 SignallingCircuitRange (const String &rangeStr, const char *name=0, int strategy=-1)
virtual ~SignallingCircuitRange ()
unsigned int count () const
const unsigned int * range () const
void clear ()
unsigned int operator[] (unsigned int index)
bool set (const String &rangeStr)
bool add (const String &rangeStr)
void add (unsigned int *codes, unsigned int len)
void add (unsigned int code)
void remove (unsigned int code)
bool find (unsigned int code)
virtual void destruct ()

Protected Member Functions

void updateLast ()

Protected Attributes

DataBlock m_range
unsigned int m_count
unsigned int m_last
int m_strategy
unsigned int m_used

Friends

class SignallingCircuitGroup


Detailed Description

A circuit range (set of circuits).

Keeps a range (set) of circuits. The circuit codes contained within a range may not be contiguous. See SignallingUtils::parseUIntArray() for the format of the string ranges this object can be built from


Constructor & Destructor Documentation

SignallingCircuitRange ( const String rangeStr,
const char *  name = 0,
int  strategy = -1 
)

Constructor

Parameters:
rangeStr String used to build this range
name Range name
strategy Strategy used to allocate circuits from this range

virtual ~SignallingCircuitRange (  )  [inline, virtual]

Destructor


Member Function Documentation

unsigned int count (  )  const [inline]

Get the number of circuits contained by this range

Returns:
The number of circuits contained by this range

const unsigned int* range (  )  const [inline]

Get the pointer to the circuit codes array

Returns:
Pointer to the circuit codes array or 0

void clear (  )  [inline]

Get the pointer to the circuit codes array

Returns:
Pointer to the circuit codes array or 0

Reimplemented from String.

unsigned int operator[] ( unsigned int  index  )  [inline]

Indexing operator

Parameters:
index The index in the array to retreive
Returns:
The code at the given index

bool set ( const String rangeStr  )  [inline]

Set this range from a string

Parameters:
rangeStr String used to (re)build this range
Returns:
False if the string has invalid format

bool add ( const String rangeStr  ) 

Add codes to this range from a string

Parameters:
rangeStr String containing the codes to be added to this range
Returns:
False if the string has invalid format

void add ( unsigned int *  codes,
unsigned int  len 
)

Add an array of circuit codes to this range

Parameters:
codes The array to add
len The array's length

void add ( unsigned int  code  )  [inline]

Add a circuit code to this range

Parameters:
code The circuit code to add

void remove ( unsigned int  code  ) 

Remove a circuit code from this range

Parameters:
code The circuit code to remove

bool find ( unsigned int  code  ) 

Check if a circuit code is within this range

Parameters:
code The circuit code to find
Returns:
True if found

virtual void destruct (  )  [inline, virtual]

Release memory

Reimplemented from GenObject.

References GenObject::destruct().


The documentation for this class was generated from the following file:

Generated on Mon Aug 11 16:18:53 2008 for Yate by  doxygen 1.5.6