ANTLR3C
3.3.1
|
Structure that tracks vectors in a vector and auto deletes the vectors in the vector factory when closed. More...
#include <antlr3collections.h>
Data Fields | |
void(* | close )(struct ANTLR3_VECTOR_FACTORY_struct *factory) |
Function to close the vector factory. More... | |
pANTLR3_STACK | freeStack |
Consumers from the factory can release a factory produced vector back to the factory so that it may be reused (and thus conserve memory) by another caller. More... | |
pANTLR3_VECTOR(* | newVector )(struct ANTLR3_VECTOR_FACTORY_struct *factory) |
Function to supply a new vector. More... | |
ANTLR3_UINT32 | nextVector |
The next vector available in the pool. More... | |
pANTLR3_VECTOR * | pools |
List of all vector pools allocated so far. More... | |
void(* | returnVector )(struct ANTLR3_VECTOR_FACTORY_struct *factory, pANTLR3_VECTOR vector) |
Function to return a vector to the factory for reuse. More... | |
ANTLR3_INT32 | thisPool |
Count of the vector pools allocated so far (current active pool) More... | |
ANTLR3_VECTOR | unTruc |
Trick to quickly initialize a new vector via memcpy and not a function call. More... | |
Structure that tracks vectors in a vector and auto deletes the vectors in the vector factory when closed.
void(* ANTLR3_VECTOR_FACTORY_struct::close) (struct ANTLR3_VECTOR_FACTORY_struct *factory) |
Function to close the vector factory.
Referenced by antlr3VectorFactoryNew(), and factoryClose().
pANTLR3_STACK ANTLR3_VECTOR_FACTORY_struct::freeStack |
Consumers from the factory can release a factory produced vector back to the factory so that it may be reused (and thus conserve memory) by another caller.
The available vectors are stored here. Note that the only vectors avaible in the free chain are produced by this factory, so they need not be explicitly freed when the factory is closed.
Referenced by antlr3VectorFactoryNew(), closeVectorFactory(), newVector(), and returnVector().
pANTLR3_VECTOR(* ANTLR3_VECTOR_FACTORY_struct::newVector) (struct ANTLR3_VECTOR_FACTORY_struct *factory) |
Function to supply a new vector.
Referenced by add(), and antlr3VectorFactoryNew().
ANTLR3_UINT32 ANTLR3_VECTOR_FACTORY_struct::nextVector |
The next vector available in the pool.
Referenced by closeVectorFactory(), newPool(), and newVector().
pANTLR3_VECTOR* ANTLR3_VECTOR_FACTORY_struct::pools |
List of all vector pools allocated so far.
Referenced by antlr3VectorFactoryNew(), closeVectorFactory(), newPool(), and newVector().
void(* ANTLR3_VECTOR_FACTORY_struct::returnVector) (struct ANTLR3_VECTOR_FACTORY_struct *factory, pANTLR3_VECTOR vector) |
Function to return a vector to the factory for reuse.
Referenced by antlr3VectorFactoryNew(), freeNodeRS(), and freeRS().
ANTLR3_INT32 ANTLR3_VECTOR_FACTORY_struct::thisPool |
Count of the vector pools allocated so far (current active pool)
Referenced by antlr3VectorFactoryNew(), closeVectorFactory(), newPool(), and newVector().
ANTLR3_VECTOR ANTLR3_VECTOR_FACTORY_struct::unTruc |
Trick to quickly initialize a new vector via memcpy and not a function call.
Referenced by antlr3VectorFactoryNew().