-
Notifications
You must be signed in to change notification settings - Fork 1
/
winxedxx_namespace.h
50 lines (38 loc) · 1.2 KB
/
winxedxx_namespace.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef INCLUDE_WINXEDXX_NAMESPACE_H
#define INCLUDE_WINXEDXX_NAMESPACE_H
// winxedxx_namespace.h
// (C) 2012 Julián Albo "NotFound"
#include "winxedxx_types.h"
#include "winxedxx_object.h"
#include "winxedxx_default.h"
#include <string>
#include <map>
namespace WinxedXX
{
class WxxNamespace : public WxxDefault
{
protected:
WxxNamespace();
WxxNamespace(const std::string &nsname, WxxNamespace *parent);
private:
WxxNamespace(const WxxNamespace &);
void operator = (const WxxNamespace &);
public:
WxxObjectPtr get(const std::string &name);
WxxNamespace &childNamespace(const std::string &name);
void set(const std::string &name, const WxxObjectPtr &value);
private:
// vtable functions
std::string get_string();
WxxObjectPtr get_pmc_keyed(const std::string &s);
void set_pmc_keyed(const std::string &s, const WxxObjectPtr &value);
WxxObjectPtr call_method(const std::string &methname, WxxObjectArray &args);
const std::string name;
WxxNamespace * const parentns;
std::map<std::string, WxxNamespace *> childs;
std::map<std::string, WxxObjectPtr> symbols;
};
WxxNamespace &getRootNamespace();
} // namespace WinxedXX
#endif
// End of winxedxx_namespace.h