ANTLR3_VECTOR_FACTORY_struct(3)
π ANTLR3_VECTOR_FACTORY_struct π
okay bestie, so this page is from the ANTLR3C manual, and it's literally all about ANTLR3_VECTOR_FACTORY_struct π¦ β the lil struct that keeps tabs on vectors inside a vector, and auto-deletes them when the factory gets closed. no cap.
β¨ NAME β¨
ANTLR3_VECTOR_FACTORY_struct β the struct that tracks vectors in a vector, and auto deletes the vectors in the vector factory when it's closed. periodt. π
πΈ SYNOPSIS πΈ
#include <antlr3collections.h>
π Data Fields π
void(* close )(struct ANTLR3_VECTOR_FACTORY_struct *factory)β the function that closes the vector factory.pANTLR3_STACK freeStackβ consumers from the factory can release a factory-produced vector back to the factory so it can be reused (and thus conserve memory πΎ) by another caller.pANTLR3_VECTOR(* newVector )(struct ANTLR3_VECTOR_FACTORY_struct *factory)β the function that supplies a new vector.ANTLR3_UINT32 nextVectorβ the next vector available in the pool.pANTLR3_VECTOR * poolsβ the list of all vector pools allocated so far.void(* returnVector )(struct ANTLR3_VECTOR_FACTORY_struct *factory, pANTLR3_VECTOR vector)β the function that returns a vector to the factory for reuse.ANTLR3_INT32 thisPoolβ count of the vector pools allocated so far (current active pool).ANTLR3_VECTOR unTrucβ a trick to quickly initialize a new vector viamemcpyand not a function call. sneaky iconic π
π«Ά Detailed Description π«Ά
Structure that tracks vectors in a vector and auto deletes the vectors in the vector factory when closed.
like, it's the vibe check for your vectors, fr fr. π
π Field Documentation π
β 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.
ngl that "need not be explicitly freed" part is the bestie behavior we love to see π₯°
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().
π Author π
Generated automatically by Doxygen for ANTLR3C from the source code.
and that's the whole page, bestie π it's giving Version 3.3.1, dated Tue Jul 29 2025 β so yeah, shoutout to Doxygen for auto-generating this whole thing and to ANTLR3C for the source code, mwah πβ¨ bye!! π¦
π¦ where this page comes from
- fedora 43: antlr3-C-devel 1:3.4-3.5.3.14.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms