LLOOP Index | GSP Language | GSP Library | Framework Classes | Component Classes

SymbolCounterComposite Class Reference

#include "gsp__Symbol.h"

Defines a symbol counter composite for recursively counting (possibly nested) repetitive symbol sequences More...


Deriving Class(es)


Public Functions

SymbolCounterComposite ( ) 
~SymbolCounterComposite ( ) 
  • void 
addComponent SymbolCounter * pComponent 
  • void 
destroyAllComponents ( ) 
getComponent ( unsigned long uIndex 
getConstComponentAt ( unsigned long uIndex ) const 
  • unsigned long 
getNbComponents ( ) const 

Protected Functions

  • void 
ensureComponentCapacity ( unsigned long uMinCapacity 
getComponentAt ( unsigned long uIterLevel , va_list arg 

Protected Variables

m_apComponents 
  • unsigned long 
m_uCapacity 
  • unsigned long 
m_uNbComponents 

Detailed Description

Defines a symbol counter composite for recursively counting (possibly nested) repetitive symbol sequences


Files Included

#include <iostream>
#include "universal.h"

Functions Documentation

SymbolCounterComposite ( ) 

Constructor. By default the composite is empty.

See also:

Back to index

~SymbolCounterComposite ( )   [  virtual  ] 

Destructor. By default the composite is empty.

See also:

Back to index

const SymbolCounter * getConstComponentAt ( unsigned long uIndex ) const 

Returns the const sub component of the specified index.

See also:

Back to index

void ensureComponentCapacity ( unsigned long uMinCapacity   [  protected  ] 

Components-related management function.

Manages the memory slots used to store pointers to sub components (symbols) (when the symbol is iterative). Re-allocates the memory slots if necessary to ensure that at least uMinCapacity pointers can be stored. If the slots must be increased, the new slot capacity is at least doubled if this is sufficient.

See also:

Back to index

void addComponent SymbolCounter * pComponent 

Adds a sub component for this symbol.

See also:

Back to index

void destroyAllComponents ( ) 

Destroys all sub components and resets any reference to them.

See also:

Back to index

unsigned long getNbComponents ( ) const 

Returns the number of components contained by this composite. Note that these components may themselves be composites.

See also:

Back to index

SymbolCounter * getComponent ( unsigned long uIndex 

Returns the sub component of the specified index.

See also:

Back to index

SymbolCounter * getComponentAt ( unsigned long uIterLevel , va_list arg   [  protected  ] 

Returns the sub component of the specified index. Allows to get a random sub component from the composite hierarchy.

uIterLevel gives the depth of the hierarchy. ... gives the indexes of the sub composites for each hierarchy level.

Note: uIterLevel can't be zero. If so this function does nothing.

See also:

Back to index


This file is part of the LLOOP Reversible Object-Oriented Parser Generator. Copyright (c) 2005-2006 Michel MEHL, France. All rights reserved. LLOOP is distributed by the company ERSA SaRL.


Copyright (c) 2005-2006 Michel MEHL, Haguenau, France
LLOOP version 1.1


Generated with makedoc.