MCPcopy Create free account
hub / github.com/Samsung/UTopia / toJson

Method toJson

lib/inputanalysis/Definition.cpp:48–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48Json::Value Definition::toJson() const {
49 Json::Value Result;
50
51 Result["ID"] = ID;
52 Result["Path"] = Path;
53 Result["Offset"] = Offset;
54 Result["Length"] = Length;
55 Result["FilePath"] = FilePath;
56 Result["BufferAllocSize"] = BufferAllocSize;
57 Result["Array"] = Array;
58 Result["ArrayLen"] = ArrayLen;
59
60 Json::Value JsonArrayIDs = Json::Value(Json::arrayValue);
61 for (auto ArrayID : ArrayIDs)
62 JsonArrayIDs.append(ArrayID);
63 Result["ArrayIDs"] = JsonArrayIDs;
64
65 Json::Value JsonArrayLenIDs = Json::Value(Json::arrayValue);
66 for (auto ArrayLenID : ArrayLenIDs)
67 JsonArrayLenIDs.append(ArrayLenID);
68 Result["ArrayLenIDs"] = JsonArrayLenIDs;
69
70 Result["LoopExit"] = LoopExit;
71
72 Result["DataType"] = DataType ? DataType->toJson() : Json::nullValue;
73 Result["Declaration"] = Declaration;
74 Result["AssignOperatorRequired"] = AssignOperatorRequired;
75 Result["TypeOffset"] = TypeOffset;
76 Result["TypeString"] = TypeString;
77 Result["EndOffset"] = EndOffset;
78 Result["VarName"] = VarName;
79 Result["Namespace"] = Namespace;
80 Result["Value"] = Value.toJson();
81
82 Json::Value FilterElementJson;
83 for (auto Filter : Filters)
84 FilterElementJson.append(Filter);
85 Result["Filters"] = FilterElementJson;
86
87 return Result;
88}

Callers

nothing calls this directly

Calls 1

ValueClass · 0.50

Tested by

no test coverage detected