blob: 6ec1cadcb2b9581e4e5ec6a4bb786397838cab7d (
plain)
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
|
%{
#include "swconfig.h"
%}
%ignore sword::SWConfig::operator[];
%ignore sword::SWConfig::operator+=;
%ignore sword::SWConfig::sections;
%ignore sword::SWConfig::Sections;
%include "swconfig.h"
%extend sword::SWConfig {
void set(const char* group, const char* entry, const char* value) {
self->Sections[group][entry] = value;
};
const char* get(const char* group, const char* entry) {
return self->Sections[group][entry].c_str();
};
std::multimap < sword::SWBuf, std::map <sword::SWBuf, sword::SWBuf> >
*getSections() {
return (std::multimap < sword::SWBuf, std::map < sword::SWBuf, sword::SWBuf > > *) &self->Sections;
}
}
|