78 lines
2.0 KiB
C++
78 lines
2.0 KiB
C++
/*
|
|
PIP - Platform Independent Primitives
|
|
Test program
|
|
Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
//#define PIP_DEBUG
|
|
/*#include "pip.h"
|
|
|
|
|
|
class ElementA: public PIObject {
|
|
PIOBJECT(ElementA)
|
|
// ...
|
|
};
|
|
ADD_NEW_TO_COLLECTION(ab_group, ElementA)
|
|
|
|
class ElementB: public PIObject {
|
|
PIOBJECT(ElementB)
|
|
// ...
|
|
};
|
|
ADD_NEW_TO_COLLECTION(ab_group, ElementB)
|
|
|
|
class ElementC: public PIObject {
|
|
PIOBJECT(ElementC)
|
|
// ...
|
|
};
|
|
ADD_NEW_TO_COLLECTION(c_group, ElementC)
|
|
|
|
class ElementD: public PIObject {
|
|
PIOBJECT(ElementD)
|
|
// ...
|
|
};
|
|
*/
|
|
#include "pip.h"
|
|
#include "pivariant.h"
|
|
|
|
/*
|
|
Test::PIVariant<> * pv;
|
|
|
|
|
|
template <typename T>
|
|
Test::PIVariant<T> newVariant(const T & v) {return Test::PIVariant<T>(v);}
|
|
template <typename T>
|
|
Test::PIVariant<T> * castVariant(Test::__PIVariantBase * v, const T & t) {return static_cast<Test::PIVariant<T> * >(v);}
|
|
*/
|
|
#include "picode.h"
|
|
|
|
#define S(a, b) a#b
|
|
|
|
int main (int argc, char * argv[]) {
|
|
//piCout << (S(1,2));
|
|
//(1,2));
|
|
//CodeParser cd;
|
|
//cd.parseFile("test.cpp");
|
|
//piCout << v.toType<float>();
|
|
//piCout << v.toType<float>().toType<PIString>();
|
|
//PIFile::remove("ki");
|
|
/*PIConfig conf("protocols_commod.conf");
|
|
piCout << conf.allTree();
|
|
conf.setValue("rmd.123", 456);*/
|
|
piCout << PIString("1.1").toFloat();
|
|
piCout << PIString("1,1").toFloat();
|
|
}
|
|
|
|
|