| 33 | static const rdcliteral debugOnlyString = "DEBUG VARIABLE: Read-only in stable builds."_lit; |
| 34 | |
| 35 | static rdcstr valueString(const SDObject *o) |
| 36 | { |
| 37 | if(o->type.basetype == SDBasic::String) |
| 38 | return o->data.str; |
| 39 | |
| 40 | if(o->type.basetype == SDBasic::UnsignedInteger) |
| 41 | return StringFormat::Fmt("%llu", o->data.basic.u); |
| 42 | |
| 43 | if(o->type.basetype == SDBasic::SignedInteger) |
| 44 | return StringFormat::Fmt("%lld", o->data.basic.i); |
| 45 | |
| 46 | if(o->type.basetype == SDBasic::Float) |
| 47 | return StringFormat::Fmt("%lf", o->data.basic.d); |
| 48 | |
| 49 | if(o->type.basetype == SDBasic::Boolean) |
| 50 | return o->data.basic.b ? "True" : "False"; |
| 51 | |
| 52 | if(o->type.basetype == SDBasic::Array) |
| 53 | return StringFormat::Fmt("[%zu]", o->NumChildren()); |
| 54 | |
| 55 | return "{}"; |
| 56 | } |
| 57 | |
| 58 | struct xml_stream_writer : pugi::xml_writer |
| 59 | { |
no test coverage detected