Bottle 2D - Lua API 1.0.0
All you need to create games using bottle2D.
|
A config node represent a node in the configuration file (like an XML node). More...
#include <header.hpp>
Public Member Functions | |
string | GetString (string key) |
Get the string corresponding to key in this node. | |
number | GetNumber (string key) |
Get the number corresponding to key in this node. | |
luaObject | GetValue (string key) |
Get the value corresponding to key in this node. | |
bool | ChildExists (string key) |
Retrun true if the child key exists (it can be string / number / child node) | |
luaObject | GetLuaTable () |
Return a lua table containing the values of this node and its children. | |
nil | SetValue (string key, luaObject value) |
Set / create a value with key. | |
nil | SetLuaTable (luaObject table) |
Set a lua table as a value. | |
ConfigNode | AccessNode (string key) |
Get the ConfigNode corresponding to key, if it exists, otherwise, create a child ConfigNode named "key" in this ConfigNode and return it. | |
nil | Remove (string key) |
Remove the child named key. | |
nil | Clear () |
Clear the ConfigNode (delete all childs) | |
bool | IsDeleted () |
Return true is this Node or one of its parents has been deleted. |
A config node represent a node in the configuration file (like an XML node).
You can add data to the node with a key and add child node.
ConfigNode ConfigNode::AccessNode | ( | string | key | ) |
Get the ConfigNode corresponding to key, if it exists, otherwise, create a child ConfigNode named "key" in this ConfigNode and return it.
bool ConfigNode::ChildExists | ( | string | key | ) |
Retrun true if the child key exists (it can be string / number / child node)
nil ConfigNode::Clear | ( | ) |
Clear the ConfigNode (delete all childs)
luaObject ConfigNode::GetLuaTable | ( | ) |
Return a lua table containing the values of this node and its children.
number ConfigNode::GetNumber | ( | string | key | ) |
Get the number corresponding to key in this node.
string ConfigNode::GetString | ( | string | key | ) |
Get the string corresponding to key in this node.
luaObject ConfigNode::GetValue | ( | string | key | ) |
Get the value corresponding to key in this node.
Value type can be a boolean, a string, a number, nil or a Vector2D.
bool ConfigNode::IsDeleted | ( | ) |
Return true is this Node or one of its parents has been deleted.
nil ConfigNode::Remove | ( | string | key | ) |
Remove the child named key.
nil ConfigNode::SetLuaTable | ( | luaObject | table | ) |
Set a lua table as a value.
All element of the table will be saved in this node. Table elements types can be a boolean, a string, a number, nil, Vector2D or another table. Note: the node will not be cleared.
nil ConfigNode::SetValue | ( | string | key, |
luaObject | value | ||
) |
Set / create a value with key.
Value type can be a boolean, a string, a number, nil or a Vector2D.