redsnow 0.3.7 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +4 -4
- data/ext/drafter/Makefile +54 -0
- data/ext/drafter/appveyor.yml +10 -0
- data/ext/drafter/bin/drafter +0 -0
- data/ext/{snowcrash → drafter}/build/Makefile +29 -14
- data/ext/{snowcrash/build/snowcrash.Makefile → drafter/build/drafter.Makefile} +1 -1
- data/ext/{snowcrash/build/snowcrash.target.mk → drafter/build/drafter.target.mk} +25 -23
- data/ext/{snowcrash/build → drafter/build/ext/snowcrash}/libmarkdownparser.target.mk +7 -7
- data/ext/drafter/build/ext/snowcrash/libsnowcrash.target.mk +152 -0
- data/ext/{snowcrash/build → drafter/build/ext/snowcrash}/libsundown.target.mk +13 -13
- data/ext/{snowcrash/build → drafter/build/ext/snowcrash}/perf-libsnowcrash.target.mk +14 -20
- data/ext/drafter/build/ext/snowcrash/snowcrash.Makefile +6 -0
- data/ext/{snowcrash → drafter}/build/gyp-mac-tool +0 -0
- data/ext/{snowcrash/build/libsnowcrash.target.mk → drafter/build/libdrafter.target.mk} +29 -36
- data/ext/drafter/build/libsos.target.mk +133 -0
- data/ext/drafter/build/out/Release/drafter +0 -0
- data/ext/drafter/build/out/Release/libdrafter.dylib +0 -0
- data/ext/drafter/build/out/Release/libmarkdownparser.a +0 -0
- data/ext/drafter/build/out/Release/libsnowcrash.a +0 -0
- data/ext/drafter/build/out/Release/libsos.a +0 -0
- data/ext/{snowcrash → drafter}/build/out/Release/libsundown.a +0 -0
- data/ext/{snowcrash → drafter}/build/out/Release/linker.lock +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/config.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/main.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/reporting.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Serialize.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeAST.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeResult.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/cdrafter.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Blueprint.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/BlueprintSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HTTP.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HeadersParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSON.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONOneOfParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONTypeSectionParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONValueMemberParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Section.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Signature.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/UriTemplateParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/posix/RegexMatch.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/snowcrash.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsos/ext/sos/src/sos.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html_smartypants.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/autolink.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/buffer.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/markdown.o +0 -0
- data/ext/{snowcrash/build/out/Release/obj.target/libsundown → drafter/build/out/Release/obj.target/libsundown/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/src_map.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
- data/ext/drafter/circle.yml +12 -0
- data/ext/{snowcrash → drafter}/config.gypi +1 -1
- data/ext/{snowcrash → drafter}/config.mk +0 -0
- data/ext/{snowcrash → drafter}/configure +16 -5
- data/ext/drafter/drafter.gyp +118 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/Makefile +4 -12
- data/ext/{snowcrash → drafter/ext/snowcrash}/Vagrantfile +14 -4
- data/ext/drafter/ext/snowcrash/appveyor.yml +7 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/common.gypi +0 -0
- data/ext/drafter/ext/snowcrash/configure +197 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/Makefile +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/CONTRIBUTING.md +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/Makefile +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/Makefile.win +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/examples/smartypants.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/examples/sundown.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/houdini.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/houdini_href_e.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/houdini_html_e.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html/html_smartypants.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/html_block_names.txt +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/autolink.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/autolink.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/buffer.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/buffer.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/html_blocks.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/markdown.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/markdown.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/src_map.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/src_map.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/stack.c +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/src/stack.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/ext/sundown/sundown.def +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/msvc/markdown/markdown.vcproj +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/msvc/msvc.sln +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/msvc/sundown/sundown.vcproj +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/ByteBuffer.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/ByteBuffer.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/MarkdownNode.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/MarkdownNode.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/MarkdownParser.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/ext/markdown-parser/src/MarkdownParser.h +10 -2
- data/ext/{snowcrash → drafter/ext/snowcrash}/provisioning.sh +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/snowcrash.gyp +41 -39
- data/ext/{snowcrash → drafter/ext/snowcrash}/snowcrash.xcworkspace/contents.xcworkspacedata +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ActionParser.h +50 -6
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/AssetParser.h +1 -12
- data/ext/drafter/ext/snowcrash/src/AttributesParser.h +121 -0
- data/ext/drafter/ext/snowcrash/src/Blueprint.cc +90 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Blueprint.h +169 -33
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/BlueprintParser.h +305 -48
- data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc +81 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/BlueprintSourcemap.h +130 -39
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/BlueprintUtility.h +10 -4
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/CodeBlockUtility.h +1 -1
- data/ext/drafter/ext/snowcrash/src/DataStructureGroupParser.h +154 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/HTTP.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/HTTP.h +0 -0
- data/ext/drafter/ext/snowcrash/src/HeadersParser.cc +110 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/HeadersParser.h +123 -54
- data/ext/drafter/ext/snowcrash/src/MSON.cc +272 -0
- data/ext/drafter/ext/snowcrash/src/MSON.h +399 -0
- data/ext/drafter/ext/snowcrash/src/MSONMixinParser.h +95 -0
- data/ext/drafter/ext/snowcrash/src/MSONNamedTypeParser.h +108 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.cc +132 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.h +80 -0
- data/ext/drafter/ext/snowcrash/src/MSONParameterParser.h +232 -0
- data/ext/drafter/ext/snowcrash/src/MSONPropertyMemberParser.h +91 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.cc +141 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.h +181 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.cc +209 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.h +213 -0
- data/ext/drafter/ext/snowcrash/src/MSONUtility.h +423 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.cc +179 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.h +346 -0
- data/ext/drafter/ext/snowcrash/src/ModelTable.h +87 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ParameterParser.h +120 -61
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ParametersParser.h +17 -18
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/PayloadParser.h +36 -18
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Platform.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/RegexMatch.h +0 -0
- data/ext/drafter/ext/snowcrash/src/RelationParser.h +75 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ResourceGroupParser.h +127 -33
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ResourceParser.h +126 -33
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Section.cc +6 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Section.h +15 -2
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/SectionParser.h +3 -1
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/SectionParserData.h +15 -5
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/SectionProcessor.h +24 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/Signature.cc +14 -0
- data/ext/drafter/ext/snowcrash/src/Signature.h +80 -0
- data/ext/drafter/ext/snowcrash/src/SignatureSectionProcessor.h +439 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/SourceAnnotation.h +3 -2
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/StringUtility.h +103 -6
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/UriTemplateParser.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/UriTemplateParser.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/ValuesParser.h +1 -13
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/posix/RegexMatch.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/snowcrash.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/snowcrash.h +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/src/win/RegexMatch.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/AUTHORS +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/DEPS +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/OWNERS +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/PRESUBMIT.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/buildbot/buildbot_run.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/codereview.settings +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/data/win/large-pdb-shim.cc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/gyp +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/gyp.bat +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/gyp_main.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSNew.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSProject.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSSettings.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSToolFile.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSUserFile.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSUtil.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/MSVSVersion.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/__init__.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/common.py +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/easy_xml.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/flock_tool.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/android.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/cmake.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/eclipse.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/gypd.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/gypsh.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/make.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/msvs.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/ninja.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/xcode.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/input.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/mac_tool.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/msvs_emulation.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/ninja_syntax.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/ordered_dict.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/win_tool.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xcode_emulation.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xcodeproj_file.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylib/gyp/xml_fix.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/pylintrc +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/samples/samples +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/samples/samples.bat +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/setup.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/emacs/gyp.el +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/graphviz.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/pretty_gyp.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/pretty_sln.py +0 -0
- data/ext/{snowcrash → drafter/ext/snowcrash}/tools/gyp/tools/pretty_vcproj.py +0 -0
- data/ext/drafter/ext/snowcrash/vcbuild.bat +139 -0
- data/ext/drafter/ext/sos/Makefile +57 -0
- data/ext/drafter/ext/sos/src/sos.cc +200 -0
- data/ext/drafter/ext/sos/src/sos.h +179 -0
- data/ext/drafter/ext/sos/src/sosJSON.h +105 -0
- data/ext/drafter/ext/sos/src/sosYAML.h +104 -0
- data/ext/{snowcrash → drafter}/src/Serialize.cc +30 -15
- data/ext/drafter/src/Serialize.h +135 -0
- data/ext/drafter/src/SerializeAST.cc +775 -0
- data/ext/drafter/src/SerializeAST.h +19 -0
- data/ext/drafter/src/SerializeResult.cc +67 -0
- data/ext/drafter/src/SerializeResult.h +26 -0
- data/ext/drafter/src/SerializeSourcemap.cc +446 -0
- data/ext/drafter/src/SerializeSourcemap.h +19 -0
- data/ext/drafter/src/Version.h +38 -0
- data/ext/drafter/src/cdrafter.cc +44 -0
- data/ext/drafter/src/cdrafter.h +55 -0
- data/ext/drafter/src/config.cc +80 -0
- data/ext/drafter/src/config.h +35 -0
- data/ext/drafter/src/drafter.cc +22 -0
- data/ext/drafter/src/drafter.h +38 -0
- data/ext/drafter/src/main.cc +91 -0
- data/ext/drafter/src/reporting.cc +162 -0
- data/ext/drafter/src/reporting.h +28 -0
- data/ext/drafter/src/stream.h +146 -0
- data/ext/drafter/tools/homebrew/drafter.rb +12 -0
- data/ext/{snowcrash → drafter}/vcbuild.bat +3 -3
- data/lib/redsnow.rb +6 -11
- data/lib/redsnow/binding.rb +11 -201
- data/lib/redsnow/blueprint.rb +104 -169
- data/lib/redsnow/parseresult.rb +28 -42
- data/lib/redsnow/sourcemap.rb +92 -177
- data/lib/redsnow/version.rb +1 -1
- data/redsnow.gemspec +1 -1
- metadata +249 -197
- data/ext/snowcrash/bin/snowcrash +0 -0
- data/ext/snowcrash/build/out/Release/libmarkdownparser.a +0 -0
- data/ext/snowcrash/build/out/Release/libsnowcrash.dylib +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libmarkdownparser/ext/markdown-parser/src/ByteBuffer.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libmarkdownparser/ext/markdown-parser/src/MarkdownNode.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libmarkdownparser/ext/markdown-parser/src/MarkdownParser.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/CBlueprint.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/CBlueprintSourcemap.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/CSourceAnnotation.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/HTTP.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/Section.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/Serialize.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/SerializeJSON.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/SerializeYAML.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/Signature.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/UriTemplateParser.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/csnowcrash.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/posix/RegexMatch.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsnowcrash/src/snowcrash.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsundown/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsundown/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/libsundown/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
- data/ext/snowcrash/build/out/Release/obj.target/snowcrash/src/snowcrash/snowcrash.o +0 -0
- data/ext/snowcrash/build/out/Release/snowcrash +0 -0
- data/ext/snowcrash/src/CBlueprint.cc +0 -628
- data/ext/snowcrash/src/CBlueprint.h +0 -366
- data/ext/snowcrash/src/CBlueprintSourcemap.cc +0 -630
- data/ext/snowcrash/src/CBlueprintSourcemap.h +0 -351
- data/ext/snowcrash/src/CSourceAnnotation.cc +0 -154
- data/ext/snowcrash/src/CSourceAnnotation.h +0 -106
- data/ext/snowcrash/src/Serialize.h +0 -71
- data/ext/snowcrash/src/SerializeJSON.cc +0 -1221
- data/ext/snowcrash/src/SerializeJSON.h +0 -24
- data/ext/snowcrash/src/SerializeYAML.cc +0 -702
- data/ext/snowcrash/src/SerializeYAML.h +0 -24
- data/ext/snowcrash/src/Signature.h +0 -32
- data/ext/snowcrash/src/SymbolTable.h +0 -94
- data/ext/snowcrash/src/Version.h +0 -39
- data/ext/snowcrash/src/csnowcrash.cc +0 -29
- data/ext/snowcrash/src/csnowcrash.h +0 -40
- data/ext/snowcrash/src/snowcrash/snowcrash.cc +0 -200
- data/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/snowcrash/tools/homebrew/snowcrash.rb +0 -12
@@ -1,366 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// CBlueprint.h
|
3
|
-
// snowcrash
|
4
|
-
// C Implementation of Blueprint.h for binding purposes
|
5
|
-
//
|
6
|
-
// Created by Ali Khoramshahi on 13/6/14.
|
7
|
-
// Copyright (c) 2014 Apiary Inc. All rights reserved.
|
8
|
-
//
|
9
|
-
|
10
|
-
#ifndef SC_C_BLUEPRINT_H
|
11
|
-
#define SC_C_BLUEPRINT_H
|
12
|
-
|
13
|
-
#include "Platform.h"
|
14
|
-
#include "stdlib.h"
|
15
|
-
|
16
|
-
#ifdef __cplusplus
|
17
|
-
extern "C" {
|
18
|
-
#endif
|
19
|
-
|
20
|
-
/** brief Blueprint Parser Options */
|
21
|
-
typedef unsigned int sc_blueprint_parser_options;
|
22
|
-
|
23
|
-
/** brief Blueprint Parser Options Enums */
|
24
|
-
enum sc_blueprint_parser_option {
|
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
|
27
|
-
SC_EXPORT_SORUCEMAP_OPTION = (1 << 2) /// < Export source maps AST
|
28
|
-
};
|
29
|
-
|
30
|
-
/** Parameter Use flag */
|
31
|
-
typedef enum sc_parameter_use {
|
32
|
-
SC_UNDEFINED_PARAMETER_USE,
|
33
|
-
SC_OPTIONAL_PARAMETER_USE,
|
34
|
-
SC_REQUIRED_PARAMETER_USE
|
35
|
-
} sc_parameter_use;
|
36
|
-
|
37
|
-
typedef enum sc_reference_type_t {
|
38
|
-
SC_TYPE_SYMBOL_REFERENCE
|
39
|
-
} sc_reference_type_t;
|
40
|
-
|
41
|
-
/** Class Blueprint wrapper */
|
42
|
-
struct sc_blueprint_s;
|
43
|
-
typedef struct sc_blueprint_s sc_blueprint_t;
|
44
|
-
|
45
|
-
/** Array Metadata wrapper */
|
46
|
-
struct sc_metadata_collection_s;
|
47
|
-
typedef struct sc_metadata_collection_s sc_metadata_collection_t;
|
48
|
-
|
49
|
-
/** Class Metadata wrapper */
|
50
|
-
struct sc_metadata_s;
|
51
|
-
typedef struct sc_metadata_s sc_metadata_t;
|
52
|
-
|
53
|
-
/** Array Resource Group Collection wrapper */
|
54
|
-
struct sc_resource_group_collection_s;
|
55
|
-
typedef struct sc_resource_group_collection_s sc_resource_group_collection_t;
|
56
|
-
|
57
|
-
/** Class Resource Group wrapper */
|
58
|
-
struct sc_resource_group_s;
|
59
|
-
typedef struct sc_resource_group_s sc_resource_group_t;
|
60
|
-
|
61
|
-
/** Array Resource Collection wrapper */
|
62
|
-
struct sc_resource_collection_s;
|
63
|
-
typedef struct sc_resource_collection_s sc_resource_collection_t;
|
64
|
-
|
65
|
-
/** Class Resource wrapper */
|
66
|
-
struct sc_resource_s;
|
67
|
-
typedef struct sc_resource_s sc_resource_t;
|
68
|
-
|
69
|
-
/** Class Resource Model wrapper */
|
70
|
-
struct sc_resource_model_s;
|
71
|
-
typedef struct sc_resource_model_s sc_resource_model_t;
|
72
|
-
|
73
|
-
/** Array Payload Collection wrapper */
|
74
|
-
struct sc_payload_collection_s;
|
75
|
-
typedef struct sc_payload_collection_s sc_payload_collection_t;
|
76
|
-
|
77
|
-
/** Class Reference wrapper */
|
78
|
-
struct sc_reference_s;
|
79
|
-
typedef struct sc_reference_s sc_reference_t;
|
80
|
-
|
81
|
-
/** Class Payload wrapper */
|
82
|
-
struct sc_payload_s;
|
83
|
-
typedef struct sc_payload_s sc_payload_t;
|
84
|
-
|
85
|
-
/** Array Parameter wrapper */
|
86
|
-
struct sc_parameter_collection_s;
|
87
|
-
typedef struct sc_parameter_collection_s sc_parameter_collection_t;
|
88
|
-
|
89
|
-
/** class Parameter wrapper */
|
90
|
-
struct sc_parameter_s;
|
91
|
-
typedef struct sc_parameter_s sc_parameter_t;
|
92
|
-
|
93
|
-
/** Array Header wrapper */
|
94
|
-
struct sc_header_collection_s;
|
95
|
-
typedef struct sc_header_collection_s sc_header_collection_t;
|
96
|
-
|
97
|
-
/** class Header wrapper */
|
98
|
-
struct sc_header_s;
|
99
|
-
typedef struct sc_header_s sc_header_t;
|
100
|
-
|
101
|
-
/** Array Value wrapper */
|
102
|
-
struct sc_value_collection_s;
|
103
|
-
typedef struct sc_value_collection_s sc_value_collection_t;
|
104
|
-
|
105
|
-
/** class Value wrapper */
|
106
|
-
struct sc_value_s;
|
107
|
-
typedef struct sc_value_s sc_value_t;
|
108
|
-
|
109
|
-
/** Array Action wrapper */
|
110
|
-
struct sc_action_collection_s;
|
111
|
-
typedef struct sc_action_collection_s sc_action_collection_t;
|
112
|
-
|
113
|
-
/** class Action wrapper */
|
114
|
-
struct sc_action_s;
|
115
|
-
typedef struct sc_action_s sc_action_t;
|
116
|
-
|
117
|
-
/** Array Transaction Example wrapper */
|
118
|
-
struct sc_transaction_example_collection_s;
|
119
|
-
typedef struct sc_transaction_example_collection_s sc_transaction_example_collection_t;
|
120
|
-
|
121
|
-
/** class Transaction Example wrapper */
|
122
|
-
struct sc_transaction_example_s;
|
123
|
-
typedef struct sc_transaction_example_s sc_transaction_example_t;
|
124
|
-
|
125
|
-
/*----------------------------------------------------------------------*/
|
126
|
-
|
127
|
-
/** \returns pointer to allocated Blueprint */
|
128
|
-
SC_API sc_blueprint_t* sc_blueprint_new();
|
129
|
-
|
130
|
-
/** \deallocate Blueprint from pointer */
|
131
|
-
SC_API void sc_blueprint_free(sc_blueprint_t* blueprint);
|
132
|
-
|
133
|
-
/** \returns Blueprint name */
|
134
|
-
SC_API const char* sc_blueprint_name(const sc_blueprint_t* blueprint);
|
135
|
-
|
136
|
-
/** \returns Blueprint description */
|
137
|
-
SC_API const char* sc_blueprint_description(const sc_blueprint_t* blueprint);
|
138
|
-
|
139
|
-
/*----------------------------------------------------------------------*/
|
140
|
-
|
141
|
-
/** \returns Metadata array handle */
|
142
|
-
SC_API const sc_metadata_collection_t* sc_metadata_collection_handle(const sc_blueprint_t* blueprint);
|
143
|
-
|
144
|
-
/** \returns size of Metadata array */
|
145
|
-
SC_API size_t sc_metadata_collection_size(const sc_metadata_collection_t* metadata);
|
146
|
-
|
147
|
-
/*----------------------------------------------------------------------*/
|
148
|
-
|
149
|
-
/** \returns Metadata at `index` handle */
|
150
|
-
SC_API const sc_metadata_t* sc_metadata_handle(const sc_metadata_collection_t* metadata_col, size_t index);
|
151
|
-
|
152
|
-
/** \returns Metadata key */
|
153
|
-
SC_API const char* sc_metadata_key(const sc_metadata_t* metadata);
|
154
|
-
|
155
|
-
/** \returns Metadata value */
|
156
|
-
SC_API const char* sc_metadata_value(const sc_metadata_t* metadata);
|
157
|
-
|
158
|
-
/*----------------------------------------------------------------------*/
|
159
|
-
|
160
|
-
/** \returns Resource Group Collection array handle */
|
161
|
-
SC_API const sc_resource_group_collection_t* sc_resource_group_collection_handle(const sc_blueprint_t* blueprint);
|
162
|
-
|
163
|
-
/** \returns size of Resource Group Collection array */
|
164
|
-
SC_API size_t sc_resource_group_collection_size(const sc_resource_group_collection_t* resource);
|
165
|
-
|
166
|
-
/*----------------------------------------------------------------------*/
|
167
|
-
|
168
|
-
/** \returns Resource Group handle */
|
169
|
-
SC_API const sc_resource_group_t* sc_resource_group_handle(const sc_resource_group_collection_t* resource, size_t index);
|
170
|
-
|
171
|
-
/** \returns Resource Group name */
|
172
|
-
SC_API const char* sc_resource_group_name(const sc_resource_group_t* handle);
|
173
|
-
|
174
|
-
/** \returns Resource Group description */
|
175
|
-
SC_API const char* sc_resource_group_description(const sc_resource_group_t* handle);
|
176
|
-
|
177
|
-
/*----------------------------------------------------------------------*/
|
178
|
-
|
179
|
-
/** \returns Resource array handle */
|
180
|
-
SC_API const sc_resource_collection_t* sc_resource_collection_handle(const sc_resource_group_t* handle);
|
181
|
-
|
182
|
-
/** \returns Resource array size */
|
183
|
-
SC_API size_t sc_resource_collection_size(const sc_resource_collection_t* resource);
|
184
|
-
|
185
|
-
/*----------------------------------------------------------------------*/
|
186
|
-
|
187
|
-
/** \returns Resource handle */
|
188
|
-
SC_API const sc_resource_t* sc_resource_handle(const sc_resource_collection_t* resource, size_t index);
|
189
|
-
|
190
|
-
/** \returns Resource URITemplate */
|
191
|
-
SC_API const char* sc_resource_uritemplate(const sc_resource_t* handle);
|
192
|
-
|
193
|
-
/** \returns Resource name */
|
194
|
-
SC_API const char* sc_resource_name(const sc_resource_t* handle);
|
195
|
-
|
196
|
-
/** \returns Resource description */
|
197
|
-
SC_API const char* sc_resource_description(const sc_resource_t* handle);
|
198
|
-
|
199
|
-
/*----------------------------------------------------------------------*/
|
200
|
-
|
201
|
-
/** \returns Payload Collection array handle from TransactionExample for requests*/
|
202
|
-
SC_API const sc_payload_collection_t* sc_payload_collection_handle_requests(const sc_transaction_example_t* handle);
|
203
|
-
|
204
|
-
/** \returns Payload Collection array handle from TransactionExample for responses*/
|
205
|
-
SC_API const sc_payload_collection_t* sc_payload_collection_handle_responses(const sc_transaction_example_t* handle);
|
206
|
-
|
207
|
-
/** \returns Payload Collection array size */
|
208
|
-
SC_API size_t sc_payload_collection_size(const sc_payload_collection_t* handle);
|
209
|
-
|
210
|
-
/*----------------------------------------------------------------------*/
|
211
|
-
|
212
|
-
/** \returns Payload at `index` handle */
|
213
|
-
SC_API const sc_payload_t* sc_payload_handle(const sc_payload_collection_t* handle, size_t index);
|
214
|
-
|
215
|
-
/** \returns Payload handle from resource */
|
216
|
-
SC_API const sc_payload_t* sc_payload_handle_resource(const sc_resource_t* handle);
|
217
|
-
|
218
|
-
/** \returns Payload name */
|
219
|
-
SC_API const char* sc_payload_name(const sc_payload_t* handle);
|
220
|
-
|
221
|
-
/** \returns Payload description */
|
222
|
-
SC_API const char* sc_payload_description(const sc_payload_t* handle);
|
223
|
-
|
224
|
-
/** \returns Payload body */
|
225
|
-
SC_API const char* sc_payload_body(const sc_payload_t* handle);
|
226
|
-
|
227
|
-
/** \returns Payload schema */
|
228
|
-
SC_API const char* sc_payload_schema(const sc_payload_t* handle);
|
229
|
-
|
230
|
-
/*----------------------------------------------------------------------*/
|
231
|
-
|
232
|
-
/** \returns Reference handle from payload */
|
233
|
-
SC_API const sc_reference_t* sc_reference_handle_payload(const sc_payload_t* handle);
|
234
|
-
|
235
|
-
/** \returns Reference identifier */
|
236
|
-
SC_API const char* sc_reference_id(const sc_reference_t* handle);
|
237
|
-
|
238
|
-
/** \returns Reference identifier */
|
239
|
-
SC_API sc_reference_type_t sc_reference_type(const sc_reference_t* handle);
|
240
|
-
|
241
|
-
/*----------------------------------------------------------------------*/
|
242
|
-
|
243
|
-
/** \returns Parameter Collection handle from Payload */
|
244
|
-
SC_API const sc_parameter_collection_t* sc_parameter_collection_handle_payload(const sc_payload_t* handle);
|
245
|
-
|
246
|
-
/** \returns Parameter Collection handle from Resource */
|
247
|
-
SC_API const sc_parameter_collection_t* sc_parameter_collection_handle_resource(const sc_resource_t* handle);
|
248
|
-
|
249
|
-
/** \returns Parameter Collection handle from Action */
|
250
|
-
SC_API const sc_parameter_collection_t* sc_parameter_collection_handle_action(const sc_action_t* handle);
|
251
|
-
|
252
|
-
/** \returns Parameter Collection size */
|
253
|
-
SC_API size_t sc_parameter_collection_size(const sc_parameter_collection_t* handle);
|
254
|
-
|
255
|
-
/*----------------------------------------------------------------------*/
|
256
|
-
|
257
|
-
/** \returns Parameter handle */
|
258
|
-
SC_API const sc_parameter_t* sc_parameter_handle(const sc_parameter_collection_t* handle, size_t index);
|
259
|
-
|
260
|
-
/** \returns Parameter name */
|
261
|
-
SC_API const char* sc_parameter_name(const sc_parameter_t* handle);
|
262
|
-
|
263
|
-
/** \returns Parameter description */
|
264
|
-
SC_API const char* sc_parameter_description(const sc_parameter_t* handle);
|
265
|
-
|
266
|
-
/** \returns Parameter type */
|
267
|
-
SC_API const char* sc_parameter_type(const sc_parameter_t* handle);
|
268
|
-
|
269
|
-
/** \returns Parameter use */
|
270
|
-
SC_API sc_parameter_use sc_parameter_parameter_use(const sc_parameter_t* handle);
|
271
|
-
|
272
|
-
/** \returns Parameter default value */
|
273
|
-
SC_API const char* sc_parameter_default_value(const sc_parameter_t* handle);
|
274
|
-
|
275
|
-
/** \returns Parameter example value */
|
276
|
-
SC_API const char* sc_parameter_example_value(const sc_parameter_t* handle);
|
277
|
-
|
278
|
-
/*----------------------------------------------------------------------*/
|
279
|
-
|
280
|
-
/** \returns Value Collection array handle */
|
281
|
-
SC_API const sc_value_collection_t* sc_value_collection_handle(const sc_parameter_t* handle);
|
282
|
-
|
283
|
-
/** \returns Value Collection array size */
|
284
|
-
SC_API size_t sc_value_collection_size(const sc_value_collection_t* handle);
|
285
|
-
|
286
|
-
/*----------------------------------------------------------------------*/
|
287
|
-
|
288
|
-
/** \returns Value handle */
|
289
|
-
SC_API const sc_value_t* sc_value_handle(const sc_value_collection_t* handle, size_t index);
|
290
|
-
|
291
|
-
/** \returns Value string */
|
292
|
-
SC_API const char* sc_value(const sc_value_t* handle);
|
293
|
-
|
294
|
-
/*----------------------------------------------------------------------*/
|
295
|
-
|
296
|
-
/** \returns Header Collection array handle from Payload */
|
297
|
-
SC_API const sc_header_collection_t* sc_header_collection_handle_payload(const sc_payload_t* handle);
|
298
|
-
|
299
|
-
/** \returns Header Collection array handle from Resource */
|
300
|
-
SC_API const sc_header_collection_t* sc_header_collection_handle_resource(const sc_resource_t* handle);
|
301
|
-
|
302
|
-
/** \returns Header Collection array handle from Action */
|
303
|
-
SC_API const sc_header_collection_t* sc_header_collection_handle_action(const sc_action_t* handle);
|
304
|
-
|
305
|
-
/** \returns Header Collection array size */
|
306
|
-
SC_API size_t sc_header_collection_size(const sc_header_collection_t* handle);
|
307
|
-
|
308
|
-
/*----------------------------------------------------------------------*/
|
309
|
-
|
310
|
-
/** \returns Header handle */
|
311
|
-
SC_API const sc_header_t* sc_header_handle(const sc_header_collection_t* handle, size_t index);
|
312
|
-
|
313
|
-
/** \returns Header Key */
|
314
|
-
SC_API const char* sc_header_key(const sc_header_t* handle);
|
315
|
-
|
316
|
-
/** \returns Header Value */
|
317
|
-
SC_API const char* sc_header_value(const sc_header_t* handle);
|
318
|
-
|
319
|
-
/*----------------------------------------------------------------------*/
|
320
|
-
|
321
|
-
/** \returns Action Collection array handle */
|
322
|
-
SC_API const sc_action_collection_t* sc_action_collection_handle(const sc_resource_t* handle);
|
323
|
-
|
324
|
-
/** \returns Action Collection array size */
|
325
|
-
SC_API size_t sc_action_collection_size(const sc_action_collection_t* handle);
|
326
|
-
|
327
|
-
/*----------------------------------------------------------------------*/
|
328
|
-
|
329
|
-
/** \returns Action handle */
|
330
|
-
SC_API const sc_action_t* sc_action_handle(const sc_action_collection_t* handle, size_t index);
|
331
|
-
|
332
|
-
/** \returns Action HTTPMethod */
|
333
|
-
SC_API const char* sc_action_httpmethod(const sc_action_t* handle);
|
334
|
-
|
335
|
-
/** \returns Action name */
|
336
|
-
SC_API const char* sc_action_name(const sc_action_t* handle);
|
337
|
-
|
338
|
-
/** \returns Action description */
|
339
|
-
SC_API const char* sc_action_description(const sc_action_t* handle);
|
340
|
-
|
341
|
-
/*----------------------------------------------------------------------*/
|
342
|
-
|
343
|
-
/** \returns Transaction Example Collection array handle */
|
344
|
-
SC_API const sc_transaction_example_collection_t* sc_transaction_example_collection_handle(const sc_action_t* handle);
|
345
|
-
|
346
|
-
/** \returns Transaction Example Collection array size */
|
347
|
-
SC_API size_t sc_transaction_example_collection_size(const sc_transaction_example_collection_t* handle);
|
348
|
-
|
349
|
-
/*----------------------------------------------------------------------*/
|
350
|
-
|
351
|
-
/** \returns Transaction Example handle */
|
352
|
-
SC_API const sc_transaction_example_t* sc_transaction_example_handle(const sc_transaction_example_collection_t* handle, size_t index);
|
353
|
-
|
354
|
-
/** \returns Transaction Example name */
|
355
|
-
SC_API const char* sc_transaction_example_name(const sc_transaction_example_t* handle);
|
356
|
-
|
357
|
-
/** \returns Transaction Example description */
|
358
|
-
SC_API const char* sc_transaction_example_description(const sc_transaction_example_t* handle);
|
359
|
-
|
360
|
-
/*----------------------------------------------------------------------*/
|
361
|
-
|
362
|
-
#ifdef __cplusplus
|
363
|
-
}
|
364
|
-
#endif
|
365
|
-
|
366
|
-
#endif
|
@@ -1,630 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// CBlueprintSourcemap.cc
|
3
|
-
// snowcrash
|
4
|
-
// C Implementation of BlueprintSourcemap.h for binding purposes
|
5
|
-
//
|
6
|
-
// Created by Pavan Kumar Sunkara on 15/9/14.
|
7
|
-
// Copyright (c) 2014 Apiary Inc. All rights reserved.
|
8
|
-
//
|
9
|
-
|
10
|
-
#include "CBlueprintSourcemap.h"
|
11
|
-
#include "snowcrash.h"
|
12
|
-
|
13
|
-
SC_API size_t sc_source_map_size(const sc_source_map_t* source_map)
|
14
|
-
{
|
15
|
-
const mdp::BytesRangeSet* p = AS_CTYPE(mdp::BytesRangeSet, source_map);
|
16
|
-
if(!p)
|
17
|
-
return 0;
|
18
|
-
|
19
|
-
return p->size();
|
20
|
-
}
|
21
|
-
|
22
|
-
SC_API size_t sc_source_map_length(const sc_source_map_t* source_map, size_t index)
|
23
|
-
{
|
24
|
-
const mdp::BytesRangeSet* p = AS_CTYPE(mdp::BytesRangeSet, source_map);
|
25
|
-
if(!p)
|
26
|
-
return 0;
|
27
|
-
|
28
|
-
return p->at(index).length;
|
29
|
-
}
|
30
|
-
|
31
|
-
SC_API size_t sc_source_map_location(const sc_source_map_t* source_map, size_t index)
|
32
|
-
{
|
33
|
-
const mdp::BytesRangeSet* p = AS_CTYPE(mdp::BytesRangeSet, source_map);
|
34
|
-
if(!p)
|
35
|
-
return 0;
|
36
|
-
|
37
|
-
return p->at(index).location;
|
38
|
-
}
|
39
|
-
|
40
|
-
/*----------------------------------------------------------------------*/
|
41
|
-
|
42
|
-
SC_API sc_sm_blueprint_t* sc_sm_blueprint_new()
|
43
|
-
{
|
44
|
-
return AS_TYPE(sc_sm_blueprint_t, ::new snowcrash::SourceMap<snowcrash::Blueprint>);
|
45
|
-
}
|
46
|
-
|
47
|
-
SC_API void sc_sm_blueprint_free(sc_sm_blueprint_t* blueprint)
|
48
|
-
{
|
49
|
-
::delete AS_TYPE(snowcrash::SourceMap<snowcrash::Blueprint>, blueprint);
|
50
|
-
}
|
51
|
-
|
52
|
-
SC_API const sc_source_map_t* sc_sm_blueprint_name(const sc_sm_blueprint_t* blueprint)
|
53
|
-
{
|
54
|
-
const snowcrash::SourceMap<snowcrash::Blueprint>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Blueprint>, blueprint);
|
55
|
-
if (!p)
|
56
|
-
return NULL;
|
57
|
-
|
58
|
-
return AS_CTYPE(sc_source_map_t, &p->name.sourceMap);
|
59
|
-
}
|
60
|
-
|
61
|
-
SC_API const sc_source_map_t* sc_sm_blueprint_description(const sc_sm_blueprint_t* blueprint)
|
62
|
-
{
|
63
|
-
const snowcrash::SourceMap<snowcrash::Blueprint>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Blueprint>, blueprint);
|
64
|
-
if (!p)
|
65
|
-
return NULL;
|
66
|
-
|
67
|
-
return AS_CTYPE(sc_source_map_t, &p->description.sourceMap);
|
68
|
-
}
|
69
|
-
|
70
|
-
/*----------------------------------------------------------------------*/
|
71
|
-
|
72
|
-
SC_API const sc_sm_metadata_collection_t* sc_sm_metadata_collection_handle(const sc_sm_blueprint_t* blueprint)
|
73
|
-
{
|
74
|
-
const snowcrash::SourceMap<snowcrash::Blueprint>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Blueprint>, blueprint);
|
75
|
-
if (!p)
|
76
|
-
return NULL;
|
77
|
-
|
78
|
-
return AS_CTYPE(sc_sm_metadata_collection_t, &p->metadata);
|
79
|
-
}
|
80
|
-
|
81
|
-
SC_API size_t sc_sm_metadata_collection_size(const sc_sm_metadata_collection_t* metadata)
|
82
|
-
{
|
83
|
-
const snowcrash::SourceMap<snowcrash::MetadataCollection>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::MetadataCollection>, metadata);
|
84
|
-
if (!p)
|
85
|
-
return 0;
|
86
|
-
|
87
|
-
return p->collection.size();
|
88
|
-
}
|
89
|
-
|
90
|
-
/*----------------------------------------------------------------------*/
|
91
|
-
|
92
|
-
SC_API const sc_sm_metadata_t* sc_sm_metadata_handle(const sc_sm_metadata_collection_t* metadata_col, size_t index)
|
93
|
-
{
|
94
|
-
const snowcrash::SourceMap<snowcrash::MetadataCollection>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::MetadataCollection>, metadata_col);
|
95
|
-
if (!p)
|
96
|
-
return NULL;
|
97
|
-
|
98
|
-
return AS_CTYPE(sc_sm_metadata_t, &p->collection.at(index));
|
99
|
-
}
|
100
|
-
|
101
|
-
SC_API const sc_source_map_t* sc_sm_metadata(const sc_sm_metadata_t* metadata)
|
102
|
-
{
|
103
|
-
const snowcrash::SourceMap<snowcrash::Metadata>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Metadata>, metadata);
|
104
|
-
if (!p)
|
105
|
-
return NULL;
|
106
|
-
|
107
|
-
return AS_CTYPE(sc_source_map_t, &p->sourceMap);
|
108
|
-
}
|
109
|
-
|
110
|
-
/*----------------------------------------------------------------------*/
|
111
|
-
|
112
|
-
SC_API const sc_sm_resource_group_collection_t* sc_sm_resource_group_collection_handle(const sc_sm_blueprint_t* blueprint)
|
113
|
-
{
|
114
|
-
const snowcrash::SourceMap<snowcrash::Blueprint>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Blueprint>, blueprint);
|
115
|
-
if (!p)
|
116
|
-
return NULL;
|
117
|
-
|
118
|
-
return AS_CTYPE(sc_sm_resource_group_collection_t, &p->resourceGroups);
|
119
|
-
}
|
120
|
-
|
121
|
-
SC_API size_t sc_sm_resource_group_collection_size(const sc_sm_resource_group_collection_t* resource)
|
122
|
-
{
|
123
|
-
const snowcrash::SourceMap<snowcrash::ResourceGroups>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::ResourceGroups>, resource);
|
124
|
-
if (!p)
|
125
|
-
return 0;
|
126
|
-
|
127
|
-
return p->collection.size();
|
128
|
-
}
|
129
|
-
|
130
|
-
/*----------------------------------------------------------------------*/
|
131
|
-
|
132
|
-
SC_API const sc_sm_resource_group_t* sc_sm_resource_group_handle(const sc_sm_resource_group_collection_t* resource, size_t index)
|
133
|
-
{
|
134
|
-
const snowcrash::SourceMap<snowcrash::ResourceGroups>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::ResourceGroups>, resource);
|
135
|
-
if (!p)
|
136
|
-
return NULL;
|
137
|
-
|
138
|
-
return AS_CTYPE(sc_sm_resource_group_t, &p->collection.at(index));
|
139
|
-
}
|
140
|
-
|
141
|
-
SC_API const sc_source_map_t* sc_sm_resource_group_name(const sc_sm_resource_group_t* handle)
|
142
|
-
{
|
143
|
-
const snowcrash::SourceMap<snowcrash::ResourceGroup>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::ResourceGroup>, handle);
|
144
|
-
if(!p)
|
145
|
-
return NULL;
|
146
|
-
|
147
|
-
return AS_CTYPE(sc_source_map_t, &p->name.sourceMap);
|
148
|
-
}
|
149
|
-
|
150
|
-
SC_API const sc_source_map_t* sc_sm_resource_group_description(const sc_sm_resource_group_t* handle)
|
151
|
-
{
|
152
|
-
const snowcrash::SourceMap<snowcrash::ResourceGroup>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::ResourceGroup>, handle);
|
153
|
-
if(!p)
|
154
|
-
return NULL;
|
155
|
-
|
156
|
-
return AS_CTYPE(sc_source_map_t, &p->description.sourceMap);
|
157
|
-
}
|
158
|
-
|
159
|
-
/*----------------------------------------------------------------------*/
|
160
|
-
|
161
|
-
SC_API const sc_sm_resource_collection_t* sc_sm_resource_collection_handle(const sc_sm_resource_group_t* handle)
|
162
|
-
{
|
163
|
-
const snowcrash::SourceMap<snowcrash::ResourceGroup>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::ResourceGroup>, handle);
|
164
|
-
if (!p)
|
165
|
-
return NULL;
|
166
|
-
|
167
|
-
return AS_CTYPE(sc_sm_resource_collection_t, &p->resources);
|
168
|
-
}
|
169
|
-
|
170
|
-
SC_API size_t sc_sm_resource_collection_size(const sc_sm_resource_collection_t* resource)
|
171
|
-
{
|
172
|
-
const snowcrash::SourceMap<snowcrash::Resources>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resources>, resource);
|
173
|
-
if (!p)
|
174
|
-
return 0;
|
175
|
-
|
176
|
-
return p->collection.size();
|
177
|
-
}
|
178
|
-
|
179
|
-
/*----------------------------------------------------------------------*/
|
180
|
-
|
181
|
-
SC_API const sc_sm_resource_t* sc_sm_resource_handle(const sc_sm_resource_collection_t* resource, size_t index)
|
182
|
-
{
|
183
|
-
const snowcrash::SourceMap<snowcrash::Resources>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resources>, resource);
|
184
|
-
if (!p)
|
185
|
-
return NULL;
|
186
|
-
|
187
|
-
return AS_CTYPE(sc_sm_resource_t, &p->collection.at(index));
|
188
|
-
}
|
189
|
-
|
190
|
-
SC_API const sc_source_map_t* sc_sm_resource_uritemplate(const sc_sm_resource_t* handle)
|
191
|
-
{
|
192
|
-
const snowcrash::SourceMap<snowcrash::Resource>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resource>, handle);
|
193
|
-
if(!p)
|
194
|
-
return NULL;
|
195
|
-
|
196
|
-
return AS_CTYPE(sc_source_map_t, &p->uriTemplate.sourceMap);
|
197
|
-
}
|
198
|
-
|
199
|
-
SC_API const sc_source_map_t* sc_sm_resource_name(const sc_sm_resource_t* handle)
|
200
|
-
{
|
201
|
-
const snowcrash::SourceMap<snowcrash::Resource>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resource>, handle);
|
202
|
-
if(!p)
|
203
|
-
return NULL;
|
204
|
-
|
205
|
-
return AS_CTYPE(sc_source_map_t, &p->name.sourceMap);
|
206
|
-
}
|
207
|
-
|
208
|
-
SC_API const sc_source_map_t* sc_sm_resource_description(const sc_sm_resource_t* handle)
|
209
|
-
{
|
210
|
-
const snowcrash::SourceMap<snowcrash::Resource>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resource>, handle);
|
211
|
-
if(!p)
|
212
|
-
return NULL;
|
213
|
-
|
214
|
-
return AS_CTYPE(sc_source_map_t, &p->description.sourceMap);
|
215
|
-
}
|
216
|
-
|
217
|
-
/*----------------------------------------------------------------------*/
|
218
|
-
|
219
|
-
SC_API const sc_sm_payload_collection_t* sc_sm_payload_collection_handle_requests(const sc_sm_transaction_example_t* handle)
|
220
|
-
{
|
221
|
-
const snowcrash::SourceMap<snowcrash::TransactionExample>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::TransactionExample>, handle);
|
222
|
-
if (!p)
|
223
|
-
return NULL;
|
224
|
-
|
225
|
-
return AS_CTYPE(sc_sm_payload_collection_t, &p->requests);
|
226
|
-
}
|
227
|
-
|
228
|
-
SC_API const sc_sm_payload_collection_t* sc_sm_payload_collection_handle_responses(const sc_sm_transaction_example_t* handle)
|
229
|
-
{
|
230
|
-
const snowcrash::SourceMap<snowcrash::TransactionExample>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::TransactionExample>, handle);
|
231
|
-
if (!p)
|
232
|
-
return NULL;
|
233
|
-
|
234
|
-
return AS_CTYPE(sc_sm_payload_collection_t, &p->responses);
|
235
|
-
}
|
236
|
-
|
237
|
-
SC_API size_t sc_sm_payload_collection_size(const sc_sm_payload_collection_t* handle)
|
238
|
-
{
|
239
|
-
const snowcrash::SourceMap<snowcrash::Requests>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Requests>, handle);
|
240
|
-
if (!p)
|
241
|
-
return 0;
|
242
|
-
|
243
|
-
return p->collection.size();
|
244
|
-
}
|
245
|
-
|
246
|
-
/*----------------------------------------------------------------------*/
|
247
|
-
|
248
|
-
SC_API const sc_sm_payload_t* sc_sm_payload_handle(const sc_sm_payload_collection_t* handle, size_t index)
|
249
|
-
{
|
250
|
-
const snowcrash::SourceMap<snowcrash::Requests>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Requests>, handle);
|
251
|
-
if(!p)
|
252
|
-
return NULL;
|
253
|
-
|
254
|
-
return AS_CTYPE(sc_sm_payload_t, &p->collection.at(index));
|
255
|
-
}
|
256
|
-
|
257
|
-
SC_API const sc_sm_payload_t* sc_sm_payload_handle_resource(const sc_sm_resource_t* handle)
|
258
|
-
{
|
259
|
-
const snowcrash::SourceMap<snowcrash::Resource>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resource>, handle);
|
260
|
-
if(!p)
|
261
|
-
return NULL;
|
262
|
-
|
263
|
-
return AS_CTYPE(sc_sm_payload_t, &p->model);
|
264
|
-
}
|
265
|
-
|
266
|
-
SC_API const sc_source_map_t* sc_sm_payload_name(const sc_sm_payload_t* handle)
|
267
|
-
{
|
268
|
-
const snowcrash::SourceMap<snowcrash::Payload>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Payload>, handle);
|
269
|
-
if(!p)
|
270
|
-
return NULL;
|
271
|
-
|
272
|
-
return AS_CTYPE(sc_source_map_t, &p->name.sourceMap);
|
273
|
-
}
|
274
|
-
|
275
|
-
SC_API const sc_source_map_t* sc_sm_payload_description(const sc_sm_payload_t* handle)
|
276
|
-
{
|
277
|
-
const snowcrash::SourceMap<snowcrash::Payload>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Payload>, handle);
|
278
|
-
if(!p)
|
279
|
-
return NULL;
|
280
|
-
|
281
|
-
return AS_CTYPE(sc_source_map_t, &p->description.sourceMap);
|
282
|
-
}
|
283
|
-
|
284
|
-
SC_API const sc_source_map_t* sc_sm_payload_body(const sc_sm_payload_t* handle)
|
285
|
-
{
|
286
|
-
const snowcrash::SourceMap<snowcrash::Payload>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Payload>, handle);
|
287
|
-
if(!p)
|
288
|
-
return NULL;
|
289
|
-
|
290
|
-
return AS_CTYPE(sc_source_map_t, &p->body.sourceMap);
|
291
|
-
}
|
292
|
-
|
293
|
-
SC_API const sc_source_map_t* sc_sm_payload_schema(const sc_sm_payload_t* handle)
|
294
|
-
{
|
295
|
-
const snowcrash::SourceMap<snowcrash::Payload>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Payload>, handle);
|
296
|
-
if(!p)
|
297
|
-
return NULL;
|
298
|
-
|
299
|
-
return AS_CTYPE(sc_source_map_t, &p->schema.sourceMap);
|
300
|
-
}
|
301
|
-
|
302
|
-
/*----------------------------------------------------------------------*/
|
303
|
-
|
304
|
-
SC_API const sc_sm_reference_t* sc_sm_reference_handle(const sc_sm_payload_t* handle)
|
305
|
-
{
|
306
|
-
const snowcrash::SourceMap<snowcrash::Payload>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Payload>, handle);
|
307
|
-
if(!p)
|
308
|
-
return NULL;
|
309
|
-
|
310
|
-
return AS_CTYPE(sc_sm_reference_t, &p->reference);
|
311
|
-
}
|
312
|
-
|
313
|
-
SC_API const sc_source_map_t* sc_sm_reference(const sc_sm_reference_t* handle)
|
314
|
-
{
|
315
|
-
const snowcrash::SourceMap<snowcrash::Reference>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Reference>, handle);
|
316
|
-
if (!p)
|
317
|
-
return NULL;
|
318
|
-
|
319
|
-
return AS_CTYPE(sc_source_map_t, &p->sourceMap);
|
320
|
-
}
|
321
|
-
|
322
|
-
/*----------------------------------------------------------------------*/
|
323
|
-
|
324
|
-
SC_API const sc_sm_parameter_collection_t* sc_sm_parameter_collection_handle_payload(const sc_sm_payload_t* handle)
|
325
|
-
{
|
326
|
-
const snowcrash::SourceMap<snowcrash::Payload>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Payload>, handle);
|
327
|
-
if(!p)
|
328
|
-
return NULL;
|
329
|
-
|
330
|
-
return AS_CTYPE(sc_sm_parameter_collection_t, &p->parameters);
|
331
|
-
}
|
332
|
-
|
333
|
-
SC_API const sc_sm_parameter_collection_t* sc_sm_parameter_collection_handle_resource(const sc_sm_resource_t* handle)
|
334
|
-
{
|
335
|
-
const snowcrash::SourceMap<snowcrash::Resource>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resource>, handle);
|
336
|
-
if(!p)
|
337
|
-
return NULL;
|
338
|
-
|
339
|
-
return AS_CTYPE(sc_sm_parameter_collection_t, &p->parameters);
|
340
|
-
}
|
341
|
-
|
342
|
-
SC_API const sc_sm_parameter_collection_t* sc_sm_parameter_collection_handle_action(const sc_sm_action_t* handle)
|
343
|
-
{
|
344
|
-
const snowcrash::SourceMap<snowcrash::Action>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Action>, handle);
|
345
|
-
if(!p)
|
346
|
-
return NULL;
|
347
|
-
|
348
|
-
return AS_CTYPE(sc_sm_parameter_collection_t, &p->parameters);
|
349
|
-
}
|
350
|
-
|
351
|
-
SC_API size_t sc_sm_parameter_collection_size(const sc_sm_parameter_collection_t* handle)
|
352
|
-
{
|
353
|
-
const snowcrash::SourceMap<snowcrash::Parameters>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameters>, handle);
|
354
|
-
if(!p)
|
355
|
-
return 0;
|
356
|
-
|
357
|
-
return p->collection.size();
|
358
|
-
}
|
359
|
-
|
360
|
-
/*----------------------------------------------------------------------*/
|
361
|
-
|
362
|
-
SC_API const sc_sm_parameter_t* sc_sm_parameter_handle(const sc_sm_parameter_collection_t* handle, size_t index)
|
363
|
-
{
|
364
|
-
const snowcrash::SourceMap<snowcrash::Parameters>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameters>, handle);
|
365
|
-
if(!p)
|
366
|
-
return NULL;
|
367
|
-
|
368
|
-
return AS_CTYPE(sc_sm_parameter_t, &p->collection.at(index));
|
369
|
-
}
|
370
|
-
|
371
|
-
SC_API const sc_source_map_t* sc_sm_parameter_name(const sc_sm_parameter_t* handle)
|
372
|
-
{
|
373
|
-
const snowcrash::SourceMap<snowcrash::Parameter>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameter>, handle);
|
374
|
-
if (!p)
|
375
|
-
return NULL;
|
376
|
-
|
377
|
-
return AS_CTYPE(sc_source_map_t, &p->name.sourceMap);
|
378
|
-
}
|
379
|
-
|
380
|
-
SC_API const sc_source_map_t* sc_sm_parameter_description(const sc_sm_parameter_t* handle)
|
381
|
-
{
|
382
|
-
const snowcrash::SourceMap<snowcrash::Parameter>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameter>, handle);
|
383
|
-
if (!p)
|
384
|
-
return NULL;
|
385
|
-
|
386
|
-
return AS_CTYPE(sc_source_map_t, &p->description.sourceMap);
|
387
|
-
}
|
388
|
-
|
389
|
-
SC_API const sc_source_map_t* sc_sm_parameter_type(const sc_sm_parameter_t* handle)
|
390
|
-
{
|
391
|
-
const snowcrash::SourceMap<snowcrash::Parameter>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameter>, handle);
|
392
|
-
if (!p)
|
393
|
-
return NULL;
|
394
|
-
|
395
|
-
return AS_CTYPE(sc_source_map_t, &p->type.sourceMap);
|
396
|
-
}
|
397
|
-
|
398
|
-
SC_API const sc_source_map_t* sc_sm_parameter_parameter_use(const sc_sm_parameter_t* handle)
|
399
|
-
{
|
400
|
-
const snowcrash::SourceMap<snowcrash::Parameter>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameter>, handle);
|
401
|
-
if (!p)
|
402
|
-
return NULL;
|
403
|
-
|
404
|
-
return AS_CTYPE(sc_source_map_t, &p->use.sourceMap);
|
405
|
-
}
|
406
|
-
|
407
|
-
SC_API const sc_source_map_t* sc_sm_parameter_default_value(const sc_sm_parameter_t* handle)
|
408
|
-
{
|
409
|
-
const snowcrash::SourceMap<snowcrash::Parameter>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameter>, handle);
|
410
|
-
if (!p)
|
411
|
-
return NULL;
|
412
|
-
|
413
|
-
return AS_CTYPE(sc_source_map_t, &p->defaultValue.sourceMap);
|
414
|
-
}
|
415
|
-
|
416
|
-
SC_API const sc_source_map_t* sc_sm_parameter_example_value(const sc_sm_parameter_t* handle)
|
417
|
-
{
|
418
|
-
const snowcrash::SourceMap<snowcrash::Parameter>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameter>, handle);
|
419
|
-
if (!p)
|
420
|
-
return NULL;
|
421
|
-
|
422
|
-
return AS_CTYPE(sc_source_map_t, &p->exampleValue.sourceMap);
|
423
|
-
}
|
424
|
-
|
425
|
-
/*----------------------------------------------------------------------*/
|
426
|
-
|
427
|
-
SC_API const sc_sm_value_collection_t* sc_sm_value_collection_handle(const sc_sm_parameter_t* handle)
|
428
|
-
{
|
429
|
-
const snowcrash::SourceMap<snowcrash::Parameter>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Parameter>, handle);
|
430
|
-
if (!p)
|
431
|
-
return NULL;
|
432
|
-
|
433
|
-
return AS_CTYPE(sc_sm_value_collection_t, &p->values);
|
434
|
-
}
|
435
|
-
|
436
|
-
SC_API size_t sc_sm_value_collection_size(const sc_sm_value_collection_t* handle)
|
437
|
-
{
|
438
|
-
const snowcrash::SourceMap<snowcrash::Values>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Values>, handle);
|
439
|
-
if (!p)
|
440
|
-
return 0;
|
441
|
-
|
442
|
-
return p->collection.size();
|
443
|
-
}
|
444
|
-
|
445
|
-
/*----------------------------------------------------------------------*/
|
446
|
-
|
447
|
-
SC_API const sc_sm_value_t* sc_sm_value_handle(const sc_sm_value_collection_t* handle, size_t index)
|
448
|
-
{
|
449
|
-
const snowcrash::SourceMap<snowcrash::Values>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Values>, handle);
|
450
|
-
if (!p)
|
451
|
-
return NULL;
|
452
|
-
|
453
|
-
return AS_CTYPE(sc_sm_value_t, &p->collection.at(index));
|
454
|
-
}
|
455
|
-
|
456
|
-
SC_API const sc_source_map_t* sc_sm_value(const sc_sm_value_t* handle)
|
457
|
-
{
|
458
|
-
const snowcrash::SourceMap<snowcrash::Value>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Value>, handle);
|
459
|
-
if(!p)
|
460
|
-
return NULL;
|
461
|
-
|
462
|
-
return AS_CTYPE(sc_source_map_t, &p->sourceMap);
|
463
|
-
}
|
464
|
-
|
465
|
-
/*----------------------------------------------------------------------*/
|
466
|
-
|
467
|
-
SC_API const sc_sm_header_collection_t* sc_sm_header_collection_handle_payload(const sc_sm_payload_t* handle)
|
468
|
-
{
|
469
|
-
const snowcrash::SourceMap<snowcrash::Payload>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Payload>, handle);
|
470
|
-
if (!p)
|
471
|
-
return NULL;
|
472
|
-
|
473
|
-
return AS_CTYPE(sc_sm_header_collection_t, &p->headers);
|
474
|
-
}
|
475
|
-
|
476
|
-
SC_API const sc_sm_header_collection_t* sc_sm_header_collection_handle_resource(const sc_sm_resource_t* handle)
|
477
|
-
{
|
478
|
-
const snowcrash::SourceMap<snowcrash::Resource>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resource>, handle);
|
479
|
-
if (!p)
|
480
|
-
return NULL;
|
481
|
-
|
482
|
-
return AS_CTYPE(sc_sm_header_collection_t, &p->headers);
|
483
|
-
}
|
484
|
-
|
485
|
-
SC_API const sc_sm_header_collection_t* sc_sm_header_collection_handle_action(const sc_sm_action_t* handle)
|
486
|
-
{
|
487
|
-
const snowcrash::SourceMap<snowcrash::Action>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Action>, handle);
|
488
|
-
if (!p)
|
489
|
-
return NULL;
|
490
|
-
|
491
|
-
return AS_CTYPE(sc_sm_header_collection_t, &p->headers);
|
492
|
-
}
|
493
|
-
|
494
|
-
SC_API size_t sc_sm_header_collection_size(const sc_sm_header_collection_t* handle)
|
495
|
-
{
|
496
|
-
const snowcrash::SourceMap<snowcrash::Headers>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Headers>, handle);
|
497
|
-
if (!p)
|
498
|
-
return 0;
|
499
|
-
|
500
|
-
return p->collection.size();
|
501
|
-
}
|
502
|
-
|
503
|
-
/*----------------------------------------------------------------------*/
|
504
|
-
|
505
|
-
SC_API const sc_sm_header_t* sc_sm_header_handle(const sc_sm_header_collection_t* handle, size_t index)
|
506
|
-
{
|
507
|
-
const snowcrash::SourceMap<snowcrash::Headers>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Headers>, handle);
|
508
|
-
if (!p)
|
509
|
-
return NULL;
|
510
|
-
|
511
|
-
return AS_CTYPE( sc_sm_header_t, &p->collection.at(index));
|
512
|
-
}
|
513
|
-
|
514
|
-
SC_API const sc_source_map_t* sc_sm_header(const sc_sm_header_t* handle)
|
515
|
-
{
|
516
|
-
const snowcrash::SourceMap<snowcrash::Header>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Header>, handle);
|
517
|
-
if(!p)
|
518
|
-
return NULL;
|
519
|
-
|
520
|
-
return AS_CTYPE(sc_source_map_t, &p->sourceMap);
|
521
|
-
}
|
522
|
-
|
523
|
-
/*----------------------------------------------------------------------*/
|
524
|
-
|
525
|
-
SC_API const sc_sm_action_collection_t* sc_sm_action_collection_handle(const sc_sm_resource_t* handle)
|
526
|
-
{
|
527
|
-
const snowcrash::SourceMap<snowcrash::Resource>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Resource>, handle);
|
528
|
-
if(!p)
|
529
|
-
return NULL;
|
530
|
-
|
531
|
-
return AS_CTYPE(sc_sm_action_collection_t, &p->actions);
|
532
|
-
}
|
533
|
-
|
534
|
-
SC_API size_t sc_sm_action_collection_size(const sc_sm_action_collection_t* handle)
|
535
|
-
{
|
536
|
-
const snowcrash::SourceMap<snowcrash::Actions>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Actions>, handle);
|
537
|
-
if (!p)
|
538
|
-
return 0;
|
539
|
-
|
540
|
-
return p->collection.size();
|
541
|
-
}
|
542
|
-
|
543
|
-
/*----------------------------------------------------------------------*/
|
544
|
-
|
545
|
-
SC_API const sc_sm_action_t* sc_sm_action_handle(const sc_sm_action_collection_t* handle, size_t index)
|
546
|
-
{
|
547
|
-
const snowcrash::SourceMap<snowcrash::Actions>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Actions>, handle);
|
548
|
-
if(!p)
|
549
|
-
return NULL;
|
550
|
-
|
551
|
-
return AS_CTYPE(sc_sm_action_t, &p->collection.at(index));
|
552
|
-
}
|
553
|
-
|
554
|
-
SC_API const sc_source_map_t* sc_sm_action_httpmethod(const sc_sm_action_t* handle)
|
555
|
-
{
|
556
|
-
const snowcrash::SourceMap<snowcrash::Action>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Action>, handle);
|
557
|
-
if (!p)
|
558
|
-
return NULL;
|
559
|
-
|
560
|
-
return AS_CTYPE(sc_source_map_t, &p->method.sourceMap);
|
561
|
-
}
|
562
|
-
|
563
|
-
SC_API const sc_source_map_t* sc_sm_action_name(const sc_sm_action_t* handle)
|
564
|
-
{
|
565
|
-
const snowcrash::SourceMap<snowcrash::Action>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Action>, handle);
|
566
|
-
if (!p)
|
567
|
-
return NULL;
|
568
|
-
|
569
|
-
return AS_CTYPE(sc_source_map_t, &p->name.sourceMap);
|
570
|
-
}
|
571
|
-
|
572
|
-
SC_API const sc_source_map_t* sc_sm_action_description(const sc_sm_action_t* handle)
|
573
|
-
{
|
574
|
-
const snowcrash::SourceMap<snowcrash::Action>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Action>, handle);
|
575
|
-
if (!p)
|
576
|
-
return NULL;
|
577
|
-
|
578
|
-
return AS_CTYPE(sc_source_map_t, &p->description.sourceMap);
|
579
|
-
}
|
580
|
-
|
581
|
-
/*----------------------------------------------------------------------*/
|
582
|
-
|
583
|
-
SC_API const sc_sm_transaction_example_collection_t* sc_sm_transaction_example_collection_handle(const sc_sm_action_t* handle)
|
584
|
-
{
|
585
|
-
const snowcrash::SourceMap<snowcrash::Action>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::Action>, handle);
|
586
|
-
if(!p)
|
587
|
-
return NULL;
|
588
|
-
|
589
|
-
return AS_CTYPE(sc_sm_transaction_example_collection_t, &p->examples);
|
590
|
-
}
|
591
|
-
|
592
|
-
SC_API size_t sc_sm_transaction_example_collection_size(const sc_sm_transaction_example_collection_t* handle)
|
593
|
-
{
|
594
|
-
const snowcrash::SourceMap<snowcrash::TransactionExamples>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::TransactionExamples>, handle);
|
595
|
-
if (!p)
|
596
|
-
return 0;
|
597
|
-
|
598
|
-
return p->collection.size();
|
599
|
-
}
|
600
|
-
|
601
|
-
/*----------------------------------------------------------------------*/
|
602
|
-
|
603
|
-
SC_API const sc_sm_transaction_example_t* sc_sm_transaction_example_handle(const sc_sm_transaction_example_collection_t* handle, size_t index)
|
604
|
-
{
|
605
|
-
const snowcrash::SourceMap<snowcrash::TransactionExamples>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::TransactionExamples>, handle);
|
606
|
-
if(!p)
|
607
|
-
return NULL;
|
608
|
-
|
609
|
-
return AS_CTYPE(sc_sm_transaction_example_t, &p->collection.at(index));
|
610
|
-
}
|
611
|
-
|
612
|
-
SC_API const sc_source_map_t* sc_sm_transaction_example_name(const sc_sm_transaction_example_t* handle)
|
613
|
-
{
|
614
|
-
const snowcrash::SourceMap<snowcrash::TransactionExample>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::TransactionExample>, handle);
|
615
|
-
if (!p)
|
616
|
-
return NULL;
|
617
|
-
|
618
|
-
return AS_CTYPE(sc_source_map_t, &p->name.sourceMap);
|
619
|
-
}
|
620
|
-
|
621
|
-
SC_API const sc_source_map_t* sc_sm_transaction_example_description(const sc_sm_transaction_example_t* handle)
|
622
|
-
{
|
623
|
-
const snowcrash::SourceMap<snowcrash::TransactionExample>* p = AS_CTYPE(snowcrash::SourceMap<snowcrash::TransactionExample>, handle);
|
624
|
-
if (!p)
|
625
|
-
return NULL;
|
626
|
-
|
627
|
-
return AS_CTYPE(sc_source_map_t, &p->description.sourceMap);
|
628
|
-
}
|
629
|
-
|
630
|
-
/*----------------------------------------------------------------------*/
|