code format
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "cdutils_interface.h"
|
||||
|
||||
#include "cdutils_core.h"
|
||||
#include "piconfig.h"
|
||||
#include "pifile.h"
|
||||
@@ -7,11 +8,11 @@ using namespace CDUtils;
|
||||
|
||||
|
||||
Interface::Interface(CDType::cdT type_) {
|
||||
core = CDCore::instance();
|
||||
s = core->root(type_);
|
||||
type = type_;
|
||||
//piCoutObj << (void*)this << core;
|
||||
file_ = core->typeLetter(type_) + PIStringAscii(".dat");
|
||||
core = CDCore::instance();
|
||||
s = core->root(type_);
|
||||
type = type_;
|
||||
// piCoutObj << (void*)this << core;
|
||||
file_ = core->typeLetter(type_) + PIStringAscii(".dat");
|
||||
file_size = 0;
|
||||
switch (type) {
|
||||
case CDType::cdK:
|
||||
@@ -52,41 +53,41 @@ bool Interface::test(int v) {
|
||||
}
|
||||
|
||||
|
||||
CDType & Interface::operator [](const PIString & name_) {
|
||||
CDType & Interface::operator[](const PIString & name_) {
|
||||
return (*s)[name_];
|
||||
}
|
||||
|
||||
|
||||
const CDType Interface::operator [](const PIString & name_) const {
|
||||
const CDType Interface::operator[](const PIString & name_) const {
|
||||
return (*s)[name_];
|
||||
}
|
||||
|
||||
|
||||
CDType & Interface::operator [](const PIDeque<int> & path_) {
|
||||
CDType & Interface::operator[](const PIDeque<int> & path_) {
|
||||
return (*s)[path_];
|
||||
}
|
||||
|
||||
|
||||
const CDType Interface::operator [](const PIDeque<int> & path_) const {
|
||||
const CDType Interface::operator[](const PIDeque<int> & path_) const {
|
||||
return (*s)[path_];
|
||||
}
|
||||
|
||||
|
||||
CDType & Interface::operator [](int v) {
|
||||
//piCout << (void*)this << "[]" << core;
|
||||
CDType & Interface::operator[](int v) {
|
||||
// piCout << (void*)this << "[]" << core;
|
||||
return (*s)[v];
|
||||
}
|
||||
|
||||
|
||||
const CDType Interface::operator [](int v) const {
|
||||
//piCout << (void*)this << "[]" << core;
|
||||
const CDType Interface::operator[](int v) const {
|
||||
// piCout << (void*)this << "[]" << core;
|
||||
return (*s)[v];
|
||||
}
|
||||
|
||||
|
||||
CDSection & Interface::section(int v) {
|
||||
// CDSection & ret = s->section(v);
|
||||
// piCout << "[get section]" << v << ret.name;
|
||||
// CDSection & ret = s->section(v);
|
||||
// piCout << "[get section]" << v << ret.name;
|
||||
return s->section(v);
|
||||
}
|
||||
|
||||
@@ -96,9 +97,9 @@ const CDSection Interface::section(int v) const {
|
||||
}
|
||||
|
||||
|
||||
CDSection & Interface::section(const PIDeque<int> &path) {
|
||||
CDSection & Interface::section(const PIDeque<int> & path) {
|
||||
PIDeque<int> spath = path;
|
||||
CDSection * rs = s;
|
||||
CDSection * rs = s;
|
||||
while (!spath.isEmpty()) {
|
||||
rs = &(rs->section(spath.take_front()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user