update for PIP3
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
#define CDUTILS_C_H
|
#define CDUTILS_C_H
|
||||||
|
|
||||||
#include "cdutils_interface.h"
|
#include "cdutils_interface.h"
|
||||||
#include "cd_core_export.h"
|
#include "cdutils_core.h"
|
||||||
|
|
||||||
|
|
||||||
namespace CDUtils {
|
namespace CDUtils {
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace CDUtils {
|
|||||||
|
|
||||||
class CDCore;
|
class CDCore;
|
||||||
|
|
||||||
|
typedef void (*Handler)(void*);
|
||||||
|
|
||||||
class CD_CORE_EXPORT __Core_Initializer__ {
|
class CD_CORE_EXPORT __Core_Initializer__ {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ PIVector<int> enumValues(const PIString & e, const PIMap<PIString, CDSection> &
|
|||||||
PIVector<int> ret;
|
PIVector<int> ret;
|
||||||
enames.clear();
|
enames.clear();
|
||||||
if (sections.contains(e)) {
|
if (sections.contains(e)) {
|
||||||
ret = sections[e].indexes();
|
ret = sections.at(e).indexes();
|
||||||
enames = sections[e].index_names();
|
enames = sections.at(e).index_names();
|
||||||
} else {
|
} else {
|
||||||
int v = e.toInt();
|
int v = e.toInt();
|
||||||
if (v < 2) return ret;
|
if (v < 2) return ret;
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ int CDSection::count(bool recursive) const {
|
|||||||
if (recursive) {
|
if (recursive) {
|
||||||
PIMap<int, CDSection>::const_iterator i;
|
PIMap<int, CDSection>::const_iterator i;
|
||||||
for (i = s.constBegin(); i != s.constEnd(); ++i)
|
for (i = s.constBegin(); i != s.constEnd(); ++i)
|
||||||
ret += i->second.count(recursive);
|
ret += i.value().count(recursive);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,11 +127,8 @@ public:
|
|||||||
bool test(int v) {return cd.value(v).toBool();}
|
bool test(int v) {return cd.value(v).toBool();}
|
||||||
// CDType & operator [](int v) {if (!k.contains(v)) k[v].index_ = v; return k[v];}
|
// CDType & operator [](int v) {if (!k.contains(v)) k[v].index_ = v; return k[v];}
|
||||||
CDType & operator [](int v) {return cd[v];}
|
CDType & operator [](int v) {return cd[v];}
|
||||||
const CDType operator [](int v) const {return cd[v];}
|
|
||||||
CDType & operator [](const PIString & name_) {return getByName(name_);}
|
CDType & operator [](const PIString & name_) {return getByName(name_);}
|
||||||
const CDType operator [](const PIString & name_) const {return const_cast<CDSection*>(this)->getByName(name_);}
|
|
||||||
CDType & operator [](const PIDeque<int> & path_) {return getByPath(path_);}
|
CDType & operator [](const PIDeque<int> & path_) {return getByPath(path_);}
|
||||||
const CDType operator [](const PIDeque<int> & path_) const {return const_cast<CDSection*>(this)->getByPath(path_);}
|
|
||||||
CDSection & section(int v);
|
CDSection & section(int v);
|
||||||
const CDSection section(int v) const;
|
const CDSection section(int v) const;
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ void GDockWidget::addX(const CDType & t) {
|
|||||||
void GDockWidget::drawX(const PIMap<PIString, PIVector<double> > & data) {
|
void GDockWidget::drawX(const PIMap<PIString, PIVector<double> > & data) {
|
||||||
for (int i = 0; i < x_list.size_s(); ++i) {
|
for (int i = 0; i < x_list.size_s(); ++i) {
|
||||||
PIString sp = CDCore::pathToString(x_list[i]);
|
PIString sp = CDCore::pathToString(x_list[i]);
|
||||||
const PIVector<double> & ch(data[sp]);
|
PIVector<double> ch(data.at(sp));
|
||||||
for (int j = 0; j < ch.size_s(); ++j)
|
for (int j = 0; j < ch.size_s(); ++j)
|
||||||
graphic->graphic()->addPoint(ch[j], i, false);
|
graphic->graphic()->addPoint(ch[j], i, false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user