# class SignallingCircuitRange | A circuit range (set of circuits). More...
Full name | `TelEngine::SignallingCircuitRange`
Definition | `#include <libs/ysig/yatesig.h>`
Inherits | TelEngine::String [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- SignallingCircuitRange (const String& rangeStr, const char* name = 0, int strategy = -1)
- virtual ~SignallingCircuitRange ()
- inline unsigned int count () const
- inline const unsigned int* range () const
- unsigned int* copyRange (unsigned int& count) const
- inline void clear ()
- inline unsigned int operator[] (unsigned int index)
- inline bool set (const String& rangeStr)
- bool add (const String& rangeStr)
- void add (unsigned int* codes, unsigned int len)
- inline 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 Methods

- void updateLast ()

#### Protected Members

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

## Detailed Description

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

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

Constructor

Parameters:

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

~SignallingCircuitRange () | ### ~SignallingCircuitRange

[virtual]

Destructor

inline unsigned int count () | ### count

[const]

Get the number of circuits contained by this range

Returns: The number of circuits contained by this range

inline const unsigned int* range () | ### range

[const]

Get the pointer to the circuit codes array

Returns: Pointer to the circuit codes array or 0

unsigned int* copyRange (unsigned int& count) | ### copyRange

[const]

Allocate and return an array containing range circuits

Parameters:

count | Address of variable to be filled with circuit count

Returns: Pointer to allocated buffer, 0 if there is no circuit. The caller will own the returned buffer

inline void clear () | ### clear

Get the pointer to the circuit codes array

Returns: Pointer to the circuit codes array or 0

Reimplemented from String.

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

Indexing operator

Parameters:

index | The index in the array to retreive

Returns: The code at the given index

Reimplemented from String.

inline bool set (const String& rangeStr) | ### set

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

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

Add an array of circuit codes to this range

Parameters:

codes | The array to add
len | The array's length

inline void add (unsigned int code) | ### add

Add a circuit code to this range

Parameters:

code | The circuit code to add

void add (unsigned int first, unsigned int last) | ### add

Add a compact range of circuit codes to this range

Parameters:

first | The first circuit code to add
last | Number of last circuit code

void remove (unsigned int code) | ### remove

Remove a circuit code from this range

Parameters:

code | The circuit code to remove

bool find (unsigned int code) | ### find

Check if a circuit code is within this range

Parameters:

code | The circuit code to find

Returns: True if found

Reimplemented from String.

void destruct () | ### destruct

[virtual]

Release memory

Reimplemented from GenObject.

void updateLast () | ### updateLast

[protected]

DataBlock m_range | ### m_range

[protected]

unsigned int m_count | ### m_count

[protected]

unsigned int m_last | ### m_last

[protected]

int m_strategy | ### m_strategy

[protected]

unsigned int m_used | ### m_used

[protected]

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.