File tree Expand file tree Collapse file tree 2 files changed +32
-7
lines changed Expand file tree Collapse file tree 2 files changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -1300,6 +1300,25 @@ struct )cpp" << inputType.type << R"cpp(
1300
1300
1301
1301
if (!_interfaceTypes.empty ())
1302
1302
{
1303
+ if (!_objectTypes.empty ())
1304
+ {
1305
+ headerFile << R"cpp(
1306
+ namespace object {
1307
+ )cpp" ;
1308
+
1309
+ // Forward declare all of the object types so the interface types can reference them
1310
+ for (const auto & objectType : _objectTypes)
1311
+ {
1312
+ headerFile << R"cpp(
1313
+ class )cpp" << objectType.type << R"cpp( ;)cpp" ;
1314
+ }
1315
+
1316
+ headerFile << R"cpp(
1317
+
1318
+ } /* namespace object */
1319
+ )cpp" ;
1320
+ }
1321
+
1303
1322
// Forward declare all of the interface types
1304
1323
if (_interfaceTypes.size () > 1 )
1305
1324
{
@@ -1337,9 +1356,11 @@ struct )cpp" << interfaceType.type << R"cpp(
1337
1356
headerFile << R"cpp( namespace object {
1338
1357
)cpp" ;
1339
1358
1340
- if (_objectTypes.size () > 1 )
1359
+ if (_interfaceTypes.empty ()
1360
+ && _objectTypes.size () > 1 )
1341
1361
{
1342
- // Forward declare all of the object types
1362
+ // Forward declare all of the object types if there were no interfaces so the
1363
+ // object types can reference one another
1343
1364
for (const auto & objectType : _objectTypes)
1344
1365
{
1345
1366
headerFile << R"cpp(
Original file line number Diff line number Diff line change @@ -34,11 +34,6 @@ struct CompleteTaskInput
34
34
std::unique_ptr<response::StringType> clientMutationId;
35
35
};
36
36
37
- struct Node
38
- {
39
- virtual std::future<std::vector<uint8_t >> getId (service::FieldParams&& params) const = 0;
40
- };
41
-
42
37
namespace object {
43
38
44
39
class Query ;
@@ -57,6 +52,15 @@ class Task;
57
52
class Folder ;
58
53
class NestedType ;
59
54
55
+ } /* namespace object */
56
+
57
+ struct Node
58
+ {
59
+ virtual std::future<std::vector<uint8_t >> getId (service::FieldParams&& params) const = 0;
60
+ };
61
+
62
+ namespace object {
63
+
60
64
class Query
61
65
: public service::Object
62
66
{
You can’t perform that action at this time.
0 commit comments