piDe/SerializeJSON with PIJSON type, some doc
This commit is contained in:
@@ -60,6 +60,9 @@ inline PIJSON piSerializeJSON(const T & v) {
|
|||||||
|
|
||||||
// known types
|
// known types
|
||||||
|
|
||||||
|
inline PIJSON piSerializeJSON(const PIJSON & v) {
|
||||||
|
return v;
|
||||||
|
}
|
||||||
template<>
|
template<>
|
||||||
inline PIJSON piSerializeJSON(const PIVariant & v) {
|
inline PIJSON piSerializeJSON(const PIVariant & v) {
|
||||||
return PIJSON() = v;
|
return PIJSON() = v;
|
||||||
@@ -248,6 +251,9 @@ inline void piDeserializeJSON(T & v, const PIJSON & js) {
|
|||||||
|
|
||||||
// known types
|
// known types
|
||||||
|
|
||||||
|
inline void piDeserializeJSON(PIJSON & v, const PIJSON & js) {
|
||||||
|
v = js;
|
||||||
|
}
|
||||||
template<>
|
template<>
|
||||||
inline void piDeserializeJSON(PIVariant & v, const PIJSON & js) {
|
inline void piDeserializeJSON(PIVariant & v, const PIJSON & js) {
|
||||||
v = js.value();
|
v = js.value();
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ void header() {
|
|||||||
piCout << Bold << "PIP Code model generator";
|
piCout << Bold << "PIP Code model generator";
|
||||||
piCout << Cyan << "Version" << Bold << PIPVersion() << NewLine;
|
piCout << Cyan << "Version" << Bold << PIPVersion() << NewLine;
|
||||||
piCout << Green << Bold << "Usage:" << Default
|
piCout << Green << Bold << "Usage:" << Default
|
||||||
<< "\"pip_cmg [-hHqPpsAMESTG] -o <output_file> [-I<include_dir1>] [-I<include_dir1>] [...] [-D<define1>] [-D<define1>] [...] "
|
<< "\"pip_cmg [-hHqPpsAMESTGJ] -o <output_file> [-I<include_dir1>] [-I<include_dir1>] [...] [-D<define1>] [-D<define1>] [...] "
|
||||||
"<file1> [<file2>] [<file3>] [...]\""
|
"<file1> [<file2>] [<file3>] [...]\""
|
||||||
<< NewLine;
|
<< NewLine;
|
||||||
}
|
}
|
||||||
@@ -90,6 +90,7 @@ void usage() {
|
|||||||
piCout << "-E " << Green << "- write enums";
|
piCout << "-E " << Green << "- write enums";
|
||||||
piCout << "-S " << Green << "- write stream operators";
|
piCout << "-S " << Green << "- write stream operators";
|
||||||
piCout << "-G " << Green << "- write getter functions";
|
piCout << "-G " << Green << "- write getter functions";
|
||||||
|
piCout << "-J " << Green << "- write JSON functions";
|
||||||
// piCout << "-T " << Green << "- write text serialize functions";
|
// piCout << "-T " << Green << "- write text serialize functions";
|
||||||
piCout << "-o <output_file> " << Green
|
piCout << "-o <output_file> " << Green
|
||||||
<< "- output file for code model without extension (e.g. \"ccm\" - files \"ccm.h\" and \"ccm.cpp\" will be created)";
|
<< "- output file for code model without extension (e.g. \"ccm\" - files \"ccm.h\" and \"ccm.cpp\" will be created)";
|
||||||
|
|||||||
Reference in New Issue
Block a user