Yate
Public Member Functions | Protected Member Functions | Protected Attributes | Friends

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 add (unsigned int first, unsigned int last)
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:
rangeStrString used to build this range
nameRange name
strategyStrategy used to allocate circuits from this range
virtual ~SignallingCircuitRange ( ) [inline, virtual]

Destructor


Member Function Documentation

bool add ( const String rangeStr)

Add codes to this range from a string

Parameters:
rangeStrString containing the codes to be added to this range
Returns:
False if the string has invalid format
void add ( unsigned int  code) [inline]

Add a circuit code to this range

Parameters:
codeThe circuit code to add

References SignallingCircuitRange::add().

Referenced by SignallingCircuitRange::add().

void add ( unsigned int  first,
unsigned int  last 
)

Add a compact range of circuit codes to this range

Parameters:
firstThe first circuit code to add
lastNumber of last circuit code
void add ( unsigned int *  codes,
unsigned int  len 
)

Add an array of circuit codes to this range

Parameters:
codesThe array to add
lenThe array's length
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 count ( ) const [inline]

Get the number of circuits contained by this range

Returns:
The number of circuits contained by this range
virtual void destruct ( ) [inline, virtual]

Release memory

Reimplemented from GenObject.

References TelEngine::destruct().

bool find ( unsigned int  code)

Check if a circuit code is within this range

Parameters:
codeThe circuit code to find
Returns:
True if found
unsigned int operator[] ( unsigned int  index) [inline]

Indexing operator

Parameters:
indexThe index in the array to retreive
Returns:
The code at the given index
const unsigned int* range ( ) const [inline]

Get the pointer to the circuit codes array

Returns:
Pointer to the circuit codes array or 0
void remove ( unsigned int  code)

Remove a circuit code from this range

Parameters:
codeThe circuit code to remove
bool set ( const String rangeStr) [inline]

Set this range from a string

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

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