OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Compiler::Locals Class Reference

Local variable declarations. More...

#include <locals.hpp>

Collaboration diagram for Compiler::Locals:

Public Member Functions

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

Private Member Functions

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

void Compiler::Locals::clear ( )

remove all declarations.

Here is the caller graph for this function:

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

declares a variable.

Here is the call graph for this function:

std::vector< std::string > & Compiler::Locals::get ( char  type)
private

Here is the caller graph for this function:

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).

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool Compiler::Locals::search ( char  type,
const std::string &  name 
) const

Here is the call graph for this function:

Here is the caller graph for this function:

int Compiler::Locals::searchIndex ( char  type,
const std::string &  name 
) const

Return index for local variable name of type type (-1: variable does not exit).

Here is the caller graph for this function:

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: