OpenBarnyard
 
Loading...
Searching...
No Matches
TFileLexerUTF8::LookaheadTokens Struct Reference

#include <TFileLexerUTF8.h>

Public Member Functions

TokenGetTokens ()
 

Static Public Member Functions

static LookaheadTokensAllocate (TINT a_iCount=1)
 
static void Free (Token *a_pHeadToken)
 
static LookaheadTokensFromToken (Token *a_pHeadToken)
 

Public Attributes

TINT m_iCount
 

Detailed Description

Definition at line 25 of file TFileLexerUTF8.h.

Member Function Documentation

◆ Allocate()

static LookaheadTokens * TFileLexerUTF8::LookaheadTokens::Allocate ( TINT a_iCount = 1)
inlinestatic

Definition at line 33 of file TFileLexerUTF8.h.

34 {
35 return TREINTERPRETCAST(
36 LookaheadTokens*,
37 TMalloc( sizeof( LookaheadTokens ) + sizeof( Token ) * a_iCount )
38 );
39 }
void * TMalloc(TSIZE a_uiSize, Toshi::TMemory::MemBlock *a_pMemBlock, const TCHAR *a_szFileName, TINT a_iLineNum)
Allocates memory from a specific memory block.
Definition TMemory.cpp:973
#define TREINTERPRETCAST(TYPE, VALUE)
Definition Defines.h:68

◆ Free()

static void TFileLexerUTF8::LookaheadTokens::Free ( Token * a_pHeadToken)
inlinestatic

Definition at line 41 of file TFileLexerUTF8.h.

42 {
43 TFree( FromToken( a_pHeadToken ) );
44 }
void TFree(void *a_pMem)
Frees previously allocated memory.
Definition TMemory.cpp:1054
static LookaheadTokens * FromToken(Token *a_pHeadToken)

◆ FromToken()

static LookaheadTokens * TFileLexerUTF8::LookaheadTokens::FromToken ( Token * a_pHeadToken)
inlinestatic

Definition at line 46 of file TFileLexerUTF8.h.

47 {
48 return TREINTERPRETCAST(
49 LookaheadTokens*,
50 TREINTERPRETCAST( uintptr_t, a_pHeadToken ) - sizeof( LookaheadTokens )
51 );
52 }

◆ GetTokens()

Token * TFileLexerUTF8::LookaheadTokens::GetTokens ( )
inline

Definition at line 28 of file TFileLexerUTF8.h.

29 {
30 return TREINTERPRETCAST( Token*, this + 1 );
31 }

Member Data Documentation

◆ m_iCount

TINT TFileLexerUTF8::LookaheadTokens::m_iCount

Definition at line 55 of file TFileLexerUTF8.h.


The documentation for this struct was generated from the following file: