redsnow 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -1
  3. data/README.md +12 -0
  4. data/ext/snowcrash/bin/snowcrash +0 -0
  5. data/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.c +5 -2
  6. data/ext/snowcrash/snowcrash.gyp +7 -2
  7. data/ext/snowcrash/src/ActionParser.h +141 -81
  8. data/ext/snowcrash/src/AssetParser.h +19 -11
  9. data/ext/snowcrash/src/Blueprint.h +44 -14
  10. data/ext/snowcrash/src/BlueprintParser.h +65 -51
  11. data/ext/snowcrash/src/BlueprintSourcemap.h +254 -0
  12. data/ext/snowcrash/src/BlueprintUtility.h +3 -24
  13. data/ext/snowcrash/src/CBlueprint.cc +40 -31
  14. data/ext/snowcrash/src/CBlueprint.h +54 -58
  15. data/ext/snowcrash/src/CBlueprintSourcemap.cc +620 -0
  16. data/ext/snowcrash/src/CBlueprintSourcemap.h +342 -0
  17. data/ext/snowcrash/src/CSourceAnnotation.cc +14 -0
  18. data/ext/snowcrash/src/CodeBlockUtility.h +42 -5
  19. data/ext/snowcrash/src/HeadersParser.h +84 -42
  20. data/ext/snowcrash/src/ParameterParser.h +110 -68
  21. data/ext/snowcrash/src/ParametersParser.h +26 -28
  22. data/ext/snowcrash/src/PayloadParser.h +164 -83
  23. data/ext/snowcrash/src/ResourceGroupParser.h +35 -41
  24. data/ext/snowcrash/src/ResourceParser.h +142 -97
  25. data/ext/snowcrash/src/SectionParser.h +15 -14
  26. data/ext/snowcrash/src/SectionParserData.h +11 -2
  27. data/ext/snowcrash/src/SectionProcessor.h +42 -18
  28. data/ext/snowcrash/src/Serialize.cc +2 -0
  29. data/ext/snowcrash/src/Serialize.h +3 -1
  30. data/ext/snowcrash/src/SerializeJSON.cc +608 -16
  31. data/ext/snowcrash/src/SerializeJSON.h +4 -1
  32. data/ext/snowcrash/src/SerializeYAML.cc +367 -19
  33. data/ext/snowcrash/src/SerializeYAML.h +4 -1
  34. data/ext/snowcrash/src/SymbolTable.h +12 -1
  35. data/ext/snowcrash/src/ValuesParser.h +12 -11
  36. data/ext/snowcrash/src/Version.h +1 -1
  37. data/ext/snowcrash/src/csnowcrash.cc +7 -3
  38. data/ext/snowcrash/src/csnowcrash.h +4 -2
  39. data/ext/snowcrash/src/snowcrash.cc +10 -11
  40. data/ext/snowcrash/src/snowcrash.h +3 -3
  41. data/ext/snowcrash/src/snowcrash/snowcrash.cc +38 -8
  42. data/ext/snowcrash/tools/homebrew/snowcrash.rb +1 -1
  43. data/lib/redsnow.rb +41 -2
  44. data/lib/redsnow/binding.rb +93 -8
  45. data/lib/redsnow/blueprint.rb +48 -25
  46. data/lib/redsnow/parseresult.rb +9 -2
  47. data/lib/redsnow/sourcemap.rb +369 -0
  48. data/lib/redsnow/version.rb +1 -1
  49. data/test/fixtures/sample-api-ast.json +1 -1
  50. data/test/fixtures/sample-api-sourcemap.json +169 -0
  51. data/test/redsnow_binding_test.rb +19 -2
  52. data/test/redsnow_options_test.rb +42 -0
  53. data/test/redsnow_parseresult_test.rb +5 -1
  54. data/test/redsnow_test.rb +5 -0
  55. metadata +11 -2
@@ -60,12 +60,14 @@ namespace snowcrash {
60
60
 
61
61
  // Resolve left content type
62
62
  Collection<Header>::const_iterator header;
63
+
63
64
  header = std::find_if(left.headers.begin(),
64
65
  left.headers.end(),
65
66
  std::bind2nd(MatchFirstWith<Header, std::string>(),
66
67
  HTTPHeaderName::ContentType));
67
68
 
68
69
  std::string leftContentType;
70
+
69
71
  if (header != left.headers.end())
70
72
  leftContentType = header->second;
71
73
 
@@ -76,6 +78,7 @@ namespace snowcrash {
76
78
  HTTPHeaderName::ContentType));
77
79
 
78
80
  std::string rightContentType;
81
+
79
82
  if (header != right.headers.end())
80
83
  rightContentType = header->second;
81
84
 
@@ -97,30 +100,6 @@ namespace snowcrash {
97
100
  return first.method == second.method;
98
101
  }
99
102
  };
100
-
101
- /**
102
- * \brief Find a request within given action.
103
- * \param transaction A transaction to check.
104
- * \param request A request to look for.
105
- * \return Iterator pointing to the matching request within given method requests.
106
- */
107
- inline Collection<Request>::const_iterator FindRequest(const TransactionExample& example, const Request& request) {
108
- return std::find_if(example.requests.begin(),
109
- example.requests.end(),
110
- std::bind2nd(MatchPayload(), request));
111
- }
112
-
113
- /**
114
- * \brief Find a response within responses of a given action.
115
- * \param transaction A transaction to check.
116
- * \param response A response to look for.
117
- * \return Iterator pointing to the matching response within given method requests.
118
- */
119
- inline Collection<Response>::const_iterator FindResponse(const TransactionExample& example, const Response& response) {
120
- return std::find_if(example.responses.begin(),
121
- example.responses.end(),
122
- std::bind2nd(MatchPayload(), response));
123
- }
124
103
  }
125
104
 
126
105
  #endif
@@ -10,7 +10,6 @@
10
10
  #include "CBlueprint.h"
11
11
  #include "snowcrash.h"
12
12
 
13
-
14
13
  SC_API sc_blueprint_t* sc_blueprint_new()
