jazzy 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.gitmodules +3 -0
  4. data/.rubocop.yml +67 -0
  5. data/.rubocop_todo.yml +16 -0
  6. data/.travis.yml +6 -0
  7. data/Gemfile +15 -7
  8. data/Gemfile.lock +62 -12
  9. data/LICENSE +0 -0
  10. data/README.md +39 -12
  11. data/Rakefile +87 -1
  12. data/bin/jazzy +10 -44
  13. data/bin/sourcekitten +0 -0
  14. data/jazzy.gemspec +16 -16
  15. data/lib/jazzy.rb +1 -159
  16. data/lib/jazzy/assets/css/jazzy.css +561 -0
  17. data/lib/{assets/Images/carat_2x.png → jazzy/assets/img/carat.png} +0 -0
  18. data/lib/jazzy/assets/img/dash.png +0 -0
  19. data/lib/jazzy/assets/img/gh.png +0 -0
  20. data/lib/jazzy/assets/js/jazzy.js +15 -0
  21. data/lib/jazzy/assets/js/jquery.min.js +4 -0
  22. data/lib/jazzy/config.rb +100 -0
  23. data/lib/jazzy/doc.mustache +46 -0
  24. data/lib/jazzy/doc.rb +23 -0
  25. data/lib/jazzy/doc_builder.rb +166 -0
  26. data/lib/jazzy/gem_version.rb +3 -0
  27. data/lib/jazzy/jazzy_markdown.rb +13 -0
  28. data/lib/jazzy/partials/footer.mustache +4 -0
  29. data/lib/jazzy/partials/nav.mustache +16 -0
  30. data/lib/jazzy/partials/parameter.mustache +12 -0
  31. data/lib/jazzy/partials/task.mustache +66 -0
  32. data/lib/jazzy/partials/tasks.mustache +7 -0
  33. data/lib/jazzy/source_declaration.rb +19 -0
  34. data/lib/jazzy/sourcekitten.rb +146 -0
  35. data/lib/jazzy/xml_helper.rb +15 -0
  36. data/screenshot.jpg +0 -0
  37. data/spec/.gitkeep +0 -0
  38. data/spec/integration_spec.rb +89 -0
  39. data/spec/integration_specs/document_alamofire/after/docs/Classes.html +266 -0
  40. data/spec/integration_specs/document_alamofire/after/docs/Classes/Manager.html +677 -0
  41. data/spec/integration_specs/document_alamofire/after/docs/Classes/Manager/SessionDelegate.html +866 -0
  42. data/spec/integration_specs/document_alamofire/after/docs/Classes/Manager/Singleton.html +246 -0
  43. data/spec/integration_specs/document_alamofire/after/docs/Classes/Request.html +1376 -0
  44. data/spec/integration_specs/document_alamofire/after/docs/Classes/Request/DataTaskDelegate.html +486 -0
  45. data/spec/integration_specs/document_alamofire/after/docs/Classes/Request/TaskDelegate.html +506 -0
  46. data/spec/integration_specs/document_alamofire/after/docs/Enums.html +266 -0
  47. data/spec/integration_specs/document_alamofire/after/docs/Enums/ParameterEncoding.html +391 -0
  48. data/spec/integration_specs/document_alamofire/after/docs/Extensions.html +641 -0
  49. data/spec/integration_specs/document_alamofire/after/docs/Extensions/Manager.html +376 -0
  50. data/spec/integration_specs/document_alamofire/after/docs/Extensions/NSURL.html +226 -0
  51. data/spec/integration_specs/document_alamofire/after/docs/Extensions/NSURLComponents.html +226 -0
  52. data/spec/integration_specs/document_alamofire/after/docs/Extensions/NSURLRequest.html +226 -0
  53. data/spec/integration_specs/document_alamofire/after/docs/Extensions/Request.html +377 -0
  54. data/spec/integration_specs/document_alamofire/after/docs/Extensions/Request/DownloadTaskDelegate.html +406 -0
  55. data/spec/integration_specs/document_alamofire/after/docs/Extensions/Request/MIMEType.html +286 -0
  56. data/spec/integration_specs/document_alamofire/after/docs/Extensions/Request/UploadTaskDelegate.html +266 -0
  57. data/spec/integration_specs/document_alamofire/after/docs/Extensions/String.html +226 -0
  58. data/spec/integration_specs/document_alamofire/after/docs/Functions.html +1001 -0
  59. data/spec/integration_specs/document_alamofire/after/docs/Global Variables.html +236 -0
  60. data/spec/integration_specs/document_alamofire/after/docs/Protocols.html +266 -0
  61. data/spec/integration_specs/document_alamofire/after/docs/Protocols/URLRequestConvertible.html +236 -0
  62. data/spec/integration_specs/document_alamofire/after/docs/Protocols/URLStringConvertible.html +236 -0
  63. data/spec/integration_specs/document_alamofire/after/docs/Typealiases.html +266 -0
  64. data/spec/integration_specs/document_alamofire/after/docs/css/jazzy.css +561 -0
  65. data/spec/integration_specs/document_alamofire/after/docs/img/carat.png +0 -0
  66. data/spec/integration_specs/document_alamofire/after/docs/img/dash.png +0 -0
  67. data/spec/integration_specs/document_alamofire/after/docs/img/gh.png +0 -0
  68. data/spec/integration_specs/document_alamofire/after/docs/index.html +194 -0
  69. data/spec/integration_specs/document_alamofire/after/docs/js/jazzy.js +15 -0
  70. data/spec/integration_specs/document_alamofire/after/docs/js/jquery.min.js +4 -0
  71. data/spec/integration_specs/document_alamofire/after/execution_output.txt +2 -0
  72. data/spec/integration_specs/misc_jazzy_features/after/docs/Classes.html +317 -0
  73. data/spec/integration_specs/misc_jazzy_features/after/docs/Classes/ImplicitlyInternalTopLevelClass.html +138 -0
  74. data/spec/integration_specs/misc_jazzy_features/after/docs/Enums.html +155 -0
  75. data/spec/integration_specs/misc_jazzy_features/after/docs/Enums/DocumentedEnum.html +128 -0
  76. data/spec/integration_specs/misc_jazzy_features/after/docs/Global Variables.html +138 -0
  77. data/spec/integration_specs/misc_jazzy_features/after/docs/css/jazzy.css +561 -0
  78. data/spec/integration_specs/misc_jazzy_features/after/docs/img/carat.png +0 -0
  79. data/spec/integration_specs/misc_jazzy_features/after/docs/img/dash.png +0 -0
  80. data/spec/integration_specs/misc_jazzy_features/after/docs/img/gh.png +0 -0
  81. data/spec/integration_specs/misc_jazzy_features/after/docs/index.html +99 -0
  82. data/spec/integration_specs/misc_jazzy_features/after/docs/js/jazzy.js +15 -0
  83. data/spec/integration_specs/misc_jazzy_features/after/docs/js/jquery.min.js +4 -0
  84. data/spec/integration_specs/misc_jazzy_features/after/execution_output.txt +2 -0
  85. data/spec/integration_specs/misc_jazzy_features/before/MiscJazzyFeatures.xcodeproj/project.pbxproj +293 -0
  86. data/{parser/ASTDump.xcodeproj → spec/integration_specs/misc_jazzy_features/before/MiscJazzyFeatures.xcodeproj}/project.xcworkspace/contents.xcworkspacedata +1 -1
  87. data/spec/integration_specs/misc_jazzy_features/before/MiscJazzyFeatures/Classes.swift +60 -0
  88. data/spec/integration_specs/misc_jazzy_features/before/MiscJazzyFeatures/Info.plist +28 -0
  89. data/spec/integration_specs/misc_jazzy_features/before/MiscJazzyFeatures/MiscJazzyFeatures.h +10 -0
  90. data/spec/integration_specs/misc_jazzy_features/before/docs/Classes.html +317 -0
  91. data/spec/integration_specs/misc_jazzy_features/before/docs/Classes/ImplicitlyInternalTopLevelClass.html +138 -0
  92. data/spec/integration_specs/misc_jazzy_features/before/docs/Enums.html +155 -0
  93. data/spec/integration_specs/misc_jazzy_features/before/docs/Enums/DocumentedEnum.html +128 -0
  94. data/spec/integration_specs/misc_jazzy_features/before/docs/Global Variables.html +138 -0
  95. data/spec/integration_specs/misc_jazzy_features/before/docs/css/jazzy.css +561 -0
  96. data/spec/integration_specs/misc_jazzy_features/before/docs/img/carat.png +0 -0
  97. data/spec/integration_specs/misc_jazzy_features/before/docs/img/dash.png +0 -0
  98. data/spec/integration_specs/misc_jazzy_features/before/docs/img/gh.png +0 -0
  99. data/spec/integration_specs/misc_jazzy_features/before/docs/index.html +99 -0
  100. data/spec/integration_specs/misc_jazzy_features/before/docs/js/jazzy.js +15 -0
  101. data/spec/integration_specs/misc_jazzy_features/before/docs/js/jquery.min.js +4 -0
  102. metadata +112 -76
  103. data/DEV_README.md +0 -35
  104. data/bin/ASTDump +0 -0
  105. data/bin/generate_swift_header.sh +0 -14
  106. data/lib/assets/CSS/style-1.1.15.css +0 -3366
  107. data/lib/assets/Images/apple2.png +0 -0
  108. data/lib/assets/Images/check.png +0 -0
  109. data/lib/assets/Images/class_node_parent_and_child_2x.png +0 -0
  110. data/lib/assets/Images/class_node_subclass_last_child_2x.png +0 -0
  111. data/lib/assets/Images/class_node_subclass_with_siblings_2x.png +0 -0
  112. data/lib/assets/Images/closebox_2x.png +0 -0
  113. data/lib/assets/Images/collection_last_child_2x.png +0 -0
  114. data/lib/assets/Images/collection_last_child_orphan_grandparent_2x.png +0 -0
  115. data/lib/assets/Images/collection_last_child_orphan_parent_2x.png +0 -0
  116. data/lib/assets/Images/collection_last_child_orphan_parent_and_grandparent_2x.png +0 -0
  117. data/lib/assets/Images/collection_node_2x.png +0 -0
  118. data/lib/assets/Images/collection_node_orphan_grandparent_2x.png +0 -0
  119. data/lib/assets/Images/collection_node_orphan_parent_2x.png +0 -0
  120. data/lib/assets/Images/collection_node_orphan_parent_and_grandparent_2x.png +0 -0
  121. data/lib/assets/Images/collection_node_parent_2x.png +0 -0
  122. data/lib/assets/Images/collection_node_parent_last_child_orphan_parent_2x.png +0 -0
  123. data/lib/assets/Images/collection_node_parent_orphan_parent_2x.png +0 -0
  124. data/lib/assets/Images/collection_parent_last_child_2x.png +0 -0
  125. data/lib/assets/Images/download_2x.png +0 -0
  126. data/lib/assets/Images/left_arrow_2x.png +0 -0
  127. data/lib/assets/Images/magnify_2x.png +0 -0
  128. data/lib/assets/Images/minus_2x.png +0 -0
  129. data/lib/assets/Images/playbutton.svg +0 -15
  130. data/lib/assets/Images/plus_2x.png +0 -0
  131. data/lib/assets/Images/right_arrow_2x.png +0 -0
  132. data/lib/assets/Images/search_2x.png +0 -0
  133. data/lib/assets/Images/shortstack_2x.png +0 -0
  134. data/lib/assets/JavaScript/devpubs-1.1.15.js +0 -1293
  135. data/lib/jazzy/jazzhtml.rb +0 -7
  136. data/lib/jazzy/klass.mustache +0 -150
  137. data/lib/jazzy/klass.rb +0 -23
  138. data/lib/jazzy/partials/klass-method.mustache +0 -70
  139. data/lib/jazzy/partials/klass-overview.mustache +0 -6
  140. data/lib/jazzy/partials/klass-property.mustache +0 -41
  141. data/parser/ASTDump.xcodeproj/project.pbxproj +0 -301
  142. data/parser/ASTDump.xcodeproj/project.xcworkspace/xcshareddata/ASTDump.xccheckout +0 -41
  143. data/parser/ASTDump.xcodeproj/project.xcworkspace/xcuserdata/ta.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  144. data/parser/ASTDump.xcodeproj/xcuserdata/ta.xcuserdatad/xcschemes/ASTDump.xcscheme +0 -86
  145. data/parser/ASTDump.xcodeproj/xcuserdata/ta.xcuserdatad/xcschemes/xcschememanagement.plist +0 -22
  146. data/parser/ASTDump/main.cpp +0 -71
  147. data/parser/clang-c/BuildSystem.h +0 -148
  148. data/parser/clang-c/CXCompilationDatabase.h +0 -170
  149. data/parser/clang-c/CXErrorCode.h +0 -64
  150. data/parser/clang-c/CXString.h +0 -61
  151. data/parser/clang-c/Documentation.h +0 -554
  152. data/parser/clang-c/Index.h +0 -5454
  153. data/parser/clang-c/Platform.h +0 -45
  154. data/sample/JAZMusician.h +0 -38
  155. data/sample/JAZMusician.m +0 -19
  156. data/sample/Musician.swift +0 -37
