Fixing documentation. Adding an example.
This commit is contained in:
parent
736c6b953e
commit
6b18d20979
6 changed files with 110 additions and 8 deletions
28
Examples/lua/nspace/example.h
Normal file
28
Examples/lua/nspace/example.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef _example_guardian_
|
||||
#define _example_guardian_
|
||||
|
||||
int module_function() { return 7; }
|
||||
int module_variable = 9;
|
||||
|
||||
namespace MyWorld {
|
||||
class World {
|
||||
public:
|
||||
World():
|
||||
world_max_count(9) {}
|
||||
int create_world() { return 17; }
|
||||
const int world_max_count; // = 9
|
||||
};
|
||||
namespace Nested {
|
||||
class Dweller {
|
||||
public:
|
||||
Dweller():
|
||||
food_count(11) {}
|
||||
enum Gender { MALE = 0, FEMALE = 1 };
|
||||
static int populate_cave() { return 19; }
|
||||
int create_cave() { return 13; }
|
||||
int food_count; // = 11
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue