#include <cscriptparser.h>
Public Member Functions | |
| CScriptparser (const std::string &scriptfile) | |
| Default ctor. | |
| ~CScriptparser () | |
| Default dtor. | |
| void | parse () |
| Start parsing the scriptfile. | |
Protected Member Functions | |
| void | callFunc (const std::string &func, const std::list< std::string > &funcparams) |
| Delegates the function and its parameters to the correct method (internal or handler). | |
| void | read (std::list< std::string > funcparams) |
| Handles/wrappes read-command. according to the filetype the read-method of the corresponding handler will be called inside. | |
| void | write (std::list< std::string > funcparams) |
| Handles/wrappes write-command. according to the filetype the write-method of the corresponding handler will be called inside. | |
Classes | |
| class | ParserError |
| Exception thrown by CScriptparser. More... | |
read- and write-commands have hard coded parameters, number#1 being a filetype. Classes handling certain filetypes must be of type CFile. Custom functions will be passed to CFile::callFunc().
On error ParserError will be thrown.
| CScriptparser::CScriptparser | ( | const std::string & | scriptfile | ) |
Default ctor.
| scriptfile | filename of script to parse |
| bad_alloc |
| CScriptparser::~CScriptparser | ( | ) |
Default dtor.
| - |
| none |
| void CScriptparser::parse | ( | ) |
Start parsing the scriptfile.
| - |
| ParserError |
| void CScriptparser::callFunc | ( | const std::string & | func, | |
| const std::list< std::string > & | funcparams | |||
| ) | [protected] |
Delegates the function and its parameters to the correct method (internal or handler).
| func | function name | |
| funcparams | function parameters as list |
| ParserError |
| void CScriptparser::read | ( | std::list< std::string > | funcparams | ) | [protected] |
Handles/wrappes read-command. according to the filetype the read-method of the corresponding handler will be called inside.
| funcparams | function parameters as list |
| ParserError |
| void CScriptparser::write | ( | std::list< std::string > | funcparams | ) | [protected] |
Handles/wrappes write-command. according to the filetype the write-method of the corresponding handler will be called inside.
| funcparams | function parameters as list |
| ParserError |
1.5.3