15
14
  {
16
15
  return AS_TYPE(sc_blueprint_t, ::new snowcrash::Blueprint);
@@ -52,7 +51,7 @@ SC_API const sc_metadata_collection_t* sc_metadata_collection_handle(const sc_bl
52
51
 
53
52
  SC_API size_t sc_metadata_collection_size(const sc_metadata_collection_t* metadata)
54
53
  {
55
- const snowcrash::Collection<snowcrash::Metadata>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Metadata>::type, metadata);
54
+ const snowcrash::MetadataCollection* p = AS_CTYPE(snowcrash::MetadataCollection, metadata);
56
55
  if (!p)
57
56
  return 0;
58
57
 
@@ -63,7 +62,7 @@ SC_API size_t sc_metadata_collection_size(const sc_metadata_collection_t* metada
63
62
 
64
63
  SC_API const sc_metadata_t* sc_metadata_handle(const sc_metadata_collection_t* metadata_col, size_t index)
65
64
  {
66
- const snowcrash::Collection<snowcrash::Metadata>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Metadata>::type, metadata_col);
65
+ const snowcrash::MetadataCollection* p = AS_CTYPE(snowcrash::MetadataCollection, metadata_col);
67
66
  if (!p)
68
67
  return NULL;
69
68
 
@@ -90,18 +89,18 @@ SC_API const char* sc_metadata_value(const sc_metadata_t* metadata)
90
89
 
91
90
  /*----------------------------------------------------------------------*/
92
91
 
93
- SC_API const sc_resource_groups_collection_t* sc_resource_groups_collection_handle(const sc_blueprint_t* blueprint)
92
+ SC_API const sc_resource_group_collection_t* sc_resource_group_collection_handle(const sc_blueprint_t* blueprint)
94
93
  {
95
94
  const snowcrash::Blueprint* p = AS_CTYPE(snowcrash::Blueprint, blueprint);
96
95
  if (!p)
97
96
  return NULL;
98
97
 
99
- return AS_CTYPE(sc_resource_groups_collection_t, &p->resourceGroups);
98
+ return AS_CTYPE(sc_resource_group_collection_t, &p->resourceGroups);
100
99
  }
101
100
 
102
- SC_API size_t sc_resource_groups_collection_size(const sc_resource_groups_collection_t* resource)
101
+ SC_API size_t sc_resource_group_collection_size(const sc_resource_group_collection_t* resource)
103
102
  {
104
- const snowcrash::Collection<snowcrash::ResourceGroup>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::ResourceGroup>::type, resource);
103
+ const snowcrash::ResourceGroups* p = AS_CTYPE(snowcrash::ResourceGroups, resource);
105
104
  if (!p)
106
105
  return 0;
107
106
 
@@ -110,16 +109,16 @@ SC_API size_t sc_resource_groups_collection_size(const sc_resource_groups_collec
110
109
 
111
110
  /*----------------------------------------------------------------------*/
112
111
 
113
- SC_API const sc_resource_groups_t* sc_resource_groups_handle(const sc_resource_groups_collection_t* resource, size_t index)
112
+ SC_API const sc_resource_group_t* sc_resource_group_handle(const sc_resource_group_collection_t* resource, size_t index)
114
113
  {
115
- const snowcrash::Collection<snowcrash::ResourceGroup>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::ResourceGroup>::type, resource);
114
+ const snowcrash::ResourceGroups* p = AS_CTYPE(snowcrash::ResourceGroups, resource);
116
115
  if (!p)
117
116
  return NULL;
118
117
 
119
- return AS_CTYPE(sc_resource_groups_t, &p->at(index));
118
+ return AS_CTYPE(sc_resource_group_t, &p->at(index));
120
119
  }
121
120
 
122
- SC_API const char* sc_resource_groups_name(const sc_resource_groups_t* handle)
121
+ SC_API const char* sc_resource_group_name(const sc_resource_group_t* handle)
123
122
  {
124
123
  const snowcrash::ResourceGroup* p = AS_CTYPE(snowcrash::ResourceGroup, handle);
125
124
  if(!p)
@@ -128,7 +127,7 @@ SC_API const char* sc_resource_groups_name(const sc_resource_groups_t* handle)
128
127
  return p->name.c_str();
129
128
  }
130
129
 
131
- SC_API const char* sc_resource_groups_description(const sc_resource_groups_t* handle)
130
+ SC_API const char* sc_resource_group_description(const sc_resource_group_t* handle)
132
131
  {
133
132
  const snowcrash::ResourceGroup* p = AS_CTYPE(snowcrash::ResourceGroup, handle);
134
133
  if(!p)
@@ -139,7 +138,7 @@ SC_API const char* sc_resource_groups_description(const sc_resource_groups_t* ha
139
138
 
140
139
  /*----------------------------------------------------------------------*/
141
140
 
142
- SC_API const sc_resource_collection_t* sc_resource_collection_handle(const sc_resource_groups_t* handle)
141
+ SC_API const sc_resource_collection_t* sc_resource_collection_handle(const sc_resource_group_t* handle)
143
142
  {
144
143
  const snowcrash::ResourceGroup* p = AS_CTYPE(snowcrash::ResourceGroup, handle);
145
144
  if (!p)
@@ -150,7 +149,7 @@ SC_API const sc_resource_collection_t* sc_resource_collection_handle(const sc_re
150
149
 
151
150
  SC_API size_t sc_resource_collection_size(const sc_resource_collection_t* resource)
152
151
  {
153
- const snowcrash::Collection<snowcrash::Resource>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Resource>::type, resource);
152
+ const snowcrash::Resources* p = AS_CTYPE(snowcrash::Resources, resource);
154
153
  if (!p)
155
154
  return 0;
156
155
 
@@ -161,7 +160,7 @@ SC_API size_t sc_resource_collection_size(const sc_resource_collection_t* resour
161
160
 
162
161
  SC_API const sc_resource_t* sc_resource_handle(const sc_resource_collection_t* resource, size_t index)
163
162
  {
164
- const snowcrash::Collection<snowcrash::Resource>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Resource>::type, resource);
163
+ const snowcrash::Resources* p = AS_CTYPE(snowcrash::Resources, resource);
165
164
  if (!p)
166
165
  return NULL;
167
166
 
@@ -230,7 +229,7 @@ SC_API const sc_payload_t* sc_payload_handle(const sc_payload_collection_t* hand
230
229
  {
231
230
  const snowcrash::Collection<snowcrash::Payload>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Payload>::type, handle);
232
231
  if(!p)
233
- return 0;
232
+ return NULL;
234
233
 
235
234
  return AS_CTYPE(sc_payload_t, &p->at(index));
236
235
  }
@@ -253,6 +252,16 @@ SC_API const char* sc_payload_name(const sc_payload_t* handle)
253
252
  return p->name.c_str();
254
253
  }
255
254
 
255
+ /** TODO: Need to change this to use the "Reference" data structure */
256
+ SC_API const char* sc_payload_symbol(const sc_payload_t* handle)
257
+ {
258
+ const snowcrash::Payload* p = AS_CTYPE(snowcrash::Payload, handle);
259
+ if (!p)
260
+ return "";
261
+
262
+ return p->symbol.c_str();
263
+ }
264
+
256
265
  SC_API const char* sc_payload_description(const sc_payload_t* handle)
257
266
  {
258
267
  const snowcrash::Payload* p = AS_CTYPE(snowcrash::Payload, handle);
@@ -311,7 +320,7 @@ SC_API const sc_parameter_collection_t* sc_parameter_collection_handle_action(co
311
320
 
312
321
  SC_API size_t sc_parameter_collection_size(const sc_parameter_collection_t* handle)
313
322
  {
314
- const snowcrash::Collection<snowcrash::Parameter>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Parameter>::type, handle);
323
+ const snowcrash::Parameters* p = AS_CTYPE(snowcrash::Parameters, handle);
315
324
  if(!p)
316
325
  return 0;
317
326
 
@@ -322,9 +331,9 @@ SC_API size_t sc_parameter_collection_size(const sc_parameter_collection_t* hand
322
331
 
323
332
  SC_API const sc_parameter_t* sc_parameter_handle(const sc_parameter_collection_t* handle, size_t index)
324
333
  {
325
- const snowcrash::Collection<snowcrash::Parameter>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Parameter>::type, handle);
334
+ const snowcrash::Parameters* p = AS_CTYPE(snowcrash::Parameters, handle);
326
335
  if(!p)
327
- return 0;
336
+ return NULL;
328
337
 
329
338
  return AS_CTYPE(sc_parameter_t, &p->at(index));
330
339
  }
@@ -396,7 +405,7 @@ SC_API const sc_value_collection_t* sc_value_collection_handle(const sc_paramete
396
405
 
397
406
  SC_API size_t sc_value_collection_size(const sc_value_collection_t* handle)
398
407
  {
399
- const snowcrash::Collection<snowcrash::Value>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Value>::type, handle);
408
+ const snowcrash::Values* p = AS_CTYPE(snowcrash::Values, handle);
400
409
  if (!p)
401
410
  return 0;
402
411
 
@@ -407,14 +416,14 @@ SC_API size_t sc_value_collection_size(const sc_value_collection_t* handle)
407
416
 
408
417
  SC_API const sc_value_t* sc_value_handle(const sc_value_collection_t* handle, size_t index)
409
418
  {
410
- const snowcrash::Collection<snowcrash::Value>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Value>::type, handle);
419
+ const snowcrash::Values* p = AS_CTYPE(snowcrash::Values, handle);
411
420
  if (!p)
412
421
  return NULL;
413
422
 
414
- return AS_CTYPE( sc_value_t, &p->at(index));
423
+ return AS_CTYPE(sc_value_t, &p->at(index));
415
424
  }
416
425
 
417
- SC_API const char* sc_value_string(const sc_value_t* handle)
426
+ SC_API const char* sc_value(const sc_value_t* handle)
418
427
  {
419
428
  const snowcrash::Value* p = AS_CTYPE(snowcrash::Value, handle);
420
429
  if(!p)
@@ -454,7 +463,7 @@ SC_API const sc_header_collection_t* sc_header_collection_handle_action(const sc
454
463
 
455
464
  SC_API size_t sc_header_collection_size(const sc_header_collection_t* handle)
456
465
  {
457
- const snowcrash::Collection<snowcrash::Header>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Header>::type, handle);
466
+ const snowcrash::Headers* p = AS_CTYPE(snowcrash::Headers, handle);
458
467
  if (!p)
459
468
  return 0;
460
469
 
@@ -465,7 +474,7 @@ SC_API size_t sc_header_collection_size(const sc_header_collection_t* handle)
465
474
 
466
475
  SC_API const sc_header_t* sc_header_handle(const sc_header_collection_t* handle, size_t index)
467
476
  {
468
- const snowcrash::Collection<snowcrash::Header>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Header>::type, handle);
477
+ const snowcrash::Headers* p = AS_CTYPE(snowcrash::Headers, handle);
469
478
  if (!p)
470
479
  return NULL;
471
480
 
@@ -503,7 +512,7 @@ SC_API const sc_action_collection_t* sc_action_collection_handle(const sc_resour
503
512
 
504
513
  SC_API size_t sc_action_collection_size(const sc_action_collection_t* handle)
505
514
  {
506
- const snowcrash::Collection<snowcrash::Action>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Action>::type, handle);
515
+ const snowcrash::Actions* p = AS_CTYPE(snowcrash::Actions, handle);
507
516
  if (!p)
508
517
  return 0;
509
518
 
@@ -514,9 +523,9 @@ SC_API size_t sc_action_collection_size(const sc_action_collection_t* handle)
514
523
 
515
524
  SC_API const sc_action_t* sc_action_handle(const sc_action_collection_t* handle, size_t index)
516
525
  {
517
- const snowcrash::Collection<snowcrash::Action>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::Action>::type, handle);
526
+ const snowcrash::Actions* p = AS_CTYPE(snowcrash::Actions, handle);
518
527
  if(!p)
519
- return 0;
528
+ return NULL;
520
529
 
521
530
  return AS_CTYPE(sc_action_t, &p->at(index));
522
531
  }
@@ -561,7 +570,7 @@ SC_API const sc_transaction_example_collection_t* sc_transaction_example_collect
561
570
 
562
571
  SC_API size_t sc_transaction_example_collection_size(const sc_transaction_example_collection_t* handle)
563
572
  {
564
- const snowcrash::Collection<snowcrash::TransactionExample>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::TransactionExample>::type, handle);
573
+ const snowcrash::TransactionExamples* p = AS_CTYPE(snowcrash::TransactionExamples, handle);
565
574
  if (!p)
566
575
  return 0;
567
576
 
@@ -572,9 +581,9 @@ SC_API size_t sc_transaction_example_collection_size(const sc_transaction_exampl
572
581
 
573
582
  SC_API const sc_transaction_example_t* sc_transaction_example_handle(const sc_transaction_example_collection_t* handle, size_t index)
574
583
  {
575
- const snowcrash::Collection<snowcrash::TransactionExample>::type* p = AS_CTYPE(snowcrash::Collection<snowcrash::TransactionExample>::type, handle);
584
+ const snowcrash::TransactionExamples* p = AS_CTYPE(snowcrash::TransactionExamples, handle);
576
585
  if(!p)
577
- return 0;
586
+ return NULL;
578
587
 
579
588
  return AS_CTYPE(sc_transaction_example_t, &p->at(index));
580
589
  }
@@ -23,7 +23,8 @@ extern "C" {
23
23
  /** brief Blueprint Parser Options Enums */
24
24
  enum sc_blueprint_parser_option {
25
25
  SC_RENDER_DESCRIPTIONS_OPTION = (1 << 0), /// < Render Markdown in description.
26
- SC_REQUIRE_BLUEPRINT_NAME_OPTION = (1 << 1) /// < Treat missing blueprint name as error
26
+ SC_REQUIRE_BLUEPRINT_NAME_OPTION = (1 << 1), /// < Treat missing blueprint name as error
27
+ SC_EXPORT_SORUCEMAP_OPTION = (1 << 2) /// < Export source maps AST
27
28
  };
28
29
 
29
30
  /** Parameter Use flag */
@@ -45,19 +46,19 @@ extern "C" {
45
46
  struct sc_metadata_s;
46
47
  typedef struct sc_metadata_s sc_metadata_t;
47
48
 
48
- /** Array Resource Groups wrapper */
49
- struct sc_resource_groups_collection_s;
50
- typedef struct sc_resource_groups_collection_s sc_resource_groups_collection_t;
49
+ /** Array Resource Group Collection wrapper */
50
+ struct sc_resource_group_collection_s;
51
+ typedef struct sc_resource_group_collection_s sc_resource_group_collection_t;
51
52
 
52
53
  /** Class Resource Group wrapper */
53
- struct sc_resource_groups_s;
54
- typedef struct sc_resource_groups_s sc_resource_groups_t;
54
+ struct sc_resource_group_s;
55
+ typedef struct sc_resource_group_s sc_resource_group_t;
55
56
 
56
- /** Array Resources Collection wrapper */
57
+ /** Array Resource Collection wrapper */
57
58
  struct sc_resource_collection_s;
58
59
  typedef struct sc_resource_collection_s sc_resource_collection_t;
59
60
 
60
- /** Class Resources wrapper */
61
+ /** Class Resource wrapper */
61
62
  struct sc_resource_s;
62
63
  typedef struct sc_resource_s sc_resource_t;
63
64
 
@@ -97,14 +98,6 @@ extern "C" {
97
98
  struct sc_value_s;
98
99
  typedef struct sc_value_s sc_value_t;
99
100
 
100
- /** Array Header wrapper */
101
- struct sc_header_collection_s;
102
- typedef struct sc_header_collection_s sc_header_collection_t;
103
-
104
- /** class Header wrapper */
105
- struct sc_header_s;
106
- typedef struct sc_header_s sc_header_t;
107
-
108
101
  /** Array Action wrapper */
109
102
  struct sc_action_collection_s;
110
103
  typedef struct sc_action_collection_s sc_action_collection_t;
@@ -123,10 +116,10 @@ extern "C" {
123
116
 
124
117
  /*----------------------------------------------------------------------*/
125
118
 
126
- /** \returns pointer to allocated Blueprint*/
119
+ /** \returns pointer to allocated Blueprint */
127
120
  SC_API sc_blueprint_t* sc_blueprint_new();
128
121
 
129
- /** \deallocate Blueprint from pointer*/
122
+ /** \deallocate Blueprint from pointer */
130
123
  SC_API void sc_blueprint_free(sc_blueprint_t* blueprint);
131
124
 
132
125
  /** \returns Blueprint name */
@@ -137,7 +130,7 @@ extern "C" {
137
130
 
138
131
  /*----------------------------------------------------------------------*/
139
132
 
140
- /** \returns Metadata Handle */
133
+ /** \returns Metadata array handle */
141
134
  SC_API const sc_metadata_collection_t* sc_metadata_collection_handle(const sc_blueprint_t* blueprint);
142
135
 
143
136
  /** \returns size of Metadata array */
@@ -156,34 +149,34 @@ extern "C" {
156
149
 
157
150
  /*----------------------------------------------------------------------*/
158
151
 
159
- /** \returns Resource Groups Array Handle */
160
- SC_API const sc_resource_groups_collection_t* sc_resource_groups_collection_handle(const sc_blueprint_t* blueprint);
152
+ /** \returns Resource Group Collection array handle */
153
+ SC_API const sc_resource_group_collection_t* sc_resource_group_collection_handle(const sc_blueprint_t* blueprint);
161
154
 
162
- /** \returns size of Resource Groups array */
163
- SC_API size_t sc_resource_groups_collection_size(const sc_resource_groups_collection_t* resource);
155
+ /** \returns size of Resource Group Collection array */
156
+ SC_API size_t sc_resource_group_collection_size(const sc_resource_group_collection_t* resource);
164
157
 
165
158
  /*----------------------------------------------------------------------*/
166
159
 
167
- /** \returns Resource Groups Handle */
168
- SC_API const sc_resource_groups_t* sc_resource_groups_handle(const sc_resource_groups_collection_t* resource, size_t index);
160
+ /** \returns Resource Group handle */
161
+ SC_API const sc_resource_group_t* sc_resource_group_handle(const sc_resource_group_collection_t* resource, size_t index);
169
162
 
170
- /** \returns Resource Groups name */
171
- SC_API const char* sc_resource_groups_name(const sc_resource_groups_t* handle);
163
+ /** \returns Resource Group name */
164
+ SC_API const char* sc_resource_group_name(const sc_resource_group_t* handle);
172
165
 
173
- /** \returns Resource Groups Description */
174
- SC_API const char* sc_resource_groups_description(const sc_resource_groups_t* handle);
166
+ /** \returns Resource Group description */
167
+ SC_API const char* sc_resource_group_description(const sc_resource_group_t* handle);
175
168
 
176
169
  /*----------------------------------------------------------------------*/
177
170
 
178
- /** \returns Resource Array Handle */
179
- SC_API const sc_resource_collection_t* sc_resource_collection_handle(const sc_resource_groups_t* handle);
171
+ /** \returns Resource array handle */
172
+ SC_API const sc_resource_collection_t* sc_resource_collection_handle(const sc_resource_group_t* handle);
180
173
 
181
- /** \returns Resource array size*/
174
+ /** \returns Resource array size */
182
175
  SC_API size_t sc_resource_collection_size(const sc_resource_collection_t* resource);
183
176
 
184
177
  /*----------------------------------------------------------------------*/
185
178
 
186
- /** \returns Resource Handle */
179
+ /** \returns Resource handle */
187
180
  SC_API const sc_resource_t* sc_resource_handle(const sc_resource_collection_t* resource, size_t index);
188
181
 
189
182
  /** \returns Resource URITemplate */
@@ -197,26 +190,29 @@ extern "C" {
197
190
 
198
191
  /*----------------------------------------------------------------------*/
199
192
 
200
- /** \returns Payload Collection handle from TransactionExample for requests*/
193
+ /** \returns Payload Collection array handle from TransactionExample for requests*/
201
194
  SC_API const sc_payload_collection_t* sc_payload_collection_handle_requests(const sc_transaction_example_t* handle);
202
195
 
203
- /** \returns Payload Collection handle from TransactionExample for responses*/
196
+ /** \returns Payload Collection array handle from TransactionExample for responses*/
204
197
  SC_API const sc_payload_collection_t* sc_payload_collection_handle_responses(const sc_transaction_example_t* handle);
205
198
 
206
- /** \returns Payload Collection size */
199
+ /** \returns Payload Collection array size */
207
200
  SC_API size_t sc_payload_collection_size(const sc_payload_collection_t* handle);
208
201
 
209
202
  /*----------------------------------------------------------------------*/
210
203
 
211
- /** \returns Payload at `index` Handle*/
204
+ /** \returns Payload at `index` handle */
212
205
  SC_API const sc_payload_t* sc_payload_handle(const sc_payload_collection_t* handle, size_t index);
213
206
 
214
- /** \returns Payload Handle from resource*/
207
+ /** \returns Payload handle from resource */
215
208
  SC_API const sc_payload_t* sc_payload_handle_resource(const sc_resource_t* handle);
216
209
 
217
210
  /** \returns Payload name */
218
211
  SC_API const char* sc_payload_name(const sc_payload_t* handle);
219
212
 
213
+ /** \returns Payload symbol name */
214
+ SC_API const char* sc_payload_symbol(const sc_payload_t* handle);
215
+
220
216
  /** \returns Payload description */
221
217
  SC_API const char* sc_payload_description(const sc_payload_t* handle);
222
218
 
@@ -228,13 +224,13 @@ extern "C" {
228
224
 
229
225
  /*----------------------------------------------------------------------*/
230
226
 
231
- /** \returns Parameter Collection handle from Payload*/
227
+ /** \returns Parameter Collection handle from Payload */
232
228
  SC_API const sc_parameter_collection_t* sc_parameter_collection_handle_payload(const sc_payload_t* handle);
233
229
 
234
- /** \returns Parameter Collection handle from Resource*/
230
+ /** \returns Parameter Collection handle from Resource */
235
231
  SC_API const sc_parameter_collection_t* sc_parameter_collection_handle_resource(const sc_resource_t* handle);
236
232
 
237
- /** \returns Parameter Collection handle from Action*/
233
+ /** \returns Parameter Collection handle from Action */
238
234
  SC_API const sc_parameter_collection_t* sc_parameter_collection_handle_action(const sc_action_t* handle);
239
235
 
240
236
  /** \returns Parameter Collection size */
@@ -251,24 +247,24 @@ extern "C" {
251
247
  /** \returns Parameter description */
252
248
  SC_API const char* sc_parameter_description(const sc_parameter_t* handle);
253
249
 
254
- /** \returns Parameter Type */
250
+ /** \returns Parameter type */
255
251
  SC_API const char* sc_parameter_type(const sc_parameter_t* handle);
256
252
 
257
- /** \returns Parameter Parameter Use */
253
+ /** \returns Parameter use */
258
254
  SC_API sc_parameter_use sc_parameter_parameter_use(const sc_parameter_t* handle);
259
255
 
260
- /** \returns Parameter Default Value */
256
+ /** \returns Parameter default value */
261
257
  SC_API const char* sc_parameter_default_value(const sc_parameter_t* handle);
262
258
 
263
- /** \returns Parameter Example Value */
259
+ /** \returns Parameter example value */
264
260
  SC_API const char* sc_parameter_example_value(const sc_parameter_t* handle);
265
261
 
266
262
  /*----------------------------------------------------------------------*/
267
263
 
268
- /** \returns Value Collection handle */
264
+ /** \returns Value Collection array handle */
269
265
  SC_API const sc_value_collection_t* sc_value_collection_handle(const sc_parameter_t* handle);
270
266
 
271
- /** \returns Value Collection size */
267
+ /** \returns Value Collection array size */
272
268
  SC_API size_t sc_value_collection_size(const sc_value_collection_t* handle);
273
269
 
274
270
  /*----------------------------------------------------------------------*/
@@ -277,20 +273,20 @@ extern "C" {
277
273
  SC_API const sc_value_t* sc_value_handle(const sc_value_collection_t* handle, size_t index);
278
274
 
279
275
  /** \returns Value string */
280
- SC_API const char* sc_value_string(const sc_value_t* handle);
276
+ SC_API const char* sc_value(const sc_value_t* handle);
281
277
 
282
278
  /*----------------------------------------------------------------------*/
283
279
 
284
- /** \returns Header Collection handle from Payload*/
280
+ /** \returns Header Collection array handle from Payload */
285
281
  SC_API const sc_header_collection_t* sc_header_collection_handle_payload(const sc_payload_t* handle);
286
282
 
287
- /** \returns Header Collection handle from Resource*/
283
+ /** \returns Header Collection array handle from Resource */
288
284
  SC_API const sc_header_collection_t* sc_header_collection_handle_resource(const sc_resource_t* handle);
289
285
 
290
- /** \returns Header Collection handle from Action*/
286
+ /** \returns Header Collection array handle from Action */
291
287
  SC_API const sc_header_collection_t* sc_header_collection_handle_action(const sc_action_t* handle);
292
288
 
293
- /** \returns Header Collection size */
289
+ /** \returns Header Collection array size */
294
290
  SC_API size_t sc_header_collection_size(const sc_header_collection_t* handle);
295
291
 
296
292
  /*----------------------------------------------------------------------*/
@@ -306,10 +302,10 @@ extern "C" {
306
302
 
307
303
  /*----------------------------------------------------------------------*/
308
304
 
309
- /** \returns Action Collection handle */
305
+ /** \returns Action Collection array handle */
310
306
  SC_API const sc_action_collection_t* sc_action_collection_handle(const sc_resource_t* handle);
311
307
 
312
- /** \returns Action Collection size */
308
+ /** \returns Action Collection array size */
313
309
  SC_API size_t sc_action_collection_size(const sc_action_collection_t* handle);
314
310
 
315
311
  /*----------------------------------------------------------------------*/
@@ -323,15 +319,15 @@ extern "C" {
323
319
  /** \returns Action name */
324
320
  SC_API const char* sc_action_name(const sc_action_t* handle);
325
321
 
326
- /** \returns Action Description */
322
+ /** \returns Action description */
327
323
  SC_API const char* sc_action_description(const sc_action_t* handle);
328
324
 
329
325
  /*----------------------------------------------------------------------*/
330
326
 
331
- /** \returns Transaction Example Collection handle */
327
+ /** \returns Transaction Example Collection array handle */
332
328
  SC_API const sc_transaction_example_collection_t* sc_transaction_example_collection_handle(const sc_action_t* handle);
333
329
 
334
- /** \returns Transaction Example Collection size */
330
+ /** \returns Transaction Example Collection array size */
335
331
  SC_API size_t sc_transaction_example_collection_size(const sc_transaction_example_collection_t* handle);
336
332
 
337
333
  /*----------------------------------------------------------------------*/
@@ -342,7 +338,7 @@ extern "C" {
342
338
  /** \returns Transaction Example name */
343
339
  SC_API const char* sc_transaction_example_name(const sc_transaction_example_t* handle);
344
340
 
345
- /** \returns Transaction Example Description */
341
+ /** \returns Transaction Example description */
346
342
  SC_API const char* sc_transaction_example_description(const sc_transaction_example_t* handle);
347
343
 
348
344
  /*----------------------------------------------------------------------*/