OpenMW
Public Member Functions | Private Member Functions | Private Attributes
Compiler::Locals Class Reference

Local variable declarations. More...

#include <locals.hpp>

List of all members.

Public Member Functions

char getType (const std::string &name) const
 's': short, 'l': long, 'f': float, ' ': does not exist.
int getIndex (const std::string &name) const
 return index for local variable name (-1: does not exist).
const std::vector< std::string > & get (char type) const
void write (std::ostream &localFile) const
 write declarations to file.
void declare (char type, const std::string &name)
 declares a variable.
void clear ()
 remove all declarations.

Private Member Functions

int searchIndex (char type, const std::string &name) const
bool search (char type, const std::string &name) const
std::vector< std::string > & get (char type)

Private Attributes

std::vector< std::string > mShorts
std::vector< std::string > mLongs
std::vector< std::string > mFloats

Detailed Description

Local variable declarations.


Member Function Documentation

remove all declarations.

void Compiler::Locals::declare ( char  type,
const std::string &  name 
)

declares a variable.

std::vector< std::string > & Compiler::Locals::get ( char  type) [private]
const std::vector< std::string > & Compiler::Locals::get ( char  type) const
int Compiler::Locals::getIndex ( const std::string &  name) const

return index for local variable name (-1: does not exist).

char Compiler::Locals::getType ( const std::string &  name) const

's': short, 'l': long, 'f': float, ' ': does not exist.

bool Compiler::Locals::search ( char  type,
const std::string &  name 
) const [private]
int Compiler::Locals::searchIndex ( char  type,
const std::string &  name 
) const [private]
void Compiler::Locals::write ( std::ostream &  localFile) const

write declarations to file.


Member Data Documentation

std::vector<std::string> Compiler::Locals::mFloats [private]
std::vector<std::string> Compiler::Locals::mLongs [private]
std::vector<std::string> Compiler::Locals::mShorts [private]

The documentation for this class was generated from the following files: