blob: b1f6834686d82661c3ccc001fa4602bde5b3bc6b (
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();
};
PySectionMap /*std::map < sword::SWBuf, std::multimap <sword::SWBuf, sword::SWBuf> > */
*getSections() {
return (PySectionMap* /*std::map < sword::SWBuf, std::multimap < sword::SWBuf, sword::SWBuf > > * */) &self->Sections;
}
}
|