├── .gitignore ├── Doxyfile ├── LICENSE ├── README.md ├── demo1.gif └── src ├── examples ├── drawing │ ├── drawing-main.cpp │ ├── drawing-script.cpp │ └── drawing.pro ├── examples.pro └── repl │ ├── repl-main.cpp │ └── repl.pro ├── qicruntime ├── qiccontext.h ├── qicentry.h ├── qicruntime.cpp ├── qicruntime.h ├── qicruntime.pri └── qicruntime.pro └── qt-interactive-coding.pro /.gitignore: -------------------------------------------------------------------------------- 1 | build* 2 | *.pro.user* 3 | -------------------------------------------------------------------------------- /Doxyfile: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.2 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project. 5 | # 6 | # All text after a hash (#) is considered a comment and will be ignored. 7 | # The format is: 8 | # TAG = value [value, ...] 9 | # For lists items can also be appended using: 10 | # TAG += value [value, ...] 11 | # Values that contain spaces should be placed between quotes (" "). 12 | 13 | #--------------------------------------------------------------------------- 14 | # Project related configuration options 15 | #--------------------------------------------------------------------------- 16 | 17 | # This tag specifies the encoding used for all characters in the config file 18 | # that follow. The default is UTF-8 which is also the encoding used for all 19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the 20 | # iconv built into libc) for the transcoding. See 21 | # http://www.gnu.org/software/libiconv for the list of possible encodings. 22 | 23 | DOXYFILE_ENCODING = UTF-8 24 | 25 | # The PROJECT_NAME tag is a single word (or sequence of words) that should 26 | # identify the project. Note that if you do not use Doxywizard you need 27 | # to put quotes around the project name if it contains spaces. 28 | 29 | PROJECT_NAME = "Qt Interactive Coding" 30 | 31 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. 32 | # This could be handy for archiving the generated documentation or 33 | # if some version control system is used. 34 | 35 | PROJECT_NUMBER = 36 | 37 | # Using the PROJECT_BRIEF tag one can provide an optional one line description 38 | # for a project that appears at the top of each page and should give viewer 39 | # a quick idea about the purpose of the project. Keep the description short. 40 | 41 | PROJECT_BRIEF = 42 | 43 | # With the PROJECT_LOGO tag one can specify an logo or icon that is 44 | # included in the documentation. The maximum height of the logo should not 45 | # exceed 55 pixels and the maximum width should not exceed 200 pixels. 46 | # Doxygen will copy the logo to the output directory. 47 | 48 | PROJECT_LOGO = 49 | 50 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 51 | # base path where the generated documentation will be put. 52 | # If a relative path is entered, it will be relative to the location 53 | # where doxygen was started. If left blank the current directory will be used. 54 | 55 | OUTPUT_DIRECTORY = build-doxygen 56 | 57 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 58 | # 4096 sub-directories (in 2 levels) under the output directory of each output 59 | # format and will distribute the generated files over these directories. 60 | # Enabling this option can be useful when feeding doxygen a huge amount of 61 | # source files, where putting all generated files in the same directory would 62 | # otherwise cause performance problems for the file system. 63 | 64 | CREATE_SUBDIRS = NO 65 | 66 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 67 | # documentation generated by doxygen is written. Doxygen will use this 68 | # information to generate all constant output in the proper language. 69 | # The default language is English, other supported languages are: 70 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 71 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 72 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 73 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 74 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 75 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. 76 | 77 | OUTPUT_LANGUAGE = English 78 | 79 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 80 | # include brief member descriptions after the members that are listed in 81 | # the file and class documentation (similar to JavaDoc). 82 | # Set to NO to disable this. 83 | 84 | BRIEF_MEMBER_DESC = YES 85 | 86 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 87 | # the brief description of a member or function before the detailed description. 88 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 89 | # brief descriptions will be completely suppressed. 90 | 91 | REPEAT_BRIEF = YES 92 | 93 | # This tag implements a quasi-intelligent brief description abbreviator 94 | # that is used to form the text in various listings. Each string 95 | # in this list, if found as the leading text of the brief description, will be 96 | # stripped from the text and the result after processing the whole list, is 97 | # used as the annotated text. Otherwise, the brief description is used as-is. 98 | # If left blank, the following values are used ("$name" is automatically 99 | # replaced with the name of the entity): "The $name class" "The $name widget" 100 | # "The $name file" "is" "provides" "specifies" "contains" 101 | # "represents" "a" "an" "the" 102 | 103 | ABBREVIATE_BRIEF = 104 | 105 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 106 | # Doxygen will generate a detailed section even if there is only a brief 107 | # description. 108 | 109 | ALWAYS_DETAILED_SEC = YES 110 | 111 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 112 | # inherited members of a class in the documentation of that class as if those 113 | # members were ordinary class members. Constructors, destructors and assignment 114 | # operators of the base classes will not be shown. 115 | 116 | INLINE_INHERITED_MEMB = NO 117 | 118 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 119 | # path before files name in the file list and in the header files. If set 120 | # to NO the shortest path that makes the file name unique will be used. 121 | 122 | FULL_PATH_NAMES = NO 123 | 124 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 125 | # can be used to strip a user-defined part of the path. Stripping is 126 | # only done if one of the specified strings matches the left-hand part of 127 | # the path. The tag can be used to show relative paths in the file list. 128 | # If left blank the directory from which doxygen is run is used as the 129 | # path to strip. Note that you specify absolute paths here, but also 130 | # relative paths, which will be relative from the directory where doxygen is 131 | # started. 132 | 133 | STRIP_FROM_PATH = 134 | 135 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 136 | # the path mentioned in the documentation of a class, which tells 137 | # the reader which header file to include in order to use a class. 138 | # If left blank only the name of the header file containing the class 139 | # definition is used. Otherwise one should specify the include paths that 140 | # are normally passed to the compiler using the -I flag. 141 | 142 | STRIP_FROM_INC_PATH = 143 | 144 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 145 | # (but less readable) file names. This can be useful if your file system 146 | # doesn't support long names like on DOS, Mac, or CD-ROM. 147 | 148 | SHORT_NAMES = NO 149 | 150 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 151 | # will interpret the first line (until the first dot) of a JavaDoc-style 152 | # comment as the brief description. If set to NO, the JavaDoc 153 | # comments will behave just like regular Qt-style comments 154 | # (thus requiring an explicit @brief command for a brief description.) 155 | 156 | JAVADOC_AUTOBRIEF = NO 157 | 158 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will 159 | # interpret the first line (until the first dot) of a Qt-style 160 | # comment as the brief description. If set to NO, the comments 161 | # will behave just like regular Qt-style comments (thus requiring 162 | # an explicit \brief command for a brief description.) 163 | 164 | QT_AUTOBRIEF = YES 165 | 166 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 167 | # treat a multi-line C++ special comment block (i.e. a block of //! or /// 168 | # comments) as a brief description. This used to be the default behaviour. 169 | # The new default is to treat a multi-line C++ comment block as a detailed 170 | # description. Set this tag to YES if you prefer the old behaviour instead. 171 | 172 | MULTILINE_CPP_IS_BRIEF = NO 173 | 174 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 175 | # member inherits the documentation from any documented member that it 176 | # re-implements. 177 | 178 | INHERIT_DOCS = YES 179 | 180 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 181 | # a new page for each member. If set to NO, the documentation of a member will 182 | # be part of the file/class/namespace that contains it. 183 | 184 | SEPARATE_MEMBER_PAGES = NO 185 | 186 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. 187 | # Doxygen uses this value to replace tabs by spaces in code fragments. 188 | 189 | TAB_SIZE = 4 190 | 191 | # This tag can be used to specify a number of aliases that acts 192 | # as commands in the documentation. An alias has the form "name=value". 193 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to 194 | # put the command \sideeffect (or @sideeffect) in the documentation, which 195 | # will result in a user-defined paragraph with heading "Side Effects:". 196 | # You can put \n's in the value part of an alias to insert newlines. 197 | 198 | ALIASES = 199 | 200 | # This tag can be used to specify a number of word-keyword mappings (TCL only). 201 | # A mapping has the form "name=value". For example adding 202 | # "class=itcl::class" will allow you to use the command class in the 203 | # itcl::class meaning. 204 | 205 | TCL_SUBST = 206 | 207 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 208 | # sources only. Doxygen will then generate output that is more tailored for C. 209 | # For instance, some of the names that are used will be different. The list 210 | # of all members will be omitted, etc. 211 | 212 | OPTIMIZE_OUTPUT_FOR_C = NO 213 | 214 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 215 | # sources only. Doxygen will then generate output that is more tailored for 216 | # Java. For instance, namespaces will be presented as packages, qualified 217 | # scopes will look different, etc. 218 | 219 | OPTIMIZE_OUTPUT_JAVA = NO 220 | 221 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 222 | # sources only. Doxygen will then generate output that is more tailored for 223 | # Fortran. 224 | 225 | OPTIMIZE_FOR_FORTRAN = NO 226 | 227 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 228 | # sources. Doxygen will then generate output that is tailored for 229 | # VHDL. 230 | 231 | OPTIMIZE_OUTPUT_VHDL = NO 232 | 233 | # Doxygen selects the parser to use depending on the extension of the files it 234 | # parses. With this tag you can assign which parser to use for a given 235 | # extension. Doxygen has a built-in mapping, but you can override or extend it 236 | # using this tag. The format is ext=language, where ext is a file extension, 237 | # and language is one of the parsers supported by doxygen: IDL, Java, 238 | # Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, 239 | # C++. For instance to make doxygen treat .inc files as Fortran files (default 240 | # is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note 241 | # that for custom extensions you also need to set FILE_PATTERNS otherwise the 242 | # files are not read by doxygen. 243 | 244 | EXTENSION_MAPPING = 245 | 246 | # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all 247 | # comments according to the Markdown format, which allows for more readable 248 | # documentation. See http://daringfireball.net/projects/markdown/ for details. 249 | # The output of markdown processing is further processed by doxygen, so you 250 | # can mix doxygen, HTML, and XML commands with Markdown formatting. 251 | # Disable only in case of backward compatibilities issues. 252 | 253 | MARKDOWN_SUPPORT = YES 254 | 255 | # When enabled doxygen tries to link words that correspond to documented classes, 256 | # or namespaces to their corresponding documentation. Such a link can be 257 | # prevented in individual cases by by putting a % sign in front of the word or 258 | # globally by setting AUTOLINK_SUPPORT to NO. 259 | 260 | AUTOLINK_SUPPORT = YES 261 | 262 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 263 | # to include (a tag file for) the STL sources as input, then you should 264 | # set this tag to YES in order to let doxygen match functions declarations and 265 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 266 | # func(std::string) {}). This also makes the inheritance and collaboration 267 | # diagrams that involve STL classes more complete and accurate. 268 | 269 | BUILTIN_STL_SUPPORT = NO 270 | 271 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 272 | # enable parsing support. 273 | 274 | CPP_CLI_SUPPORT = NO 275 | 276 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 277 | # Doxygen will parse them like normal C++ but will assume all classes use public 278 | # instead of private inheritance when no explicit protection keyword is present. 279 | 280 | SIP_SUPPORT = NO 281 | 282 | # For Microsoft's IDL there are propget and propput attributes to indicate getter and setter methods for a property. Setting this option to YES (the default) will make doxygen replace the get and set methods by a property in the documentation. This will only work if the methods are indeed getting or setting a simple type. If this is not the case, or you want to show the methods anyway, you should set this option to NO. 283 | 284 | IDL_PROPERTY_SUPPORT = YES 285 | 286 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 287 | # tag is set to YES, then doxygen will reuse the documentation of the first 288 | # member in the group (if any) for the other members of the group. By default 289 | # all members of a group must be documented explicitly. 290 | 291 | DISTRIBUTE_GROUP_DOC = NO 292 | 293 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of 294 | # the same type (for instance a group of public functions) to be put as a 295 | # subgroup of that type (e.g. under the Public Functions section). Set it to 296 | # NO to prevent subgrouping. Alternatively, this can be done per class using 297 | # the \nosubgrouping command. 298 | 299 | SUBGROUPING = YES 300 | 301 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 302 | # unions are shown inside the group in which they are included (e.g. using 303 | # @ingroup) instead of on a separate page (for HTML and Man pages) or 304 | # section (for LaTeX and RTF). 305 | 306 | INLINE_GROUPED_CLASSES = NO 307 | 308 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and 309 | # unions with only public data fields will be shown inline in the documentation 310 | # of the scope in which they are defined (i.e. file, namespace, or group 311 | # documentation), provided this scope is documented. If set to NO (the default), 312 | # structs, classes, and unions are shown on a separate page (for HTML and Man 313 | # pages) or section (for LaTeX and RTF). 314 | 315 | INLINE_SIMPLE_STRUCTS = NO 316 | 317 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 318 | # is documented as struct, union, or enum with the name of the typedef. So 319 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 320 | # with name TypeT. When disabled the typedef will appear as a member of a file, 321 | # namespace, or class. And the struct will be named TypeS. This can typically 322 | # be useful for C code in case the coding convention dictates that all compound 323 | # types are typedef'ed and only the typedef is referenced, never the tag name. 324 | 325 | TYPEDEF_HIDES_STRUCT = NO 326 | 327 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 328 | # determine which symbols to keep in memory and which to flush to disk. 329 | # When the cache is full, less often used symbols will be written to disk. 330 | # For small to medium size projects (<1000 input files) the default value is 331 | # probably good enough. For larger projects a too small cache size can cause 332 | # doxygen to be busy swapping symbols to and from disk most of the time 333 | # causing a significant performance penalty. 334 | # If the system has enough physical memory increasing the cache will improve the 335 | # performance by keeping more symbols in memory. Note that the value works on 336 | # a logarithmic scale so increasing the size by one will roughly double the 337 | # memory usage. The cache size is given by this formula: 338 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 339 | # corresponding to a cache size of 2^16 = 65536 symbols. 340 | 341 | SYMBOL_CACHE_SIZE = 0 342 | 343 | # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be 344 | # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given 345 | # their name and scope. Since this can be an expensive process and often the 346 | # same symbol appear multiple times in the code, doxygen keeps a cache of 347 | # pre-resolved symbols. If the cache is too small doxygen will become slower. 348 | # If the cache is too large, memory is wasted. The cache size is given by this 349 | # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, 350 | # corresponding to a cache size of 2^16 = 65536 symbols. 351 | 352 | LOOKUP_CACHE_SIZE = 0 353 | 354 | #--------------------------------------------------------------------------- 355 | # Build related configuration options 356 | #--------------------------------------------------------------------------- 357 | 358 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 359 | # documentation are documented, even if no documentation was available. 360 | # Private class members and static file members will be hidden unless 361 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 362 | 363 | EXTRACT_ALL = NO 364 | 365 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class 366 | # will be included in the documentation. 367 | 368 | EXTRACT_PRIVATE = NO 369 | 370 | # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal 371 | # scope will be included in the documentation. 372 | 373 | EXTRACT_PACKAGE = NO 374 | 375 | # If the EXTRACT_STATIC tag is set to YES all static members of a file 376 | # will be included in the documentation. 377 | 378 | EXTRACT_STATIC = NO 379 | 380 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 381 | # defined locally in source files will be included in the documentation. 382 | # If set to NO only classes defined in header files are included. 383 | 384 | EXTRACT_LOCAL_CLASSES = YES 385 | 386 | # This flag is only useful for Objective-C code. When set to YES local 387 | # methods, which are defined in the implementation section but not in 388 | # the interface are included in the documentation. 389 | # If set to NO (the default) only methods in the interface are included. 390 | 391 | EXTRACT_LOCAL_METHODS = NO 392 | 393 | # If this flag is set to YES, the members of anonymous namespaces will be 394 | # extracted and appear in the documentation as a namespace called 395 | # 'anonymous_namespace{file}', where file will be replaced with the base 396 | # name of the file that contains the anonymous namespace. By default 397 | # anonymous namespaces are hidden. 398 | 399 | EXTRACT_ANON_NSPACES = NO 400 | 401 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 402 | # undocumented members of documented classes, files or namespaces. 403 | # If set to NO (the default) these members will be included in the 404 | # various overviews, but no documentation section is generated. 405 | # This option has no effect if EXTRACT_ALL is enabled. 406 | 407 | HIDE_UNDOC_MEMBERS = NO 408 | 409 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 410 | # undocumented classes that are normally visible in the class hierarchy. 411 | # If set to NO (the default) these classes will be included in the various 412 | # overviews. This option has no effect if EXTRACT_ALL is enabled. 413 | 414 | HIDE_UNDOC_CLASSES = YES 415 | 416 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 417 | # friend (class|struct|union) declarations. 418 | # If set to NO (the default) these declarations will be included in the 419 | # documentation. 420 | 421 | HIDE_FRIEND_COMPOUNDS = NO 422 | 423 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 424 | # documentation blocks found inside the body of a function. 425 | # If set to NO (the default) these blocks will be appended to the 426 | # function's detailed documentation block. 427 | 428 | HIDE_IN_BODY_DOCS = NO 429 | 430 | # The INTERNAL_DOCS tag determines if documentation 431 | # that is typed after a \internal command is included. If the tag is set 432 | # to NO (the default) then the documentation will be excluded. 433 | # Set it to YES to include the internal documentation. 434 | 435 | INTERNAL_DOCS = NO 436 | 437 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 438 | # file names in lower-case letters. If set to YES upper-case letters are also 439 | # allowed. This is useful if you have classes or files whose names only differ 440 | # in case and if your file system supports case sensitive file names. Windows 441 | # and Mac users are advised to set this option to NO. 442 | 443 | CASE_SENSE_NAMES = NO 444 | 445 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 446 | # will show members with their full class and namespace scopes in the 447 | # documentation. If set to YES the scope will be hidden. 448 | 449 | HIDE_SCOPE_NAMES = NO 450 | 451 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 452 | # will put a list of the files that are included by a file in the documentation 453 | # of that file. 454 | 455 | SHOW_INCLUDE_FILES = YES 456 | 457 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 458 | # will list include files with double quotes in the documentation 459 | # rather than with sharp brackets. 460 | 461 | FORCE_LOCAL_INCLUDES = NO 462 | 463 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 464 | # is inserted in the documentation for inline members. 465 | 466 | INLINE_INFO = YES 467 | 468 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 469 | # will sort the (detailed) documentation of file and class members 470 | # alphabetically by member name. If set to NO the members will appear in 471 | # declaration order. 472 | 473 | SORT_MEMBER_DOCS = YES 474 | 475 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 476 | # brief documentation of file, namespace and class members alphabetically 477 | # by member name. If set to NO (the default) the members will appear in 478 | # declaration order. 479 | 480 | SORT_BRIEF_DOCS = NO 481 | 482 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 483 | # will sort the (brief and detailed) documentation of class members so that 484 | # constructors and destructors are listed first. If set to NO (the default) 485 | # the constructors will appear in the respective orders defined by 486 | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 487 | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 488 | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. 489 | 490 | SORT_MEMBERS_CTORS_1ST = NO 491 | 492 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 493 | # hierarchy of group names into alphabetical order. If set to NO (the default) 494 | # the group names will appear in their defined order. 495 | 496 | SORT_GROUP_NAMES = NO 497 | 498 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 499 | # sorted by fully-qualified names, including namespaces. If set to 500 | # NO (the default), the class list will be sorted only by class name, 501 | # not including the namespace part. 502 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 503 | # Note: This option applies only to the class list, not to the 504 | # alphabetical list. 505 | 506 | SORT_BY_SCOPE_NAME = NO 507 | 508 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 509 | # do proper type resolution of all parameters of a function it will reject a 510 | # match between the prototype and the implementation of a member function even 511 | # if there is only one candidate or it is obvious which candidate to choose 512 | # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 513 | # will still accept a match between prototype and implementation in such cases. 514 | 515 | STRICT_PROTO_MATCHING = NO 516 | 517 | # The GENERATE_TODOLIST tag can be used to enable (YES) or 518 | # disable (NO) the todo list. This list is created by putting \todo 519 | # commands in the documentation. 520 | 521 | GENERATE_TODOLIST = YES 522 | 523 | # The GENERATE_TESTLIST tag can be used to enable (YES) or 524 | # disable (NO) the test list. This list is created by putting \test 525 | # commands in the documentation. 526 | 527 | GENERATE_TESTLIST = YES 528 | 529 | # The GENERATE_BUGLIST tag can be used to enable (YES) or 530 | # disable (NO) the bug list. This list is created by putting \bug 531 | # commands in the documentation. 532 | 533 | GENERATE_BUGLIST = YES 534 | 535 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 536 | # disable (NO) the deprecated list. This list is created by putting 537 | # \deprecated commands in the documentation. 538 | 539 | GENERATE_DEPRECATEDLIST= YES 540 | 541 | # The ENABLED_SECTIONS tag can be used to enable conditional 542 | # documentation sections, marked by \if sectionname ... \endif. 543 | 544 | ENABLED_SECTIONS = 545 | 546 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines 547 | # the initial value of a variable or macro consists of for it to appear in 548 | # the documentation. If the initializer consists of more lines than specified 549 | # here it will be hidden. Use a value of 0 to hide initializers completely. 550 | # The appearance of the initializer of individual variables and macros in the 551 | # documentation can be controlled using \showinitializer or \hideinitializer 552 | # command in the documentation regardless of this setting. 553 | 554 | MAX_INITIALIZER_LINES = 30 555 | 556 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated 557 | # at the bottom of the documentation of classes and structs. If set to YES the 558 | # list will mention the files that were used to generate the documentation. 559 | 560 | SHOW_USED_FILES = YES 561 | 562 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. 563 | # This will remove the Files entry from the Quick Index and from the 564 | # Folder Tree View (if specified). The default is YES. 565 | 566 | SHOW_FILES = YES 567 | 568 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the 569 | # Namespaces page. 570 | # This will remove the Namespaces entry from the Quick Index 571 | # and from the Folder Tree View (if specified). The default is YES. 572 | 573 | SHOW_NAMESPACES = YES 574 | 575 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 576 | # doxygen should invoke to get the current version for each file (typically from 577 | # the version control system). Doxygen will invoke the program by executing (via 578 | # popen()) the command , where is the value of 579 | # the FILE_VERSION_FILTER tag, and is the name of an input file 580 | # provided by doxygen. Whatever the program writes to standard output 581 | # is used as the file version. See the manual for examples. 582 | 583 | FILE_VERSION_FILTER = 584 | 585 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 586 | # by doxygen. The layout file controls the global structure of the generated 587 | # output files in an output format independent way. To create the layout file 588 | # that represents doxygen's defaults, run doxygen with the -l option. 589 | # You can optionally specify a file name after the option, if omitted 590 | # DoxygenLayout.xml will be used as the name of the layout file. 591 | 592 | LAYOUT_FILE = 593 | 594 | # The CITE_BIB_FILES tag can be used to specify one or more bib files 595 | # containing the references data. This must be a list of .bib files. The 596 | # .bib extension is automatically appended if omitted. Using this command 597 | # requires the bibtex tool to be installed. See also 598 | # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 599 | # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this 600 | # feature you need bibtex and perl available in the search path. 601 | 602 | CITE_BIB_FILES = 603 | 604 | #--------------------------------------------------------------------------- 605 | # configuration options related to warning and progress messages 606 | #--------------------------------------------------------------------------- 607 | 608 | # The QUIET tag can be used to turn on/off the messages that are generated 609 | # by doxygen. Possible values are YES and NO. If left blank NO is used. 610 | 611 | QUIET = NO 612 | 613 | # The WARNINGS tag can be used to turn on/off the warning messages that are 614 | # generated by doxygen. Possible values are YES and NO. If left blank 615 | # NO is used. 616 | 617 | WARNINGS = YES 618 | 619 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 620 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will 621 | # automatically be disabled. 622 | 623 | WARN_IF_UNDOCUMENTED = YES 624 | 625 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 626 | # potential errors in the documentation, such as not documenting some 627 | # parameters in a documented function, or documenting parameters that 628 | # don't exist or using markup commands wrongly. 629 | 630 | WARN_IF_DOC_ERROR = YES 631 | 632 | # The WARN_NO_PARAMDOC option can be enabled to get warnings for 633 | # functions that are documented, but have no documentation for their parameters 634 | # or return value. If set to NO (the default) doxygen will only warn about 635 | # wrong or incomplete parameter documentation, but not about the absence of 636 | # documentation. 637 | 638 | WARN_NO_PARAMDOC = NO 639 | 640 | # The WARN_FORMAT tag determines the format of the warning messages that 641 | # doxygen can produce. The string should contain the $file, $line, and $text 642 | # tags, which will be replaced by the file and line number from which the 643 | # warning originated and the warning text. Optionally the format may contain 644 | # $version, which will be replaced by the version of the file (if it could 645 | # be obtained via FILE_VERSION_FILTER) 646 | 647 | WARN_FORMAT = "$file:$line: $text" 648 | 649 | # The WARN_LOGFILE tag can be used to specify a file to which warning 650 | # and error messages should be written. If left blank the output is written 651 | # to stderr. 652 | 653 | WARN_LOGFILE = 654 | 655 | #--------------------------------------------------------------------------- 656 | # configuration options related to the input files 657 | #--------------------------------------------------------------------------- 658 | 659 | # The INPUT tag can be used to specify the files and/or directories that contain 660 | # documented source files. You may enter file names like "myfile.cpp" or 661 | # directories like "/usr/src/myproject". Separate the files or directories 662 | # with spaces. 663 | 664 | INPUT = src/qicruntime 665 | 666 | # This tag can be used to specify the character encoding of the source files 667 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 668 | # also the default input encoding. Doxygen uses libiconv (or the iconv built 669 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 670 | # the list of possible encodings. 671 | 672 | INPUT_ENCODING = UTF-8 673 | 674 | # If the value of the INPUT tag contains directories, you can use the 675 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 676 | # and *.h) to filter out the source-files in the directories. If left 677 | # blank the following patterns are tested: 678 | # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 679 | # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 680 | # *.f90 *.f *.for *.vhd *.vhdl 681 | 682 | FILE_PATTERNS = 683 | 684 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories 685 | # should be searched for input files as well. Possible values are YES and NO. 686 | # If left blank NO is used. 687 | 688 | RECURSIVE = NO 689 | 690 | # The EXCLUDE tag can be used to specify files and/or directories that should be 691 | # excluded from the INPUT source files. This way you can easily exclude a 692 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 693 | # Note that relative paths are relative to the directory from which doxygen is 694 | # run. 695 | 696 | EXCLUDE = 697 | 698 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 699 | # directories that are symbolic links (a Unix file system feature) are excluded 700 | # from the input. 701 | 702 | EXCLUDE_SYMLINKS = NO 703 | 704 | # If the value of the INPUT tag contains directories, you can use the 705 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 706 | # certain files from those directories. Note that the wildcards are matched 707 | # against the file with absolute path, so to exclude all test directories 708 | # for example use the pattern */test/* 709 | 710 | EXCLUDE_PATTERNS = 711 | 712 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 713 | # (namespaces, classes, functions, etc.) that should be excluded from the 714 | # output. The symbol name can be a fully qualified name, a word, or if the 715 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 716 | # AClass::ANamespace, ANamespace::*Test 717 | 718 | EXCLUDE_SYMBOLS = 719 | 720 | # The EXAMPLE_PATH tag can be used to specify one or more files or 721 | # directories that contain example code fragments that are included (see 722 | # the \include command). 723 | 724 | EXAMPLE_PATH = 725 | 726 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 727 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 728 | # and *.h) to filter out the source-files in the directories. If left 729 | # blank all files are included. 730 | 731 | EXAMPLE_PATTERNS = 732 | 733 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 734 | # searched for input files to be used with the \include or \dontinclude 735 | # commands irrespective of the value of the RECURSIVE tag. 736 | # Possible values are YES and NO. If left blank NO is used. 737 | 738 | EXAMPLE_RECURSIVE = NO 739 | 740 | # The IMAGE_PATH tag can be used to specify one or more files or 741 | # directories that contain image that are included in the documentation (see 742 | # the \image command). 743 | 744 | IMAGE_PATH = 745 | 746 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 747 | # invoke to filter for each input file. Doxygen will invoke the filter program 748 | # by executing (via popen()) the command , where 749 | # is the value of the INPUT_FILTER tag, and is the name of an 750 | # input file. Doxygen will then use the output that the filter program writes 751 | # to standard output. 752 | # If FILTER_PATTERNS is specified, this tag will be 753 | # ignored. 754 | 755 | INPUT_FILTER = 756 | 757 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 758 | # basis. 759 | # Doxygen will compare the file name with each pattern and apply the 760 | # filter if there is a match. 761 | # The filters are a list of the form: 762 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 763 | # info on how filters are used. If FILTER_PATTERNS is empty or if 764 | # non of the patterns match the file name, INPUT_FILTER is applied. 765 | 766 | FILTER_PATTERNS = 767 | 768 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 769 | # INPUT_FILTER) will be used to filter the input files when producing source 770 | # files to browse (i.e. when SOURCE_BROWSER is set to YES). 771 | 772 | FILTER_SOURCE_FILES = NO 773 | 774 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 775 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) 776 | # and it is also possible to disable source filtering for a specific pattern 777 | # using *.ext= (so without naming a filter). This option only has effect when 778 | # FILTER_SOURCE_FILES is enabled. 779 | 780 | FILTER_SOURCE_PATTERNS = 781 | 782 | #--------------------------------------------------------------------------- 783 | # configuration options related to source browsing 784 | #--------------------------------------------------------------------------- 785 | 786 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will 787 | # be generated. Documented entities will be cross-referenced with these sources. 788 | # Note: To get rid of all source code in the generated output, make sure also 789 | # VERBATIM_HEADERS is set to NO. 790 | 791 | SOURCE_BROWSER = NO 792 | 793 | # Setting the INLINE_SOURCES tag to YES will include the body 794 | # of functions and classes directly in the documentation. 795 | 796 | INLINE_SOURCES = NO 797 | 798 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 799 | # doxygen to hide any special comment blocks from generated source code 800 | # fragments. Normal C, C++ and Fortran comments will always remain visible. 801 | 802 | STRIP_CODE_COMMENTS = YES 803 | 804 | # If the REFERENCED_BY_RELATION tag is set to YES 805 | # then for each documented function all documented 806 | # functions referencing it will be listed. 807 | 808 | REFERENCED_BY_RELATION = NO 809 | 810 | # If the REFERENCES_RELATION tag is set to YES 811 | # then for each documented function all documented entities 812 | # called/used by that function will be listed. 813 | 814 | REFERENCES_RELATION = NO 815 | 816 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 817 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 818 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 819 | # link to the source code. 820 | # Otherwise they will link to the documentation. 821 | 822 | REFERENCES_LINK_SOURCE = YES 823 | 824 | # If the USE_HTAGS tag is set to YES then the references to source code 825 | # will point to the HTML generated by the htags(1) tool instead of doxygen 826 | # built-in source browser. The htags tool is part of GNU's global source 827 | # tagging system (see http://www.gnu.org/software/global/global.html). You 828 | # will need version 4.8.6 or higher. 829 | 830 | USE_HTAGS = NO 831 | 832 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 833 | # will generate a verbatim copy of the header file for each class for 834 | # which an include is specified. Set to NO to disable this. 835 | 836 | VERBATIM_HEADERS = YES 837 | 838 | #--------------------------------------------------------------------------- 839 | # configuration options related to the alphabetical class index 840 | #--------------------------------------------------------------------------- 841 | 842 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 843 | # of all compounds will be generated. Enable this if the project 844 | # contains a lot of classes, structs, unions or interfaces. 845 | 846 | ALPHABETICAL_INDEX = YES 847 | 848 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 849 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 850 | # in which this list will be split (can be a number in the range [1..20]) 851 | 852 | COLS_IN_ALPHA_INDEX = 5 853 | 854 | # In case all classes in a project start with a common prefix, all 855 | # classes will be put under the same header in the alphabetical index. 856 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that 857 | # should be ignored while generating the index headers. 858 | 859 | IGNORE_PREFIX = 860 | 861 | #--------------------------------------------------------------------------- 862 | # configuration options related to the HTML output 863 | #--------------------------------------------------------------------------- 864 | 865 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will 866 | # generate HTML output. 867 | 868 | GENERATE_HTML = YES 869 | 870 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 871 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 872 | # put in front of it. If left blank `html' will be used as the default path. 873 | 874 | HTML_OUTPUT = html 875 | 876 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for 877 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank 878 | # doxygen will generate files with .html extension. 879 | 880 | HTML_FILE_EXTENSION = .html 881 | 882 | # The HTML_HEADER tag can be used to specify a personal HTML header for 883 | # each generated HTML page. If it is left blank doxygen will generate a 884 | # standard header. Note that when using a custom header you are responsible 885 | # for the proper inclusion of any scripts and style sheets that doxygen 886 | # needs, which is dependent on the configuration options used. 887 | # It is advised to generate a default header using "doxygen -w html 888 | # header.html footer.html stylesheet.css YourConfigFile" and then modify 889 | # that header. Note that the header is subject to change so you typically 890 | # have to redo this when upgrading to a newer version of doxygen or when 891 | # changing the value of configuration settings such as GENERATE_TREEVIEW! 892 | 893 | HTML_HEADER = 894 | 895 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for 896 | # each generated HTML page. If it is left blank doxygen will generate a 897 | # standard footer. 898 | 899 | HTML_FOOTER = 900 | 901 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading 902 | # style sheet that is used by each HTML page. It can be used to 903 | # fine-tune the look of the HTML output. If left blank doxygen will 904 | # generate a default style sheet. Note that it is recommended to use 905 | # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this 906 | # tag will in the future become obsolete. 907 | 908 | HTML_STYLESHEET = 909 | 910 | # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional 911 | # user-defined cascading style sheet that is included after the standard 912 | # style sheets created by doxygen. Using this option one can overrule 913 | # certain style aspects. This is preferred over using HTML_STYLESHEET 914 | # since it does not replace the standard style sheet and is therefor more 915 | # robust against future updates. Doxygen will copy the style sheet file to 916 | # the output directory. 917 | 918 | HTML_EXTRA_STYLESHEET = 919 | 920 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 921 | # other source files which should be copied to the HTML output directory. Note 922 | # that these files will be copied to the base HTML output directory. Use the 923 | # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 924 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that 925 | # the files will be copied as-is; there are no commands or markers available. 926 | 927 | HTML_EXTRA_FILES = 928 | 929 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 930 | # Doxygen will adjust the colors in the style sheet and background images 931 | # according to this color. Hue is specified as an angle on a colorwheel, 932 | # see http://en.wikipedia.org/wiki/Hue for more information. 933 | # For instance the value 0 represents red, 60 is yellow, 120 is green, 934 | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 935 | # The allowed range is 0 to 359. 936 | 937 | HTML_COLORSTYLE_HUE = 220 938 | 939 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 940 | # the colors in the HTML output. For a value of 0 the output will use 941 | # grayscales only. A value of 255 will produce the most vivid colors. 942 | 943 | HTML_COLORSTYLE_SAT = 100 944 | 945 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 946 | # the luminance component of the colors in the HTML output. Values below 947 | # 100 gradually make the output lighter, whereas values above 100 make 948 | # the output darker. The value divided by 100 is the actual gamma applied, 949 | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 950 | # and 100 does not change the gamma. 951 | 952 | HTML_COLORSTYLE_GAMMA = 80 953 | 954 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 955 | # page will contain the date and time when the page was generated. Setting 956 | # this to NO can help when comparing the output of multiple runs. 957 | 958 | HTML_TIMESTAMP = YES 959 | 960 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 961 | # documentation will contain sections that can be hidden and shown after the 962 | # page has loaded. 963 | 964 | HTML_DYNAMIC_SECTIONS = NO 965 | 966 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of 967 | # entries shown in the various tree structured indices initially; the user 968 | # can expand and collapse entries dynamically later on. Doxygen will expand 969 | # the tree to such a level that at most the specified number of entries are 970 | # visible (unless a fully collapsed tree already exceeds this amount). 971 | # So setting the number of entries 1 will produce a full collapsed tree by 972 | # default. 0 is a special value representing an infinite number of entries 973 | # and will result in a full expanded tree by default. 974 | 975 | HTML_INDEX_NUM_ENTRIES = 100 976 | 977 | # If the GENERATE_DOCSET tag is set to YES, additional index files 978 | # will be generated that can be used as input for Apple's Xcode 3 979 | # integrated development environment, introduced with OSX 10.5 (Leopard). 980 | # To create a documentation set, doxygen will generate a Makefile in the 981 | # HTML output directory. Running make will produce the docset in that 982 | # directory and running "make install" will install the docset in 983 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 984 | # it at startup. 985 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 986 | # for more information. 987 | 988 | GENERATE_DOCSET = NO 989 | 990 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 991 | # feed. A documentation feed provides an umbrella under which multiple 992 | # documentation sets from a single provider (such as a company or product suite) 993 | # can be grouped. 994 | 995 | DOCSET_FEEDNAME = "Doxygen generated docs" 996 | 997 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 998 | # should uniquely identify the documentation set bundle. This should be a 999 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 1000 | # will append .docset to the name. 1001 | 1002 | DOCSET_BUNDLE_ID = org.doxygen.Project 1003 | 1004 | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely 1005 | # identify the documentation publisher. This should be a reverse domain-name 1006 | # style string, e.g. com.mycompany.MyDocSet.documentation. 1007 | 1008 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 1009 | 1010 | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. 1011 | 1012 | DOCSET_PUBLISHER_NAME = Publisher 1013 | 1014 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files 1015 | # will be generated that can be used as input for tools like the 1016 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 1017 | # of the generated HTML documentation. 1018 | 1019 | GENERATE_HTMLHELP = NO 1020 | 1021 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 1022 | # be used to specify the file name of the resulting .chm file. You 1023 | # can add a path in front of the file if the result should not be 1024 | # written to the html output directory. 1025 | 1026 | CHM_FILE = 1027 | 1028 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 1029 | # be used to specify the location (absolute path including file name) of 1030 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 1031 | # the HTML help compiler on the generated index.hhp. 1032 | 1033 | HHC_LOCATION = 1034 | 1035 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 1036 | # controls if a separate .chi index file is generated (YES) or that 1037 | # it should be included in the master .chm file (NO). 1038 | 1039 | GENERATE_CHI = NO 1040 | 1041 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 1042 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file 1043 | # content. 1044 | 1045 | CHM_INDEX_ENCODING = 1046 | 1047 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 1048 | # controls whether a binary table of contents is generated (YES) or a 1049 | # normal table of contents (NO) in the .chm file. 1050 | 1051 | BINARY_TOC = NO 1052 | 1053 | # The TOC_EXPAND flag can be set to YES to add extra items for group members 1054 | # to the contents of the HTML help documentation and to the tree view. 1055 | 1056 | TOC_EXPAND = NO 1057 | 1058 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1059 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 1060 | # that can be used as input for Qt's qhelpgenerator to generate a 1061 | # Qt Compressed Help (.qch) of the generated HTML documentation. 1062 | 1063 | GENERATE_QHP = NO 1064 | 1065 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can 1066 | # be used to specify the file name of the resulting .qch file. 1067 | # The path specified is relative to the HTML output folder. 1068 | 1069 | QCH_FILE = 1070 | 1071 | # The QHP_NAMESPACE tag specifies the namespace to use when generating 1072 | # Qt Help Project output. For more information please see 1073 | # http://doc.trolltech.com/qthelpproject.html#namespace 1074 | 1075 | QHP_NAMESPACE = org.doxygen.Project 1076 | 1077 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 1078 | # Qt Help Project output. For more information please see 1079 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders 1080 | 1081 | QHP_VIRTUAL_FOLDER = doc 1082 | 1083 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 1084 | # add. For more information please see 1085 | # http://doc.trolltech.com/qthelpproject.html#custom-filters 1086 | 1087 | QHP_CUST_FILTER_NAME = 1088 | 1089 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 1090 | # custom filter to add. For more information please see 1091 | # 1092 | # Qt Help Project / Custom Filters. 1093 | 1094 | QHP_CUST_FILTER_ATTRS = 1095 | 1096 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1097 | # project's 1098 | # filter section matches. 1099 | # 1100 | # Qt Help Project / Filter Attributes. 1101 | 1102 | QHP_SECT_FILTER_ATTRS = 1103 | 1104 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 1105 | # be used to specify the location of Qt's qhelpgenerator. 1106 | # If non-empty doxygen will try to run qhelpgenerator on the generated 1107 | # .qhp file. 1108 | 1109 | QHG_LOCATION = 1110 | 1111 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files 1112 | # will be generated, which together with the HTML files, form an Eclipse help 1113 | # plugin. To install this plugin and make it available under the help contents 1114 | # menu in Eclipse, the contents of the directory containing the HTML and XML 1115 | # files needs to be copied into the plugins directory of eclipse. The name of 1116 | # the directory within the plugins directory should be the same as 1117 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 1118 | # the help appears. 1119 | 1120 | GENERATE_ECLIPSEHELP = NO 1121 | 1122 | # A unique identifier for the eclipse help plugin. When installing the plugin 1123 | # the directory name containing the HTML and XML files should also have 1124 | # this name. 1125 | 1126 | ECLIPSE_DOC_ID = org.doxygen.Project 1127 | 1128 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 1129 | # at top of each HTML page. The value NO (the default) enables the index and 1130 | # the value YES disables it. Since the tabs have the same information as the 1131 | # navigation tree you can set this option to NO if you already set 1132 | # GENERATE_TREEVIEW to YES. 1133 | 1134 | DISABLE_INDEX = NO 1135 | 1136 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1137 | # structure should be generated to display hierarchical information. 1138 | # If the tag value is set to YES, a side panel will be generated 1139 | # containing a tree-like index structure (just like the one that 1140 | # is generated for HTML Help). For this to work a browser that supports 1141 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 1142 | # Windows users are probably better off using the HTML help feature. 1143 | # Since the tree basically has the same information as the tab index you 1144 | # could consider to set DISABLE_INDEX to NO when enabling this option. 1145 | 1146 | GENERATE_TREEVIEW = NO 1147 | 1148 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 1149 | # (range [0,1..20]) that doxygen will group on one line in the generated HTML 1150 | # documentation. Note that a value of 0 will completely suppress the enum 1151 | # values from appearing in the overview section. 1152 | 1153 | ENUM_VALUES_PER_LINE = 4 1154 | 1155 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 1156 | # used to set the initial width (in pixels) of the frame in which the tree 1157 | # is shown. 1158 | 1159 | TREEVIEW_WIDTH = 250 1160 | 1161 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 1162 | # links to external symbols imported via tag files in a separate window. 1163 | 1164 | EXT_LINKS_IN_WINDOW = NO 1165 | 1166 | # Use this tag to change the font size of Latex formulas included 1167 | # as images in the HTML documentation. The default is 10. Note that 1168 | # when you change the font size after a successful doxygen run you need 1169 | # to manually remove any form_*.png images from the HTML output directory 1170 | # to force them to be regenerated. 1171 | 1172 | FORMULA_FONTSIZE = 10 1173 | 1174 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images 1175 | # generated for formulas are transparent PNGs. Transparent PNGs are 1176 | # not supported properly for IE 6.0, but are supported on all modern browsers. 1177 | # Note that when changing this option you need to delete any form_*.png files 1178 | # in the HTML output before the changes have effect. 1179 | 1180 | FORMULA_TRANSPARENT = YES 1181 | 1182 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 1183 | # (see http://www.mathjax.org) which uses client side Javascript for the 1184 | # rendering instead of using prerendered bitmaps. Use this if you do not 1185 | # have LaTeX installed or if you want to formulas look prettier in the HTML 1186 | # output. When enabled you may also need to install MathJax separately and 1187 | # configure the path to it using the MATHJAX_RELPATH option. 1188 | 1189 | USE_MATHJAX = NO 1190 | 1191 | # When MathJax is enabled you need to specify the location relative to the 1192 | # HTML output directory using the MATHJAX_RELPATH option. The destination 1193 | # directory should contain the MathJax.js script. For instance, if the mathjax 1194 | # directory is located at the same level as the HTML output directory, then 1195 | # MATHJAX_RELPATH should be ../mathjax. The default value points to 1196 | # the MathJax Content Delivery Network so you can quickly see the result without 1197 | # installing MathJax. 1198 | # However, it is strongly recommended to install a local 1199 | # copy of MathJax from http://www.mathjax.org before deployment. 1200 | 1201 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest 1202 | 1203 | # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension 1204 | # names that should be enabled during MathJax rendering. 1205 | 1206 | MATHJAX_EXTENSIONS = 1207 | 1208 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box 1209 | # for the HTML output. The underlying search engine uses javascript 1210 | # and DHTML and should work on any modern browser. Note that when using 1211 | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 1212 | # (GENERATE_DOCSET) there is already a search function so this one should 1213 | # typically be disabled. For large projects the javascript based search engine 1214 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. 1215 | 1216 | SEARCHENGINE = YES 1217 | 1218 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be 1219 | # implemented using a PHP enabled web server instead of at the web client 1220 | # using Javascript. Doxygen will generate the search PHP script and index 1221 | # file to put on the web server. The advantage of the server 1222 | # based approach is that it scales better to large projects and allows 1223 | # full text search. The disadvantages are that it is more difficult to setup 1224 | # and does not have live searching capabilities. 1225 | 1226 | SERVER_BASED_SEARCH = NO 1227 | 1228 | #--------------------------------------------------------------------------- 1229 | # configuration options related to the LaTeX output 1230 | #--------------------------------------------------------------------------- 1231 | 1232 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 1233 | # generate Latex output. 1234 | 1235 | GENERATE_LATEX = NO 1236 | 1237 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 1238 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1239 | # put in front of it. If left blank `latex' will be used as the default path. 1240 | 1241 | LATEX_OUTPUT = latex 1242 | 1243 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 1244 | # invoked. If left blank `latex' will be used as the default command name. 1245 | # Note that when enabling USE_PDFLATEX this option is only used for 1246 | # generating bitmaps for formulas in the HTML output, but not in the 1247 | # Makefile that is written to the output directory. 1248 | 1249 | LATEX_CMD_NAME = latex 1250 | 1251 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 1252 | # generate index for LaTeX. If left blank `makeindex' will be used as the 1253 | # default command name. 1254 | 1255 | MAKEINDEX_CMD_NAME = makeindex 1256 | 1257 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 1258 | # LaTeX documents. This may be useful for small projects and may help to 1259 | # save some trees in general. 1260 | 1261 | COMPACT_LATEX = NO 1262 | 1263 | # The PAPER_TYPE tag can be used to set the paper type that is used 1264 | # by the printer. Possible values are: a4, letter, legal and 1265 | # executive. If left blank a4wide will be used. 1266 | 1267 | PAPER_TYPE = a4 1268 | 1269 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 1270 | # packages that should be included in the LaTeX output. 1271 | 1272 | EXTRA_PACKAGES = 1273 | 1274 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for 1275 | # the generated latex document. The header should contain everything until 1276 | # the first chapter. If it is left blank doxygen will generate a 1277 | # standard header. Notice: only use this tag if you know what you are doing! 1278 | 1279 | LATEX_HEADER = 1280 | 1281 | # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 1282 | # the generated latex document. The footer should contain everything after 1283 | # the last chapter. If it is left blank doxygen will generate a 1284 | # standard footer. Notice: only use this tag if you know what you are doing! 1285 | 1286 | LATEX_FOOTER = 1287 | 1288 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 1289 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will 1290 | # contain links (just like the HTML output) instead of page references 1291 | # This makes the output suitable for online browsing using a pdf viewer. 1292 | 1293 | PDF_HYPERLINKS = YES 1294 | 1295 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 1296 | # plain latex in the generated Makefile. Set this option to YES to get a 1297 | # higher quality PDF documentation. 1298 | 1299 | USE_PDFLATEX = YES 1300 | 1301 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 1302 | # command to the generated LaTeX files. This will instruct LaTeX to keep 1303 | # running if errors occur, instead of asking the user for help. 1304 | # This option is also used when generating formulas in HTML. 1305 | 1306 | LATEX_BATCHMODE = NO 1307 | 1308 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not 1309 | # include the index chapters (such as File Index, Compound Index, etc.) 1310 | # in the output. 1311 | 1312 | LATEX_HIDE_INDICES = NO 1313 | 1314 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include 1315 | # source code with syntax highlighting in the LaTeX output. 1316 | # Note that which sources are shown also depends on other settings 1317 | # such as SOURCE_BROWSER. 1318 | 1319 | LATEX_SOURCE_CODE = NO 1320 | 1321 | # The LATEX_BIB_STYLE tag can be used to specify the style to use for the 1322 | # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See 1323 | # http://en.wikipedia.org/wiki/BibTeX for more info. 1324 | 1325 | LATEX_BIB_STYLE = plain 1326 | 1327 | #--------------------------------------------------------------------------- 1328 | # configuration options related to the RTF output 1329 | #--------------------------------------------------------------------------- 1330 | 1331 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 1332 | # The RTF output is optimized for Word 97 and may not look very pretty with 1333 | # other RTF readers or editors. 1334 | 1335 | GENERATE_RTF = NO 1336 | 1337 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 1338 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1339 | # put in front of it. If left blank `rtf' will be used as the default path. 1340 | 1341 | RTF_OUTPUT = rtf 1342 | 1343 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact 1344 | # RTF documents. This may be useful for small projects and may help to 1345 | # save some trees in general. 1346 | 1347 | COMPACT_RTF = NO 1348 | 1349 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 1350 | # will contain hyperlink fields. The RTF file will 1351 | # contain links (just like the HTML output) instead of page references. 1352 | # This makes the output suitable for online browsing using WORD or other 1353 | # programs which support those fields. 1354 | # Note: wordpad (write) and others do not support links. 1355 | 1356 | RTF_HYPERLINKS = NO 1357 | 1358 | # Load style sheet definitions from file. Syntax is similar to doxygen's 1359 | # config file, i.e. a series of assignments. You only have to provide 1360 | # replacements, missing definitions are set to their default value. 1361 | 1362 | RTF_STYLESHEET_FILE = 1363 | 1364 | # Set optional variables used in the generation of an rtf document. 1365 | # Syntax is similar to doxygen's config file. 1366 | 1367 | RTF_EXTENSIONS_FILE = 1368 | 1369 | #--------------------------------------------------------------------------- 1370 | # configuration options related to the man page output 1371 | #--------------------------------------------------------------------------- 1372 | 1373 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will 1374 | # generate man pages 1375 | 1376 | GENERATE_MAN = NO 1377 | 1378 | # The MAN_OUTPUT tag is used to specify where the man pages will be put. 1379 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1380 | # put in front of it. If left blank `man' will be used as the default path. 1381 | 1382 | MAN_OUTPUT = man 1383 | 1384 | # The MAN_EXTENSION tag determines the extension that is added to 1385 | # the generated man pages (default is the subroutine's section .3) 1386 | 1387 | MAN_EXTENSION = .3 1388 | 1389 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output, 1390 | # then it will generate one additional man file for each entity 1391 | # documented in the real man page(s). These additional files 1392 | # only source the real man page, but without them the man command 1393 | # would be unable to find the correct page. The default is NO. 1394 | 1395 | MAN_LINKS = NO 1396 | 1397 | #--------------------------------------------------------------------------- 1398 | # configuration options related to the XML output 1399 | #--------------------------------------------------------------------------- 1400 | 1401 | # If the GENERATE_XML tag is set to YES Doxygen will 1402 | # generate an XML file that captures the structure of 1403 | # the code including all documentation. 1404 | 1405 | GENERATE_XML = NO 1406 | 1407 | # The XML_OUTPUT tag is used to specify where the XML pages will be put. 1408 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1409 | # put in front of it. If left blank `xml' will be used as the default path. 1410 | 1411 | XML_OUTPUT = xml 1412 | 1413 | # The XML_SCHEMA tag can be used to specify an XML schema, 1414 | # which can be used by a validating XML parser to check the 1415 | # syntax of the XML files. 1416 | 1417 | XML_SCHEMA = 1418 | 1419 | # The XML_DTD tag can be used to specify an XML DTD, 1420 | # which can be used by a validating XML parser to check the 1421 | # syntax of the XML files. 1422 | 1423 | XML_DTD = 1424 | 1425 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will 1426 | # dump the program listings (including syntax highlighting 1427 | # and cross-referencing information) to the XML output. Note that 1428 | # enabling this will significantly increase the size of the XML output. 1429 | 1430 | XML_PROGRAMLISTING = YES 1431 | 1432 | #--------------------------------------------------------------------------- 1433 | # configuration options for the AutoGen Definitions output 1434 | #--------------------------------------------------------------------------- 1435 | 1436 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 1437 | # generate an AutoGen Definitions (see autogen.sf.net) file 1438 | # that captures the structure of the code including all 1439 | # documentation. Note that this feature is still experimental 1440 | # and incomplete at the moment. 1441 | 1442 | GENERATE_AUTOGEN_DEF = NO 1443 | 1444 | #--------------------------------------------------------------------------- 1445 | # configuration options related to the Perl module output 1446 | #--------------------------------------------------------------------------- 1447 | 1448 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will 1449 | # generate a Perl module file that captures the structure of 1450 | # the code including all documentation. Note that this 1451 | # feature is still experimental and incomplete at the 1452 | # moment. 1453 | 1454 | GENERATE_PERLMOD = NO 1455 | 1456 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate 1457 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able 1458 | # to generate PDF and DVI output from the Perl module output. 1459 | 1460 | PERLMOD_LATEX = NO 1461 | 1462 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 1463 | # nicely formatted so it can be parsed by a human reader. 1464 | # This is useful 1465 | # if you want to understand what is going on. 1466 | # On the other hand, if this 1467 | # tag is set to NO the size of the Perl module output will be much smaller 1468 | # and Perl will parse it just the same. 1469 | 1470 | PERLMOD_PRETTY = YES 1471 | 1472 | # The names of the make variables in the generated doxyrules.make file 1473 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 1474 | # This is useful so different doxyrules.make files included by the same 1475 | # Makefile don't overwrite each other's variables. 1476 | 1477 | PERLMOD_MAKEVAR_PREFIX = 1478 | 1479 | #--------------------------------------------------------------------------- 1480 | # Configuration options related to the preprocessor 1481 | #--------------------------------------------------------------------------- 1482 | 1483 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 1484 | # evaluate all C-preprocessor directives found in the sources and include 1485 | # files. 1486 | 1487 | ENABLE_PREPROCESSING = YES 1488 | 1489 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 1490 | # names in the source code. If set to NO (the default) only conditional 1491 | # compilation will be performed. Macro expansion can be done in a controlled 1492 | # way by setting EXPAND_ONLY_PREDEF to YES. 1493 | 1494 | MACRO_EXPANSION = NO 1495 | 1496 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 1497 | # then the macro expansion is limited to the macros specified with the 1498 | # PREDEFINED and EXPAND_AS_DEFINED tags. 1499 | 1500 | EXPAND_ONLY_PREDEF = NO 1501 | 1502 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 1503 | # pointed to by INCLUDE_PATH will be searched when a #include is found. 1504 | 1505 | SEARCH_INCLUDES = YES 1506 | 1507 | # The INCLUDE_PATH tag can be used to specify one or more directories that 1508 | # contain include files that are not input files but should be processed by 1509 | # the preprocessor. 1510 | 1511 | INCLUDE_PATH = 1512 | 1513 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 1514 | # patterns (like *.h and *.hpp) to filter out the header-files in the 1515 | # directories. If left blank, the patterns specified with FILE_PATTERNS will 1516 | # be used. 1517 | 1518 | INCLUDE_FILE_PATTERNS = 1519 | 1520 | # The PREDEFINED tag can be used to specify one or more macro names that 1521 | # are defined before the preprocessor is started (similar to the -D option of 1522 | # gcc). The argument of the tag is a list of macros of the form: name 1523 | # or name=definition (no spaces). If the definition and the = are 1524 | # omitted =1 is assumed. To prevent a macro definition from being 1525 | # undefined via #undef or recursively expanded use the := operator 1526 | # instead of the = operator. 1527 | 1528 | PREDEFINED = 1529 | 1530 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 1531 | # this tag can be used to specify a list of macro names that should be expanded. 1532 | # The macro definition that is found in the sources will be used. 1533 | # Use the PREDEFINED tag if you want to use a different macro definition that 1534 | # overrules the definition found in the source code. 1535 | 1536 | EXPAND_AS_DEFINED = 1537 | 1538 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 1539 | # doxygen's preprocessor will remove all references to function-like macros 1540 | # that are alone on a line, have an all uppercase name, and do not end with a 1541 | # semicolon, because these will confuse the parser if not removed. 1542 | 1543 | SKIP_FUNCTION_MACROS = YES 1544 | 1545 | #--------------------------------------------------------------------------- 1546 | # Configuration::additions related to external references 1547 | #--------------------------------------------------------------------------- 1548 | 1549 | # The TAGFILES option can be used to specify one or more tagfiles. For each 1550 | # tag file the location of the external documentation should be added. The 1551 | # format of a tag file without this location is as follows: 1552 | # 1553 | # TAGFILES = file1 file2 ... 1554 | # Adding location for the tag files is done as follows: 1555 | # 1556 | # TAGFILES = file1=loc1 "file2 = loc2" ... 1557 | # where "loc1" and "loc2" can be relative or absolute paths 1558 | # or URLs. Note that each tag file must have a unique name (where the name does 1559 | # NOT include the path). If a tag file is not located in the directory in which 1560 | # doxygen is run, you must also specify the path to the tagfile here. 1561 | 1562 | TAGFILES = 1563 | 1564 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create 1565 | # a tag file that is based on the input files it reads. 1566 | 1567 | GENERATE_TAGFILE = 1568 | 1569 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed 1570 | # in the class index. If set to NO only the inherited external classes 1571 | # will be listed. 1572 | 1573 | ALLEXTERNALS = NO 1574 | 1575 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 1576 | # in the modules index. If set to NO, only the current project's groups will 1577 | # be listed. 1578 | 1579 | EXTERNAL_GROUPS = YES 1580 | 1581 | # The PERL_PATH should be the absolute path and name of the perl script 1582 | # interpreter (i.e. the result of `which perl'). 1583 | 1584 | PERL_PATH = /usr/bin/perl 1585 | 1586 | #--------------------------------------------------------------------------- 1587 | # Configuration options related to the dot tool 1588 | #--------------------------------------------------------------------------- 1589 | 1590 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 1591 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 1592 | # or super classes. Setting the tag to NO turns the diagrams off. Note that 1593 | # this option also works with HAVE_DOT disabled, but it is recommended to 1594 | # install and use dot, since it yields more powerful graphs. 1595 | 1596 | CLASS_DIAGRAMS = YES 1597 | 1598 | # You can define message sequence charts within doxygen comments using the \msc 1599 | # command. Doxygen will then run the mscgen tool (see 1600 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 1601 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where 1602 | # the mscgen tool resides. If left empty the tool is assumed to be found in the 1603 | # default search path. 1604 | 1605 | MSCGEN_PATH = 1606 | 1607 | # If set to YES, the inheritance and collaboration graphs will hide 1608 | # inheritance and usage relations if the target is undocumented 1609 | # or is not a class. 1610 | 1611 | HIDE_UNDOC_RELATIONS = YES 1612 | 1613 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 1614 | # available from the path. This tool is part of Graphviz, a graph visualization 1615 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section 1616 | # have no effect if this option is set to NO (the default) 1617 | 1618 | HAVE_DOT = NO 1619 | 1620 | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 1621 | # allowed to run in parallel. When set to 0 (the default) doxygen will 1622 | # base this on the number of processors available in the system. You can set it 1623 | # explicitly to a value larger than 0 to get control over the balance 1624 | # between CPU load and processing speed. 1625 | 1626 | DOT_NUM_THREADS = 0 1627 | 1628 | # By default doxygen will use the Helvetica font for all dot files that 1629 | # doxygen generates. When you want a differently looking font you can specify 1630 | # the font name using DOT_FONTNAME. You need to make sure dot is able to find 1631 | # the font, which can be done by putting it in a standard location or by setting 1632 | # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the 1633 | # directory containing the font. 1634 | 1635 | DOT_FONTNAME = Helvetica 1636 | 1637 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 1638 | # The default size is 10pt. 1639 | 1640 | DOT_FONTSIZE = 10 1641 | 1642 | # By default doxygen will tell dot to use the Helvetica font. 1643 | # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to 1644 | # set the path where dot can find it. 1645 | 1646 | DOT_FONTPATH = 1647 | 1648 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 1649 | # will generate a graph for each documented class showing the direct and 1650 | # indirect inheritance relations. Setting this tag to YES will force the 1651 | # CLASS_DIAGRAMS tag to NO. 1652 | 1653 | CLASS_GRAPH = YES 1654 | 1655 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 1656 | # will generate a graph for each documented class showing the direct and 1657 | # indirect implementation dependencies (inheritance, containment, and 1658 | # class references variables) of the class with other documented classes. 1659 | 1660 | COLLABORATION_GRAPH = YES 1661 | 1662 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 1663 | # will generate a graph for groups, showing the direct groups dependencies 1664 | 1665 | GROUP_GRAPHS = YES 1666 | 1667 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and 1668 | # collaboration diagrams in a style similar to the OMG's Unified Modeling 1669 | # Language. 1670 | 1671 | UML_LOOK = NO 1672 | 1673 | # If the UML_LOOK tag is enabled, the fields and methods are shown inside 1674 | # the class node. If there are many fields or methods and many nodes the 1675 | # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS 1676 | # threshold limits the number of items for each type to make the size more 1677 | # managable. Set this to 0 for no limit. Note that the threshold may be 1678 | # exceeded by 50% before the limit is enforced. 1679 | 1680 | UML_LIMIT_NUM_FIELDS = 10 1681 | 1682 | # If set to YES, the inheritance and collaboration graphs will show the 1683 | # relations between templates and their instances. 1684 | 1685 | TEMPLATE_RELATIONS = NO 1686 | 1687 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 1688 | # tags are set to YES then doxygen will generate a graph for each documented 1689 | # file showing the direct and indirect include dependencies of the file with 1690 | # other documented files. 1691 | 1692 | INCLUDE_GRAPH = YES 1693 | 1694 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 1695 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each 1696 | # documented header file showing the documented files that directly or 1697 | # indirectly include this file. 1698 | 1699 | INCLUDED_BY_GRAPH = YES 1700 | 1701 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then 1702 | # doxygen will generate a call dependency graph for every global function 1703 | # or class method. Note that enabling this option will significantly increase 1704 | # the time of a run. So in most cases it will be better to enable call graphs 1705 | # for selected functions only using the \callgraph command. 1706 | 1707 | CALL_GRAPH = NO 1708 | 1709 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 1710 | # doxygen will generate a caller dependency graph for every global function 1711 | # or class method. Note that enabling this option will significantly increase 1712 | # the time of a run. So in most cases it will be better to enable caller 1713 | # graphs for selected functions only using the \callergraph command. 1714 | 1715 | CALLER_GRAPH = NO 1716 | 1717 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 1718 | # will generate a graphical hierarchy of all classes instead of a textual one. 1719 | 1720 | GRAPHICAL_HIERARCHY = YES 1721 | 1722 | # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES 1723 | # then doxygen will show the dependencies a directory has on other directories 1724 | # in a graphical way. The dependency relations are determined by the #include 1725 | # relations between the files in the directories. 1726 | 1727 | DIRECTORY_GRAPH = YES 1728 | 1729 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 1730 | # generated by dot. Possible values are svg, png, jpg, or gif. 1731 | # If left blank png will be used. If you choose svg you need to set 1732 | # HTML_FILE_EXTENSION to xhtml in order to make the SVG files 1733 | # visible in IE 9+ (other browsers do not have this requirement). 1734 | 1735 | DOT_IMAGE_FORMAT = png 1736 | 1737 | # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to 1738 | # enable generation of interactive SVG images that allow zooming and panning. 1739 | # Note that this requires a modern browser other than Internet Explorer. 1740 | # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you 1741 | # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files 1742 | # visible. Older versions of IE do not have SVG support. 1743 | 1744 | INTERACTIVE_SVG = NO 1745 | 1746 | # The tag DOT_PATH can be used to specify the path where the dot tool can be 1747 | # found. If left blank, it is assumed the dot tool can be found in the path. 1748 | 1749 | DOT_PATH = 1750 | 1751 | # The DOTFILE_DIRS tag can be used to specify one or more directories that 1752 | # contain dot files that are included in the documentation (see the 1753 | # \dotfile command). 1754 | 1755 | DOTFILE_DIRS = 1756 | 1757 | # The MSCFILE_DIRS tag can be used to specify one or more directories that 1758 | # contain msc files that are included in the documentation (see the 1759 | # \mscfile command). 1760 | 1761 | MSCFILE_DIRS = 1762 | 1763 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 1764 | # nodes that will be shown in the graph. If the number of nodes in a graph 1765 | # becomes larger than this value, doxygen will truncate the graph, which is 1766 | # visualized by representing a node as a red box. Note that doxygen if the 1767 | # number of direct children of the root node in a graph is already larger than 1768 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 1769 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. 1770 | 1771 | DOT_GRAPH_MAX_NODES = 50 1772 | 1773 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 1774 | # graphs generated by dot. A depth value of 3 means that only nodes reachable 1775 | # from the root by following a path via at most 3 edges will be shown. Nodes 1776 | # that lay further from the root node will be omitted. Note that setting this 1777 | # option to 1 or 2 may greatly reduce the computation time needed for large 1778 | # code bases. Also note that the size of a graph can be further restricted by 1779 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. 1780 | 1781 | MAX_DOT_GRAPH_DEPTH = 0 1782 | 1783 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 1784 | # background. This is disabled by default, because dot on Windows does not 1785 | # seem to support this out of the box. Warning: Depending on the platform used, 1786 | # enabling this option may lead to badly anti-aliased labels on the edges of 1787 | # a graph (i.e. they become hard to read). 1788 | 1789 | DOT_TRANSPARENT = NO 1790 | 1791 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 1792 | # files in one run (i.e. multiple -o and -T options on the command line). This 1793 | # makes dot run faster, but since only newer versions of dot (>1.8.10) 1794 | # support this, this feature is disabled by default. 1795 | 1796 | DOT_MULTI_TARGETS = NO 1797 | 1798 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 1799 | # generate a legend page explaining the meaning of the various boxes and 1800 | # arrows in the dot generated graphs. 1801 | 1802 | GENERATE_LEGEND = YES 1803 | 1804 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 1805 | # remove the intermediate dot files that are used to generate 1806 | # the various graphs. 1807 | 1808 | DOT_CLEANUP = YES 1809 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Martin Kutny 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Qt Interactive Coding 2 | 3 | Author: [Martin Kutny](https://kutny.net/) \ 4 | License: MIT 5 | 6 | ## Summary 7 | 8 | Simple, cross-platform library to automate the process of compilation and 9 | execution of C++ code from within a running application. Allows to use C++ 10 | as a scripting language. This library is implemented using Qt and therefore 11 | is suitable for integrating with Qt projects. 12 | 13 | Possible uses: 14 | 15 | - interactive / creative / live coding 16 | - debugging, state inspection 17 | - application scripting 18 | 19 | **Dependencies:** Qt 5 (libQtCore5, qmake), C++ compiler toolchain \ 20 | **Platforms:** Windows, Linux, possibly other platforms supported by Qt 21 | 22 | ## Demo 23 | 24 | ![demo gif](demo1.gif) 25 | 26 | ## Integration 27 | 28 | The library consists of one C++ source file and a couple of headers. You can 29 | either build it as a shared or static library using `qicruntime.pro`, or copy 30 | the [code](src/qicruntime/) directly into your Qt project and include 31 | `qicruntime.pri`. 32 | 33 | ## Usage 34 | 35 | Basic example: Compiling and running C++ code at runtime. 36 | 37 | ``` c++ 38 | #include 39 | 40 | int main() 41 | { 42 | qicRuntime rt; 43 | // configure your runtime build environment 44 | rt.setIncludePath({ "/path/to/src/qicruntime" }); 45 | rt.setQmake("/path/to/qt/version/platform/bin/qmake"); 46 | 47 | const char src[] = "#include \n" 48 | "#include \n" 49 | "extern \"C\" QIC_ENTRY_EXPORT void qic_entry(qicContext *ctx) {\n" 50 | " printf(\"hello runtime!\");\n" 51 | "}\n"; 52 | 53 | rt.exec(src); 54 | 55 | return 0; 56 | } 57 | ``` 58 | 59 | For more examples, see the code in the [examples](src/examples/) directory. 60 | 61 | ## Interop 62 | 63 | To interact and exchange data with the runtime-compiled code, use *context 64 | variables*. An entire, complex application model can be shared with the runtime 65 | code this way. 66 | 67 | ``` c++ 68 | class AppModel { 69 | // This class represents the data and functionality of our application that 70 | // we want to be able to make 'scriptable'. Actually defined somewhere 71 | // in a common header or shared library, so it can be included and linked 72 | // by both the host program and the runtime-compiled code. 73 | }; 74 | 75 | int main() 76 | { 77 | AppModel model; 78 | 79 | qicRuntime rt; 80 | rt.ctx()->set(&model, "model"); 81 | 82 | rt.exec(...); 83 | } 84 | ``` 85 | 86 | In the runtime code, access the *context variable* via the `qicContext`. 87 | 88 | ``` c++ 89 | #include // possibly also link with AppModel.lib/.dll 90 | 91 | extern "C" void qic_entry(qicContext *ctx) 92 | { 93 | AppModel *const model = static_cast(ctx->get("model")); 94 | model->... // access or modify data, call methods 95 | } 96 | ``` 97 | 98 | ## Design 99 | 100 | The principle behind this library is very simple, no magic, no special tricks. 101 | Conceptually, the process is similar to how plugin systems work and boils down 102 | to 4 simple steps. 103 | 104 | 1. compile user code into a shared object (.dll) 105 | 2. dlopen() 106 | 3. entry_point = dlsym() 107 | 4. call entry_point(app_context) 108 | 109 | The purpose of this library is to automate this process in a simple and 110 | portable manner so that from the user's perspective this is a simple one-liner: 111 | 112 | ``` c++ 113 | //qicRuntime rt; 114 | rt.exec(source_code); 115 | ``` 116 | 117 | To compile the runtime code, we make use of Qt's own build system `qmake` and 118 | leverage its natural cross-platform capability. 119 | 120 | There are no restrictions on what can or cannot go into the runtime-compiled 121 | source code. The only requirement is that the code exports one C-style function 122 | that serves as the main entry point: 123 | 124 | ``` c++ 125 | extern "C" void qic_entry(qicContext *ctx); 126 | ``` 127 | 128 | The `qicContext` is a simple interface for exchange of `void*` pointers to 129 | arbitrary data between the host program and the runtime code. This is most 130 | flexible, as the user is free to use any techique for data exchange and 131 | interaction: 132 | 133 | - pointers to POD structures, 134 | - C function pointers, callbacks, 135 | - virtual base interfaces, 136 | - full C++ classes in common shared libraries, 137 | - or whatever data persistence mechanism the user comes up with. 138 | 139 | ## Things to Keep in Mind 140 | 141 | The mechanism of this library is similar to plugin systems and share the same 142 | set of behaviors the user should be aware of: 143 | 144 | 1. We are loading and executing unsafe, untested, native code. There are 145 | a million ways how to shoot yourself in the foot with this. Let’s just 146 | accept that we can bring the host program down any time. This technique 147 | is intended for development only. It should not be used in production or 148 | situations where you can’t afford to lose data. 149 | 2. Make sure that both the host program and the script code are compiled in 150 | a binary compatible manner: using the same toolchain, same build options, 151 | and if they share any libraries, be sure that both link the same version 152 | of those libraries. Failing to do so is an invitation to undefined behavior 153 | and crashes. 154 | 3. You need to be aware of object lifetime and ownership when sharing data 155 | between the host program and a script. At some point, the library that 156 | contains script code will be unloaded – its code and data unmapped from 157 | the host process address space. If the host program accesses this data or 158 | code after it has been unloaded, it will result in a segfault. Typically, 159 | a strange crash just before the program exits is indicative of an object 160 | lifetime issue. 161 | 162 | ## Resources 163 | 164 | Blog: 165 | 166 | - [My Take On Run-time Compiled C++](https://blog.kutny.net/2018/07/02/my-take-on-run-time-compiled-c/) 167 | 168 | Inspiration: 169 | 170 | 1. [Using runtime-compiled C++ code as a scripting language: under the hood](https://blog.molecular-matters.com/2014/05/10/using-runtime-compiled-c-code-as-a-scripting-language-under-the-hood/) 171 | 2. [Runtime Compiled C++](https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus) 172 | 3. [DLL Hot Reloading in Theory and Practice](http://ourmachinery.com/post/dll-hot-reloading-in-theory-and-practice/) 173 | 4. [Read-Compile-Run-Loop - a tiny REPL for C++](http://onqtam.com/programming/2018-02-12-read-compile-run-loop-a-tiny-repl-for-cpp/) 174 | 5. [A comprehensive list of projects and resources on runtime compiled C/C++](https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus/wiki/Alternatives) compiled by @dougbinks 175 | -------------------------------------------------------------------------------- /demo1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinky/qt-interactive-coding/ad5385c001117518e81a55616dd404a75ff90e82/demo1.gif -------------------------------------------------------------------------------- /src/examples/drawing/drawing-main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int main(int argc, char *argv[]) 10 | { 11 | QApplication app(argc, argv); 12 | 13 | // 14 | // Configure the build environment. 15 | // Change your base_dir as needed. 16 | // 17 | qicRuntime rt; 18 | QString base_dir = "C:/projects/qt-interactive-coding/"; 19 | rt.setIncludePath({ base_dir + "src/qicruntime", 20 | base_dir + "src/examples/drawing" }); 21 | // Our script will be using these Qt libraries. 22 | rt.setQtLibs({ "core", "gui", "widgets" }); 23 | 24 | // 25 | // We are going to watch this file and recompile and execute it whenever 26 | // it changes. 27 | // 28 | QString watched = base_dir + "src/examples/drawing/drawing-script.cpp"; 29 | 30 | // 31 | // This is our whole GUI application. 32 | // 33 | QLabel label; 34 | label.setMinimumSize(400, 300); 35 | label.setAlignment(Qt::AlignCenter); 36 | label.setWordWrap(true); 37 | label.setText("Go ahead, modify and save the watched file:\n" + watched); 38 | label.show(); 39 | 40 | // 41 | // Make the label widget available to the runtime-compiled code. 42 | // 43 | rt.ctx()->set(&label, "label"); 44 | 45 | // 46 | // Watch our "script" file and recompile and execute when changed. 47 | // 48 | rt.watchExecFile(watched, false); 49 | 50 | return app.exec(); 51 | } 52 | -------------------------------------------------------------------------------- /src/examples/drawing/drawing-script.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | QImage paint() 10 | { 11 | QImage img(160, 160, QImage::Format_RGB32); 12 | QPainter p(&img); 13 | 14 | p.setPen(Qt::NoPen); 15 | p.setBrush(QColor(0, 200, 100)); 16 | p.drawRect(0, 0, 160, 160); 17 | 18 | p.setBrush(QColor(200, 0, 0)); 19 | //p.drawRect(40, 40, 20, 20); 20 | //p.drawRect(100, 40, 20, 20); 21 | //p.drawRect(40, 100, 80, 20); 22 | 23 | return img; 24 | } 25 | 26 | extern "C" QIC_ENTRY_EXPORT void qic_entry(qicContext *ctx) 27 | { 28 | // 29 | // Get the application widget and paint something on it. 30 | // 31 | QLabel *const label = static_cast(ctx->get("label")); 32 | label->setPixmap(QPixmap::fromImage(paint())); 33 | } 34 | -------------------------------------------------------------------------------- /src/examples/drawing/drawing.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | QT += core gui widgets 4 | 5 | CONFIG += console 6 | 7 | SOURCES += \ 8 | drawing-main.cpp 9 | 10 | OTHER_FILES += \ 11 | drawing-script.cpp 12 | 13 | # library: qiccontext 14 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../qicruntime/release/ -lqicruntime 15 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../qicruntime/debug/ -lqicruntime 16 | else:unix: LIBS += -L$$OUT_PWD/../../qicruntime/ -lqicruntime 17 | 18 | INCLUDEPATH += $$PWD/../../qicruntime 19 | DEPENDPATH += $$PWD/../../qicruntime 20 | -------------------------------------------------------------------------------- /src/examples/examples.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | CONFIG = ordered 3 | 4 | SUBDIRS += repl 5 | SUBDIRS += drawing 6 | -------------------------------------------------------------------------------- /src/examples/repl/repl-main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | // 8 | // Configure the build environment. 9 | // 10 | qicRuntime rt; 11 | QString base_dir = "C:/projects/qt-interactive-coding/"; 12 | rt.setIncludePath({ base_dir + "src/qicruntime" }); 13 | //rt.setQmake("/path/to/Qt/version/platform/bin/qmake"); 14 | //rt.loadEnv(base_dir + "env3.txt"); 15 | //rt.setQtLibs({ "core" }); 16 | #ifdef QT_DEBUG 17 | // It is extremely impmortant to ensure that the runtime-compiled code 18 | // links with the same version of Qt libraries and CRT library as the host 19 | // application (i.e. QtCore5.dll vs. QtCore5d.dll). 20 | rt.setQtConfig({ "debug" }); 21 | #endif 22 | 23 | // Add some context variables. 24 | int x = 961; 25 | rt.ctx()->set(&x, "x"); 26 | 27 | QString boilerplate = "#include \n" 28 | "#include \n" 29 | "extern \"C\" QIC_ENTRY_EXPORT void qic_entry(qicContext *ctx) {\n" 30 | " %CODE%\n" 31 | "}\n"; 32 | QString code; 33 | 34 | QTextStream out(stdout); 35 | QTextStream in(stdin); 36 | 37 | out << "REPL: Type C++ code here, then type 'go' to compile and run, or 'quit' to exit." << Qt::endl; 38 | 39 | // 40 | // REPL - Well, not exactly a REPL, rather a Read-Compile-Execute-Loop. 41 | // 42 | while (true) { 43 | QString line = in.readLine(); 44 | if (line == "quit") { 45 | break; 46 | } else if (line == "clear") { 47 | code.clear(); 48 | } else if (line == "go") { 49 | QString source = boilerplate; 50 | source.replace("%CODE%", code); 51 | rt.exec(source); 52 | code.clear(); 53 | } else { 54 | code += line + "\n"; 55 | } 56 | } 57 | 58 | return 0; 59 | } 60 | -------------------------------------------------------------------------------- /src/examples/repl/repl.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | QT += core 4 | 5 | CONFIG += console 6 | 7 | SOURCES += \ 8 | repl-main.cpp 9 | 10 | # library: qiccontext 11 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../qicruntime/release/ -lqicruntime 12 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../qicruntime/debug/ -lqicruntime 13 | else:unix: LIBS += -L$$OUT_PWD/../../qicruntime/ -lqicruntime 14 | 15 | INCLUDEPATH += $$PWD/../../qicruntime 16 | DEPENDPATH += $$PWD/../../qicruntime 17 | -------------------------------------------------------------------------------- /src/qicruntime/qiccontext.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2018 Martin Kutny 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. */ 20 | 21 | #ifndef QICCONTEXT_H 22 | #define QICCONTEXT_H 23 | 24 | /** 25 | \class qicContext 26 | The qicContext pure virtual class serves as the interface for communication 27 | between the host program and the runtime-compiled code. A pointer to 28 | qicContext is passed by the runtime to qic_entry(), the main function of 29 | the runtime-compiled code. 30 | 31 | \fn qicContext::get() 32 | Retrieves an object previously stored by set(). 33 | 34 | \fn qicContext::set() 35 | Registers an object with the context. This object will be accessible to 36 | subsequent runtime-compiled code as well as to the user of qicRuntime. If 37 | \a deleter function is provided, it will be used to dispose of the object 38 | when the library that holds the code is unloaded. Never pass pointers to 39 | local variables to set(). 40 | 41 | \fn qicContext::debug() 42 | Prints a debug message. 43 | */ 44 | struct qicContext 45 | { 46 | virtual void *get(const char *name) = 0; 47 | virtual void *set(void *ptr, const char *name, void(*deleter)(void*) = nullptr) = 0; 48 | 49 | virtual void debug(const char *fmt, ...) = 0; 50 | }; 51 | 52 | #endif // QICCONTEXT_H 53 | -------------------------------------------------------------------------------- /src/qicruntime/qicentry.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2018 Martin Kutny 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. */ 20 | 21 | #ifndef QICENTRY_H 22 | #define QICENTRY_H 23 | 24 | #ifdef _MSC_VER 25 | #define QIC_ENTRY_EXPORT __declspec(dllexport) 26 | #else 27 | #define QIC_ENTRY_EXPORT 28 | #endif 29 | 30 | struct qicContext; 31 | 32 | /** 33 | \file qicentry.h 34 | 35 | \fn void qic_entry(qicContext *ctx) 36 | Entry point exported by the runtime-compiled library. The user code must 37 | define and export this function. 38 | 39 | extern "C" void qic_entry(qicContext *ctx); 40 | */ 41 | extern "C" QIC_ENTRY_EXPORT void qic_entry(qicContext *ctx); 42 | 43 | #endif // QICENTRY_H 44 | -------------------------------------------------------------------------------- /src/qicruntime/qicruntime.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2018 Martin Kutny 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. */ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include "qicruntime.h" 30 | #include "qiccontext.h" 31 | 32 | 33 | struct qicVar 34 | { 35 | void *ptr = nullptr; 36 | char *name = nullptr; 37 | void (*deleter)(void *) = nullptr; 38 | }; 39 | 40 | struct qicFrame 41 | { 42 | QLibrary *lib = nullptr; 43 | std::vector vars; 44 | }; 45 | 46 | 47 | struct qicContextImpl : public qicContext 48 | { 49 | // Stack of context frames. A frame holds the library that contains the 50 | // runtime-compiled code and any variables this code may have registered. 51 | std::vector frames; 52 | 53 | // Unload libs in destructor. 54 | bool unloadLibs = true; 55 | 56 | qicContextImpl() 57 | { 58 | // push one empty frame to hold user defined global variables 59 | frames.push_back(qicFrame()); 60 | } 61 | 62 | ~qicContextImpl() 63 | { 64 | // unload libs in reverse order 65 | for (auto fit = frames.rbegin(); fit != frames.rend(); ++fit) { 66 | // destroy lib vars in reverse order before unload 67 | for (auto vit = fit->vars.rbegin(); vit != fit->vars.rend(); ++vit) { 68 | ::free(vit->name); 69 | if (vit->deleter) { 70 | vit->deleter(vit->ptr); 71 | } 72 | } 73 | if (fit->lib) { 74 | if (unloadLibs) { 75 | fit->lib->unload(); 76 | } 77 | delete fit->lib; 78 | } 79 | } 80 | } 81 | 82 | void *get(const char *name) override 83 | { 84 | // search context frames and their variables in reverse order - most 85 | // recently set variables override previously set variables 86 | for (auto fit = frames.rbegin(); fit != frames.rend(); ++fit) { 87 | for (auto vit = fit->vars.rbegin(); vit != fit->vars.rend(); ++vit) { 88 | if (0 == ::strcmp(name, vit->name)) { 89 | return vit->ptr; 90 | } 91 | } 92 | } 93 | 94 | return nullptr; 95 | } 96 | 97 | void *set(void *ptr, const char *name, void(*deleter)(void*)) override 98 | { 99 | Q_ASSERT(frames.empty() == false); 100 | frames.back().vars.push_back({ ptr, ::_strdup(name), deleter }); 101 | return ptr; 102 | } 103 | 104 | void debug(const char *fmt, ...) override 105 | { 106 | char buff[1024]; 107 | va_list args; 108 | va_start(args, fmt); 109 | vsnprintf(buff, 1024, fmt, args); 110 | va_end(args); 111 | qDebug("%s", buff); 112 | } 113 | }; 114 | 115 | 116 | class qicRuntimePrivate 117 | { 118 | public: 119 | QTemporaryDir dir; 120 | QProcessEnvironment env; 121 | QString qmake, make; 122 | // qmake project variables 123 | QStringList defines; // DEFINES 124 | QStringList include_path; // INCLUDEPATH 125 | QStringList qtlibs; // QT 126 | QStringList qtconf; // CONFIG 127 | QStringList libs; // LIBS 128 | // additional flags 129 | bool autodebug = true; // add "debug" to CONFIG automatically 130 | 131 | QFileSystemWatcher *watcher = nullptr; 132 | 133 | qicContextImpl ctx; 134 | 135 | qicRuntimePrivate() 136 | { 137 | env = QProcessEnvironment::systemEnvironment(); 138 | 139 | qmake = "qmake"; // assume to be on PATH 140 | #ifdef Q_OS_WIN 141 | make = "nmake"; 142 | #else 143 | make = "make"; 144 | #endif 145 | } 146 | 147 | bool loadEnv(QString path) 148 | { 149 | //env.clear(); 150 | 151 | QFile f(path); 152 | if (!f.open(QIODevice::ReadOnly)) { 153 | return false; 154 | } 155 | 156 | while (!f.atEnd()) { 157 | QString line = f.readLine().trimmed(); 158 | int eq = line.indexOf(QChar('=')); 159 | if (eq < 0) continue; 160 | QString name = line.mid(0, eq); 161 | QString value = line.mid(eq+1); 162 | env.insert(name, value); 163 | } 164 | 165 | return true; 166 | } 167 | 168 | bool runProcess(QString fnlog, QString program, QStringList arguments = QStringList()) 169 | { 170 | QString fplog = dir.filePath(fnlog); 171 | QProcess proc; 172 | proc.setWorkingDirectory(dir.path()); 173 | proc.setProcessEnvironment(env); 174 | proc.setProcessChannelMode(QProcess::MergedChannels); 175 | proc.setStandardOutputFile(fplog, QProcess::Append); 176 | proc.start(program, arguments); 177 | proc.waitForFinished(); 178 | return proc.exitStatus() == QProcess::NormalExit && 179 | proc.state() == QProcess::NotRunning && 180 | proc.exitCode() == 0; 181 | } 182 | 183 | QString getLibPath() const 184 | { 185 | #ifdef Q_OS_WIN 186 | QString libn = "bin/a%1.dll"; 187 | #else 188 | QString libn = "bin/a%1"; 189 | #endif 190 | return dir.filePath(libn.arg(seq())); 191 | } 192 | 193 | int seq() const 194 | { 195 | return (int)ctx.frames.size(); 196 | } 197 | }; 198 | 199 | 200 | 201 | qicRuntime::qicRuntime(QObject *parent) : QObject(parent), 202 | p(new qicRuntimePrivate) 203 | { 204 | } 205 | 206 | qicRuntime::~qicRuntime() 207 | { 208 | delete p; 209 | } 210 | 211 | void qicRuntime::setTempDir(QString path) 212 | { 213 | p->dir = QTemporaryDir(path); 214 | } 215 | 216 | bool qicRuntime::exec(QString source) 217 | { 218 | // compile 219 | 220 | if (!compile(source)) { 221 | return false; 222 | } 223 | 224 | // load library 225 | 226 | QString lib_path = p->getLibPath(); 227 | QLibrary *lib = new QLibrary(lib_path); 228 | if (!lib->load()) { 229 | qWarning("qicRuntime: Failed to load library %s: %s", qPrintable(lib_path), qPrintable(lib->errorString())); 230 | delete lib; 231 | return false; 232 | } 233 | 234 | // resolve entry point 235 | 236 | typedef void (*qic_entry_f)(qicContext *); 237 | qic_entry_f qic_entry = (qic_entry_f) lib->resolve("qic_entry"); 238 | if (!qic_entry) { 239 | qWarning("qicRuntime: Failed to resolve qic_entry: %s", qPrintable(lib->errorString())); 240 | lib->unload(); 241 | delete lib; 242 | return false; 243 | } 244 | 245 | // add frame record 246 | 247 | qicFrame frame; 248 | frame.lib = lib; 249 | p->ctx.frames.push_back(frame); 250 | 251 | // execute 252 | 253 | qic_entry(&p->ctx); 254 | 255 | return true; 256 | } 257 | 258 | bool qicRuntime::execFile(QString filename) 259 | { 260 | QFile f(filename); 261 | if (!f.open(QIODevice::ReadOnly)) { 262 | qWarning("qicRuntime: Failed to open source file: %s", qPrintable(filename)); 263 | return false; 264 | } 265 | QTextStream t(&f); 266 | return exec(t.readAll()); 267 | } 268 | 269 | bool qicRuntime::watchExecFile(QString filename, bool execNow) 270 | { 271 | QFileInfo file(filename); 272 | if (!file.exists()) return false; 273 | 274 | QString absfn = file.canonicalFilePath(); 275 | if (absfn.isEmpty()) return false; 276 | 277 | if (p->watcher == nullptr) { 278 | p->watcher = new QFileSystemWatcher(this); 279 | QObject::connect(p->watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path){ 280 | // Small workaround, because some editors save files in a "weird" way 281 | // that actually deletes and replaces the file and this confuses the 282 | // QFileSystemWatcher, which stops watching for subsequent changes. 283 | QThread::msleep(250); 284 | p->watcher->addPath(path); 285 | 286 | execFile(path); 287 | }); 288 | } 289 | 290 | if (!p->watcher->addPath(absfn)) return false; 291 | 292 | if (execNow) { 293 | return execFile(absfn); 294 | } 295 | 296 | return true; 297 | } 298 | 299 | void qicRuntime::setEnv(QString name, QString value) 300 | { 301 | p->env.insert(name, value); 302 | } 303 | 304 | void qicRuntime::addEnv(QString name, QString value) 305 | { 306 | QString old = p->env.value(name); 307 | if (!old.isEmpty() && !value.isEmpty()) { 308 | value.append(QDir::listSeparator()); 309 | } 310 | value.append(old); 311 | p->env.insert(name, value); 312 | } 313 | 314 | bool qicRuntime::loadEnv(QString path) 315 | { 316 | return p->loadEnv(path); 317 | } 318 | 319 | void qicRuntime::setQmake(QString path) 320 | { 321 | p->qmake = path; 322 | } 323 | 324 | void qicRuntime::setMake(QString path) 325 | { 326 | p->make = path; 327 | } 328 | 329 | void qicRuntime::setDefines(QStringList defines) 330 | { 331 | p->defines = defines; 332 | } 333 | 334 | void qicRuntime::setIncludePath(QStringList dirs) 335 | { 336 | p->include_path = dirs; 337 | } 338 | 339 | void qicRuntime::setIncludeDirs(QList dirs) 340 | { 341 | QStringList paths; 342 | for (const QDir &d : dirs) { 343 | paths += d.canonicalPath(); 344 | } 345 | setIncludePath(paths); 346 | } 347 | 348 | void qicRuntime::setLibs(QStringList libs) 349 | { 350 | p->libs = libs; 351 | } 352 | 353 | void qicRuntime::setQtLibs(QStringList qtlibs) 354 | { 355 | p->qtlibs = qtlibs; 356 | } 357 | 358 | void qicRuntime::setQtConfig(QStringList qtconf) 359 | { 360 | p->qtconf = qtconf; 361 | } 362 | 363 | void qicRuntime::setAutoDebug(bool enable) 364 | { 365 | p->autodebug = enable; 366 | } 367 | 368 | void qicRuntime::setUnloadLibs(bool unload) 369 | { 370 | p->ctx.unloadLibs = unload; 371 | } 372 | 373 | qicContext *qicRuntime::ctx() 374 | { 375 | return &p->ctx; 376 | } 377 | 378 | bool qicRuntime::compile(QString src) 379 | { 380 | QElapsedTimer timer; 381 | timer.start(); 382 | 383 | if (!p->dir.isValid()) { 384 | qWarning("qicRuntime: Failed to create temp directory."); 385 | return false; 386 | } 387 | 388 | const int seq = p->seq(); 389 | 390 | QString fncpp = QString("a%1.cpp").arg(seq); 391 | QFile fcpp(p->dir.filePath(fncpp)); 392 | if (!fcpp.open(QIODevice::WriteOnly)) { 393 | qWarning("qicRuntime: Failed to create temp source file."); 394 | return false; 395 | } 396 | { 397 | QTextStream tcpp(&fcpp); 398 | tcpp << src; 399 | } 400 | fcpp.close(); 401 | 402 | QString fnlog = QString("a%1.log").arg(seq); 403 | QString fnpro = QString("a%1.pro").arg(seq); 404 | QFile fpro(p->dir.filePath(fnpro)); 405 | if (!fpro.open(QIODevice::WriteOnly)) { 406 | qWarning("qicRuntime: Failed to create temp project file."); 407 | return false; 408 | } 409 | { 410 | using Qt::endl; 411 | QTextStream tpro(&fpro); 412 | tpro << "TEMPLATE = lib" << endl; 413 | tpro << "QT = " << p->qtlibs.join(QChar(' ')) << endl; 414 | tpro << "CONFIG += " << p->qtconf.join(QChar(' ')) << endl; 415 | #ifdef QT_DEBUG 416 | if (p->autodebug) { 417 | tpro << "CONFIG += debug" << endl; 418 | } 419 | #endif 420 | tpro << "DESTDIR = bin" << endl; 421 | tpro << "SOURCES = " << fncpp << endl; 422 | for (const QString &def: p->defines) { 423 | tpro << "DEFINES += " << def << endl; 424 | } 425 | for (const QString &inc : p->include_path) { 426 | tpro << "INCLUDEPATH += " << inc << endl; 427 | } 428 | for (const QString &lib : p->libs) { 429 | tpro << "LIBS += " << lib << endl; 430 | } 431 | } 432 | fpro.close(); 433 | 434 | // for (QString k : p->env.keys()) { 435 | // QString v = p->env.value(k); 436 | // qDebug("[env] %s=%s", qPrintable(k), qPrintable(v)); 437 | // } 438 | 439 | if (!p->runProcess(fnlog, p->qmake, { fnpro })) { 440 | qWarning("qicRuntime: Failed to generate Makefile. See log: %s", qPrintable(fnlog)); 441 | return false; 442 | } 443 | 444 | if (!p->runProcess(fnlog, p->make)) { 445 | qWarning("qicRuntime: Build failed. See log: %s", qPrintable(fnlog)); 446 | return false; 447 | } 448 | 449 | qDebug("qicRuntime: Build finished in %g seconds.", (timer.elapsed() / 1000.0)); 450 | return true; 451 | } 452 | -------------------------------------------------------------------------------- /src/qicruntime/qicruntime.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2018 Martin Kutny 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. */ 20 | 21 | #ifndef QICRUNTIME_H 22 | #define QICRUNTIME_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #ifdef QIC_STATIC 29 | # define QIC_EXPORT 30 | #else 31 | # if defined QIC_DLL 32 | # define QIC_EXPORT Q_DECL_EXPORT 33 | # else 34 | # define QIC_EXPORT Q_DECL_IMPORT 35 | # endif 36 | #endif 37 | 38 | class qicRuntimePrivate; 39 | 40 | struct qicContext; 41 | 42 | class QIODevice; 43 | 44 | /** 45 | \class qicRuntime 46 | The qicRuntime class provides the runtime build and execution environment. 47 | 48 | The exec() method takes a piece of self-contained C++ source code, wraps it 49 | in a shared library `qmake` project and builds it using the installed C++ 50 | toolchain and Qt SDK. The source code must define and export the 51 | qic_entry() function. Upon successful compilation of this code into a 52 | shared library, this library is loaded, and the qic_entry() function is 53 | resolved and called. 54 | 55 | The ctx() method returns the qicContext object for exchange of data with 56 | the runtime-compiled code. 57 | 58 | Use the various setters to control the build environment. You can override 59 | environment variables, path to the `qmake` and `make` programs, add defines, 60 | include paths and linked libraries. By default, the compiled library does 61 | not link with Qt. You can override and link with Qt libraries using 62 | setQtLibs(). Use setQtConfig() to configure additional build options. 63 | 64 | \fn qicRuntime::qicRuntime() 65 | Constructs a default build and runtime environment. Environment variables 66 | are inherited from the parent process. The `qmake` and `make` (or `nmake` 67 | on Windows) utilities are expected to be on PATH. 68 | 69 | \fn qicRuntime::~qicRuntime() 70 | Destroys the runtime environment. Destroys all objects registered by the 71 | runtime-compiled code via qicContext::set() and unloads all libraries in 72 | reverse order. 73 | 74 | \fn qicRuntime::setTempDir() 75 | Sets the temporary working directory for the build output, generated 76 | intermediate files and log files. The directory is automatically deleted in 77 | the destructor. The default temporary directory location is system specific. 78 | 79 | \fn qicRuntime::exec() 80 | Compiles and executes the provided C++ code. This method is blocking and 81 | returns only after the build process completes and the qic_entry() function 82 | returns. 83 | 84 | \fn qicRuntime::execFile() 85 | Same as exec() except the source code is read from the \a filename. 86 | 87 | \fn qicRuntime::watchExecFile() 88 | Watches a file and calls execFile() each time the file is changed. 89 | 90 | \fn qicRuntime::setEnv() 91 | Sets an environment variable for the build process. 92 | 93 | \fn qicRuntime::addEnv() 94 | Appends an environment variable, using the system's native path delimiter. 95 | Useful for appending the PATH env variable. 96 | 97 | \fn qicRuntime::loadEnv() 98 | Sets one or more environment variables loaded from a file. Useful for 99 | configuring a complete build environment. 100 | 101 | \fn qicRuntime::setQmake() 102 | Sets the path to the `qmake` utility. Useful when multiple installations 103 | of the Qt SDK are present. 104 | 105 | \fn qicRuntime::setMake() 106 | Sets the path to the `make` utility, or `nmake` on Windows. 107 | 108 | \fn qicRuntime::setDefines() 109 | Sets the content of the **DEFINES** `qmake` variable. 110 | 111 | \fn qicRuntime::setIncludePath() 112 | Sets the content of the **INCLUDEPATH** `qmake` variable. 113 | 114 | \fn qicRuntime::setIncludeDirs() 115 | Sets the content of the **INCLUDEPATH** `qmake` variable. Converts QDir 116 | to canonical path. 117 | 118 | \fn qicRuntime::setLibs() 119 | Sets the content of the **LIBS** `qmake` variable. 120 | 121 | \fn qicRuntime::setQtLibs() 122 | Sets the content of the **QT** `qmake` variable. This controls which Qt 123 | libraries will be linked with the binary. By default Qt is not linked. 124 | 125 | \fn qicRuntime::setQtConfig() 126 | Sets the content of the **CONFIG** `qmake` variable. This is used to 127 | control build options such as debug/release, rtti, exceptions, etc. If the 128 | host application is compiled using `CONFIG=debug`, make sure, the runtime 129 | code is also compiled with the same option. Otherwise the host application 130 | and the runtime code will be linked with different Qt libraries and 131 | different versions of the CRT runtime which will cause unpredictable fatal 132 | errors. 133 | 134 | \fn qicRuntime::setAutoDebug() 135 | Adds the "debug" option to **CONFIG** `qmake` variable automatically if 136 | qic Runtime was compiled in debug mode, i.e. `QT_DEBUG` macro was defined. 137 | This is enabled by default. 138 | 139 | \fn qicRuntime::setUnloadLibs() 140 | If set to `true`, dynamically loaded libs will be unloaded in the 141 | destructor. Otherwise, libs that contain runtime-compiled code will remain 142 | loaded until the parent process exits. Not unloading libs may prevent some 143 | lifetime errors, e.g. when code mapped to the lib needs to be executed after 144 | qicRuntime was destroyed. This happens if objects created from inside the 145 | runtime-compiled code outlive the qicRuntime. 146 | This is initially set to `true`. 147 | 148 | \fn qicRuntime::ctx() 149 | Returns pointer to qicContext that can be used to share data with the 150 | runtime code. 151 | */ 152 | class QIC_EXPORT qicRuntime : public QObject 153 | { 154 | public: 155 | qicRuntime(QObject *parent = nullptr); 156 | ~qicRuntime(); 157 | 158 | // properties 159 | 160 | void setTempDir(QString path); 161 | 162 | // compile and execute code 163 | 164 | bool exec(QString source); 165 | bool execFile(QString filename); 166 | bool watchExecFile(QString filename, bool execNow = true); 167 | 168 | // build environment 169 | 170 | void setEnv(QString name, QString value); 171 | void addEnv(QString name, QString value); 172 | bool loadEnv(QString path); 173 | void setQmake(QString path); 174 | void setMake(QString path); 175 | void setDefines(QStringList defines); 176 | void setIncludePath(QStringList dirs); 177 | void setIncludeDirs(QList dirs); 178 | void setLibs(QStringList libs); 179 | void setQtLibs(QStringList qtlibs); 180 | void setQtConfig(QStringList qtconf); 181 | void setAutoDebug(bool enable); 182 | void setUnloadLibs(bool unload); 183 | 184 | // runtime env 185 | 186 | qicContext *ctx(); 187 | 188 | private: 189 | bool compile(QString src); 190 | 191 | private: 192 | qicRuntimePrivate *p; 193 | }; 194 | 195 | #endif // QICRUNTIME_H 196 | -------------------------------------------------------------------------------- /src/qicruntime/qicruntime.pri: -------------------------------------------------------------------------------- 1 | HEADERS += \ 2 | $$PWD/qiccontext.h \ 3 | $$PWD/qicentry.h \ 4 | $$PWD/qicruntime.h 5 | 6 | SOURCES += \ 7 | $$PWD/qicruntime.cpp 8 | -------------------------------------------------------------------------------- /src/qicruntime/qicruntime.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = lib 2 | 3 | QT += core 4 | 5 | include(qicruntime.pri) 6 | 7 | DEFINES += QIC_DLL 8 | -------------------------------------------------------------------------------- /src/qt-interactive-coding.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | CONFIG = ordered 3 | 4 | SUBDIRS += qicruntime 5 | SUBDIRS += examples 6 | --------------------------------------------------------------------------------