shiny  0.4
a shader and material management library for OGRE
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
sh::ScriptLoader Class Reference

The base class of loaders that read Ogre style script files to get configuration and settings. Heavily inspired by: http://www.ogre3d.org/tikiwiki/All-purpose+script+parser ( "Non-ogre version") More...

#include <ScriptLoader.hpp>

Public Member Functions

 ScriptLoader (const std::string &fileEnding)
 
ScriptNodegetConfigScript (const std::string &name)
 
std::map< std::string, ScriptNode * > getAllConfigScripts ()
 
void parseScript (std::ifstream &stream)
 

Static Public Member Functions

static void loadAllFiles (ScriptLoader *c, const std::string &path)
 

Public Attributes

std::string mFileEnding
 
std::string mCurrentFileName
 

Protected Types

enum  Token {
  TOKEN_Text, TOKEN_NewLine, TOKEN_OpenBrace, TOKEN_CloseBrace,
  TOKEN_EOF
}
 

Protected Member Functions

void _parseNodes (std::ifstream &stream, ScriptNode *parent)
 
void _nextToken (std::ifstream &stream)
 
void _skipNewLines (std::ifstream &stream)
 
void clearScriptList ()
 

Protected Attributes

float mLoadOrder
 
std::map< std::string, ScriptNode * > m_scriptList
 
Token mToken
 
Token mLastToken
 
std::string mTokenValue
 

Detailed Description

The base class of loaders that read Ogre style script files to get configuration and settings. Heavily inspired by: http://www.ogre3d.org/tikiwiki/All-purpose+script+parser ( "Non-ogre version")


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