Skip to content

Commit 30a39df

Browse files
author
Andres Sevillano
committed
c++ namespac
1 parent aed8d8c commit 30a39df

File tree

2 files changed

+42
-10
lines changed

2 files changed

+42
-10
lines changed

json/schema.json

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,51 @@
2727
"title": "Impression",
2828
"bookmarkTarget": "impression",
2929
"type": "object",
30+
"metatype" : "struct Impression",
3031
"properties": {
3132
"id": {
32-
"type": "string"
33+
"type": "string",
34+
"metatype": "std::string"
3335
},
3436
"banner": {
3537
"type": "object",
38+
"metatype" : "struct Banner",
3639
"metainfo": "not implemented",
3740
"scope": "required for banner impressions"
3841
},
3942
"audio": {
4043
"type": "object",
44+
"metatype" : "struct Audio",
4145
"metainfo": "not implemented",
4246
"scope": "required for audio impressions"
4347
},
4448
"video": {
4549
"type": "object",
50+
"metatype" : "struct Video",
4651
"metainfo": "not implemented",
4752
"scope": "required for video impressions"
4853
},
4954
"native": {
5055
"title" : "Native",
56+
"metatype" : "struct Native",
5157
"type": "object",
5258
"scope": "required for native impressions",
5359
"properties": {
5460
"request": {
55-
"type": "string"
61+
"type": "string",
62+
"metatype": "std::string"
5663
},
5764
"ver": {
5865
"type": "string",
66+
"metatype": "std::string",
5967
"default": "1.1"
6068
},
6169
"api": {
6270
"type": "array",
71+
"metatype": "std::vector<unsigned int>",
6372
"items": {
64-
"type": "integer"
73+
"type": "integer",
74+
"metatype": "unsigned int"
6575
}
6676
}
6777
},
@@ -72,44 +82,54 @@
7282
"pmp": {
7383
"title" : "PMP",
7484
"type": "object",
85+
"metatype": "struct PMP",
7586
"properties": {
7687
"private_auction": {
7788
"type": "integer",
89+
"metatype": "unsigned int",
7890
"minimum": 0,
7991
"maximum": 1,
8092
"default": 0
8193
},
8294
"deals": {
8395
"type": "array",
96+
"metatype": "std::vector<Deal>",
8497
"items": {
8598
"title": "Deal",
8699
"type": "object",
100+
"metatype": "struct Deal",
87101
"properties": {
88102
"id": {
89-
"type": "string"
103+
"type": "string",
104+
"metatype": "std::string"
90105
},
91106
"bidfloor": {
92107
"type": "number",
108+
"metatype": "double",
93109
"minimum": 0.0,
94110
"default": 0.0
95111
},
96112
"bidfloorcur": {
97113
"type": "string",
114+
"metatype": "std::string",
98115
"enum": [
99116
"USD"
100117
]
101118
},
102119
"at": {
103-
"type": "integer"
120+
"type": "integer",
121+
"metatype": "int"
104122
},
105123
"wseat": {
106124
"type": "array",
125+
"metatype": "std::vector<std::string>",
107126
"items": {
108127
"type": "string"
109128
}
110129
},
111130
"wadomain": {
112131
"type": "array",
132+
"metatype": "std::vector<std::string>",
113133
"items": {
114134
"type": "string"
115135
}
@@ -124,58 +144,70 @@
124144
}
125145
},
126146
"displaymanager": {
127-
"type": "string"
147+
"type": "string",
148+
"metatype": "std::string"
128149
},
129150
"displaymanagerver": {
130-
"type": "string"
151+
"type": "string",
152+
"metatype": "std::string"
131153
},
132154
"instl": {
133155
"type": "integer",
156+
"metatype": "unsigned int",
134157
"minimum": 0,
135158
"maximum": 1,
136159
"default": 0
137160
},
138161
"tagid": {
139-
"type": "string"
162+
"type": "string",
163+
"metatype": "std::string"
140164
},
141165
"bidfloor": {
142166
"type": "number",
167+
"metatype": "double",
143168
"minimum": 0.0,
144169
"default": 0.0
145170
},
146171
"bidfloorcur": {
147172
"type": "string",
173+
"metatype": "std::string",
148174
"enum": [
149175
"USD"
150176
]
151177
},
152178
"clickbrowser": {
153179
"type": "integer",
180+
"metatype": "unsigned int",
154181
"minimum": 0,
155182
"maximum": 1,
156183
"default": 0
157184
},
158185
"secure": {
159186
"type": "integer",
187+
"metatype": "unsigned int",
160188
"minimum": 0,
161189
"maximum": 1,
162190
"default": 0
163191
},
164192
"iframabuster": {
165193
"type": "array",
194+
"metatype": "std::vector<std::string>",
166195
"items": {
167196
"type": "string"
168197
}
169198
},
170199
"exp": {
171-
"type": "integer"
200+
"type": "integer",
201+
"metatype": "int"
172202
},
173203
"ext": {
174204
"title": "Extension",
175205
"type": "object",
206+
"metatype": "struct Extension",
176207
"properties": {
177208
"strictbannersize": {
178209
"type": "integer",
210+
"metatype": "unsigned int",
179211
"minimum": 0,
180212
"maximum": 1,
181213
"default": 0

src/boilerplateCodeDoc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ return boilerplateOperator(jsonSchema, *this, jsonSchema.namespace_id, [](const
457457
}
458458

459459
addition += "\n}; // " + parentMetatype + "\n";
460-
if( not namespace_id.empty() ) { addition += "\n} // namespace " + namespace_id + "\n"; }
460+
if( not namespace_id.empty() ) { addition += "\n} // namespace " + namespace_id + "\n\n"; }
461461

462462
filtered = addition + filtered;
463463
}

0 commit comments

Comments
 (0)