git-svn-id: svn://db.shs.com.ru/libs@114 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -33,16 +33,58 @@ const CDType KInterface::operator [](int v) const {
|
||||
|
||||
|
||||
CDSection & KInterface::section(int v) {
|
||||
return core->k_.section(v);
|
||||
CDSection & ret = core->k_.section(v);
|
||||
piCout << "[get section]" << v << ret.name;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const CDSection KInterface::section(int v) const {
|
||||
return core->k_.section(v);
|
||||
}
|
||||
|
||||
|
||||
const CDSection & KInterface::root() const {
|
||||
//CDSection & KInterface::section(const PIDeque<int> &path) {
|
||||
// piCout << "error"; return root();
|
||||
// PIDeque<int> spath = path;
|
||||
// CDSection & rs = core->k_;
|
||||
// CDSection trs = rs;
|
||||
// piCout << "[get section from path]" << path << rs.name;
|
||||
// PIString tab;
|
||||
// while (!spath.isEmpty()) {
|
||||
// piCout << "!1" << tab << rs.alias << rs.name;
|
||||
// rs = rs.section(spath.take_front());
|
||||
// tab += " ";
|
||||
//// rs = trs;
|
||||
// }
|
||||
// piCout << "!2" << tab << rs.alias << rs.name;
|
||||
// return rs;
|
||||
//}
|
||||
|
||||
|
||||
const CDSection KInterface::section(const PIDeque<int> &path) const {
|
||||
PIDeque<int> spath = path;
|
||||
CDSection rs = core->k_;
|
||||
CDSection trs = rs;
|
||||
//piCout << "[get section from path]" << path << rs.name;
|
||||
PIString tab;
|
||||
while (!spath.isEmpty()) {
|
||||
//piCout << "!1" << tab << rs.alias << rs.name;
|
||||
trs = rs.section(spath.take_front());
|
||||
tab += " ";
|
||||
rs = trs;
|
||||
}
|
||||
//piCout << "!2" << tab << rs.alias << rs.name;
|
||||
return rs;
|
||||
}
|
||||
|
||||
|
||||
CDSection & KInterface::root() {
|
||||
piCout << "[root]" << core->k_.name;
|
||||
return core->k_;
|
||||
}
|
||||
|
||||
|
||||
const CDSection KInterface::root() const {
|
||||
return core->k_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user