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

#include <scriptcontext.hpp>

Inheritance diagram for CSMWorld::ScriptContext:
Collaboration diagram for CSMWorld::ScriptContext:

Public Member Functions

 ScriptContext (const Data &data)
 
virtual bool canDeclareLocals () const
 Is the compiler allowed to declare local variables? More...
 
virtual char getGlobalType (const std::string &name) const
 'l: long, 's': short, 'f': float, ' ': does not exist. More...
 
virtual std::pair< char, boolgetMemberType (const std::string &name, const std::string &id) const
 
virtual bool isId (const std::string &name) const
 Does name match an ID, that can be referenced? More...
 
virtual bool isJournalId (const std::string &name) const
 Does name match a journal ID? More...
 
void invalidateIds ()
 
void clear ()
 Remove all cached data. More...
 
bool clearLocals (const std::string &script)
 
- Public Member Functions inherited from Compiler::Context
 Context ()
 
virtual ~Context ()
 
void setExtensions (const Extensions *extensions=0)
 
const ExtensionsgetExtensions () const
 

Private Attributes

const DatamData
 
std::vector< std::string > mIds
 
bool mIdsUpdated
 
std::map< std::string,
Compiler::Locals
mLocals
 

Constructor & Destructor Documentation

CSMWorld::ScriptContext::ScriptContext ( const Data data)

Member Function Documentation

bool CSMWorld::ScriptContext::canDeclareLocals ( ) const
virtual

Is the compiler allowed to declare local variables?

Implements Compiler::Context.

void CSMWorld::ScriptContext::clear ( )

Remove all cached data.

bool CSMWorld::ScriptContext::clearLocals ( const std::string &  script)
Returns
Were there any locals that needed clearing?

Here is the call graph for this function:

char CSMWorld::ScriptContext::getGlobalType ( const std::string &  name) const
virtual

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

Implements Compiler::Context.

std::pair< char, bool > CSMWorld::ScriptContext::getMemberType ( const std::string &  name,
const std::string &  id 
) const
virtual

Return type of member variable name in script id or in script of reference of id

Returns
first: 'l: long, 's': short, 'f': float, ' ': does not exist. second: true: script of reference

Implements Compiler::Context.

Here is the call graph for this function:

void CSMWorld::ScriptContext::invalidateIds ( )
bool CSMWorld::ScriptContext::isId ( const std::string &  name) const
virtual

Does name match an ID, that can be referenced?

Implements Compiler::Context.

Here is the call graph for this function:

bool CSMWorld::ScriptContext::isJournalId ( const std::string &  name) const
virtual

Does name match a journal ID?

Implements Compiler::Context.

Member Data Documentation

const Data& CSMWorld::ScriptContext::mData
private
std::vector<std::string> CSMWorld::ScriptContext::mIds
mutableprivate
bool CSMWorld::ScriptContext::mIdsUpdated
mutableprivate
std::map<std::string, Compiler::Locals> CSMWorld::ScriptContext::mLocals
mutableprivate

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