| Home | Index | universal Index | gsp Index | Examples | Tutorial |
#include "ini__IdToken.h"
Factory class for the token. More...
Public Functions | |||
| IdTokenFactory | ( ) | ||
| ~IdTokenFactory | ( ) | ||
| create | ( ) | |
| destroy | ( IdToken * & pInstance ) | |
| getNbCreated | ( ) const | |
Private Variables | |||
| m_spare [ 1 ] | ||
| m_uAmountSpare | ||
| m_uStatisticNbCreated | ||
Private Static Variables | |||
| MAX_SPARE | ||
Factory class for the token.
The factory provides a 1 spare object optimisation to avoid useless and time-consuming object instantiations and destructions.
That means that the first time a token instance needs to be created and to be parsed, the token is actually created using the 'new' operator. If afterwards the parsing fails, the instance is not destroyed by the factory and is kept as a spare object that will be returned at the next creation request. Otherwise, if the parsing was successful, another object is created which may become in turn a spare object on a parse failure.
Constructor. Constructs a default spare object.
See also:
Destructor.
See also:
Creates an instance of the symbol. If there is a spare object available, it returns it. Otherwise a new object is created and returned.
See also:
Destroys the instance of the symbol from the passed pointer pInstance. However, if the factory has no spare object currently in reserve, the object is not destroyed but kept as spare object that will be returned at the next creation request.
In all cases, the pointer pInstance is set to null.
See also:
Returns the number of instance created in all. It is NOT the number of times the create() method was called, but actually the real number of times that an instance had to be created with the 'new' operator.
See also:
This file is part of the LLOOP LL Object-Oriented Parser Generator and Object Expander 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 |