25
#include "PreCompiled.h"
29
#include <xercesc/sax/SAXParseException.hpp>
43
#include "Interpreter.h"
49
class ParameterGrpObserver: public ParameterGrp::ObserverType
52
explicit ParameterGrpObserver(const Py::Object& obj)
56
ParameterGrpObserver(const Py::Object& obj, const Py::Object& callable, ParameterGrp* target)
61
~ParameterGrpObserver() override
63
Base::PyGILStateLocker lock;
65
callable = Py::None();
67
void OnChange(ParameterGrp::SubjectType& rCaller, ParameterGrp::MessageType Reason) override
69
Base::PyGILStateLocker lock;
71
ParameterGrp& rGrp = static_cast<ParameterGrp&>(rCaller);
72
ParameterGrp::handle hGrp(&rGrp);
73
Py::Callable method(this->inst.getAttr(std::string("onChange")));
75
args.setItem(0, Py::asObject(GetPyObject(hGrp)));
77
if (Reason && Reason[0] != '\0') {
78
args.setItem(1, Py::String(Reason));
82
catch (Py::Exception&) {
87
bool isEqual(const Py::Object& obj) const
89
return this->inst.is(obj);
94
boost::signals2::scoped_connection conn;
95
ParameterGrp* _target = nullptr;
101
using ParameterGrpObserverList = std::list<ParameterGrpObserver*>;
103
class ParameterGrpPy: public Py::PythonExtension<ParameterGrpPy>
106
static void init_type();
108
explicit ParameterGrpPy(const Base::Reference<ParameterGrp>& rcParamGrp);
109
~ParameterGrpPy() override;
111
Py::Object repr() override;
113
Py::Object getGroup(const Py::Tuple&);
114
Py::Object getGroupName(const Py::Tuple&);
115
Py::Object getGroups(const Py::Tuple&);
116
Py::Object remGroup(const Py::Tuple&);
117
Py::Object hasGroup(const Py::Tuple&);
119
Py::Object getManager(const Py::Tuple&);
120
Py::Object getParent(const Py::Tuple&);
122
Py::Object isEmpty(const Py::Tuple&);
123
Py::Object clear(const Py::Tuple&);
125
Py::Object attach(const Py::Tuple&);
126
Py::Object attachManager(const Py::Tuple& args);
127
Py::Object detach(const Py::Tuple&);
128
Py::Object notify(const Py::Tuple&);
129
Py::Object notifyAll(const Py::Tuple&);
131
Py::Object setBool(const Py::Tuple&);
132
Py::Object getBool(const Py::Tuple&);
133
Py::Object getBools(const Py::Tuple&);
134
Py::Object remBool(const Py::Tuple&);
136
Py::Object setInt(const Py::Tuple&);
137
Py::Object getInt(const Py::Tuple&);
138
Py::Object getInts(const Py::Tuple&);
139
Py::Object remInt(const Py::Tuple&);
141
Py::Object setUnsigned(const Py::Tuple&);
142
Py::Object getUnsigned(const Py::Tuple&);
143
Py::Object getUnsigneds(const Py::Tuple&);
144
Py::Object remUnsigned(const Py::Tuple&);
146
Py::Object setFloat(const Py::Tuple&);
147
Py::Object getFloat(const Py::Tuple&);
148
Py::Object getFloats(const Py::Tuple&);
149
Py::Object remFloat(const Py::Tuple&);
151
Py::Object setString(const Py::Tuple&);
152
Py::Object getString(const Py::Tuple&);
153
Py::Object getStrings(const Py::Tuple&);
154
Py::Object remString(const Py::Tuple&);
156
Py::Object importFrom(const Py::Tuple&);
157
Py::Object insert(const Py::Tuple&);
158
Py::Object exportTo(const Py::Tuple&);
160
Py::Object getContents(const Py::Tuple&);
163
ParameterGrp::handle _cParamGrp;
164
ParameterGrpObserverList _observers;
169
void ParameterGrpPy::init_type()
171
behaviors().name("ParameterGrp");
172
behaviors().doc("Python interface class to set parameters");
174
behaviors().supportRepr();
175
behaviors().supportGetattr();
176
behaviors().supportSetattr();
177
behaviors().readyType();
179
add_varargs_method("GetGroup", &ParameterGrpPy::getGroup, "GetGroup(str)");
180
add_varargs_method("GetGroupName", &ParameterGrpPy::getGroupName, "GetGroupName()");
181
add_varargs_method("GetGroups", &ParameterGrpPy::getGroups, "GetGroups()");
182
add_varargs_method("RemGroup", &ParameterGrpPy::remGroup, "RemGroup(str)");
183
add_varargs_method("HasGroup", &ParameterGrpPy::hasGroup, "HasGroup(str)");
185
add_varargs_method("Manager", &ParameterGrpPy::getManager, "Manager()");
186
add_varargs_method("Parent", &ParameterGrpPy::getParent, "Parent()");
188
add_varargs_method("IsEmpty", &ParameterGrpPy::isEmpty, "IsEmpty()");
189
add_varargs_method("Clear", &ParameterGrpPy::clear, "Clear()");
191
add_varargs_method("Attach", &ParameterGrpPy::attach, "Attach()");
194
&ParameterGrpPy::attachManager,
195
"AttachManager(observer) -- attach parameter manager for notification\n\n"
196
"This method attaches a user defined observer to the manager (i.e. the root)\n"
197
"of the current parameter group to receive notification of all its parameters\n"
198
"and those from its sub-groups\n\n"
199
"The method expects the observer to have a callable attribute as shown below\n"
200
" slotParamChanged(param, tp, name, value)\n"
201
"where 'param' is the parameter group causing the change, 'tp' is the type of\n"
202
"the parameter, 'name' is the name of the parameter, and 'value' is the current\n"
204
"The possible value of type are, 'FCBool', 'FCInt', 'FCUint', 'FCFloat', 'FCText',\n"
205
"and 'FCParamGroup'. The notification is triggered when value is changed, in which\n"
206
"case 'value' contains the new value in text form, or, when the parameter is removed,\n"
207
"in which case 'value' is empty.\n\n"
208
"For 'FCParamGroup' type, the observer will be notified in the following events.\n"
209
"* Group creation: both 'name' and 'value' contain the name of the new group\n"
210
"* Group removal: both 'name' and 'value' are empty\n"
211
"* Group rename: 'name' is the new name, and 'value' is the old name");
212
add_varargs_method("Detach", &ParameterGrpPy::detach, "Detach()");
213
add_varargs_method("Notify", &ParameterGrpPy::notify, "Notify()");
214
add_varargs_method("NotifyAll", &ParameterGrpPy::notifyAll, "NotifyAll()");
216
add_varargs_method("SetBool", &ParameterGrpPy::setBool, "SetBool()");
217
add_varargs_method("GetBool", &ParameterGrpPy::getBool, "GetBool()");
218
add_varargs_method("GetBools", &ParameterGrpPy::getBools, "GetBools()");
219
add_varargs_method("RemBool", &ParameterGrpPy::remBool, "RemBool()");
221
add_varargs_method("SetInt", &ParameterGrpPy::setInt, "SetInt()");
222
add_varargs_method("GetInt", &ParameterGrpPy::getInt, "GetInt()");
223
add_varargs_method("GetInts", &ParameterGrpPy::getInts, "GetInts()");
224
add_varargs_method("RemInt", &ParameterGrpPy::remInt, "RemInt()");
226
add_varargs_method("SetUnsigned", &ParameterGrpPy::setUnsigned, "SetUnsigned()");
227
add_varargs_method("GetUnsigned", &ParameterGrpPy::getUnsigned, "GetUnsigned()");
228
add_varargs_method("GetUnsigneds", &ParameterGrpPy::getUnsigneds, "GetUnsigneds()");
229
add_varargs_method("RemUnsigned", &ParameterGrpPy::remUnsigned, "RemUnsigned()");
231
add_varargs_method("SetFloat", &ParameterGrpPy::setFloat, "SetFloat()");
232
add_varargs_method("GetFloat", &ParameterGrpPy::getFloat, "GetFloat()");
233
add_varargs_method("GetFloats", &ParameterGrpPy::getFloats, "GetFloats()");
234
add_varargs_method("RemFloat", &ParameterGrpPy::remFloat, "RemFloat()");
236
add_varargs_method("SetString", &ParameterGrpPy::setString, "SetString()");
237
add_varargs_method("GetString", &ParameterGrpPy::getString, "GetString()");
238
add_varargs_method("GetStrings", &ParameterGrpPy::getStrings, "GetStrings()");
239
add_varargs_method("RemString", &ParameterGrpPy::remString, "RemString()");
241
add_varargs_method("Import", &ParameterGrpPy::importFrom, "Import()");
242
add_varargs_method("Insert", &ParameterGrpPy::insert, "Insert()");
243
add_varargs_method("Export", &ParameterGrpPy::exportTo, "Export()");
245
add_varargs_method("GetContents", &ParameterGrpPy::getContents, "GetContents()");
248
ParameterGrpPy::ParameterGrpPy(const Base::Reference<ParameterGrp>& rcParamGrp)
249
: _cParamGrp(rcParamGrp)
252
ParameterGrpPy::~ParameterGrpPy()
255
for (ParameterGrpObserver* obs : _observers) {
257
_cParamGrp->Detach(obs);
266
Py::Object ParameterGrpPy::repr()
269
s << "<ParameterGrp at " << this << ">";
270
return Py::String(s.str());
273
Py::Object ParameterGrpPy::importFrom(const Py::Tuple& args)
275
char* pstr = nullptr;
276
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
277
throw Py::Exception();
280
_cParamGrp->importFrom(pstr);
284
Py::Object ParameterGrpPy::insert(const Py::Tuple& args)
286
char* pstr = nullptr;
287
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
288
throw Py::Exception();
291
_cParamGrp->insert(pstr);
295
Py::Object ParameterGrpPy::exportTo(const Py::Tuple& args)
297
char* pstr = nullptr;
298
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
299
throw Py::Exception();
302
_cParamGrp->exportTo(pstr);
306
Py::Object ParameterGrpPy::getGroup(const Py::Tuple& args)
308
char* pstr = nullptr;
309
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
310
throw Py::Exception();
315
Base::Reference<ParameterGrp> handle = _cParamGrp->GetGroup(pstr);
316
if (handle.isValid()) {
318
ParameterGrpPy* pcParamGrp = new ParameterGrpPy(handle);
320
return Py::asObject(pcParamGrp);
323
throw Py::RuntimeError("GetGroup failed");
325
catch (const Base::Exception& e) {
327
throw Py::Exception();
331
Py::Object ParameterGrpPy::getManager(const Py::Tuple& args)
333
if (!PyArg_ParseTuple(args.ptr(), "")) {
334
throw Py::Exception();
338
Base::Reference<ParameterGrp> handle = _cParamGrp->Manager();
339
if (handle.isValid()) {
341
ParameterGrpPy* pcParamGrp = new ParameterGrpPy(handle);
343
return Py::asObject(pcParamGrp);
349
Py::Object ParameterGrpPy::getParent(const Py::Tuple& args)
351
if (!PyArg_ParseTuple(args.ptr(), "")) {
352
throw Py::Exception();
356
Base::Reference<ParameterGrp> handle = _cParamGrp->Parent();
357
if (handle.isValid()) {
359
ParameterGrpPy* pcParamGrp = new ParameterGrpPy(handle);
361
return Py::asObject(pcParamGrp);
367
Py::Object ParameterGrpPy::getGroupName(const Py::Tuple& args)
369
if (!PyArg_ParseTuple(args.ptr(), "")) {
370
throw Py::Exception();
374
std::string name = _cParamGrp->GetGroupName();
375
return Py::String(name);
378
Py::Object ParameterGrpPy::getGroups(const Py::Tuple& args)
380
if (!PyArg_ParseTuple(args.ptr(), "")) {
381
throw Py::Exception();
385
std::vector<Base::Reference<ParameterGrp>> handle = _cParamGrp->GetGroups();
387
for (const auto& it : handle) {
388
list.append(Py::String(it->GetGroupName()));
394
Py::Object ParameterGrpPy::setBool(const Py::Tuple& args)
396
char* pstr = nullptr;
398
if (!PyArg_ParseTuple(args.ptr(), "si", &pstr, &Bool)) {
399
throw Py::Exception();
402
_cParamGrp->SetBool(pstr, Bool != 0);
406
Py::Object ParameterGrpPy::getBool(const Py::Tuple& args)
408
char* pstr = nullptr;
410
if (!PyArg_ParseTuple(args.ptr(), "s|i", &pstr, &Bool)) {
411
throw Py::Exception();
414
return Py::Boolean(_cParamGrp->GetBool(pstr, Bool != 0));
417
Py::Object ParameterGrpPy::getBools(const Py::Tuple& args)
419
char* filter = nullptr;
420
if (!PyArg_ParseTuple(args.ptr(), "|s", &filter)) {
421
throw Py::Exception();
424
std::vector<std::pair<std::string, bool>> map = _cParamGrp->GetBoolMap(filter);
426
for (const auto& it : map) {
427
list.append(Py::String(it.first));
433
Py::Object ParameterGrpPy::setInt(const Py::Tuple& args)
435
char* pstr = nullptr;
437
if (!PyArg_ParseTuple(args.ptr(), "si", &pstr, &Int)) {
438
throw Py::Exception();
441
_cParamGrp->SetInt(pstr, Int);
445
Py::Object ParameterGrpPy::getInt(const Py::Tuple& args)
447
char* pstr = nullptr;
449
if (!PyArg_ParseTuple(args.ptr(), "s|i", &pstr, &Int)) {
450
throw Py::Exception();
452
return Py::Long(_cParamGrp->GetInt(pstr, Int));
455
Py::Object ParameterGrpPy::getInts(const Py::Tuple& args)
457
char* filter = nullptr;
458
if (!PyArg_ParseTuple(args.ptr(), "|s", &filter)) {
459
throw Py::Exception();
462
std::vector<std::pair<std::string, long>> map = _cParamGrp->GetIntMap(filter);
464
for (const auto& it : map) {
465
list.append(Py::String(it.first));
471
Py::Object ParameterGrpPy::setUnsigned(const Py::Tuple& args)
473
char* pstr = nullptr;
474
unsigned int UInt = 0;
475
if (!PyArg_ParseTuple(args.ptr(), "sI", &pstr, &UInt)) {
476
throw Py::Exception();
479
_cParamGrp->SetUnsigned(pstr, UInt);
483
Py::Object ParameterGrpPy::getUnsigned(const Py::Tuple& args)
485
char* pstr = nullptr;
486
unsigned int UInt = 0;
487
if (!PyArg_ParseTuple(args.ptr(), "s|I", &pstr, &UInt)) {
488
throw Py::Exception();
490
return Py::Long(_cParamGrp->GetUnsigned(pstr, UInt));
493
Py::Object ParameterGrpPy::getUnsigneds(const Py::Tuple& args)
495
char* filter = nullptr;
496
if (!PyArg_ParseTuple(args.ptr(), "|s", &filter)) {
497
throw Py::Exception();
500
std::vector<std::pair<std::string, unsigned long>> map = _cParamGrp->GetUnsignedMap(filter);
502
for (const auto& it : map) {
503
list.append(Py::String(it.first));
509
Py::Object ParameterGrpPy::setFloat(const Py::Tuple& args)
511
char* pstr = nullptr;
513
if (!PyArg_ParseTuple(args.ptr(), "sd", &pstr, &Float)) {
514
throw Py::Exception();
517
_cParamGrp->SetFloat(pstr, Float);
521
Py::Object ParameterGrpPy::getFloat(const Py::Tuple& args)
523
char* pstr = nullptr;
525
if (!PyArg_ParseTuple(args.ptr(), "s|d", &pstr, &Float)) {
526
throw Py::Exception();
529
return Py::Float(_cParamGrp->GetFloat(pstr, Float));
532
Py::Object ParameterGrpPy::getFloats(const Py::Tuple& args)
534
char* filter = nullptr;
535
if (!PyArg_ParseTuple(args.ptr(), "|s", &filter)) {
536
throw Py::Exception();
539
std::vector<std::pair<std::string, double>> map = _cParamGrp->GetFloatMap(filter);
541
for (const auto& it : map) {
542
list.append(Py::String(it.first));
548
Py::Object ParameterGrpPy::setString(const Py::Tuple& args)
550
char* pstr = nullptr;
552
if (!PyArg_ParseTuple(args.ptr(), "ss", &pstr, &str)) {
553
throw Py::Exception();
556
_cParamGrp->SetASCII(pstr, str);
560
Py::Object ParameterGrpPy::getString(const Py::Tuple& args)
562
char* pstr = nullptr;
564
if (!PyArg_ParseTuple(args.ptr(), "s|s", &pstr, &str)) {
565
throw Py::Exception();
568
return Py::String(_cParamGrp->GetASCII(pstr, str));
571
Py::Object ParameterGrpPy::getStrings(const Py::Tuple& args)
573
char* filter = nullptr;
574
if (!PyArg_ParseTuple(args.ptr(), "|s", &filter)) {
575
throw Py::Exception();
578
std::vector<std::pair<std::string, std::string>> map = _cParamGrp->GetASCIIMap(filter);
580
for (const auto& it : map) {
581
list.append(Py::String(it.first));
587
Py::Object ParameterGrpPy::remInt(const Py::Tuple& args)
589
char* pstr = nullptr;
590
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
591
throw Py::Exception();
594
_cParamGrp->RemoveInt(pstr);
598
Py::Object ParameterGrpPy::remUnsigned(const Py::Tuple& args)
600
char* pstr = nullptr;
601
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
602
throw Py::Exception();
605
_cParamGrp->RemoveUnsigned(pstr);
609
Py::Object ParameterGrpPy::remBool(const Py::Tuple& args)
611
char* pstr = nullptr;
612
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
613
throw Py::Exception();
616
_cParamGrp->RemoveBool(pstr);
620
Py::Object ParameterGrpPy::remGroup(const Py::Tuple& args)
622
char* pstr = nullptr;
623
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
624
throw Py::Exception();
627
_cParamGrp->RemoveGrp(pstr);
631
Py::Object ParameterGrpPy::remFloat(const Py::Tuple& args)
633
char* pstr = nullptr;
634
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
635
throw Py::Exception();
638
_cParamGrp->RemoveFloat(pstr);
642
Py::Object ParameterGrpPy::remString(const Py::Tuple& args)
644
char* pstr = nullptr;
645
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
646
throw Py::Exception();
649
_cParamGrp->RemoveASCII(pstr);
653
Py::Object ParameterGrpPy::clear(const Py::Tuple& args)
655
if (!PyArg_ParseTuple(args.ptr(), "")) {
656
throw Py::Exception();
663
Py::Object ParameterGrpPy::isEmpty(const Py::Tuple& args)
665
if (!PyArg_ParseTuple(args.ptr(), "")) {
666
throw Py::Exception();
669
return Py::Boolean(_cParamGrp->IsEmpty());
672
Py::Object ParameterGrpPy::hasGroup(const Py::Tuple& args)
674
char* pstr = nullptr;
675
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
676
throw Py::Exception();
679
return Py::Boolean(_cParamGrp->HasGroup(pstr));
682
Py::Object ParameterGrpPy::attach(const Py::Tuple& args)
684
PyObject* obj = nullptr;
685
if (!PyArg_ParseTuple(args.ptr(), "O", &obj)) {
686
throw Py::Exception();
690
if (!o.hasAttr(std::string("onChange"))) {
691
throw Py::TypeError("Object has no onChange attribute");
694
for (ParameterGrpObserver* it : _observers) {
695
if (it->isEqual(o)) {
696
throw Py::RuntimeError("Object is already attached.");
700
ParameterGrpObserver* obs = new ParameterGrpObserver(o);
701
_cParamGrp->Attach(obs);
702
_observers.push_back(obs);
707
Py::Object ParameterGrpPy::attachManager(const Py::Tuple& args)
709
PyObject* obj = nullptr;
710
if (!PyArg_ParseTuple(args.ptr(), "O", &obj)) {
711
throw Py::Exception();
714
if (!_cParamGrp->Manager()) {
715
throw Py::RuntimeError("Parameter has no manager");
719
if (!o.hasAttr(std::string("slotParamChanged"))) {
720
throw Py::TypeError("Object has no slotParamChanged attribute");
723
Py::Object attr(o.getAttr("slotParamChanged"));
724
if (!attr.isCallable()) {
725
throw Py::TypeError("Object has no slotParamChanged callable attribute");
728
for (ParameterGrpObserver* it : _observers) {
729
if (it->isEqual(o)) {
730
throw Py::RuntimeError("Object is already attached.");
734
ParameterGrpObserver* obs = new ParameterGrpObserver(o, attr, _cParamGrp);
736
_cParamGrp->Manager()->signalParamChanged.connect([obs](ParameterGrp* Param,
737
ParameterGrp::ParamType Type,
743
for (auto p = Param; p; p = p->Parent()) {
744
if (p == obs->_target) {
745
Base::PyGILStateLocker lock;
746
Py::TupleN args(Py::asObject(new ParameterGrpPy(Param)),
747
Py::String(ParameterGrp::TypeName(Type)),
748
Py::String(Name ? Name : ""),
749
Py::String(Value ? Value : ""));
751
Py::Callable(obs->callable).apply(args);
753
catch (Py::Exception&) {
762
_observers.push_back(obs);
766
Py::Object ParameterGrpPy::detach(const Py::Tuple& args)
768
PyObject* obj = nullptr;
769
if (!PyArg_ParseTuple(args.ptr(), "O", &obj)) {
770
throw Py::Exception();
774
if (!o.hasAttr(std::string("onChange"))) {
775
throw Py::TypeError("Object has no onChange attribute");
778
for (ParameterGrpObserverList::iterator it = _observers.begin(); it != _observers.end(); ++it) {
779
if ((*it)->isEqual(o)) {
780
ParameterGrpObserver* obs = *it;
781
_observers.erase(it);
782
_cParamGrp->Detach(obs);
791
Py::Object ParameterGrpPy::notify(const Py::Tuple& args)
793
char* pstr = nullptr;
794
if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) {
795
throw Py::Exception();
798
_cParamGrp->Notify(pstr);
802
Py::Object ParameterGrpPy::notifyAll(const Py::Tuple& args)
804
if (!PyArg_ParseTuple(args.ptr(), "")) {
805
throw Py::Exception();
808
_cParamGrp->NotifyAll();
812
Py::Object ParameterGrpPy::getContents(const Py::Tuple& args)
814
if (!PyArg_ParseTuple(args.ptr(), "")) {
815
throw Py::Exception();
818
if (_cParamGrp->IsEmpty()) {
824
std::vector<std::pair<std::string, std::string>> mcTextMap = _cParamGrp->GetASCIIMap();
825
for (const auto& it : mcTextMap) {
827
t2.setItem(0, Py::String("String"));
828
t2.setItem(1, Py::String(it.first.c_str()));
829
t2.setItem(2, Py::String(it.second.c_str()));
834
std::vector<std::pair<std::string, long>> mcIntMap = _cParamGrp->GetIntMap();
835
for (const auto& it : mcIntMap) {
837
t3.setItem(0, Py::String("Integer"));
838
t3.setItem(1, Py::String(it.first.c_str()));
839
t3.setItem(2, Py::Long(it.second));
844
std::vector<std::pair<std::string, double>> mcFloatMap = _cParamGrp->GetFloatMap();
845
for (const auto& it : mcFloatMap) {
847
t4.setItem(0, Py::String("Float"));
848
t4.setItem(1, Py::String(it.first.c_str()));
849
t4.setItem(2, Py::Float(it.second));
854
std::vector<std::pair<std::string, bool>> mcBoolMap = _cParamGrp->GetBoolMap();
855
for (const auto& it : mcBoolMap) {
857
t5.setItem(0, Py::String("Boolean"));
858
t5.setItem(1, Py::String(it.first.c_str()));
859
t5.setItem(2, Py::Boolean(it.second));
864
std::vector<std::pair<std::string, unsigned long>> mcUIntMap = _cParamGrp->GetUnsignedMap();
865
for (const auto& it : mcUIntMap) {
867
t6.setItem(0, Py::String("Unsigned Long"));
868
t6.setItem(1, Py::String(it.first.c_str()));
869
t6.setItem(2, Py::Long(it.second));
880
PyObject* GetPyObject(const Base::Reference<ParameterGrp>& hcParamGrp)
882
static bool init = false;
885
Base::ParameterGrpPy::init_type();
888
return new Base::ParameterGrpPy(hcParamGrp);