@@ -1,41 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDESourceControlProjectFavoriteDictionaryKey</key>
6
- <false/>
7
- <key>IDESourceControlProjectIdentifier</key>
8
- <string>F844CCD6-9859-41B0-A56D-6CE71EC1028B</string>
9
- <key>IDESourceControlProjectName</key>
10
- <string>ASTDump</string>
11
- <key>IDESourceControlProjectOriginsDictionary</key>
12
- <dict>
13
- <key>66FD7FE3-3E84-4A39-B98D-6C26A4D647F2</key>
14
- <string>ssh://github.com/realm/jazzy.git</string>
15
- </dict>
16
- <key>IDESourceControlProjectPath</key>
17
- <string>parser/ASTDump.xcodeproj/project.xcworkspace</string>
18
- <key>IDESourceControlProjectRelativeInstallPathDictionary</key>
19
- <dict>
20
- <key>66FD7FE3-3E84-4A39-B98D-6C26A4D647F2</key>
21
- <string>../../..</string>
22
- </dict>
23
- <key>IDESourceControlProjectURL</key>
24
- <string>ssh://github.com/realm/jazzy.git</string>
25
- <key>IDESourceControlProjectVersion</key>
26
- <integer>110</integer>
27
- <key>IDESourceControlProjectWCCIdentifier</key>
28
- <string>66FD7FE3-3E84-4A39-B98D-6C26A4D647F2</string>
29
- <key>IDESourceControlProjectWCConfigurations</key>
30
- <array>
31
- <dict>
32
- <key>IDESourceControlRepositoryExtensionIdentifierKey</key>
33
- <string>public.vcs.git</string>
34
- <key>IDESourceControlWCCIdentifierKey</key>
35
- <string>66FD7FE3-3E84-4A39-B98D-6C26A4D647F2</string>
36
- <key>IDESourceControlWCCName</key>
37
- <string>jazzy</string>
38
- </dict>
39
- </array>
40
- </dict>
41
- </plist>
@@ -1,86 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "0510"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "E80E07D0194125DB00E2B0B5"
18
- BuildableName = "ASTDump"
19
- BlueprintName = "ASTDump"
20
- ReferencedContainer = "container:ASTDump.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28
- shouldUseLaunchSchemeArgsEnv = "YES"
29
- buildConfiguration = "Debug">
30
- <Testables>
31
- </Testables>
32
- <MacroExpansion>
33
- <BuildableReference
34
- BuildableIdentifier = "primary"
35
- BlueprintIdentifier = "E80E07D0194125DB00E2B0B5"
36
- BuildableName = "ASTDump"
37
- BlueprintName = "ASTDump"
38
- ReferencedContainer = "container:ASTDump.xcodeproj">
39
- </BuildableReference>
40
- </MacroExpansion>
41
- </TestAction>
42
- <LaunchAction
43
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
44
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
45
- launchStyle = "0"
46
- useCustomWorkingDirectory = "NO"
47
- buildConfiguration = "Debug"
48
- ignoresPersistentStateOnLaunch = "NO"
49
- debugDocumentVersioning = "YES"
50
- allowLocationSimulation = "YES">
51
- <BuildableProductRunnable>
52
- <BuildableReference
53
- BuildableIdentifier = "primary"
54
- BlueprintIdentifier = "E80E07D0194125DB00E2B0B5"
55
- BuildableName = "ASTDump"
56
- BlueprintName = "ASTDump"
57
- ReferencedContainer = "container:ASTDump.xcodeproj">
58
- </BuildableReference>
59
- </BuildableProductRunnable>
60
- <AdditionalOptions>
61
- </AdditionalOptions>
62
- </LaunchAction>
63
- <ProfileAction
64
- shouldUseLaunchSchemeArgsEnv = "YES"
65
- savedToolIdentifier = ""
66
- useCustomWorkingDirectory = "NO"
67
- buildConfiguration = "Release"
68
- debugDocumentVersioning = "YES">
69
- <BuildableProductRunnable>
70
- <BuildableReference
71
- BuildableIdentifier = "primary"
72
- BlueprintIdentifier = "E80E07D0194125DB00E2B0B5"
73
- BuildableName = "ASTDump"
74
- BlueprintName = "ASTDump"
75
- ReferencedContainer = "container:ASTDump.xcodeproj">
76
- </BuildableReference>
77
- </BuildableProductRunnable>
78
- </ProfileAction>
79
- <AnalyzeAction
80
- buildConfiguration = "Debug">
81
- </AnalyzeAction>
82
- <ArchiveAction
83
- buildConfiguration = "Release"
84
- revealArchiveInOrganizer = "YES">
85
- </ArchiveAction>
86
- </Scheme>
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>ASTDump.xcscheme</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- <key>SuppressBuildableAutocreation</key>
14
- <dict>
15
- <key>E80E07D0194125DB00E2B0B5</key>
16
- <dict>
17
- <key>primary</key>
18
- <true/>
19
- </dict>
20
- </dict>
21
- </dict>
22
- </plist>
@@ -1,71 +0,0 @@
1
- //
2
- // main.cpp
3
- // ASTDump
4
- //
5
- // Created by JP Simard on 6/5/14.
6
- // Copyright (c) 2014 Realm. All rights reserved.
7
- //
8
-
9
- #include <iostream>
10
- #include "clang-c/Index.h"
11
-
12
- //////////////////////////////////////////
13
- // Print XML from translation unit
14
- //////////////////////////////////////////
15
-
16
- void printXMLFromTU(CXTranslationUnit tu)
17
- {
18
- printf("<?xml version=\"1.0\"?>\n<jazz>");
19
- clang_visitChildrenWithBlock(clang_getTranslationUnitCursor(tu), ^enum CXChildVisitResult(CXCursor cursor, CXCursor parent) {
20
- CXComment comment = clang_Cursor_getParsedComment(cursor);
21
- if (clang_Comment_getKind(comment) == CXComment_FullComment) {
22
- printf("%s\n", clang_getCString(clang_FullComment_getAsXML(comment)));
23
- }
24
- return CXChildVisit_Recurse;
25
- });
26
- printf("</jazz>");
27
- }
28
-
29
- //////////////////////////////////////////
30
- // Make translation unit from index/file
31
- //////////////////////////////////////////
32
-
33
- CXTranslationUnit tuFromIndexAndFile(CXIndex index, const char *filename)
34
- {
35
- const char *args[] = {
36
- "-x",
37
- "objective-c",
38
- "-isysroot",
39
- "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
40
- };
41
-
42
- int numArgs = sizeof(args) / sizeof(*args);
43
-
44
- return clang_createTranslationUnitFromSourceFile(index, filename, numArgs, args, 0, NULL);
45
- }
46
-
47
- //////////////////////////////////////////
48
- // Print XML from filename
49
- //////////////////////////////////////////
50
-
51
- void printXMLFromFile(const char *filename)
52
- {
53
- CXIndex index = clang_createIndex(0, 1);
54
-
55
- CXTranslationUnit tu = tuFromIndexAndFile(index, filename);
56
-
57
- printXMLFromTU(tu);
58
-
59
- clang_disposeTranslationUnit(tu);
60
- clang_disposeIndex(index);
61
- }
62
-
63
- //////////////////////////////////////////
64
- // Program entry
65
- //////////////////////////////////////////
66
-
67
- int main(int argc, const char * argv[])
68
- {
69
- printXMLFromFile(argv[1]);
70
- return 0;
71
- }
@@ -1,148 +0,0 @@
1
- /*==-- clang-c/BuildSystem.h - Utilities for use by build systems -*- C -*-===*\
2
- |* *|
3
- |* The LLVM Compiler Infrastructure *|
4
- |* *|
5
- |* This file is distributed under the University of Illinois Open Source *|
6
- |* License. See LICENSE.TXT for details. *|
7
- |* *|
8
- |*===----------------------------------------------------------------------===*|
9
- |* *|
10
- |* This header provides various utilities for use by build systems. *|
11
- |* *|
12
- \*===----------------------------------------------------------------------===*/
13
-
14
- #ifndef CLANG_C_BUILD_SYSTEM_H
15
- #define CLANG_C_BUILD_SYSTEM_H
16
-
17
- #include "clang-c/Platform.h"
18
- #include "clang-c/CXErrorCode.h"
19
- #include "clang-c/CXString.h"
20
-
21
- #ifdef __cplusplus
22
- extern "C" {
23
- #endif
24
-
25
- /**
26
- * \defgroup BUILD_SYSTEM Build system utilities
27
- * @{
28
- */
29
-
30
- /**
31
- * \brief Return the timestamp for use with Clang's
32
- * \c -fbuild-session-timestamp= option.
33
- */
34
- CINDEX_LINKAGE unsigned long long clang_getBuildSessionTimestamp(void);
35
-
36
- /**
37
- * \brief Object encapsulating information about overlaying virtual
38
- * file/directories over the real file system.
39
- */
40
- typedef struct CXVirtualFileOverlayImpl *CXVirtualFileOverlay;
41
-
42
- /**
43
- * \brief Create a \c CXVirtualFileOverlay object.
44
- * Must be disposed with \c clang_VirtualFileOverlay_dispose().
45
- *
46
- * \param options is reserved, always pass 0.
47
- */
48
- CINDEX_LINKAGE CXVirtualFileOverlay
49
- clang_VirtualFileOverlay_create(unsigned options);
50
-
51
- /**
52
- * \brief Map an absolute virtual file path to an absolute real one.
53
- * The virtual path must be canonicalized (not contain "."/"..").
54
- * \returns 0 for success, non-zero to indicate an error.
55
- */
56
- CINDEX_LINKAGE enum CXErrorCode
57
- clang_VirtualFileOverlay_addFileMapping(CXVirtualFileOverlay,
58
- const char *virtualPath,
59
- const char *realPath);
60
-
61
- /**
62
- * \brief Set the case sensitivity for the \c CXVirtualFileOverlay object.
63
- * The \c CXVirtualFileOverlay object is case-sensitive by default, this
64
- * option can be used to override the default.
65
- * \returns 0 for success, non-zero to indicate an error.
66
- */
67
- CINDEX_LINKAGE enum CXErrorCode
68
- clang_VirtualFileOverlay_setCaseSensitivity(CXVirtualFileOverlay,
69
- int caseSensitive);
70
-
71
- /**
72
- * \brief Write out the \c CXVirtualFileOverlay object to a char buffer.
73
- *
74
- * \param options is reserved, always pass 0.
75
- * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
76
- * disposed using \c free().
77
- * \param out_buffer_size pointer to receive the buffer size.
78
- * \returns 0 for success, non-zero to indicate an error.
79
- */
80
- CINDEX_LINKAGE enum CXErrorCode
81
- clang_VirtualFileOverlay_writeToBuffer(CXVirtualFileOverlay, unsigned options,
82
- char **out_buffer_ptr,
83
- unsigned *out_buffer_size);
84
-
85
- /**
86
- * \brief Dispose a \c CXVirtualFileOverlay object.
87
- */
88
- CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay);
89
-
90
- /**
91
- * \brief Object encapsulating information about a module.map file.
92
- */
93
- typedef struct CXModuleMapDescriptorImpl *CXModuleMapDescriptor;
94
-
95
- /**
96
- * \brief Create a \c CXModuleMapDescriptor object.
97
- * Must be disposed with \c clang_ModuleMapDescriptor_dispose().
98
- *
99
- * \param options is reserved, always pass 0.
100
- */
101
- CINDEX_LINKAGE CXModuleMapDescriptor
102
- clang_ModuleMapDescriptor_create(unsigned options);
103
-
104
- /**
105
- * \brief Sets the framework module name that the module.map describes.
106
- * \returns 0 for success, non-zero to indicate an error.
107
- */
108
- CINDEX_LINKAGE enum CXErrorCode
109
- clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor,
110
- const char *name);
111
-
112
- /**
113
- * \brief Sets the umbrealla header name that the module.map describes.
114
- * \returns 0 for success, non-zero to indicate an error.
115
- */
116
- CINDEX_LINKAGE enum CXErrorCode
117
- clang_ModuleMapDescriptor_setUmbrellaHeader(CXModuleMapDescriptor,
118
- const char *name);
119
-
120
- /**
121
- * \brief Write out the \c CXModuleMapDescriptor object to a char buffer.
122
- *
123
- * \param options is reserved, always pass 0.
124
- * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
125
- * disposed using \c free().
126
- * \param out_buffer_size pointer to receive the buffer size.
127
- * \returns 0 for success, non-zero to indicate an error.
128
- */
129
- CINDEX_LINKAGE enum CXErrorCode
130
- clang_ModuleMapDescriptor_writeToBuffer(CXModuleMapDescriptor, unsigned options,
131
- char **out_buffer_ptr,
132
- unsigned *out_buffer_size);
133
-
134
- /**
135
- * \brief Dispose a \c CXModuleMapDescriptor object.
136
- */
137
- CINDEX_LINKAGE void clang_ModuleMapDescriptor_dispose(CXModuleMapDescriptor);
138
-
139
- /**
140
- * @}
141
- */
142
-
143
- #ifdef __cplusplus
144
- }
145
- #endif
146
-
147
- #endif /* CLANG_C_BUILD_SYSTEM_H */
148
-
@@ -1,170 +0,0 @@
1
- /*===-- clang-c/CXCompilationDatabase.h - Compilation database ---*- C -*-===*\
2
- |* *|
3
- |* The LLVM Compiler Infrastructure *|
4
- |* *|
5
- |* This file is distributed under the University of Illinois Open Source *|
6
- |* License. See LICENSE.TXT for details. *|
7
- |* *|
8
- |*===----------------------------------------------------------------------===*|
9
- |* *|
10
- |* This header provides a public inferface to use CompilationDatabase without *|
11
- |* the full Clang C++ API. *|
12
- |* *|
13
- \*===----------------------------------------------------------------------===*/
14
-
15
- #ifndef CLANG_CXCOMPILATIONDATABASE_H
16
- #define CLANG_CXCOMPILATIONDATABASE_H
17
-
18
- #include "clang-c/Platform.h"
19
- #include "clang-c/CXString.h"
20
-
21
- #ifdef __cplusplus
22
- extern "C" {
23
- #endif
24
-
25
- /** \defgroup COMPILATIONDB CompilationDatabase functions
26
- * \ingroup CINDEX
27
- *
28
- * @{
29
- */
30
-
31
- /**
32
- * A compilation database holds all information used to compile files in a
33
- * project. For each file in the database, it can be queried for the working
34
- * directory or the command line used for the compiler invocation.
35
- *
36
- * Must be freed by \c clang_CompilationDatabase_dispose
37
- */
38
- typedef void * CXCompilationDatabase;
39
-
40
- /**
41
- * \brief Contains the results of a search in the compilation database
42
- *
43
- * When searching for the compile command for a file, the compilation db can
44
- * return several commands, as the file may have been compiled with
45
- * different options in different places of the project. This choice of compile
46
- * commands is wrapped in this opaque data structure. It must be freed by
47
- * \c clang_CompileCommands_dispose.
48
- */
49
- typedef void * CXCompileCommands;
50
-
51
- /**
52
- * \brief Represents the command line invocation to compile a specific file.
53
- */
54
- typedef void * CXCompileCommand;
55
-
56
- /**
57
- * \brief Error codes for Compilation Database
58
- */
59
- typedef enum {
60
- /*
61
- * \brief No error occurred
62
- */
63
- CXCompilationDatabase_NoError = 0,
64
-
65
- /*
66
- * \brief Database can not be loaded
67
- */
68
- CXCompilationDatabase_CanNotLoadDatabase = 1
69
-
70
- } CXCompilationDatabase_Error;
71
-
72
- /**
73
- * \brief Creates a compilation database from the database found in directory
74
- * buildDir. For example, CMake can output a compile_commands.json which can
75
- * be used to build the database.
76
- *
77
- * It must be freed by \c clang_CompilationDatabase_dispose.
78
- */
79
- CINDEX_LINKAGE CXCompilationDatabase
80
- clang_CompilationDatabase_fromDirectory(const char *BuildDir,
81
- CXCompilationDatabase_Error *ErrorCode);
82
-
83
- /**
84
- * \brief Free the given compilation database
85
- */
86
- CINDEX_LINKAGE void
87
- clang_CompilationDatabase_dispose(CXCompilationDatabase);
88
-
89
- /**
90
- * \brief Find the compile commands used for a file. The compile commands
91
- * must be freed by \c clang_CompileCommands_dispose.
92
- */
93
- CINDEX_LINKAGE CXCompileCommands
94
- clang_CompilationDatabase_getCompileCommands(CXCompilationDatabase,
95
- const char *CompleteFileName);
96
-
97
- /**
98
- * \brief Get all the compile commands in the given compilation database.
99
- */
100
- CINDEX_LINKAGE CXCompileCommands
101
- clang_CompilationDatabase_getAllCompileCommands(CXCompilationDatabase);
102
-
103
- /**
104
- * \brief Free the given CompileCommands
105
- */
106
- CINDEX_LINKAGE void clang_CompileCommands_dispose(CXCompileCommands);
107
-
108
- /**
109
- * \brief Get the number of CompileCommand we have for a file
110
- */
111
- CINDEX_LINKAGE unsigned
112
- clang_CompileCommands_getSize(CXCompileCommands);
113
-
114
- /**
115
- * \brief Get the I'th CompileCommand for a file
116
- *
117
- * Note : 0 <= i < clang_CompileCommands_getSize(CXCompileCommands)
118
- */
119
- CINDEX_LINKAGE CXCompileCommand
120
- clang_CompileCommands_getCommand(CXCompileCommands, unsigned I);
121
-
122
- /**
123
- * \brief Get the working directory where the CompileCommand was executed from
124
- */
125
- CINDEX_LINKAGE CXString
126
- clang_CompileCommand_getDirectory(CXCompileCommand);
127
-
128
- /**
129
- * \brief Get the number of arguments in the compiler invocation.
130
- *
131
- */
132
- CINDEX_LINKAGE unsigned
133
- clang_CompileCommand_getNumArgs(CXCompileCommand);
134
-
135
- /**
136
- * \brief Get the I'th argument value in the compiler invocations
137
- *
138
- * Invariant :
139
- * - argument 0 is the compiler executable
140
- */
141
- CINDEX_LINKAGE CXString
142
- clang_CompileCommand_getArg(CXCompileCommand, unsigned I);
143
-
144
- /**
145
- * \brief Get the number of source mappings for the compiler invocation.
146
- */
147
- CINDEX_LINKAGE unsigned
148
- clang_CompileCommand_getNumMappedSources(CXCompileCommand);
149
-
150
- /**
151
- * \brief Get the I'th mapped source path for the compiler invocation.
152
- */
153
- CINDEX_LINKAGE CXString
154
- clang_CompileCommand_getMappedSourcePath(CXCompileCommand, unsigned I);
155
-
156
- /**
157
- * \brief Get the I'th mapped source content for the compiler invocation.
158
- */
159
- CINDEX_LINKAGE CXString
160
- clang_CompileCommand_getMappedSourceContent(CXCompileCommand, unsigned I);
161
-
162
- /**
163
- * @}
164
- */
165
-
166
- #ifdef __cplusplus
167
- }
168
- #endif
169
- #endif
170
-