示例#1
0
文件: picture.cpp 项目: timbod7/adl
 void toJson( JsonWriter &json, const _T & v ) const
 {
     switch( v.d() )
     {
         case ADL::picture::Picture::CIRCLE: json.startObject(); writeField( json, circle_s(), "circle", v.circle() ); json.endObject(); break;
         case ADL::picture::Picture::RECTANGLE: json.startObject(); writeField( json, rectangle_s(), "rectangle", v.rectangle() ); json.endObject(); break;
         case ADL::picture::Picture::COMPOSED: json.startObject(); writeField( json, composed_s(), "composed", v.composed() ); json.endObject(); break;
         case ADL::picture::Picture::TRANSLATED: json.startObject(); writeField( json, translated_s(), "translated", v.translated() ); json.endObject(); break;
     }
 }
示例#2
0
文件: picture.cpp 项目: timbod7/adl
 void toJson( JsonWriter &json, const _T & v ) const
 {
     json.startObject();
     writeField<double>( json, width_s, "width", v.width );
     writeField<double>( json, height_s, "height", v.height );
     json.endObject();
 }
示例#3
0
文件: picture.cpp 项目: timbod7/adl
 void toJson( JsonWriter &json, const _T & v ) const
 {
     json.startObject();
     writeField<double>( json, radius_s, "radius", v.radius );
     json.endObject();
 }