29.04.2014 - Version 0.4.0_prealpha. PICodeParser, namespace PICodeInfo, new tool "pip_cmg" in dir "code_model_generator". New feature in PIIODevice - "createFromFullPath", all parameters of all I/O devices now works with PIObjects`s properties.
This commit is contained in:
@@ -14,14 +14,14 @@
|
||||
|
||||
PIStringList PICollection::groups() {
|
||||
PIStringList sl;
|
||||
piForeachC (Group & g, _groups)
|
||||
piForeachC (Group & g, *_groups)
|
||||
sl << g.name;
|
||||
return sl;
|
||||
}
|
||||
|
||||
|
||||
PIVector<const PIObject * > PICollection::groupElements(const PIString & group) {
|
||||
piForeachC (Group & g, _groups)
|
||||
piForeachC (Group & g, *_groups)
|
||||
if (g.name == group)
|
||||
return g.elements;
|
||||
return PIVector<const PIObject * >();
|
||||
@@ -29,18 +29,21 @@ PIVector<const PIObject * > PICollection::groupElements(const PIString & group)
|
||||
|
||||
|
||||
void PICollection::addToGroup(const PIString & group, const PIObject * element) {
|
||||
//piCout << "add to" << group << element;
|
||||
PIString n = element->className();
|
||||
piForeach (Group & g, _groups)
|
||||
piForeach (Group & g, *_groups)
|
||||
if (g.name == group) {
|
||||
for (int i = 0; i < g.elements.size_s(); ++i)
|
||||
if (PIString(g.elements[i]->className()) == n)
|
||||
return;
|
||||
g.elements << element;
|
||||
//piCout << "new group" << group << ", ok";
|
||||
return;
|
||||
}
|
||||
_groups << Group(group);
|
||||
_groups.back().elements << element;
|
||||
*_groups << Group(group);
|
||||
_groups->back().elements << element;
|
||||
//piCout << "new group" << group << ", ok";
|
||||
}
|
||||
|
||||
|
||||
PIVector<PICollection::Group> PICollection::_groups;
|
||||
bool __PICollectionInitializer::_inited_(false);
|
||||
PIVector<PICollection::Group> * PICollection::_groups;
|
||||
|
||||
Reference in New Issue
Block a user