Compare commits

..
223 Commits
Author SHA1 Message Date
malte_langkabel 899138a6bd data: performance optimization NameHierarchy
* For performance reasons nodes now store a serialized version of their name hierarchy directly. Removed NameHierarchy table from database.
2016-01-05 16:42:29 +01:00
Eberhard Graether 6f083a10ac src: improvements to logging
* log messages as they are sent and received
* log information about messages by overriding method print()
* reduced logging of autocompletion list
* removed log location from message and parsing logs, as they are known and make up 90% of logs
2016-01-04 16:06:32 +01:00
malte_langkabel f44b76936d build: cmake fix
* removed parser files from the app target since they are already compiled into the parser_lib which is linked to the app target.
2016-01-04 15:22:15 +01:00
Eberhard Graether 94e3058e38 ui: Added shortcut to font size resetting 2016-01-04 11:34:20 +01:00
Manuel Dobusch 958dad1d59 logic: vs plugin solution utility
Utility class to get list of files in a vs solution in the plugin.
2015-12-30 01:06:15 +01:00
Manuel Dobusch 5af8d0f03f ui: graph toggle button number position
Improved the position of the small number in the graph node toggle button for windows.
2015-12-30 00:21:38 +01:00
Manuel Dobusch afc2d1e6b5 ui: windows start menu shortcut
Fixed an issue with the start menu shortcut generated when installing on windows.
2015-12-27 18:45:05 +01:00
malte_langkabel bed0f8f157 logic: c language support
* re-added gui for c project setup
* ASTVisitor now visits RecordDecls instead of CXXRecordDecls
* prevented endless recursion when parsing struct that is defined in functions signature.
2015-12-18 16:27:49 +01:00
Eberhard Graether 5c0493267c ui: Added option for hiding dock widge title bars to view menu 2015-12-17 14:28:47 +01:00
malte_langkabel b6beab8283 logic: fixed locations in macro
* fixed a bug where the end of source locations contained in a macro was not calculated correctly.
2015-12-17 14:14:03 +01:00
Eberhard Graether 32cc49b0fd refactor: Define tooltip style in single css file and pass it to QApplication 2015-12-17 13:45:02 +01:00
Eberhard Graether b107fd2655 ui: Fixed activation of unparsed file with errors not showing anything 2015-12-17 13:23:45 +01:00
Eberhard Graether dd119fe12c script: fixed Mac OS bundle script 2015-12-17 12:00:51 +01:00
Eberhard Graether b58778da0c resources: Added new changelog 2015-12-17 11:41:43 +01:00
Eberhard Graether f725dc1866 ui: use green for comments in bright scheme for better readability 2015-12-16 17:18:55 +01:00
Manuel Dobusch 8a1914182f ui: disabled language selection
Disabled language selection because parsing C code caused crashes.
2015-12-16 16:58:40 +01:00
malte_langkabel d5cf4b7109 logic: improved template argument parsing
* improved the way of gettig a TemplateSpecializationTypeLoc from any TypeLoc to parse template arguments.
* fixed wrong forward mouse button code in app settings.
2015-12-16 16:36:36 +01:00
Eberhard Graether 82a16341d8 ui: renamed undo&redo to back&forward, control back&forward via mouse and backspace
* the key codes for mouse back and forward buttons can be defined in the ApplicationSettings
* fixed only left mouse button allowed for graph interactions
2015-12-16 16:22:10 +01:00
malte_langkabel 103c8242f5 logic: fixed template argument parsing crash
* handled case when clang doesn't know the source info of an explicitly specified template argument :(
2015-12-16 13:27:00 +01:00
Eberhard Graether f06bb0e031 logic: Fixed log warnings of color scheme and edge
* fixed warnings for overriden node and edge colors
* fixed warnings for edges connecting the wrong node types
* removed tool tip from color scheme
* changed names in project setup screen
2015-12-16 11:33:59 +01:00
malte_langkabel a44af51122 data: function signature handling
* functions will only display their names in the graph view. hovering the nodes shows the signature as a tooltip. However, nodes in the database will be created and used regarding their signature.
* improved lambda handling. All calls to generated lambda functions (constructor, call operator) will now point to the lambda class instead.
* implemented handling of the "auto" type.
* improved the CxxParserTestSuite to use function strings instead of function names for template related functions.
2015-12-16 11:27:29 +01:00
Manuel Dobusch 28c1a0048b ui: windows setup prerequisit
Added windows prerequisit to installer project. This prompts the user to download and install prerequisit automatically.
2015-12-14 18:24:17 +01:00
malte_langkabel 3000b88bd3 test: fixed tests
* changed the tests to reflect the changes to source location parsing in commit 26203c4ac8
2015-12-14 17:21:38 +01:00
malte_langkabel 6b750de333 data: anonymous unions
* fixed crashes that occurred when parsing unnamed unions.
2015-12-14 17:12:19 +01:00
Eberhard Graether 7b6c83d441 ui: use bright tooptips in every color scheme because it can't be changed on Windows 2015-12-14 11:32:25 +01:00
Eberhard Graether e8dda6acbe logic: Fixed db refreshed when opening with existing db 2015-12-14 11:21:03 +01:00
Eberhard Graether ff3377161b ui: Improved spacing of children within function and method nodes 2015-12-14 10:11:48 +01:00
Eberhard Graether 1ddc4609e4 build: fixed trial project
* fixed boost dependency
* fixed TaskParseCXX of trial to initialize correctly
2015-12-13 05:18:40 +01:00
Eberhard Graether 801c2555bc src: fixed clang warnings 2015-12-13 04:48:04 +01:00
Eberhard Graether 87ad243f31 logic: Fixed crash when refreshing project after deleting coatidb 2015-12-13 04:32:59 +01:00
Eberhard Graether 26203c4ac8 data: Fixes for parsing Coati
* reverted to old source location retrieval for CxxConstructExpr, because source locations were outside file
* removed exisiting source location check for better performance
* fixed CXXParserTestSuite to use c++11 standard
* fixed crash on missing signature retrieval
2015-12-12 15:14:44 +01:00
Eberhard Graether cd4c0e64b4 data: Fixed language std not added to parser arguments 2015-12-11 19:15:37 +01:00
Eberhard Graether ceea7b6b48 build: Added app name to plist of Mac bundle 2015-12-11 18:10:07 +01:00
Manuel Dobusch 0f4e49477a ui: language standard options
Added some language standard options.

<description>
2015-12-11 15:22:28 +01:00
malte_langkabel 52352baa8e data: fix anonymous record crash
* implemented handling of anonymous classes and structs.
2015-12-11 12:27:38 +01:00
malte_langkabel 3da20e3e32 data: location crash fix
* fixed a crash that occurred when trying to find the correct location of a constructor call.
* refactored that code while being at it ;)
2015-12-10 18:59:49 +01:00
malte_langkabel 01bcf7266b data: lambda handling
* implemented handling lambdas as functions
* functions can have child nodes now
* NameElements in NameHierarchy can have signatures now.
* fixed crash that occurred when message listener was used while being half way through its destruction process.
2015-12-10 18:00:54 +01:00
Manuel Dobusch 2b03215ea4 ui: language standard
Added language standard select functionality to gui and language standard to project settings.
2015-12-09 19:54:13 +01:00
Andreas Stallinger c5077e1db1 build: missing boost include in cmakelists 2015-12-09 16:24:04 +01:00
Andreas Stallinger 59d6143fbf build: lib for the parser
lib_parser is new, its use by app and test

<description>
2015-12-09 14:34:14 +01:00
Andreas Stallinger a6648cafeb ui: different ui for trial and app 2015-12-09 13:00:39 +01:00
Andreas Stallinger 43409cd6b7 build: trial version target
builds now app and trail target, lib_gui added, istrail function
2015-12-08 17:55:12 +01:00
malte_langkabel ed4b6546f0 logic: template argument handling
* now Coati will also parse the body of an instantiated template function and follow calls to other template functions there.
* Coati will parse template arguments at the point of implicit or explicit template instantiation and explicit template specialization.
* refactored template handling in storage.
2015-12-08 10:29:21 +01:00
Eberhard Graether faa79e44f1 ui: added help texts to directory list boxes
* added a ? button to the labels of the directory list boxes to show help messages
* added a window stack to QtMainWindow for easier screen handling
* added a button to the preferences in the project setup
* removed 'has seen settings' flag from AppSettings
2015-12-03 19:09:42 +01:00
malte_langkabel 32db79a675 logic: fix infinite loop
* fixed a loop that might be running indefinitely while looking for the correct source location of an identifier.
2015-12-03 16:26:00 +01:00
Eberhard Graether 0424162acb ui: removed close window action from menu because it quits the application 2015-12-03 14:50:40 +01:00
malte_langkabel 151b4d8620 logic: fixed crash when calling message listeners that already have been destroyed
* prevented lambda created by MessageQueue::sendMessageAsTask to call functions on message listeners that already have been destroyed.
2015-12-03 13:54:47 +01:00
malte_langkabel 23909058c8 logic: fixed infinite loop
* fixed infinite loop that occurred when trying to find the source location of an unnamed template parameter.
* commented out the deploy settings define.
2015-12-02 16:38:06 +01:00
Eberhard Graether 3fac5e69f3 data: Fixed constructors and destructurs having return type use void without location 2015-12-02 16:24:37 +01:00
Eberhard Graether 1eb9b194ff ui: immediatly show all errors during parsing 2015-12-02 16:09:48 +01:00
Eberhard Graether 35b5e423da utility: creating directories with boost in FileSystem method 2015-12-02 15:23:27 +01:00
Eberhard Graether 7d0b3773e7 ui: Fixed font zoom not affecting graph 2015-12-02 15:12:42 +01:00
Manuel Dobusch 9ed8dd69c7 ui: windows uninstall
Added uninstall script
2015-12-02 14:57:38 +01:00
Eberhard Graether fb7113917d ui: updated about window 2015-12-02 14:52:54 +01:00
Manuel Dobusch 04196db81d ui: windows installer
Created a windows installer (vs deployment project).
2015-12-02 14:50:02 +01:00
Eberhard Graether 09bc453fb0 logic: Fixed graph view style settings not loaded correctly when project has errors 2015-12-01 15:12:04 +01:00
Andreas Stallinger 77466bb57e utility: Fileendings for DB and Settings changed
changed DB from .sqlite to .coatidb and Projectsettings from .xml to .coatiproject
2015-11-30 16:02:05 +01:00
Andreas Stallinger bfaceceb29 build: remove Coati folder from linux package
removed the coati folder in Coati-<version> folder, was one folder too much
2015-11-27 15:05:14 +01:00
Eberhard Graether 9af08f4ff1 ui: Fixed font size in graph smaller on non MacOS systems 2015-11-26 00:13:58 +01:00
Eberhard Graether 6d8f733962 ui: show signature in function & method tooltip 2015-11-25 16:48:26 +01:00
malte_langkabel 622972cd28 logic: Template Parameter Packs
* implemented handling of template parameter packs.
* added tests for these cases.
* refactored some areas of the template code.
* fixed the names of template arguments that get parsed when they occur in a function's/declarator's body.
2015-11-25 15:43:59 +01:00
Eberhard Graether f29a966504 ui: fixed syntax highlighting
* fixed strings and number highlights within comments
* fixed quotations not considering escaped quotations within strings
* fixed quotations spanning till last quotation in line
* fixed tag quotations only used after blank space
* fixed multiline comments using correct start and end
* fixed single line comments interfering with multiline comments
2015-11-25 14:05:03 +01:00
malte_langkabel 0144c44d1d data: Fix Locations of Declarations
* using clang's lexer to get the exact location of a declaration's identifier.
2015-11-24 14:09:17 +01:00
Andreas Stallinger a5f08d0946 ui: fix for loop warning
replaced int with size_t
2015-11-24 11:00:58 +01:00
Manuel Dobusch 057ab57a42 logic: vs plugin bug
Error handling for plugin bug where the client socket is disposed when it's still needed.
2015-11-23 15:41:26 +01:00
Eberhard Graether fa7c8d8b40 ui: use icons in directory list box UI 2015-11-23 14:01:56 +01:00
malte_langkabel 96d933633f ui: Show Template Definition
* Show template definition in codeview when implicite specialization is active.
2015-11-20 15:38:35 +01:00
Eberhard Graether f5f4eed509 ui: extended color scheme and added new color scheme bad_rainbow
* added color scheme template
* define fill, border, text, icon and hatching colors for each node with states normal and focus
* define colors for each edge with states normal and focus
* use default node and edge colors when no type specific ones are defined
* use normal colors for nodes and edges when no focused are defined
* allow nodes and edges to imitate look of others with "like" tag
* added style for bundle
* added style for count circle
2015-11-20 15:24:20 +01:00
malte_langkabel 9f0df1bcee src: Handling of Anonymous Enums
* names of anonymous enums are constructed like names of anonymous namespaces.
2015-11-20 14:15:24 +01:00
malte_langkabel c40dda07f8 src: Fix Annotations after Snippet Merge
* snippet::merge does not take code from TextAccess since it could be out of date. Instead it takes the code from the snippets that will be merged.
2015-11-20 12:02:33 +01:00
malte_langkabel bbf9c43909 src: Template Argument Handling
* improved handling of template arguments
2015-11-19 16:30:59 +01:00
Eberhard Graether 4e6fdaf79c setup: improved MacOSX bundle script to do all the release work 2015-11-19 10:29:52 +01:00
Eberhard Graether 19b4d152c7 resources: updated manual and added changelog to README 2015-11-19 09:37:27 +01:00
malte_langkabel 9da116ddcf logic: Parsing Field Initializations
* extended use of ASTBodyVisitor methods for visiting VarDecls to include FieldDecls as well (part of C++ 11).
* impemented handling of invalid source location in ASTVisitor to prevent crash.
2015-11-18 19:44:30 +01:00
Manuel Dobusch fbc5f7a7fe logic: network port option
Added options to Coati and VS plugin to set network ports
2015-11-18 17:08:05 +01:00
malte_langkabel ea04dc926f script: windows packaging script updates
* changed the name of the folder that gets packaged.
* added some [y/N] questions.
2015-11-18 14:56:40 +01:00
Eberhard Graether 816be7b654 ui: undefined symbols bundle needs at least 2 nodes 2015-11-18 13:22:57 +01:00
malte_langkabel 901fa1a387 data: template argument handling
* storing template argument relations for cases where at lease one of these (template class, template argument) is defined inside the parsed project files.
* prevented storage from saving the same source location multiple times.
2015-11-17 18:09:20 +01:00
Andreas Stallinger 88b94a21d0 build: linux package
linux package
2015-11-17 16:41:49 +01:00
malte_langkabel 102bc8945a test: comment parsing
added tests for comment parsing.
2015-11-17 14:03:56 +01:00
Andreas Stallinger 86f06c9f78 ui: recent projects menu fix
recent projects updates now when a projects is loaded
2015-11-17 12:13:48 +01:00
malte_langkabel 42afbce300 resources: Tutorial Project Improvements
* implemented "user study" feedback
2015-11-17 10:54:56 +01:00
malte_langkabel 8f0213e18c build: Packaging Script for Windows
* added packaging script for windows
* renamed sublime plugin.
* added tictactoe project to packages projects
2015-11-16 15:42:23 +01:00
Andreas Stallinger fc816240cb ui: Recent projects in menu
add a recent projects menu in the project menu
2015-11-13 22:53:37 +01:00
malte_langkabel 7fce4cfae6 resources: Tutorial Project
* added tutorial project to coati projects.
* ignoring all .sqlite files for git.
2015-11-13 18:55:10 +01:00
Eberhard Graether 3c2804797a logic: improvements for IDE communication
* fixed Sublime Text plugin to correctly send messages
* activate and focus Coati window when receiving a message
* extended lookup range for activate token message from plugin
2015-11-13 13:09:22 +01:00
Eberhard Graether df7c5ea9b7 ui: code view scrolls directly to active line
This change makes the code view first look for the rect of the first active line and then tries to scroll this line into
the middle of the view.
2015-11-13 10:39:30 +01:00
Eberhard Graether de4f2973bc ui: Fixed search query without node disappears when submiting search request 2015-11-12 13:45:57 +01:00
Eberhard Graether 00b74d2f30 ui: focusing multiple tokens at once
This change focuses all token locations underneath the cursor at once by extending the focus handling to use vectors.
2015-11-12 10:14:46 +01:00
Eberhard Graether 28e3880e10 ui: Fixed cursor jumping to end position when editing search query 2015-11-11 15:13:48 +01:00
Eberhard Graether 42aa99d99b ui: reworked code view highlighting
This change draws the annotations in the code view in the paintEvent handler instead of using the ExtraSelections API.
Annotations are now drawn with a slight corner radius. Fill and border colors are defined in the ColorScheme.
2015-11-11 15:02:23 +01:00
Eberhard Graether 3351e4aad7 data: fixed parsing problems
* fixed calleeDecl pointer not checked for CallExpr
* fixed CommentHandler not checking if valid file in FileRegister
2015-11-10 10:25:47 +01:00
Andreas Stallinger 5ef9ef9e7d build: publish and sync script modification
now you can pass a branch to the publish and sync script to sync or publish to another branch  then master
2015-11-10 10:11:50 +01:00
Andreas Stallinger a4c134ebe2 src: fix clang warnings in QtCodeArea 2015-11-09 15:32:42 +01:00
Manuel Dobusch f2a202c064 logic: vs focus
Setting cursor in VS via Coati now sets the focus to the VS window.
2015-11-09 13:59:55 +01:00
Eberhard Graether 372f262204 data: don't parse lambda calls to avoid subnodes within functions 2015-11-06 14:50:25 +01:00
malte_langkabel 50bc970c30 data, ui: comment handling
* CodeView displays comments as atomic regions. They are either displayed as a whole or not at all. Do nothing halfway!
* added CommentHandler that handles comments detected by clang.
* stored CommentLocations in database.
2015-11-06 14:03:20 +01:00
Manuel Dobusch e186eefdff ui: context menu
Context menu for code view added, including option to set IDE cursor.
2015-11-04 18:51:49 +01:00
Eberhard Graether bcbeacb951 utility: Fixed crash when creating Timepoint with empty string 2015-11-04 15:12:35 +01:00
Eberhard Graether 961d0fe541 ui: clearing data in ProjectSetupScreen after creating new project 2015-11-04 14:14:20 +01:00
Eberhard Graether 5dada05bc5 data: saving macro definition scopes 2015-11-04 13:47:33 +01:00
Eberhard Graether 884e42a30c test: fixed TestSettings.xml and cleansed test_log.txt 2015-11-04 13:02:35 +01:00
Eberhard Graether 9f684ad9f5 data: saving errors to Storage
* saving errors in separate sqlite table
* use MessageShowErrors to show the errors in the UI
* show error count permanently in the right side of the status bar with click to show
* fixed clicking of error locations
* fixed expanding of files with errors
2015-11-04 12:00:28 +01:00
malte_langkabel 78259c7123 src: refactoring TimePoint
* removed typedef utility::TimePoint and replaced all its usages by using the class TimePoint instead.
2015-11-03 16:48:55 +01:00
Manuel Dobusch 7d03166282 logic: VS plugin fixes
Fixed some vs plugin issues and added plugin project to repo
2015-11-03 15:26:47 +01:00
malte_langkabel 006e73ef4c ui: horizontal scroll fix
* prevented the mouse wheel from scrolling a horizontal scrollbar when the mouse happens to enter the scrollbar's area.
2015-11-03 12:40:03 +01:00
malte_langkabel 11147e982f test: template scope fixes
* changed expected scope locations of template classes in tests to include template parameters.
2015-11-03 11:11:20 +01:00
malte_langkabel 9c4dc7b71f src: Sublime Text 3 compatibility. 2015-11-03 10:53:14 +01:00
malte_langkabel a524a7a71c ui: file not up to date display
* the codeview now displays a hatched background for a filename when the file's content has changed or the file does not exist anymore.
* added TimePoint class to encapsulate boost.
2015-11-03 10:29:29 +01:00
Eberhard Graether 42ab36fbad data: Saving application version to storage and refresh when version changes
The version string of the application is stored on every parse. The utility class Version is used to parse the version
string and compare application and stored string. The third number in the version string is now the storage refresh
number, the project will be refreshed when it changes. (0.2.1 -> 0.2.2)
2015-11-02 10:14:03 +01:00
malte_langkabel 1ad2dbe86e ui: status messages for IDE communication
* added status messages that are displayed when sending commands to the IDE.
* added status messages that are displayed when receiving commands from the IDE.
2015-10-30 11:34:28 +01:00
malte_langkabel e8c8a4ca50 logic: sublime plugin fix
* implemted checking if file really exists before letting sublime jump there.
2015-10-30 10:54:56 +01:00
Andreas Stallinger 58daa633c9 data: check for nullptr in searchindex 2015-10-29 13:33:12 +01:00
malte_langkabel a7ad0a60f3 ui: coati plugin for sublime
* Added first version of the CoatiCommunicator for Sublime.
* This version has only been tested with Sublime Text 2.
2015-10-28 15:10:47 +01:00
Eberhard Graether c7a2533dc4 data: increased autocomplete performance by caching and limiting results to 100 2015-10-27 14:22:45 +01:00
Andreas Stallinger cbb6fcd8e2 test: fixed settingstestsuite
changed settings.xml to new/refactored xml tags
2015-10-27 10:13:29 +01:00
malte_langkabel c704b4f65c ui: IDE communication integration
* handled communication from VS to Coati and vice versa.
* one bug still remains: Coati regards a tab as a single character while VS regards it as multiple characters. This causes offsets in communicated positions.
2015-10-23 13:25:15 +02:00
malte_langkabel c06beb21cb data: template class/function scope locations
* Added source locations of template parameters to the scope of template classes and functions to improve context availability in the code view.
2015-10-21 19:56:47 +02:00
Eberhard Graether 1382356a39 build: added release instructions to README 2015-10-21 10:34:11 +02:00
Andreas Stallinger 541bed1db2 build: Private beta tag 2015-10-20 17:40:44 +02:00
Andreas Stallinger 5af8800eed build: linux package private beta
update linux package for private beta
2015-10-20 17:12:05 +02:00
malte_langkabel 52494ba402 build: disabled console for release builds on windows
* updated cmake to cause visual studio to open up a console window only when running a debug build.
2015-10-20 16:36:56 +02:00
Eberhard Graether dc39e10858 build: mac bundle fix and other prerelease fixes
* fixed rpath in mac bundle
* added Qt5Network and Qt5DBus frameworks to bundle
* fixed project settings not saved
* fixed preferences not shown on first start
* added coati_manual.pdf
2015-10-20 16:15:17 +02:00
malte_langkabel 73b25c45ff data: cleaning xml tag names
* replaced xml tags that have been written in PascalCase with the underscore_notation throughout all of the settings files.
2015-10-20 11:08:42 +02:00
malte_langkabel a73906252e ui: acknowledgements
* added acknowledgement text to mention the "FH Salzburg".
* fixed alignments in about screen.
2015-10-20 10:25:12 +02:00
malte_langkabel e8a63c9de5 ui: removed horizontal scrollbars in code snippets
* they were still there when running coati on windows.
2015-10-15 16:41:41 +02:00
malte_langkabel b0245f9d7b ui: panning in code view
* Implemented horizontal panning for code snippets by dragging the mouse left and right.
2015-10-15 16:28:55 +02:00
malte_langkabel e1683d047a ui: clickable file scope
* When content that is shown in a snippet is located in the file scope, the snippet's title bar displays the file's name. Clicking this name has the same effect as maximizing the file (the file's entire content is shown but the file symbol is not activated).
2015-10-15 12:24:24 +02:00
Manuel Dobusch 0664f9a81b logic: IDE Communication
Network code and controller added to communicate with IDE plugins. Does not include GUI integration though.
2015-10-14 15:40:10 +02:00
malte_langkabel 4e4cb25540 logic: fallback selection after refresh
* extracted code for translating input messages to token activations from the FeatureController to the helper class ActivationTranslator.
* used ActivationTranslator in UndoRedoController to determine if the symbols that have been selected before refresh are still available after parsing again.
2015-10-14 12:27:05 +02:00
malte_langkabel e61171cc85 data: Template Member Specialization Edge
* Added a new edge that connects a method of an implicitly specialized template class to its definition in the unspecialized template class.
* Added a test case for this.
* Made methods that have an invalid source location stored as undefined.
2015-10-13 13:29:36 +02:00
Eberhard Graether 27bf5108ab data: fixed file clearing to clear only elements with no more source_locations 2015-10-12 11:42:19 +02:00
Eberhard Graether 29afd80673 data: Readded manual element clearing when clearing file nodes 2015-10-09 11:46:27 +02:00
Eberhard Graether 2286e7de1b test: Fixed tests to use new Node construction 2015-10-09 11:28:45 +02:00
Eberhard Graether c553e29ff8 data: save undefined in database field instead of using different node types
* expand toggle also for undefined classes
* changed direction of some template edges
* save same access component to specialized template functions and classes
2015-10-08 23:12:37 +02:00
Eberhard Graether ebeaff2724 build: Fixed Boost version number in cmake find package call 2015-10-08 12:00:37 +02:00
malte_langkabel 87ff089178 build: update dependencies
* updated dependencies for windows
* implemented getFileInfo of TestFileManager as virtual.
2015-10-07 14:35:01 +02:00
Eberhard Graether 0fba3f5cf9 logic: random fixes and improvements
* added new logos to setup ui
* changed wording in status messages and bundle nodes
* removed ununsed Vector.h
* save NameHierarchy to SearchMatch
* fixed NameHierarchyElement retrieval for name elements without parent
* fixed match weight to score last letters higher
2015-10-06 16:21:03 +02:00
Eberhard Graether 8d3112d5a9 data: increased file clearing performance
This change passes all file node ids for clearing to the sqlite storage at once and makes use of ON DELETE CASCADE for
everything else, instead of manally deleting all source locations.
2015-10-05 09:44:27 +02:00
Eberhard Graether f041e69789 test: fixed tests 2015-10-02 18:21:00 +02:00
Eberhard Graether acfbe510fb logic: fixes all over the place
* fixed refreshing to send another ui refresh message after parsing
* keepContent field for MessageBase so that views won't update
* fixed searchmatching to only weigh uppercase letters next to lowercase ones
* fixed file not jumping back to snippets when activating edge
* clicking into empty space deselects active edge
* clear file manager files on every fetch
* added db transaction for file clearing
* use zooming instead of changing font size
2015-10-02 17:07:03 +02:00
Eberhard Graether a855e14ebf logic: make SearchController only listen to MessageActivateTokens
This change makes MessageActivateTokens being used consistently throughout all Controllers. The FeatureController
accepts all incoming activation messages and turns them into MessageActivateTokens, which are then accepted by all
view controllers.
2015-10-02 10:18:17 +02:00
Eberhard Graether 2704d47cd8 logic: multiple fixes and improvements
* showing project name in main window title
* keep reference count visible when maximizing code file
* show first node in db when no main function is available
* log Storage stats after parse
* fixed macro locations saved multiply
* using NameHierarchy when retrieving ids
2015-10-01 19:03:05 +02:00
Eberhard Graether 8fa9bdde5e data: refactored file clearing on reparse to use TaskClearStorage 2015-10-01 13:45:31 +02:00
Eberhard Graether 5b47661a90 build: using directories build_debug and build_release for clang consistently 2015-10-01 10:03:08 +02:00
Eberhard Graether de1af6ce7d data: saving file contents to sqlite db 2015-09-30 02:12:49 +02:00
Eberhard Graether 4782efddcb ui: always show whole file on top when selecting file node 2015-09-29 15:22:00 +02:00
Eberhard Graether 201e6d24a9 ui: new features for the Graph UI
* removed node shadows
* made enums collapsible
* added icons to nodes: enum, typedef, macro, bundle
2015-09-29 15:10:44 +02:00
Eberhard Graether 8777c9874b logic: don't refresh project on reopen 2015-09-29 14:47:36 +02:00
Eberhard Graether eeed22f478 build: updated to new clang and other fixes
* don't save macros from external files
* fixed macro and include saving duplicates
* added NODE_UNDEFINED_MACRO

TIL = You need to cut a 1kg cake about 85 times in half until you have a piece with only a single atom.
2015-09-29 14:22:52 +02:00
Andreas Stallinger e3696df5e1 data: Macro handling
Macros have now edges from Files where they are usesd
2015-09-28 15:25:52 +02:00
Eberhard Graether dd4d74a1d9 ui: precollapse files in code view
This change shows the files in the code view minimized, if more than 5. This greatly improves performance, because code
and annotations won't get loaded until needed. Files including declarations or definitions of the active symbol are
still expanded. The number of references in each file is now shown in it's title bar. Clicking the title bar allows for
expanding and collapsing as well now.
2015-09-28 15:18:52 +02:00
malte_langkabel 27ed5a0635 data: handling nested type names
* Implemented recursive handling of nested names in CxxTypeNameResolver. For example used when resolving names of dependent template parameters.
2015-09-26 19:18:07 +02:00
Eberhard Graether ae27d8025b ui: show tooltips when hovering nodes and edges 2015-09-24 16:18:23 +02:00
Eberhard Graether b8c95c5a20 logic: removed namespace splitting from GraphController
Namespace splitting is now handled in active token id retrieval from the Storage, so that namespace nodes are not added
to the Graph at all and complexity in the GraphController is reduced.
2015-09-24 15:37:35 +02:00
Eberhard Graether 97e49d9b3f data: added HierarchyCache for storing member relationships
This change introduces the HierarchyCache that caches the member relationships of nodes in memory for faster graph
retrieval. Storing these relationships allows for retrieving nodes and edges as lists from the SqliteStorage at once
which results in a 10 fold speed improvement.
2015-09-24 12:43:49 +02:00
Eberhard Graether 5c06dedf7c data: Fixed inheritance parsing for tests 2015-09-24 10:30:25 +02:00
Eberhard Graether 5825fe77ab ui: switch Graph to bucket grid layouting
This change introduces bucket grid layouting, which sorts the nodes into buckets based on how they are connected. Each
bucket is then layouted individually before they are arranged next to each other. Edges go from left to right, except
for inheritance edges that go from bottom to top.
2015-09-24 03:12:42 +02:00
Eberhard Graether c18bd6a8bc data: fixes for parsing and logging
* readded Storage logs
* turned type name resolver error logs to info logs
* fixed inheritance not parsed in forward declarations
* check file node id before saving source location
* show errors in unparsed files again
2015-09-24 02:39:10 +02:00
Eberhard Graether bb3a8bf351 ui: force refresh option in menu for reloading whole project 2015-09-23 16:44:39 +02:00
Eberhard Graether 502909c789 data: retrieving multiple datums with single queries
* getting all incoming and outgogin edges to children at once in aggregation edge computation
* getting all edges connected to active node at once
* getting all access components for all member edges at once.
2015-09-23 14:32:33 +02:00
Eberhard Graether 391082160c data: saving NameHierarchy directly to Node without TokenComponentName 2015-09-23 12:45:58 +02:00
Eberhard Graether b07bc7ed19 data: readded signature distinction for functions 2015-09-23 12:04:19 +02:00
Eberhard Graether 3d48145e47 data: Fixed edge creation
* reuse edges of same source, origin and type with multiple source locations
* save return type and parameter type uses as type usage for single edge
2015-09-23 10:23:46 +02:00
Eberhard Graether ef54299deb data: increased aggregation edge creation performance 2015-09-23 10:01:28 +02:00
Eberhard Graether 78c1b32797 data: increased parse and graph assembly performance
* removed header search in subdirectories of header search paths
* cache file node ids in Storage for faster lookup
* retrieve node names from SearchIndex
* fixed addNodeAndAllChildren also called for member edges
* added check if node already present in addEdgeAndAllChildren
2015-09-23 09:26:03 +02:00
malte_langkabel e9d45a507a ui: project settings fix
* fixed open folder dialog in project settings.
* changed foreign key relation of component_access from the element to the edge table.
2015-09-17 16:48:05 +02:00
Eberhard Graether 0c7624a5ef data: saving and retrieving access components from and to Storage again 2015-09-17 15:58:10 +02:00
Eberhard Graether 04f24ba63d test: Fixed tests 2015-09-17 15:07:46 +02:00
Andreas Stallinger b36e3fb758 build: gather linux libraries for package automated 2015-09-17 14:10:11 +02:00
Eberhard Graether a596c58b02 data: Fixed performance drop in file path search 2015-09-17 13:53:28 +02:00
Eberhard Graether a14bfaff56 data: saving and loading Storage with sqlite file next to project file 2015-09-17 12:08:25 +02:00
Andreas Stallinger f702b79892 src: fixed headersearchpaths, there where not inlcuded
<description>
2015-09-17 11:31:00 +02:00
Eberhard Graether 05d390fb3f src: some fixes
* fixed field declaration type has no source location
* grouped menu items
* overload edge pointing in right direction
2015-09-17 11:08:04 +02:00
Andreas Stallinger be0eaf9d0d data: forward declaration for storageAccessProxy in FileManager
<description>
2015-09-17 10:47:48 +02:00
malte_langkabel 3d94b78b8c data: refreshing with DB
* database stores modification time of files.
* FileManager updates internal state based on database info.
* reimplemented FileManager's check if a file is in project.
* implemented clearing data of updated or removed files before reparsing the updated and added files.
2015-09-16 18:53:33 +02:00
Andreas Stallinger 73b1b77ca8 data, utility: Fixes to run Opensource Projects
templateSpecializationArgsAsWritten returning null caused a crash
VisitMemberExprInDeclBody for vardecl was missing
subdirectories for headersearchpaths, that the user does not need to add a hugh amount of folders
2015-09-16 17:08:16 +02:00
Eberhard Graether fb5316cb7f ui: toggling view visibility from the view menu 2015-09-11 18:03:44 +02:00
Eberhard Graether 6e835bd5f5 ui: activating multiple overlapping source locations
All overlapping source locations will be activated and the corresponding nodes highlighted, with all of their names
displayed in the search bar.
2015-09-11 14:52:39 +02:00
Eberhard Graether 0fc80d2a52 data: rewrote TicTacToe to work without std libs and split to cpp 2015-09-11 13:00:43 +02:00
Eberhard Graether eaa3fab4ec ui: fixes
* fixed first match in autocompletion not preselected
* fixed maximize file button extending snippets
* changed names of views and setting name of composite view
* fixed number of error locations
2015-09-10 15:49:28 +02:00
Andreas Stallinger 4c0d749a39 build: linux package fix
some linux package fixes and now there is a package option in the build.sh script
2015-09-09 16:39:23 +02:00
Andreas Stallinger baedc3eed1 ui: aboutwindow
changed about window that it is consistent with the other windows
2015-09-09 14:54:51 +02:00
Andreas Stallinger 8c606ef5c4 ui : License Menu
3rd Party Licenses in Menu Help -> Licenses
2015-09-09 14:23:59 +02:00
Eberhard Graether 3eff72340d ui: fixed flickering of search autocompletion box 2015-09-09 12:23:19 +02:00
Eberhard Graether 70283f7610 ui: new style for bundle node 2015-09-09 11:48:16 +02:00
Eberhard Graether 934c70272d ui: new file node style with icon 2015-09-08 17:08:33 +02:00
Eberhard Graether a7ec6772ff data: Fixed aggregation edge creation and display 2015-09-08 14:36:17 +02:00
Andreas Stallinger c8679dabbe build: Linux Package Reworked
New Linux Package, data folder moved to where the user have the rights to edit.
2015-09-07 10:27:34 +02:00
Eberhard Graether 1ba802dd9b ui: added ApplicationSettingsScreen
* opens on first start autmatically
* open from the menu under Preferences
* show version number on splash screen
* added recent projects markup to app settings template
* moved all qt window classes to qt/window
* put common form stuff from project setup and app settings into QtSettingsWindow
2015-09-04 14:38:30 +02:00
Eberhard Graether 5ab627b735 ui: reworked StartScreen and ProjectSettupScreen UI flow
* realigned buttons and elements
* fixed retina styles for mac
* removed MessageLoadSource and subsequent functionality
* edit existing project through menu
* browsing paths from the line item in QtDirectoryListBox
* grow QtDirectoryListBox instead of scroll
* take any file or directory as valid path
* fixed new project setup screen background
* fixed screen handling on cancelation
2015-09-04 10:54:37 +02:00
Eberhard Graether 1b445d4c3a src: removed query syntax
This change removes the query syntax from the QtSmartSearchbox and all its classes. Now it only autocompletes to one
single Token, but the UI functionality for composing a query of multiple elements is still left for later use. The struct
SearchMatch is now used in the whole pipeline for passing search results back and forth.
2015-09-02 11:52:07 +02:00
Eberhard Graether 9bcf7d2f0f data: cleaned up TokenLocation classes
* removed self assiged locationId
* show errors after parse again
2015-08-27 22:14:12 +02:00
Eberhard Graether 2044ff9723 data: cleaned up Graph classes
* removed self assignment of id from Token
* removed FilterableGraph interface from Graph
* creating Nodes and Edges on Graph with addNode and addGraph methods
* removed obsolete Aggregation edge filtering
* fixed clang warnings
* fixed memory leak for Node creation
2015-08-27 17:25:52 +02:00
malte_langkabel e628241b02 data: database storage
* replaced storage by a new version that utilizes sqlite for persistence.
* added SqliteStorage to manage direct access to the database.
* added testsuit for sqlite.
* slimmed down the protected interface of the storage.
* changed tests in StorageTestSuit to avoid using protected methods of the storage.
* added functions to begin and commit a transaction to the storage.
* removed GraphFilterTestSuite.
* removed GraphFilterConductorTestSuite.
* added Node and Edge constructor that takes id as parameter
* added constructor for TokenComponentNameCached that accepts NameHierarchy as parameter
* added TokenLocation constructor that takes locationId as parameter.
* created respective construction functions in TokenLocatonLine, -File and -Collection.

fortune cookie message = Recognition will come from unexpected sources.
2015-08-25 18:07:02 +02:00
malte_langkabel d996cf384d build: qt and version patch for windows.
* added dlls for QT5.5.
* changed version script to find and use the git.exe
2015-08-25 17:56:59 +02:00
Andreas Stallinger fb877e1304 build: fix compiler and cmake warnings
added missing virtual destructor
fixed a warning in token.h: expression with side effects will be evaluated despite being used as an operand to 'typeid'
CMP00043 Cmake warning
added missing override keyword
2015-08-18 14:43:32 +02:00
Andreas Stallinger d8489c0b04 build: versioning
versioning via git tags, commits after tags are displayed in the versionnumber
2015-08-18 11:32:22 +02:00
Eberhard Graether 30c941fcf8 logic: crash fixes
<description>
2015-08-07 00:17:41 +02:00
Eberhard Graether 30b5abd672 ui: added icon colors to ColorScheme
This change introduces the qt utility function colorizePixmap() for colloring icons in different colors for different
color schemes.
2015-08-05 21:02:52 +02:00
Eberhard Graether c0a31fca18 logic: Reloading ProjectSettings on refresh 2015-08-04 16:21:55 +02:00
Eberhard Graether 9c4e3950b6 build: updated Mac build to Qt 5.5 2015-08-04 15:38:12 +02:00
Andreas Stallinger e7a977dd5c UI: ProjectSettingsUI
ProjectSettingsUI for creation of new Projects + StartScreen design update
2015-08-03 17:24:24 +02:00
Eberhard Graether f823d0ddb4 ui: fixed some ui related bugs
* aggregation edges only connect toplevel nodes
* fixed aggregation click for undo and redo
* don't show edge name in search field, because they are not searchable
* clear search field when clicking aggregation
* leave active nodes active when clicking edges
2015-08-03 16:33:29 +02:00
Eberhard Graether 165f32f6a6 logic: MessageFlushUpdates to send new Graph to GraphView when restoring Graph 2015-07-30 20:24:18 +02:00
Eberhard Graether 5f25311389 logic: paths in ProjectSettings relative to file not working directory
This change checks all paths in the ProjectSettings file for relativity and makes them relative to the location of the
ProjectSettings file if necessary. The paths are also correctly saved relative to the file.
2015-07-29 22:20:26 +02:00
malte_langkabel 336df76912 ui: fixed ui refresh crashes
* fixed thread based crashes on refresh by adding functors for the required functionality.
2015-07-20 15:48:02 +02:00
Eberhard Graether 0f9e72d553 src: Fixed refresh of QtUndoRedoView in wrong thread 2015-07-20 15:02:01 +02:00
Eberhard Graether 73aa6080aa ui: clicking snippet title to show full scope
This change lets the user click the snippet title in the CodeView to insert the full scope. The existing snippets are
merged with the new lines accordingly.
2015-07-20 00:57:19 +02:00
Eberhard Graether e5a8609d7a ui: removed namespace nodes from graph
Nodes within namespaces are display their full name including the namespace.
2015-07-18 22:03:13 +02:00
Eberhard Graether 85d2ebc32a logic: removed FilterUndefinedNodesFromGraph setting
because it is confusing and not necessary anymore since we have bundled nodes.
2015-07-18 13:46:03 +02:00
Eberhard Graether 5722b4dc23 ui: color schemes
Put all colors into single xml file. Accessing colors is handled via the singleton class ColorScheme. The default scheme
"bright.xml" holds the original colors. The scheme "dark.xml" is a start, but still a poor alternative. Color schemes
can be switched via the View menu.
2015-07-17 19:50:39 +02:00
Eberhard Graether fb170cbd5d ui: added universal font size setting and shortcuts for changing it
This change adds font size and font family to the ApplicationSettings to have a single point for manipulating them. The
font size can also be changed via the menu or the zoomIn and zoomOut shortcuts on all platforms.
2015-07-15 00:38:10 +02:00
Eberhard Graether 7275082284 logic: correctly undoing graph interactions by replaying actions since last active token change
This change introdoces a classification of commands by order in the undo stack. Undoing the last action will resend the
message of the last active token change and all messages changing the ui after that.
2015-06-24 01:15:31 +02:00
malte_langkabel 3587b487dd ui: Fixed animation crash
* Fixed crash that occurred when resetting the current animation in the QtGraphView.
2015-06-23 16:36:39 +02:00
Eberhard Graether a527a3c34d logic: rewrote messages handling token activation for correct restoring on undo
* saving search query to undo stack with MessageSearch
* saving node and edge with name to undo stack with MessageActivateNode and MessageActivateEdge
* added FeatureController that handels distribution of MessageActivateTokens
* clearing views when refreshing or changing project
* clearing undo stack when changing project
* added StorageCache derived from StorageAccessProxy
2015-06-19 00:20:50 +02:00
Eberhard Graether d6269f9608 ui: bundling nodes in the graph view
This change bundles similar nodes in the graph view together. When the bundled node or it's aggregation edge are clicked,
then the bundle is split. This change also adds an arrow to the aggregation edge based on the direction of it's edges.
2015-06-17 22:47:08 +02:00
Eberhard Graether eb4b82c015 web: added analytics tracking code to mediacube page 2015-06-15 10:47:53 +02:00
Eberhard Graether 3a6c0440f2 test: fixed tests after use of EDGE_TYPE_USAGE for return and parameter types 2015-06-12 12:37:02 +02:00
Eberhard Graether 3c6782d94d data: fixed graph display errors
* fixed Storage saving specialized template functions as undefined function node
* fixed usages of same type in functions in return or parameter not clickable in graph, because the edges are on top
2015-06-11 14:04:20 +02:00
Eberhard Graether 063d972b13 ui: stop old graph animation before starting new one 2015-06-09 23:23:07 +02:00
Eberhard Graether e85b9e7425 ui: fixed jumps in graph navigation
* moved graph postprocessing to GraphController to avoid reprocessing on edge activation
* animat sceneRect of the GraphView to avoid jump at end of animation
2015-06-09 22:51:09 +02:00
Eberhard Graether 0c41aecfc9 ui: reworded file tooltips
* and added sample source
2015-06-09 14:09:12 +02:00
656 changed files with 196803 additions and 11200 deletions
+6
View File
@@ -18,4 +18,10 @@ then
exit 1
fi
if [ $BRANCH_NAME == "public_beta" ]
then
echo -e $ABORT "Commiting to public_beta is prohibited."
exit 1
fi
exit 0
+36 -2
View File
@@ -1,13 +1,19 @@
/build/
/distr/
/deps/
/bin/app/Debug/
/bin/app/Release/
/bin/app/data/log/
/bin/app/data/projects/
/bin/app/data/projects/ignored/
/bin/app/data/ApplicationSettings.xml
/bin/app/data/window_settings.ini
/bin/app/Release/
/bin/lib/
/bin/lib_gui/
/bin/lib_parser/
/bin/gen/
/bin/test/Debug/
/bin/test/Release/
@@ -15,4 +21,32 @@
/bin/test/data/temp.xml
/bin/test/data/TestSettings.xml
/setup/Linux/lib/*
.DS_Store
.idea
/ide_plugins/vs/vs2012/CoatiPlugin/CoatiPlugin/bin
/ide_plugins/vs/vs2012/CoatiPlugin/CoatiPlugin/obj
*.coatidb
/deployment/windows/CoatiSetup/CoatiSetup/Debug
/deployment/windows/CoatiSetup/CoatiSetup/Release
/deployment/windows/CoatiSetup/CoatiSetup.v12.suo
/deployment/windows/CoatiSetup/SetupApplicationSettingsLib/bin/
/deployment/windows/CoatiSetup/SetupApplicationSettingsLib/obj/
/deployment/windows/CoatiSetup/SetupCreateDesktopShortcutLib/bin/
/deployment/windows/CoatiSetup/SetupCreateDesktopShortcutLib/obj/
/deployment/windows/CoatiSetup/SetupCreateStartMenuShortcutLib/bin/
/deployment/windows/CoatiSetup/SetupCreateStartMenuShortcutLib/obj/
/deployment/windows/CoatiSetup/SetupRemoveCacheFiles/bin/
/deployment/windows/CoatiSetup/SetupRemoveCacheFiles/obj/
*.sqlite
*.swp
.clang_complete
+242 -105
View File
@@ -1,14 +1,24 @@
cmake_minimum_required(VERSION 2.8.9)
# to get CMP0043 warnings, upgrade to version 3 and change the line above to VERSION 3.0 and remove the line below
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
include(cmake/add_files.cmake)
include(cmake/create_source_groups.cmake)
include(cmake/version.cmake)
include(cmake/version_setup.cmake)
include(cmake/licenses.cmake)
# Variables --------------------------------------------------------------------
set(PROJECT_NAME Coati)
set(APP_PROJECT_NAME "${PROJECT_NAME}")
set(TRIAL_PROJECT_NAME "${PROJECT_NAME}_trial")
set(LIB_GUI_PROJECT_NAME "${PROJECT_NAME}_lib_gui")
set(LIB_PARSER_PROJECT_NAME "${PROJECT_NAME}_lib_parser")
set(LIB_PROJECT_NAME "${PROJECT_NAME}_lib")
set(TEST_PROJECT_NAME "${PROJECT_NAME}_test")
@@ -25,32 +35,41 @@ endif ()
if (UNIX)
add_definitions(-std=c++11 -Wno-unknown-warning-option -fcolor-diagnostics -DQT_COMPILING_QSTRING_COMPAT_CPP )
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
endif ()
# Project ----------------------------------------------------------------------
project(${PROJECT_NAME})
# Clang ------------------------------------------------------------------------
find_package(LLVM REQUIRED PATHS "$ENV{CLANG_DIR}/build/share/llvm/cmake")
if (UNIX)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
find_package(LLVM REQUIRED PATHS "$ENV{CLANG_DIR}/build_release/share/llvm/cmake")
else()
find_package(LLVM REQUIRED PATHS "$ENV{CLANG_DIR}/build_debug/share/llvm/cmake")
endif()
else()
find_package(LLVM REQUIRED PATHS "$ENV{CLANG_DIR}/build/share/llvm/cmake")
endif()
find_package(CLANG REQUIRED PATHS "${CMAKE_SOURCE_DIR}/cmake")
add_definitions(${CLANG_DEFINITIONS})
# Boost ------------------------------------------------------------------------
set(BOOST_ROOT $ENV{BOOST_155_DIR})
set(BOOST_ROOT $ENV{BOOST_159_DIR})
set(Boost_USE_MULTITHREAD ON)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
set(BOOST_LIBRARYDIR $ENV{BOOST_155_DIR})
find_package(Boost 1.55 COMPONENTS system filesystem date_time REQUIRED)
Set(Boost_NO_SYSTEM_PATHS ON)
set(BOOST_LIBRARYDIR $ENV{BOOST_159_DIR})
# Eigen -------------------------------------------------------------------------
find_package(Boost 1.59 COMPONENTS system filesystem date_time REQUIRED)
# Eigen ------------------------------------------------------------------------
add_definitions(-DEIGEN_MPL2_ONLY)
set(EIGEN_ROOT $ENV{EIGEN_DIR})
# Lib --------------------------------------------------------------------------
@@ -61,13 +80,14 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib)
add_subdirectory(src/lib)
add_subdirectory(src/external)
set_source_files_properties(${CLANG_FILES} PROPERTIES COMPILE_FLAGS "-fno-rtti")
set_source_files_properties(${EXTERNAL_FILES} PROPERTIES COMPILE_FLAGS "-w")
set_source_files_properties(${EXTERNAL_C_FILES} PROPERTIES COMPILE_FLAGS "-std=gnu89 -w")
add_library(${LIB_PROJECT_NAME} ${LIB_FILES} ${CLANG_FILES} ${EXTERNAL_FILES})
add_library(${LIB_PROJECT_NAME} ${LIB_FILES} ${EXTERNAL_FILES} ${EXTERNAL_C_FILES})
create_source_groups(${LIB_FILES})
create_source_groups(${CLANG_FILES})
create_source_groups(${EXTERNAL_FILES})
create_source_groups(${EXTERNAL_C_FILES})
set_target_properties(
${LIB_PROJECT_NAME}
@@ -80,16 +100,131 @@ set_property(
TARGET ${LIB_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/external"
${LLVM_INCLUDE_DIRS}
${CLANG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${EIGEN_ROOT}
)
target_include_directories(${LIB_PROJECT_NAME} SYSTEM
PUBLIC ${LLVM_INCLUDE_DIRS}
${CLANG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${EIGEN_ROOT}
"${CMAKE_SOURCE_DIR}/src/external"
)
target_link_libraries(${LIB_PROJECT_NAME} ${Boost_LIBRARIES})
# Lib Parser -------------------------------------------------------------------
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_parser)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_parser)
add_subdirectory(src/lib_parser)
set_source_files_properties(${CLANG_FILES} PROPERTIES COMPILE_FLAGS "-fno-rtti")
add_library(${LIB_PARSER_PROJECT_NAME} ${CLANG_FILES})
create_source_groups(${CLANG_FILES})
set_property(
TARGET ${LIB_PARSER_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib_parser"
"${CMAKE_SOURCE_DIR}/src/lib"
)
target_include_directories(${LIB_PARSER_PROJECT_NAME} SYSTEM
PUBLIC ${LLVM_INCLUDE_DIRS}
${CLANG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
link_directories(${LLVM_LIBRARY_DIRS} ${CLANG_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
target_link_libraries(${LIB_PROJECT_NAME} ${CLANG_LIBRARIES} ${LLVM_AVAILABLE_LIBS} ${Boost_LIBRARIES})
target_link_libraries(${LIB_PARSER_PROJECT_NAME} ${CLANG_LIBRARIES} ${LLVM_AVAILABLE_LIBS})
# Lib Gui ----------------------------------------------------------------------
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_gui)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib_gui)
add_subdirectory(src/lib_gui)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Find the QtWidgets library
set(CMAKE_PREFIX_PATH "$ENV{QT_DIR}/")
set(Qt5Widgets_DIR "$ENV{QT_DIR}/cmake/Qt5Widgets/")
set(Qt5PrintSupport_DIR "$ENV{QT_DIR}/cmake/Qt5PrintSupport/")
find_package(Qt5Widgets)
find_package(Qt5PrintSupport)
find_package(Qt5Network)
if(Qt5Widgets_FOUND)
MESSAGE(STATUS "Found Qt ${Qt5Widgets_VERSION_STRING}")
# FIX: Qt was built with -reduce-relocations
if (Qt5_POSITION_INDEPENDENT_CODE)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
endif()
# target for running versionnumber script
# workaround for running customcommand (ninja dependency cycle)
add_custom_target(
versionnumber ALL
)
add_library(${LIB_GUI_PROJECT_NAME} ${LIB_GUI_FILES} ${CMAKE_SOURCE_DIR}/build/src/lib_gui/version.h)
# command for versioning script
add_custom_command(
TARGET versionnumber
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/version.cmake
BYPRODUCTS ${PROJECT_SOURCE_DIR}/build/src/lib_gui/version.h
DEPENDS ${LIB_GUI_PROJECT_NAME}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "check/update version number"
)
add_dependencies(${LIB_GUI_PROJECT_NAME} versionnumber)
create_source_groups(${LIB_GUI_FILES})
set_property(
TARGET ${LIB_GUI_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/lib_gui"
"${CMAKE_SOURCE_DIR}/build/src/lib_gui"
)
# include external header without warnings
target_include_directories(${LIB_GUI_PROJECT_NAME} SYSTEM
PUBLIC "${CMAKE_SOURCE_DIR}/src/external"
PUBLIC ${Boost_INCLUDE_DIRS}
)
# Use the Widgets module from Qt 5.
qt5_use_modules(${LIB_GUI_PROJECT_NAME} Widgets)
qt5_use_modules(${LIB_GUI_PROJECT_NAME} Network)
# configure platform specific include file
configure_file(
"${PROJECT_SOURCE_DIR}/src/lib_gui/platform_includes/includes.h.in"
"${PROJECT_SOURCE_DIR}/build/src/lib_gui/includes.h"
)
#configure the versioning file
configure_file(
${CMAKE_SOURCE_DIR}/cmake/version.h.in
${CMAKE_SOURCE_DIR}/build/src/lib_gui/version.h
)
set(CMAKE_AUTOMOC OFF)
# App --------------------------------------------------------------------------
@@ -101,16 +236,10 @@ endif ()
add_subdirectory(src/app)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Find the QtWidgets library
set(CMAKE_PREFIX_PATH "$ENV{QT_DIR}/")
find_package(Qt5Widgets)
find_package(Qt5PrintSupport)
if (WIN32)
file(WRITE ${CMAKE_SOURCE_DIR}/build/Coati.rc
"// Icon with lowest ID value placed first to ensure application icon\n"
@@ -118,32 +247,41 @@ if (WIN32)
"IDI_ICON1 ICON \"${CMAKE_SOURCE_DIR}/build/coati.ico\"\n"
)
add_executable(${APP_PROJECT_NAME} ${APP_FILES} ${CMAKE_SOURCE_DIR}/build/Coati.rc)
# hide the console when running a release build.
set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
set_target_properties(${APP_PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
set_target_properties(${APP_PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/ENTRY:\"mainCRTStartup\" /SUBSYSTEM:WINDOWS")
set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
else ()
add_executable(${APP_PROJECT_NAME} ${APP_FILES})
endif ()
create_source_groups(${APP_FILES})
target_link_libraries(${APP_PROJECT_NAME} ${LIB_PROJECT_NAME})
target_link_libraries(${APP_PROJECT_NAME} ${LIB_GUI_PROJECT_NAME} ${LIB_PARSER_PROJECT_NAME} ${LIB_PROJECT_NAME} )
set_property(
TARGET ${APP_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/app"
"${CMAKE_SOURCE_DIR}/build/src/app"
"${CMAKE_SOURCE_DIR}/src/external"
${Boost_INCLUDE_DIRS}
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/lib_gui"
"${CMAKE_SOURCE_DIR}/src/lib_parser"
"${CMAKE_SOURCE_DIR}/build/src/lib_gui"
)
target_include_directories(${APP_PROJECT_NAME} SYSTEM
PUBLIC "${CMAKE_SOURCE_DIR}/src/external"
PUBLIC ${Boost_INCLUDE_DIRS}
)
# Use the Widgets module from Qt 5.
qt5_use_modules(${APP_PROJECT_NAME} Widgets)
# configure platform specific include file
configure_file(
"${PROJECT_SOURCE_DIR}/src/app/platform_includes/includes.h.in"
"${PROJECT_SOURCE_DIR}/build/src/app/includes.h"
)
qt5_use_modules(${APP_PROJECT_NAME} Network)
# add platform specific libraries
if (APPLE)
@@ -151,7 +289,66 @@ if (APPLE)
target_link_libraries(${APP_PROJECT_NAME} ${CORE_FOUNDATION})
endif ()
set(CMAKE_AUTOMOC OFF)
# Trial ---------------------------------------------------------------------
if (UNIX)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/${CMAKE_BUILD_TYPE})
else ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/)
endif ()
add_subdirectory(src/trial)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if (WIN32)
file(WRITE ${CMAKE_SOURCE_DIR}/build/Coati.rc
"// Icon with lowest ID value placed first to ensure application icon\n"
"// remains consistent on all systems.\n"
"IDI_ICON1 ICON \"${CMAKE_SOURCE_DIR}/build/coati.ico\"\n"
)
add_executable(${TRIAL_PROJECT_NAME} ${TRIAL_FILES} ${CMAKE_SOURCE_DIR}/build/Coati.rc)
# hide the console when running a release build.
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/ENTRY:\"mainCRTStartup\" /SUBSYSTEM:WINDOWS")
set_target_properties(${TRIAL_PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
else ()
add_executable(${TRIAL_PROJECT_NAME} ${TRIAL_FILES})
endif ()
create_source_groups(${TRIAL_FILES})
target_link_libraries(${TRIAL_PROJECT_NAME} ${LIB_GUI_PROJECT_NAME} ${LIB_PROJECT_NAME})
set_property(
TARGET ${TRIAL_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/trial"
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/lib_gui"
"${CMAKE_SOURCE_DIR}/build/src/lib_gui"
)
target_include_directories(${TRIAL_PROJECT_NAME} SYSTEM
PUBLIC "${CMAKE_SOURCE_DIR}/src/external"
PUBLIC ${Boost_INCLUDE_DIRS}
)
# Use the Widgets module from Qt 5.
qt5_use_modules(${TRIAL_PROJECT_NAME} Widgets)
qt5_use_modules(${TRIAL_PROJECT_NAME} Network)
# add platform specific libraries
if (APPLE)
find_library(CORE_FOUNDATION CoreFoundation)
target_link_libraries(${TRIAL_PROJECT_NAME} ${CORE_FOUNDATION})
endif ()
# MacOSX Bundle ----------------------------------------------------------------
@@ -160,7 +357,7 @@ if (APPLE)
set(MACOSX_BUNDLE_NAME ${PROJECT_NAME})
set(MACOSX_BINARY_NAME ${APP_PROJECT_NAME})
set(MACOSX_DYNAMIC_LIBRARIES ${Boost_LIBRARIES} "${LLVM_LIBRARY_DIRS}/libLTO.dylib")
set(MACOSX_DYNAMIC_LIBRARIES ${Boost_LIBRARIES} "${LLVM_LIBRARY_DIRS}/libLTO.3.8.dylib")
string(REPLACE ";" " " MACOSX_DYNAMIC_LIBRARIES "${MACOSX_DYNAMIC_LIBRARIES}")
get_property(QT_CORE_PATH TARGET ${Qt5Core_LIBRARIES} PROPERTY LOCATION)
@@ -175,7 +372,10 @@ if (APPLE)
get_property(QT_PRINT_PATH TARGET ${Qt5PrintSupport_LIBRARIES} PROPERTY LOCATION)
get_filename_component(QT_PRINT_PATH ${QT_PRINT_PATH} REALPATH)
list(APPEND MACOSX_QT_FRAMEWORKS ${QT_CORE_PATH} ${QT_GUI_PATH} ${QT_WIDGETS_PATH} ${QT_PRINT_PATH})
get_property(QT_NETWORK_PATH TARGET ${Qt5Network_LIBRARIES} PROPERTY LOCATION)
get_filename_component(QT_NETWORK_PATH ${QT_NETWORK_PATH} REALPATH)
list(APPEND MACOSX_QT_FRAMEWORKS ${QT_CORE_PATH} ${QT_GUI_PATH} ${QT_WIDGETS_PATH} ${QT_PRINT_PATH} ${QT_NETWORK_PATH})
string(REPLACE ";" " " MACOSX_QT_FRAMEWORKS "${MACOSX_QT_FRAMEWORKS}")
set(MACOSX_QT_DIR "$ENV{QT_DIR}")
@@ -214,7 +414,7 @@ add_executable (${TEST_PROJECT_NAME} ${TESTGEN_FILE} ${TEST_FILES})
create_source_groups(${TEST_FILES})
target_link_libraries(${TEST_PROJECT_NAME} ${LIB_PROJECT_NAME})
target_link_libraries(${TEST_PROJECT_NAME} ${LIB_PARSER_PROJECT_NAME} ${LIB_PROJECT_NAME})
find_package(CxxTest)
if (CXXTEST_FOUND)
@@ -222,6 +422,7 @@ if (CXXTEST_FOUND)
TARGET ${TEST_PROJECT_NAME}
PROPERTY INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/src/lib"
"${CMAKE_SOURCE_DIR}/src/lib_parser"
"${CXXTEST_INCLUDE_DIR}"
"${CMAKE_SOURCE_DIR}/src/external"
${Boost_INCLUDE_DIRS}
@@ -263,74 +464,10 @@ endif ()
# Visual Leak Detector ---------------------------------------------------------
if (WIN32)
include_directories($ENV{VLD_DIR}/include)
endif ()
# Linux package
if(UNIX AND NOT APPLE)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/data
DESTINATION share/coati
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/setup/Linux/coati.desktop
DESTINATION share/applications
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/data/gui/icon/logo_1024_1024.png
DESTINATION share/icons
RENAME coati.png)
INSTALL(FILES
${CMAKE_SOURCE_DIR}/setup/Linux/libedit.so.0.0.52
${CMAKE_SOURCE_DIR}/setup/Linux/libboost_filesystem.so.1.55.0
${CMAKE_SOURCE_DIR}/setup/Linux/libboost_system.so.1.55.0
${CMAKE_SOURCE_DIR}/setup/Linux/libboost_date_time.so.1.55.0
${CMAKE_SOURCE_DIR}/setup/Linux/libstdc++.so.6
${CMAKE_SOURCE_DIR}/setup/Linux/libpng16.so.16
${CMAKE_SOURCE_DIR}/setup/Linux/libQt5Core.so.5
${CMAKE_SOURCE_DIR}/setup/Linux/libQt5DBus.so.5
${CMAKE_SOURCE_DIR}/setup/Linux/libQt5Gui.so.5
${CMAKE_SOURCE_DIR}/setup/Linux/libQt5Widgets.so.5
${CMAKE_SOURCE_DIR}/setup/Linux/libicui18n.so.54
${CMAKE_SOURCE_DIR}/setup/Linux/libicuuc.so.54
${CMAKE_SOURCE_DIR}/setup/Linux/libpcre16.so.0
${CMAKE_SOURCE_DIR}/setup/Linux/libsystemd.so.0
${CMAKE_SOURCE_DIR}/setup/Linux/libicudata.so.54
${CMAKE_SOURCE_DIR}/setup/Linux/liblz4.so.1
${CMAKE_SOURCE_DIR}/setup/Linux/libgcrypt.so.20
${CMAKE_SOURCE_DIR}/setup/Linux/libgpg-error.so.0
DESTINATION share/coati/lib
)
INSTALL(FILES
${CMAKE_SOURCE_DIR}/setup/Linux/libqxcb.so
DESTINATION share/coati/platforms
)
INSTALL(PROGRAMS
${CMAKE_SOURCE_DIR}/setup/Linux/Coati.sh
DESTINATION share/coati
)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
INSTALL(TARGETS ${APP_PROJECT_NAME}
DESTINATION share/coati
)
SET(CPACK_GENERATOR "DEB;TGZ")
# DEBIAN PACKAGE
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andreas Stallinger <astallinger.mmt-m2013@fh-salzburg.ac.at>")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
SET(CPACK_PACKAGE_NAME "Coati")
SET(CPACK_PACKAGE_VERSION_MAJOR 0)
SET(CPACK_PACKAGE_VERSION_MINOR 1)
SET(CPACK_PACKAGE_VERSION_PATCH 2)
SET(CPACK_PACKAGE_EXECUTABLES "Coati")
INCLUDE(CPack)
include(cmake/LinuxPackage.cmake)
endif ()
+104 -5
View File
@@ -4,25 +4,124 @@
##### External Software
* QT 5.2.1
* QT 5.5
* CxxTest 4.3
* Valgrind 3.9.0(linux, macOS)
* Valgrind 3.9.0 (linux)
* Clang & LLVM (installation guide http://clang.llvm.org/docs/LibASTMatchersTutorial.html)
* Boost 1.55 ()
* Eigen 3.2.3
* Boost 1.59
* Eigen 3.2.6
##### Environment Variables
* QT_DIR - ...\Qt\Qt5.2.1\5.2.1\<IDE>\
* CXX_TEST_DIR - .../cxxtest-4.3/
* CLANG_DIR - .../clang-llvm/
* BOOST_155_DIR - .../boost_1_55_0
* BOOST_159_DIR - .../boost_1_59_0
* EIGEN_DIR - .../eigen
For Win32:
* VLD_DIR - .../Visual Leak Detector
* path - apped path to git.exe
##### Settings
Run setup script:
$ ./script/setup.sh
#### Release
##### App
* create release build
* make sure it uses the Coati icon
* obfuscate the executable using upx
##### Data folder
* put data folder in working directory
* add empty log folder
* add working tictactoe.xml project to /projects/tictactoe with sources in /projects/tictactoe/src
* add empty app settings with one recent project tictactoe.xml
* leave window_settings.ini with correct Coati start layout
##### Package
* add app
* add web/coati_manual.pdf to package
##### Updating Clang on UNIX
$ cd .../clang_llvm
$ cd llvm
$ git pull origin master
$ cd tools/clang
$ git pull origin master
$ cd tools/extra/
$ git pull origin master
$ cd ../../../../../build_debug
$ cmake -G Ninja ../llvm
$ ninja -j4 check-all
$ cd ../release_build
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../llvm
$ ninja -j4 check-all
##### Remarks
* Boost lib dir: rename library directory for your system (e.g.: 'lib32-msvc-12.0') to 'lib'
#### Changelog
##### 0.3.0
* Added Tutorial project
* Added communication interface from and to Coati via TCP sockets
* Added plugin for Visual Studio (2012, 2013, 2015)
* Added plugin for Sublime Text (2 & 3)
* Increased autocompletion performance by caching and limiting results to 100
* Save Coati version to sqlite and reparse project whenever the version changes
* Improved source locations of template scopes
* Fixed horizontal scroll in code view not activated while scrolling vertically
* Save errors to storage and reactivate them via button in the status bar
* Save macro scopes
* Fixed old data was still in new project window when creating another project
* Save comment locations and display them when right next to active symbol
* Reworked code view highlighting
* Fixed cursor was jumping at end of query when editing a search query
* Fixed search query disappeared when not token was found for it
* Improved code view auto scroll to center the first active line in the middle
* Focus all overlapping source locations in the code view
* Added recent projects menu option
* Saving all template arguments type uses
##### 0.4.0
* Network ports for IDE communication can be defined in the ApplicationSettings.xml
* Coati can now handle inclass initialization of members
* Improved handling of template arguments in analysis
* Coati now handles anonymous symbols when parsing files
* Extended color schemes to allow more extensive use in the graph
* Added new color scheme called "bad_rainbow"
* Coati shows a template's general definition when an implicit specialization is activated
* Fixed source locations of many declarations
* Fixed syntax highlighting to correctly identify strings, comments and block comments
* Added analysis for template parameter packs
* Show function and method signature in tooltip when hovering the graph node
* Fixed graph font size was too small for Windows and Linux
* Removed Coati directory from Linux package
* Introduced file endings .coatiproject and .coatidb for Coati's project files
* Added installer for Windows
* Installing prerequisits in Windows Installer
* Redesigned the about window
* Parse errors will be displayed as they appear during analysis
* Fixed constructors and destructors using return type 'void' withou source location
* Removed 'close window' action from menu
* Added help texts to project setup and preferences window
* Improved lambda handling in analysis
* Fixed style of function or method nodes with children
* Fixed tooltip colors in dark color scheme
* renamed undo&redo to back&forward
* navigate back&forward via mouse buttons
* navigate back via backspace key
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<user>
<recent_projects>
<recent_project>./data/projects/tutorial/tutorial.coatiproject</recent_project>
<recent_project>./data/projects/tictactoe/tictactoe.coatiproject</recent_project>
</recent_projects>
</user>
</config>
+32 -92
View File
@@ -7,30 +7,31 @@
<!-- COLOR: int int int int - rgba e.g. 125 125 125 255 -->
<config>
<StartupProject><!-- STRING: path to project settings xml file --></StartupProject>
<FilterUndefinedNodesFromGraph><!-- BOOL: filter out undefined nodes in graph --></FilterUndefinedNodesFromGraph>
<startup_project><!-- STRING: path to project settings xml file --></startup_project>
<source>
<CompilerFlags>
<CompilerFlag><!-- STRING: compiler flag, including the dash e.g. -v --></CompilerFlag>
</CompilerFlags>
<compiler_flags>
<compiler_flag><!-- STRING: compiler flag, including the dash e.g. -v --></compiler_flag>
</compiler_flags>
<HeaderSearchPaths>
<HeaderSearchPath><!-- STRING: header search path for each path a HeaderSearchPath element --></HeaderSearchPath>
</HeaderSearchPaths>
<header_search_paths>
<header_search_path><!-- STRING: header search path for each path a header_search_path element --></header_search_path>
</header_search_paths>
<!-- MAC ONLY -->
<FrameworkSearchPaths>
<FrameworkSearchPath><!-- STRING: framework search path --></FrameworkSearchPath>
</FrameworkSearchPaths>
<framework_search_paths>
<framework_search_path><!-- STRING: framework search path --></framework_search_path>
</framework_search_paths>
</source>
<code>
<TabWidth><!-- INTEGER: number of spaces to represent a tab in code files --></TabWidth>
<application>
<font_name><!-- STRING: font name --></font_name>
<font_size><!-- INTEGER: font size in pt --></font_size>
<color_scheme><!-- STRING: color scheme path --></color_scheme>
</application>
<FontName><!-- STRING: name of the font used for source view --></FontName> <!-- DEPRECATED -->
<FontSize><!-- INTEGER: size of the font in the source view --></FontSize> <!-- DEPRECATED -->
<code>
<tab_width><!-- INTEGER: number of spaces to represent a tab in code files --></tab_width>
<snippet>
<snap_range><!-- INTEGER: max amount of lines that the current snippet will be extended to snap to scope start/end --></snap_range>
@@ -38,80 +39,19 @@
</snippet>
</code>
<colors>
<!-- QueryNodeType -->
<command>
<normal>#8FBC92</normal>
<hover>#5EA071</hover>
</command>
<operator>
<normal>#FCA47E</normal>
<hover>#F97A4E</hover>
</operator>
<!-- NodeType -->
<class>
<normal>#ededed</normal>
<hover>#ededed</hover>
</class>
<struct>
<normal>#ededed</normal>
<hover>#ededed</hover>
</struct>
<enum>
<normal>#ededed</normal>
<hover>#ededed</hover>
</enum>
<function>
<normal>#F4D07D</normal>
<hover>#F4BC3D</hover>
</function>
<method>
<normal>#F4D07D</normal>
<hover>#F4BC3D</hover>
</method>
<field>
<normal>#7BB5D4</normal>
<hover>#42A1D4</hover>
</field>
<global>
<normal>#7BB5D4</normal>
<hover>#42A1D4</hover>
</global>
<undefined>
<normal>#00000000</normal>
<hover>#00000000</hover>
</undefined>
<undefined_variable>
<normal>#7BB5D4</normal>
<hover>#42A1D4</hover>
</undefined_variable>
<undefined_function>
<normal>#F4D07D</normal>
<hover>#F4BC3D</hover>
</undefined_function>
<undefined_type>
<normal>#ededed</normal>
<hover>#ededed</hover>
</undefined_type>
<namespace>
<normal>#00000000</normal>
<hover>#00000000</hover>
</namespace>
<typedef>
<normal>#ededed</normal>
<hover>#ededed</hover>
</typedef>
<enum_constant>
<normal>#7BB5D4</normal>
<hover>#42A1D4</hover>
</enum_constant>
<template_parameter_type>
<normal>#ededed</normal>
<hover>#ededed</hover>
</template_parameter_type>
<file>
<normal>#88BAB3</normal>
<hover>#6AA39B</hover>
</file>
</colors>
<user>
<recent_projects>
<recent_project><!-- STRING: recent project path --></recent_project>
</recent_projects>
</user>
<network>
<plugin_port><!-- INTEGER: port the plugin listens to, standard is 6666 --></plugin_port>
<coati_port><!-- INTEGER: port coati is listening to, standard is 6667 --></coati_port>
</network>
<controls>
<mouse_back_button><!-- INTEGER: mouse button code of back button, default is 8 --></mouse_back_button>
<mouse_forward_button><!-- INTEGER: mouse button code of forward button, default is 16 --></mouse_forward_button>
</controls>
</config>
+21 -16
View File
@@ -7,28 +7,33 @@
<!-- COLOR: int int int int - rgba e.g. 125 125 125 255 -->
<config>
<language_settings>
<language><!-- STRING: name of the language, e.g. c, c++, spanish, greek, greek++,... --></language>
<standard><!-- STRING: language version, e.g. c++ '11' --></standard>
</language_settings>
<source>
<SourcePaths>
<SourcePath><!-- STRING: path to source file or directory, also used as header search path --></SourcePath>
</SourcePaths>
<source_paths>
<source_path><!-- STRING: path to source file or directory, also used as header search path --></source_path>
</source_paths>
<CompilerFlags>
<CompilerFlag><!-- STRING: compiler flag, including the dash e.g. -v --></CompilerFlag>
</CompilerFlags>
<compiler_flags>
<compiler_flag><!-- STRING: compiler flag, including the dash e.g. -v --></compiler_flag>
</compiler_flags>
<HeaderSearchPaths>
<HeaderSearchPath><!-- STRING: header search path for each path a HeaderSearchPath element --></HeaderSearchPath>
</HeaderSearchPaths>
<header_search_paths>
<header_search_path><!-- STRING: header search path for each path a header_search_path element --></header_search_path>
</header_search_paths>
<!-- MAC ONLY -->
<FrameworkSearchPaths>
<FrameworkSearchPath><!-- STRING: framework search path --></FrameworkSearchPath>
</FrameworkSearchPaths>
<framework_search_paths>
<framework_search_path><!-- STRING: framework search path --></framework_search_path>
</framework_search_paths>
<Extensions>
<HeaderExtensions><!-- STRING: extension for header/include e.g. .h --></HeaderExtensions>
<SourceExtensions><!-- STRING: extension for source e.g. .cpp --></SourceExtensions>
</Extensions>
<extensions>
<header_extensions><!-- STRING: extension for header/include e.g. .h --></header_extensions>
<source_extensions><!-- STRING: extension for source e.g. .cpp --></source_extensions>
</extensions>
</source>
</config>
+241
View File
@@ -0,0 +1,241 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
COLOR:
1. HEX RGB: #RRGGBB - e.g. #00FF00
2. HEX ARGB: #AARRGGBB - e.g. #5500FF00
3. Qt5 color name - e.g. white (http://doc.qt.io/qt-5/qcolor.html)
-->
<config>
<search>
<background></background>
<button>
<normal></normal>
<hover></hover>
<press></press>
<disabled></disabled>
<icon></icon>
</button>
<field>
<text></text>
<background></background>
<highlight></highlight>
</field>
<popup>
<text></text>
<by_text></by_text>
<background></background>
<highlight></highlight>
</popup>
<query>
<none>
<normal></normal>
<hover></hover>
</none>
<command>
<normal></normal>
<hover></hover>
</command>
<operator>
<normal></normal>
<hover></hover>
</operator>
</query>
</search>
<code>
<background></background>
<file>
<background></background>
<title>
<text></text>
<normal></normal>
<hover></hover>
<press></press>
<icon></icon>
</title>
<ref_count>
<text></text>
<background></background>
</ref_count>
</file>
<snippet>
<background></background>
<title>
<text></text>
<background></background>
<hover></hover>
</title>
<line_number>
<text></text>
<background></background>
</line_number>
<syntax>
<normal></normal>
<directive></directive>
<keyword></keyword>
<type></type>
<comment></comment>
<number></number>
<quotation></quotation>
<function></function>
</syntax>
<selection>
<location>
<normal>
<border></border>
<fill></fill>
</normal>
<focus>
<border></border>
<fill></fill>
</focus>
<active>
<border></border>
<fill></fill>
</active>
</location>
<scope>
<normal>
<border></border>
<fill></fill>
</normal>
<focus>
<border></border>
<fill></fill>
</focus>
<active>
<border></border>
<fill></fill>
</active>
</scope>
<error>
<normal>
<border></border>
<fill></fill>
</normal>
<focus>
<border></border>
<fill></fill>
</focus>
<active>
<border></border>
<fill></fill>
</active>
</error>
</selection>
</snippet>
</code>
<graph>
<background></background>
<node>
<!-- REQUIRED -->
<default>
<!-- NODE TEMPLATE-->
<like><!-- NODE TYPE NAME: Imitates the look of that node type. If defined all colors will be ignored --></like>
<fill>
<normal></normal>
<focus></focus> <!-- If not defined, the normal tag is used -->
</fill>
<border>
<normal></normal>
<focus></focus> <!-- If not defined, the normal tag is used -->
</border>
<text>
<normal></normal>
<focus></focus> <!-- If not defined, the normal tag is used -->
</text>
<icon>
<normal></normal>
<focus></focus> <!-- If not defined, the normal tag is used -->
</icon>
<hatching>
<normal></normal>
<focus></focus> <!-- If not defined, the normal tag is used -->
</hatching>
</default>
<!-- OPTIONAL: type specific node colors can be overriden by using the TEMPLATE within a type tag below -->
<type></type>
<class></class>
<struct></struct>
<enum></enum>
<typedef></typedef>
<template_parameter_type></template_parameter_type>
<function></function>
<method></method>
<field></field>
<global_variable></global_variable>
<enum_constant></enum_constant>
<undefined></undefined>
<namespace></namespace>
<file></file>
<macro></macro>
<access></access>
<bundle></bundle>
<count_number></count_number> <!-- The small circles with numbers in the graph -->
</node>
<edge>
<!-- REQUIRED -->
<default>
<!-- EDGE TEMPLATE-->
<like><!-- EDGE TYPE NAME: Imitates the look of that edge type. If defined all colors will be ignored --></like>
<normal></normal>
<focus></focus> <!-- If not defined, the normal tag is used -->
</default>
<!-- OPTIONAL: type specific edge colors can be overriden by using the TEMPLATE within a type tag below -->
<type_of></type_of>
<return_type></return_type>
<parameter_type></parameter_type>
<type_use></type_use>
<inheritance></inheritance>
<typedef></typedef>
<override></override>
<call></call>
<use></use>
<template_parameter></template_parameter>
<template_argument></template_argument>
<template_default_argument></template_default_argument>
<template_specialization></template_specialization>
<include></include>
<macro_use></macro_use>
<aggregation></aggregation>
</edge>
</graph>
<tool_tip>
<text></text>
<background></background>
</tool_tip>
</config>
+318
View File
@@ -0,0 +1,318 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<search>
<background>#494949</background>
<button>
<normal>#808080</normal>
<hover>#B1B1B1</hover>
<press>#CCCCCC</press>
<disabled>#606060</disabled>
<icon>white</icon>
</button>
<field>
<text>#3D3D3D</text>
<background>#808080</background>
<highlight>#B1B1B1</highlight>
</field>
<popup>
<text>#3D3D3D</text>
<by_text>#A0A0A0</by_text>
<background>#CCCCCC</background>
<highlight>#FFFFFF</highlight>
</popup>
<query>
<none>
<normal>#B1B1B1</normal>
<hover>#CCCCCC</hover>
</none>
<command>
<normal>#406D4D</normal>
<hover>#4E855E</hover>
</command>
<operator>
<normal>#7D2724</normal>
<hover>#8C2B29</hover>
</operator>
</query>
</search>
<code>
<background>#494949</background>
<file>
<background>#CCCCCC</background>
<title>
<text>black</text>
<normal>#CCCCCC</normal>
<hover>#BBBBBB</hover>
<press>#AAAAAA</press>
<icon>black</icon>
</title>
<ref_count>
<text>#C4C4C4</text>
<background>#494949</background>
</ref_count>
</file>
<snippet>
<background>#494949</background>
<title>
<text>#A0A0A0</text>
<background>transparent</background>
<hover>#2F2F2F</hover>
</title>
<line_number>
<text>#C4C4C4</text>
<background>#494949</background>
</line_number>
<syntax>
<normal>#C4C4C4</normal>
<directive>#00A0B6</directive>
<keyword>#00A0B6</keyword>
<type>#FF4A52</type>
<comment>#A0A0A4</comment>
<number>#EE7326</number>
<quotation>#D663D6</quotation>
<function>#FBBA00</function>
</syntax>
<selection>
<location>
<normal>
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>#B2B2B2</border>
<fill>transparent</fill>
</focus>
<active>
<border>#B2B2B2</border>
<fill>#4A4A4A</fill>
</active>
</location>
<scope>
<normal>
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>transparent</border>
<fill>transparent</fill>
</focus>
<active>
<border>transparent</border>
<fill>transparent</fill>
</active>
</scope>
<error>
<normal>
<border>transparent</border>
<fill>#A0FF0000</fill>
</normal>
<focus>
<border>transparent</border>
<fill>#FFFF0000</fill>
</focus>
<active>
<border>transparent</border>
<fill>#FFFF0000</fill>
</active>
</error>
</selection>
</snippet>
</code>
<graph>
<background>#494949</background>
<node>
<default>
<fill>
<normal>#807F80</normal>
</fill>
<border>
<normal>#FFFFFF</normal>
</border>
<text>
<normal>#3D3D3D</normal>
</text>
<icon>
<normal>#3D3D3D</normal>
</icon>
<hatching>
<normal>#494949</normal>
</hatching>
</default>
<type>
<border>
<normal>#20FFFFFF</normal>
<focus>#FFFFFF</focus>
</border>
<text>
<normal>#FFFFFF</normal>
</text>
<icon>
<normal>#FFFFFF</normal>
</icon>
</type>
<class>
<like>type</like>
</class>
<struct>
<like>type</like>
</struct>
<enum>
<like>type</like>
</enum>
<typedef>
<like>type</like>
</typedef>
<template_parameter_type>
<like>type</like>
</template_parameter_type>
<function>
<fill>
<normal>#FBBA00</normal>
<focus>#FFD05A</focus>
</fill>
<border>
<normal>transparent</normal>
<focus>#FFFFFF</focus>
</border>
</function>
<method>
<like>function</like>
</method>
<global_variable>
<fill>
<normal>#00A0B6</normal>
<focus>#3BAFB2</focus>
</fill>
<border>
<normal>transparent</normal>
<focus>#FFFFFF</focus>
</border>
</global_variable>
<field>
<like>global_variable</like>
</field>
<enum_constant>
<like>global_variable</like>
</enum_constant>
<undefined>
<fill>
<normal>#00000000</normal>
</fill>
<border>
<normal>#78282D</normal>
</border>
</undefined>
<namespace>
<like>undefined</like>
</namespace>
<file>
<fill>
<normal>#4E82F6</normal>
<focus>#7FA9F4</focus>
</fill>
<border>
<normal>#20FFFFFF</normal>
<focus>#FFFFFF</focus>
</border>
</file>
<macro>
<like>file</like>
</macro>
<access>
<fill>
<normal>#CCCCCC</normal>
</fill>
</access>
<bundle>
<fill>
<normal>#494949</normal>
</fill>
<border>
<normal>#80FFFFFF</normal>
<focus>#FFFFFF</focus>
</border>
<text>
<normal>#FFFFFF</normal>
</text>
<icon>
<normal>#FFFFFF</normal>
</icon>
</bundle>
<count_number>
<fill>
<normal>#494949</normal>
</fill>
<border>
<normal>#CCCCCC</normal>
</border>
<text>
<normal>#CCCCCC</normal>
</text>
</count_number>
</node>
<edge>
<default>
<normal>#797979</normal>
</default>
<override>
<normal>#CC5E89</normal>
</override>
<call>
<normal>#FBBA00</normal>
</call>
<use>
<normal>#2A6484</normal>
</use>
<template_parameter>
<normal>#C1305D</normal>
</template_parameter>
<template_argument>
<normal>#C1305D</normal>
</template_argument>
<template_default_argument>
<normal>#C1305D</normal>
</template_default_argument>
<template_specialization>
<normal>#C1305D</normal>
</template_specialization>
<include>
<normal>#4E82F6</normal>
</include>
<macro_use>
<normal>#4E82F6</normal>
</macro_use>
<aggregation>
<normal>#5D5D5D</normal>
<focus>#6D6D6D</focus>
</aggregation>
</edge>
</graph>
</config>
+302
View File
@@ -0,0 +1,302 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<search>
<background>white</background>
<button>
<normal>#E0E0E0</normal>
<hover>#B2B2B2</hover>
<press>#626262</press>
<disabled>#F4F4F4</disabled>
<icon>white</icon>
</button>
<field>
<text>black</text>
<background>#E0E0E0</background>
<highlight>#B2B2B2</highlight>
</field>
<popup>
<text>black</text>
<by_text>#A0A0A0</by_text>
<background>white</background>
<highlight>#B2B2B2</highlight>
</popup>
<query>
<none>
<normal>white</normal>
<hover>#F5F5F5</hover>
</none>
<command>
<normal>#8FBC92</normal>
<hover>#5EA071</hover>
</command>
<operator>
<normal>#FCA47E</normal>
<hover>#F97A4E</hover>
</operator>
</query>
</search>
<code>
<background>white</background>
<file>
<background>#E0E0E0</background>
<title>
<text>black</text>
<normal>#E0E0E0</normal>
<hover>#B2B2B2</hover>
<press>#626262</press>
<icon>black</icon>
</title>
<ref_count>
<text>black</text>
<background>white</background>
</ref_count>
</file>
<snippet>
<background>white</background>
<title>
<text>#A0A0A0</text>
<background>transparent</background>
<hover>#F5F5F5</hover>
</title>
<line_number>
<text>black</text>
<background>white</background>
</line_number>
<syntax>
<normal>black</normal>
<directive>#1B8856</directive>
<keyword>#1B8856</keyword>
<type>#C1492D</type>
<comment>#1A801A</comment>
<number>#C1315E</number>
<quotation>#865F9E</quotation>
<function>#CC9533</function>
</syntax>
<selection>
<location>
<normal>
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>#B2B2B2</border>
<fill>transparent</fill>
</focus>
<active>
<border>#B2B2B2</border>
<fill>#EDEDED</fill>
</active>
</location>
<scope>
<normal>
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>transparent</border>
<fill>transparent</fill>
</focus>
<active>
<border>transparent</border>
<fill>transparent</fill>
</active>
</scope>
<error>
<normal>
<border>transparent</border>
<fill>#80FF0000</fill>
</normal>
<focus>
<border>transparent</border>
<fill>#FFFF0000</fill>
</focus>
<active>
<border>transparent</border>
<fill>#FFFF0000</fill>
</active>
</error>
</selection>
</snippet>
</code>
<graph>
<background>white</background>
<node>
<default>
<fill>
<normal>#ededed</normal>
</fill>
<border>
<normal>#3C3C3C</normal>
</border>
<text>
<normal>black</normal>
</text>
<icon>
<normal>black</normal>
</icon>
<hatching>
<normal>white</normal>
</hatching>
</default>
<type>
<border>
<normal>#203C3C3C</normal>
<focus>#3C3C3C</focus>
</border>
</type>
<class>
<like>type</like>
</class>
<struct>
<like>type</like>
</struct>
<enum>
<like>type</like>
</enum>
<typedef>
<like>type</like>
</typedef>
<template_parameter_type>
<like>type</like>
</template_parameter_type>
<function>
<fill>
<normal>#F4D07D</normal>
<focus>#F4BC3D</focus>
</fill>
<border>
<normal>transparent</normal>
<focus>#3C3C3C</focus>
</border>
</function>
<method>
<like>function</like>
</method>
<global_variable>
<fill>
<normal>#7BB5D4</normal>
<focus>#42A1D4</focus>
</fill>
<border>
<normal>transparent</normal>
<focus>#3C3C3C</focus>
</border>
</global_variable>
<field>
<like>global_variable</like>
</field>
<enum_constant>
<like>global_variable</like>
</enum_constant>
<undefined>
<fill>
<normal>#00000000</normal>
</fill>
<border>
<normal>#CC8D91</normal>
</border>
</undefined>
<namespace>
<like>undefined</like>
</namespace>
<file>
<fill>
<normal>#DDD</normal>
<focus>#CCC</focus>
</fill>
<border>
<normal>#203C3C3C</normal>
<focus>#3C3C3C</focus>
</border>
</file>
<macro>
<like>file</like>
</macro>
<access>
<fill>
<normal>white</normal>
</fill>
</access>
<bundle>
<fill>
<normal>white</normal>
</fill>
<border>
<normal>#803C3C3C</normal>
<focus>#3C3C3C</focus>
</border>
</bundle>
<count_number>
<fill>
<normal>white</normal>
</fill>
<border>
<normal>#7C7C7C</normal>
</border>
<text>
<normal>#5C5C5C</normal>
</text>
</count_number>
</node>
<edge>
<default>
<normal>#878787</normal>
</default>
<override>
<normal>#CC5E89</normal>
</override>
<call>
<normal>#F4BC3D</normal>
</call>
<use>
<normal>#3190BA</normal>
</use>
<template_parameter>
<normal>#C1305D</normal>
</template_parameter>
<template_argument>
<like>template_parameter</like>
</template_argument>
<template_default_argument>
<like>template_parameter</like>
</template_default_argument>
<template_specialization>
<like>template_parameter</like>
</template_specialization>
<template_member_specialization>
<like>template_parameter</like>
</template_member_specialization>
<aggregation>
<normal>#EEE</normal>
<focus>#DDD</focus>
</aggregation>
</edge>
</graph>
</config>
+324
View File
@@ -0,0 +1,324 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<search>
<background>#272728</background>
<button>
<normal>#777777</normal>
<hover>#555555</hover>
<press>#444444</press>
<disabled>#333333</disabled>
<icon>white</icon>
</button>
<field>
<text>#F7F7F7</text>
<background>#777777</background>
<highlight>#555555</highlight>
</field>
<popup>
<text>#F7F7F7</text>
<by_text>#A0A0A0</by_text>
<background>#272728</background>
<highlight>#555555</highlight>
</popup>
<query>
<none>
<normal>#2F2F2F</normal>
<hover>black</hover>
</none>
<command>
<normal>#406D4D</normal>
<hover>#4E855E</hover>
</command>
<operator>
<normal>#7D2724</normal>
<hover>#8C2B29</hover>
</operator>
</query>
</search>
<code>
<background>#272728</background>
<file>
<background>#777777</background>
<title>
<text>#F7F7F7</text>
<normal>#777777</normal>
<hover>#555555</hover>
<press>#444444</press>
<icon>white</icon>
</title>
<ref_count>
<text>#F7F7F7</text>
<background>#272728</background>
</ref_count>
</file>
<snippet>
<background>#272728</background>
<title>
<text>#A0A0A0</text>
<background>transparent</background>
<hover>#2F2F2F</hover>
</title>
<line_number>
<text>#F7F7F7</text>
<background>#272728</background>
</line_number>
<syntax>
<normal>#F7F7F7</normal>
<directive>#1F9C62</directive>
<keyword>#1F9C62</keyword>
<type>#D95233</type>
<comment>#A0A0A4</comment>
<number>#CC3463</number>
<quotation>#9368AD</quotation>
<function>#D69C36</function>
</syntax>
<selection>
<location>
<normal>
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>#B2B2B2</border>
<fill>transparent</fill>
</focus>
<active>
<border>#B2B2B2</border>
<fill>#4A4A4A</fill>
</active>
</location>
<scope>
<normal>
<border>transparent</border>
<fill>transparent</fill>
</normal>
<focus>
<border>transparent</border>
<fill>transparent</fill>
</focus>
<active>
<border>transparent</border>
<fill>transparent</fill>
</active>
</scope>
<error>
<normal>
<border>transparent</border>
<fill>#A0FF0000</fill>
</normal>
<focus>
<border>transparent</border>
<fill>#FFFF0000</fill>
</focus>
<active>
<border>transparent</border>
<fill>#FFFF0000</fill>
</active>
</error>
</selection>
</snippet>
</code>
<graph>
<background>#272728</background>
<node>
<default>
<fill>
<normal>#4D4D4D</normal>
</fill>
<border>
<normal>#C3C3C3</normal>
</border>
<text>
<normal>#F7F7F7</normal>
</text>
<icon>
<normal>#F7F7F7</normal>
</icon>
<hatching>
<normal>#272728</normal>
</hatching>
</default>
<type>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</type>
<class>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</class>
<struct>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</struct>
<enum>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</enum>
<typedef>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</typedef>
<template_parameter_type>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</template_parameter_type>
<function>
<fill>
<normal>#7A681F</normal>
<focus>#9C8528</focus>
</fill>
<border>
<normal>transparent</normal>
<focus>#C3C3C3</focus>
</border>
</function>
<method>
<like>function</like>
</method>
<global_variable>
<fill>
<normal>#21516B</normal>
<focus>#2A6484</focus>
</fill>
<border>
<normal>transparent</normal>
<focus>#C3C3C3</focus>
</border>
</global_variable>
<field>
<like>global_variable</like>
</field>
<enum_constant>
<like>global_variable</like>>
</enum_constant>
<undefined>
<fill>
<normal>#00000000</normal>
</fill>
<border>
<normal>#78282D</normal>
</border>
</undefined>
<namespace>
<like>undefined</like>
</namespace>
<file>
<fill>
<normal>#1B564E</normal>
<focus>#247368</focus>
</fill>
<border>
<normal>#20C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</file>
<macro>
<like>file</like>
</macro>
<access>
<fill>
<normal>#272728</normal>
</fill>
</access>
<bundle>
<fill>
<normal>#272728</normal>
</fill>
<border>
<normal>#80C3C3C3</normal>
<focus>#C3C3C3</focus>
</border>
</bundle>
<count_number>
<fill>
<normal>#272728</normal>
</fill>
<border>
<normal>#C3C3C3</normal>
</border>
<text>
<normal>#F7F7F7</normal>
</text>
</count_number>
</node>
<edge>
<default>
<normal>#797979</normal>
</default>
<override>
<normal>#CC5E89</normal>
</override>
<call>
<normal>#9C8528</normal>
</call>
<use>
<normal>#2A6484</normal>
</use>
<template_parameter>
<normal>#C1305D</normal>
</template_parameter>
<template_argument>
<normal>#C1305D</normal>
</template_argument>
<template_default_argument>
<normal>#C1305D</normal>
</template_default_argument>
<template_specialization>
<normal>#C1305D</normal>
</template_specialization>
<template_member_specialization>
<normal>#C1305D</normal>
</template_member_specialization>
<include>
<normal>#247368</normal>
</include>
<macro_use>
<normal>#247368</normal>
</macro_use>
<aggregation>
<normal>#5D5D5D</normal>
<focus>#6D6D6D</focus>
</aggregation>
</edge>
</graph>
</config>
+23
View File
@@ -0,0 +1,23 @@
* {
color: white;
font-size: 12px;
font-weight: 100;
}
#small {
font-size: 12px;
}
#closeButton {
background: transparent;
border: none;
color: white;
font-size: 14pt;
height: 20px;
width: 20px;
}
#closeButton:hover {
border: 2px solid white;
border-radius: 10px;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

+56 -33
View File
@@ -1,42 +1,58 @@
#code_file_list {
background-color: white;
#code_file_list_base, #code_file_list {
background-color: <color:code/background>;
}
* {
font-size: <setting:font_size>pt;
}
#code_file {
background-color: white;
border: 2px solid #E0E0E0;
background-color: <color:code/snippet/background>;
border: 2px solid <color:code/file/background>;
border-radius: 14px;
}
#code_file #title_widget {
background-color: #E0E0E0;
background-color: <color:code/file/background>;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
margin-bottom: 5px;
min-height: 28px;
padding-right: 5px;
}
#code_file #title_label {
background: none;
background-color: <color:code/file/title/normal>;
border: none;
border-radius: 3px;
font-size: 14px;
color: <color:code/file/title/text>;
padding: 2px 4px;
margin: 2px 8px;
margin: 1px 8px 3px;
}
#code_file #title_label:hover {
background-color: #D0D0D0;
background-color: <color:code/file/title/hover>;
}
#code_file #title_label:disabled {
color: black;
#code_file #title_label:pressed {
background-color: <color:code/file/title/press>;
}
#code_file #code_snippet{
border-top: 2px solid #E0E0E0;
padding-top: 2px;
#code_file #references_label {
background-color: <color:code/file/ref_count/background>;
border: none;
border-radius: 10px;
color: <color:code/file/ref_count/text>;
font-size: <setting:font_size-2>pt;
padding: 0px 3px;
margin: 4px 0px 4px;
}
#code_file #code_snippet {
background-color: <color:code/snippet/background>;
border-top: 2px solid <color:code/file/background>;
}
#code_file #code_snippet * {
font-family: "<setting:font_name>";
}
#code_file #code_snippet[isFirst=true] {
@@ -44,32 +60,45 @@
padding-top: 0px;
}
#code_file #code_snippet[isLast=true] {
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
}
#code_file #code_snippet #scope_name, #code_file #code_snippet #dots {
background: none;
color: gray;
background-color: <color:code/snippet/title/background>;
color: <color:code/snippet/title/text>;
border: none;
font-family: "Source Code Pro";
font-size: 14px;
}
#code_file #code_snippet #scope_name:hover {
background-color: <color:code/snippet/title/hover>;
}
#code_file #code_snippet #dots {
background-color: <color:code/snippet/line_number/background>;
padding-right: 13px;
text-align: right;
}
#code_file #code_snippet #scope_name {
padding-left: 4px;
text-align: left;
}
#code_file #code_snippet #line_number_area {
background-color: <color:code/snippet/line_number/background>;
border: none;
color: <color:code/snippet/line_number/text>;
}
#code_file #code_snippet[isLast=true] #line_number_area {
border-bottom-left-radius: 12px;
}
#code_area {
background-color: transparent;
font-family: "Source Code Pro";
font-size: 14px;
}
#code_area #line_number_area {
font-family: "Source Code Pro";
font-size: 14px;
color: <color:code/snippet/syntax/normal>;
}
#code_file #maximize_button, #code_file #snippet_button, #code_file #minimize_button {
@@ -101,9 +130,3 @@
#code_file #minimize_button:enabled {
border-image: url(data/gui/code_view/images/minimize_active.png);
}
QToolTip {
background-color: rgb(204, 204, 204);
border: 1px solid rgb(0, 0, 0);
color: rgb(0, 0, 0);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

@@ -0,0 +1,3 @@
QGraphicsView, QGraphicsScene {
background-color: <color:graph/background>;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

+98
View File
@@ -0,0 +1,98 @@
{\rtf1\ansi\ansicpg1252\deff0\deflang3079{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang7\f0\fs22 Coati\par
Software License Agreement\par
Effective 1.1.2016\par
\par
BY INSTALLING OR USING THIS SOFTWARE, YOU ARE BECOMING A PARTY TO, AND ARE CONSENTING TO BE BOUND BY, THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, DO NOT INSTALL OR USE THIS SOFTWARE.\par
\par
\par
\b DEFINITIONS\b0\par
\par
"Software" means:\par
\bullet\tab A major version of Coati in executable form. The major version is defined by the leading number of the version string (e.g. the major version of Coati 1.x.x.x is version 1); \par
\bullet\tab documentation for that major version of Coati;\par
\bullet\tab minor updates included in software maintenance which are indicated by an increase in the numbers that follow the major version number (e.g. the update from Coati 1.0.0.0 to Coati 1.0.1.4).\par
"Licensor" means:\par
\bullet\tab Coati Software OG, having a place of business at Schlossallee 7/1, 5412 Puch/Hallein, Austria.\par
"Licensee" means:\par
\bullet\tab the individual evaluating the trial version of the Software;\par
\bullet\tab the company, corporation, or organization that purchased a License(s) for the Software;\par
\bullet\tab the individual who purchased a License for the Software.\par
"Activation Key" means:\par
\bullet\tab the name of the Licensee, the kind of license, the major version of the software that is licensed, and a hashcode; the combination of these values allows the Licensee to activate a genuine copy of the Software.\par
"Authorized User" means:\par
\bullet\tab the individual evaluating the Software during a trial;\par
\bullet\tab an employee or independent contractor who might at any time use the Software, of the company, corporation, or organization that purchased a License(s) for the Software; an entity has one Authorized User for each License purchased;\par
\bullet\tab the individual who purchased a License for the Software; the individual is the only Authorized User.\par
\par
\par
\b GRANT\b0\par
\par
Subject to the terms of this Agreement, the Licensor hereby grants the Licensee a non-transferable, non-exclusive, non-sub-licensable, limited license that allows:\par
\bullet\tab the Licensee to distribute (an) Activation Key(s) to Authorized User(s);\par
\bullet\tab Authorized User(s) to install the licensed version of the Software on computer PCs where potential use of the Software is restricted exclusively to Authorized User(s);\par
\bullet\tab Authorized User(s) to use the Software on computer PCs, in virtual machines, in combination with multiple IDEs, and in combination with multiple instances of an IDE;\par
\bullet\tab Authorized User(s) to use the trial version of the software in order to examine the provided example project;\par
\bullet\tab Licensee to make a copy of the Software for archival purposes provided the copy contains all of the proprietary notices of the Software.\par
In case the Licensee of the software is a company, corporation, or organization the Licensor has the right to mention this usage of the Software on its own website.\par
\par
\par
\b RESTRICTIONS\b0\par
\par
Licensee will not, and will have no right to:\par
\bullet\tab use the trial version of the software for any commercial purposes;\par
\bullet\tab distribute, use, or transfer an Activation Key(s) that has been superseded by an Activation Key(s) provided with software maintenance;\par
\bullet\tab modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction), create derivative works based on, or otherwise attempt to discover the source code or underlying ideas or algorithms of the Software;\par
\bullet\tab sell, rent, lease, distribute, or otherwise transfer rights to the Software without prior written consent from Licensor;\par
\bullet\tab remove any proprietary notices or labels from the Software.\par
\par
\par
\b TITLE AND COPYRIGHT\par
\b0\par
Title, ownership rights, intellectual property rights, and copyright to the Software, and any copies or portions thereof, shall remain in Licensor. The Software is protected by European copyright directives, Austrian copyright laws as well as United States copyright laws and international treaty provisions.\par
\par
\par
\b DISCLAIMER OF WARRANTY\b0\par
\par
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND. LICENSOR HEREBY DISCLAIMS ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS AGREEMENT. SOME U.S. STATES DO NOT ALLOW EXCLUSIONS OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO LICENSEE. LICENSEE MAY HAVE OTHER LEGAL RIGHTS THAT VARY FROM STATE TO STATE OR BY JURISDICTION.\par
\par
\par
\b LIMITATION OF LIABILITY\par
\b0\par
LICENSEE ASSUMES THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. LICENSOR ASSUMES NO LIABILITY FOR THE COST OF ANY SERVICE OR REPAIR IF THE SOFTWARE IS DEFECTIVE. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, STRICT LIABILITY, OR OTHERWISE, SHALL LICENSOR, OR ITS LICENSORS, SUPPLIERS OR RESELLERS, BE LIABLE TO LICENSEE OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES. IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES IN EXCESS OF THE MONEY PAID FOR THE SOFTWARE, EVEN IF LICENSOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. FURTHERMORE, SOME U.S. STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION AND EXCLUSION MAY NOT APPLY TO LICENSEE.\par
\par
\par
\b TERMINATION\par
\b0\par
The license granted herein shall be perpetual. If Licensee fails to comply with any of the terms of this Agreement, this Agreement and the rights granted herein will terminate immediately. Licensor may, at its sole discretion and at any time, terminate this Agreement. On termination, Licensee must cease using and destroy all copies of the Software.\par
\par
\par
\b EXPORT CONTROLS\par
\b0\par
Licensee shall comply with all export laws, restrictions and regulations of the United States, the Directive 2009/428/EC of the European Parliament and of the Council and the Austrian Au\'dfenwirtschaftsgesetz 2011, BGBl I No. 26/2011. Licensee shall not export, re-export or otherwise transfer the Software to any country for which the United States or the European Union or Austria maintains an embargo, or to any person or entity on the U.S. Department of Treasury List of Specially Designated Nationals or the U.S. Department of Commerce Denied Persons List or Entity List. Licensee represents and warrants that licensee is not located in, under the control of, or a national or resident of any restricted country or on any such list.\par
\par
\par
\b THIRD PARTY CREDITS\par
\b0\par
Portions of the Software utilize or include third party software and other copyrighted materials. Credits, licensing terms, and disclaimers for such materials are contained in the installation directory for the Software, and are accessible via the \ldblquote Licenses\rdblquote dialog for the Software. Licensee agrees that use of such copyrighted materials is governed by their respective terms.\par
\par
\par
\b ENTIRE AGREEMENT\par
\b0\par
This Agreement represents the complete agreement concerning this license between the parties and supersedes all prior agreements and representations between them. It may be amended only in writing executed by both parties. Coati Software OG reserves the exclusive right to periodically update this EULA at its discretion at any time, with reasonable notice to you by posting the new EULA at the following URL: {\field{\*\fldinst{HYPERLINK "http://www.coati.io/"}}{\fldrslt{\ul\cf1 http://www.coati.io/}}}\f0\fs22 . Any action arising out of or relating to this Agreement may be brought exclusively in Salzburg, Austria, and Coati Software OG and you irrevocably consent to the jurisdiction of such courts and venue in Salzburg, Austria.\par
\par
\par
\b CONTACT\par
\b0\par
If you have questions regarding this agreement, contact:\par
\par
Coati Software OG\par
Schlossallee 7/1\par
5412 Puch/Hallein\par
Austria\par
\par
support@coati.io\par
\par
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

+4 -10
View File
@@ -1,20 +1,20 @@
#refresh_bar {
background: white;
background: transparent;
}
QPushButton {
background: #E0E0E0;
background: <color:search/button/normal>;
border: none;
height: 30px;
width: 30px;
}
QPushButton:hover, QPushButton:checked {
background: #B2B2B2;
background: <color:search/button/hover>;
}
QPushButton:pressed {
background: #626262;
background: <color:search/button/press>;
}
#refresh_button {
@@ -27,9 +27,3 @@ QPushButton:pressed {
border-bottom-right-radius: 12px;
border-top-right-radius: 12px;
}
QToolTip {
background-color: rgb(204, 204, 204);
border: 1px solid rgb(0, 0, 0);
color: rgb(0, 0, 0);
}
@@ -1,8 +0,0 @@
QPushButton {
border: none;
font-family: "Source Code Pro";
font-size: 16px;
height: 20px;
padding-left: 4px;
padding-right: 4px;
}
+22 -35
View File
@@ -1,9 +1,18 @@
* {
font-size: <setting:font_size>pt;
}
#search_box, #search_box * {
font-family: "<setting:font_name>";
font-size: <setting:font_size+2>pt;
}
#search_bar {
background: white;
background-color: transparent;
}
QWidget#search_box_container {
background: #E0E0E0;
background: <color:search/field/background>;
border: none;
border-bottom-left-radius: 12px;
border-top-left-radius: 12px;
@@ -11,62 +20,40 @@ QWidget#search_box_container {
}
QLineEdit#search_box {
background: #E0E0E0;
background-color: transparent;
border: none;
font-family: "Source Code Pro";
font-size: 16px;
height: 24px;
selection-background-color: #B2B2B2;
color: <color:search/field/text>;
selection-background-color: <color:search/field/highlight>;
}
QWidget#search_box_highlight {
background: #B2B2B2;
background-color: <color:search/field/highlight>;
border: none;
height: 24px;
}
QAbstractItemView#search_box_popup {
background-color: white;
background-color: <color:search/popup/background>;
border: none;
font-family: "Source Code Pro";
font-size: 14pt;
color: <color:search/popup/text>;
font-family: "<setting:font_name>";
margin: 8px 0 0;
min-height: 26px;
selection-background-color: #B2B2B2;
selection-background-color: <color:search/popup/highlight>;
}
QPushButton#search_button {
background: #E0E0E0;
background: <color:search/button/normal>;
border: none;
border-bottom-right-radius: 12px;
border-top-right-radius: 12px;
background-position: 15px 5px;
height: 30px;
width: 30px;
}
#search_button:hover {
background: #B2B2B2;
background: <color:search/button/hover>;
}
#search_button:pressed {
background: #626262;
}
/*QPushButton#case_sensitive_button {
border: none;
border-image: url(data/gui/search_view/images/button_case_sensitive_inactive.png);
height: 26px;
width: 26px;
margin-left: 4px;
}
QPushButton#case_sensitive_button:checked {
border-image: url(data/gui/search_view/images/button_case_sensitive_active.png);
}*/
QToolTip {
background-color: rgb(204, 204, 204);
border: 1px solid rgb(0, 0, 0);
color: rgb(0, 0, 0);
background: <color:search/button/press>;
}
@@ -0,0 +1,58 @@
QtDirectoryListBox {
background-color: rgba(255, 255, 255, 200);
border: 1px solid lightgray;
border-radius: 12px;
}
QListWidget {
background: transparent;
border: none;
margin: 2px 0 2px 0;
}
QListWidget::item {
border-bottom: 1px solid lightgray;
height: 20px;
}
QListWidget::item:selected {
background-color: #EEE;
}
QtListItemWidget #field {
background-color: transparent;
border: none;
font-size: 12px;
margin-top: 2px;
}
QtListItemWidget #button {
border: 1px solid lightgray;
border-radius: 8px;
font-size: 12px;
margin-top: 2px;
margin-right: 2px;
width: 20px;
}
QtListItemWidget #button:hover {
color: white;
background: #2D3F85;
}
#bar {
border-top: 1px solid lightgray;
}
#roundedButton {
color: white;
height: 16px;
margin-right: 3px;
width: 16px;
border: none;
}
#dropInfo {
color: lightgray;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1,77 @@
#titleLabel {
color: black;
font-size: 16pt;
font-weight: bold;
}
QLineEdit {
background-color: rgba(255, 255, 255, 200);
border-radius: 10px;
border: 1px solid lightgrey;
padding-left: 5px;
padding-right: 5px;
}
QLineEdit:disabled {
border: 1px solid lightgrey;
}
#formArea {
background-color: transparent;
border: none;
border-top: 1px solid lightgrey;
border-bottom: 1px solid lightgrey;
}
#form {
background-color: rgba(255, 255, 255, 150);
}
#form QLabel {
font-weight: bold;
}
#form #help {
background: transparent;
border: 1px solid #575656;
border-radius: 9px;
color: #575656;
height: 16px;
width: 16px;
}
#form #help:hover {
border-color: black;
color: black;
}
#moreButton {
background-color: rgba(255, 255, 255, 200);
border: 1px solid lightgray;
border-radius: 10px;
color: gray;
font-size: 15px;
height: 20px;
margin-left: 10px;
width: 28px;
}
#moreButton:hover {
color: white;
background: #2D3F85;
}
#windowButton {
background: white;
border: 1px solid lightgray;
border-radius: 10px;
color: black;
font-size: 17pt;
height: 30px;
width: 140px;
}
#windowButton:hover {
color: white;
background: #2D3F85;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,29 @@
#projectButton {
background: white;
border: 1px solid lightgray;
border-radius: 10px;
font-size: 17pt;
}
#projectButton:hover {
background: #2D3F85;
color: white;
}
#recentButton {
background: none;
border: none;
color: black;
font-size: 12pt;
}
#recentButton:hover {
background-color: rgba(45, 63, 133, 70);
border-radius: 10px;
}
#recentLabel {
color: black;
font-size: 16pt;
font-weight: bold;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+5
View File
@@ -0,0 +1,5 @@
QToolTip {
background-color: #E0E0E0;
color: black;
font-size: <setting:font_size>pt;
}
@@ -1,9 +1,9 @@
#undo_redo_bar {
background: white;
background: transparent;
}
QPushButton {
background: #E0E0E0;
background: <color:search/button/normal>;
border: none;
background-position: 15px 5px;
height: 30px;
@@ -22,19 +22,13 @@ QPushButton {
}
QPushButton:disabled {
background: #F4F4F4;
background: <color:search/button/disabled>;
}
QPushButton:hover {
background: #B2B2B2;
background: <color:search/button/hover>;
}
QPushButton:pressed {
background: #626262;
}
QToolTip {
background-color: rgb(204, 204, 204);
border: 1px solid rgb(0, 0, 0);
color: rgb(0, 0, 0);
background: <color:search/button/press>;
}
+1
View File
@@ -0,0 +1 @@
%windir%\system32\msiexec.exe /I{2A3B2FF5-A114-4CAB-88FB-DE8942D5B8EB}
@@ -0,0 +1,67 @@
#include "artificial_player.h"
ArtificialPlayer::ArtificialPlayer( Field::Token token, const char* name )
: Player( token, name ) {
}
ArtificialPlayer::~ArtificialPlayer() {
}
Field::Move ArtificialPlayer::Turn( const Field& field ) const {
Field fakeField = field.Clone();
Node node = MinMax( fakeField, token_ );
return node.move;
}
ArtificialPlayer::Node ArtificialPlayer::MinMax( Field& field, Field::Token token ) const {
Node node;
node.value = -10000;
Field::Move move;
int sameMove;
for ( int i = 0; i < 3; i++ ) {
move.row = i;
for ( int j = 0; j < 3; j++ ) {
move.col = j;
if ( !field.IsEmpty( move ) ) {
continue;
}
field.MakeMove( move, token );
int turnValue = Evaluate( field, token );
if ( !turnValue && !field.IsFull() ) {
turnValue = -MinMax( field, Field::Opponent( token ) ).value;
}
field.ClearMove( move );
if ( turnValue > node.value ) {
node.move = move;
node.value = turnValue;
sameMove = 1;
} else if ( turnValue == node.value ) {
sameMove++;
if ( 1 % sameMove == 0 ) {
node.move = move;
}
}
}
}
return node;
}
int ArtificialPlayer::Evaluate( const Field& field, Field::Token token ) const {
if ( field.SameInRow( token, 3 ) ) {
return 2;
} else if ( field.SameInRow( Field::Opponent( token ), 2 ) ) {
return -1;
} else if ( field.SameInRow( token, 2 ) > 1 ) {
return 1;
}
return 0;
}
@@ -0,0 +1,24 @@
#ifndef _ARTIFICIAL_PLAYER_
#define _ARTIFICIAL_PLAYER_
#include "player.h"
class ArtificialPlayer : public Player {
public:
ArtificialPlayer( Field::Token token, const char* name );
virtual ~ArtificialPlayer();
virtual Field::Move Turn( const Field& field ) const;
private:
struct Node {
Field::Move move;
int value;
};
Node MinMax( Field& field, Field::Token token ) const;
int Evaluate( const Field& field, Field::Token token ) const;
};
#endif // _ARTIFICIAL_PLAYER_
@@ -0,0 +1,126 @@
#include "field.h"
#include "io.h"
Field::Token Field::Opponent( Token token ) {
if ( token == PlayerA ) {
return PlayerB;
} else if (token == PlayerB){
return PlayerA;
} else {
return None;
}
}
Field::Field()
: left_( 9 ) {
grid_ = new Token* [3];
for ( int i = 0; i < 3 ; i++ ) {
grid_[i] = new Token[3];
}
}
Field::~Field() {
for ( int i = 0; i < 3; i++ ) {
delete [] grid_[i];
}
delete [] grid_;
}
Field Field::Clone() const {
Field field;
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
field.grid_[i][j] = grid_[i][j];
}
}
field.left_ = left_;
return field;
}
void Field::Clear() {
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
grid_[i][j] = None;
}
}
left_ = 9;
}
void Field::Show() const {
io::stringOut(" 1 2 3\n");
for ( int row = 0; row < 3; row++ ) {
io::numberOut(row + 1);
io::stringOut(" ");
for ( int col = 0; col < 3; col++ ) {
if ( grid_[row][col] == PlayerA ) {
io::stringOut(" X ");
} else if ( grid_[row][col] == PlayerB ) {
io::stringOut(" O ");
} else {
io::stringOut(" ");
}
if ( col < 2 ) {
io::stringOut("|");
}
}
if ( row < 2 ) {
io::stringOut("\n -----------\n");
}
}
io::stringOut("\n\n");
}
int Field::SameInRow( Token token, int amount ) const {
int sum = amount * token;
int count = 0;
for ( int i = 0; i < 3; i++ ) {
if ( grid_[i][0] + grid_[i][1] + grid_[i][2] == sum ) {
count++;
} else if ( grid_[0][i] + grid_[1][i] + grid_[2][i] == sum ) {
count++;
}
}
if ( grid_[0][0] + grid_[1][1] + grid_[2][2] == sum ) {
count++;
} else if ( grid_[2][0] + grid_[1][1] + grid_[0][2] == sum ) {
count++;
}
return count;
}
bool Field::InRange( const Move& move ) const {
return move.row >= 0 && move.row < 3 && move.col >= 0 && move.col < 3;
}
bool Field::IsEmpty( const Move& move ) const {
return grid_[move.row][move.col] == None;
}
bool Field::IsFull() const {
return left_ == 0;
}
void Field::MakeMove( const Move& move, Token token ) {
if ( !InRange( move ) || !IsEmpty( move ) || token == None || !left_ ) {
return;
}
grid_[move.row][move.col] = token;
left_--;
}
void Field::ClearMove( const Move& move ) {
if ( !InRange( move ) || !IsEmpty( move ) || left_ == 9 ) {
return;
}
grid_[move.row][move.col] = None;
left_++;
}
@@ -0,0 +1,41 @@
#ifndef _FIELD_
#define _FIELD_
class Field {
public:
enum Token {
None = 0,
PlayerA = 1,
PlayerB = 4
};
static Token Opponent( Token token );
struct Move {
int row;
int col;
};
Field();
~Field();
Field Clone() const;
void Clear();
void Show() const;
int SameInRow( Token token, int amount ) const;
bool InRange( const Move& move ) const;
bool IsEmpty( const Move& move ) const;
bool IsFull() const;
void MakeMove( const Move& move, Token token );
void ClearMove( const Move& move );
private:
Token** grid_;
int left_;
};
#endif // _FIELD_
@@ -0,0 +1,49 @@
#include "human_player.h"
#include "io.h"
HumanPlayer::HumanPlayer( Field::Token token, const char* name )
: Player( token, name ) {
}
HumanPlayer::~HumanPlayer() {
}
Field::Move HumanPlayer::Turn( const Field& field ) const {
Field::Move move;
io::stringOut(name_);
io::stringOut("\n");
do {
move = Input();
move.row -= 1;
move.col -= 1;
} while ( !Check( field, move ) );
return move;
}
Field::Move HumanPlayer::Input() const {
Field::Move move;
move.row = -1;
move.col = -1;
io::stringOut("Insert row: ");
move.row = io::numberIn();
io::stringOut("Insert column: ");
move.col = io::numberIn();
io::stringOut("\n");
return move;
}
bool HumanPlayer::Check( const Field& field, const Field::Move& move ) const {
if ( !field.InRange( move ) ) {
io::stringOut("Wrong input!\n");
return false;
} else if ( !field.IsEmpty( move ) ) {
io::stringOut("Is occupied!\n");
return false;
}
return true;
}
@@ -0,0 +1,19 @@
#ifndef _HUMAN_PLAYER_
#define _HUMAN_PLAYER_
#include "player.h"
class HumanPlayer : public Player {
public:
HumanPlayer( Field::Token token, const char* name );
virtual ~HumanPlayer();
virtual Field::Move Turn( const Field& field ) const;
private:
Field::Move Input() const;
bool Check( const Field& field, const Field::Move& move ) const;
};
#endif // _HUMAN_PLAYER_
@@ -0,0 +1,23 @@
#include "io.h"
// #include <iostream>
// #include <sstream>
// #include <string>
int io::numberIn() {
// std::string input;
// getline( std::cin, input );
// std::stringstream stream( input );
int number;
// stream >> number;
return number;
}
void io::numberOut(int num) {
// std::cout << num;
}
void io::stringOut(const char* str) {
// std::cout << str;
}
+13
View File
@@ -0,0 +1,13 @@
#ifndef _IO_
#define _IO_
namespace io {
int numberIn();
void numberOut(int num);
void stringOut(const char* str);
}
#endif // _IO_
@@ -0,0 +1,11 @@
#include "tictactoe.h"
int main() {
TicTacToe tictactoe;
while ( tictactoe.Start() ) {
tictactoe.Run();
}
return 0;
}
@@ -0,0 +1,19 @@
#include "player.h"
Player::Player( Field::Token token, const char* name )
: token_( token )
, name_( name ) {
}
Player::~Player() {
}
const Field::Token& Player::getToken() const
{
return token_;
}
const char* Player::getName() const
{
return name_;
}
@@ -0,0 +1,21 @@
#ifndef _PLAYER_
#define _PLAYER_
#include "field.h"
class Player {
public:
Player( Field::Token token, const char* name );
virtual ~Player();
virtual Field::Move Turn( const Field& field ) const = 0;
const Field::Token& getToken() const;
const char* getName() const;
protected:
const Field::Token token_;
const char* name_;
};
#endif // _PLAYER_
@@ -0,0 +1,85 @@
#include "tictactoe.h"
#include "artificial_player.h"
#include "human_player.h"
#include "io.h"
TicTacToe::TicTacToe() {
players_[0] = 0;
players_[1] = 0;
}
TicTacToe::~TicTacToe() {
Reset();
}
bool TicTacToe::Start() {
Reset();
io::stringOut("Tic Tac Toe\n\n[1] Human\n[2] Computer\n[3] Quit\n\n");
players_[0] = SelectPlayer( Field::PlayerA, "Player A" );
if ( !players_[0] ) {
return false;
}
players_[1] = SelectPlayer( Field::PlayerB, "Player B" );
if ( !players_[1] ) {
return false;
}
io::stringOut("\n");
return true;
}
void TicTacToe::Run() {
field_.Show();
int playerIndex = 0;
for ( int i = 0; i < 9; i++ ) {
Player& player = *players_[playerIndex];
field_.MakeMove( player.Turn( field_ ), player.getToken() );
field_.Show();
if ( field_.SameInRow( player.getToken(), 3 ) ) {
io::stringOut(player.getName());
io::stringOut(" won!\n\n");
return;
}
playerIndex = ( playerIndex + 1 ) % 2;
}
io::stringOut("Game ends in draw!\n\n");
}
void TicTacToe::Reset() {
field_.Clear();
for ( int i = 0; i < 2; i++ ) {
if ( players_[i] ) {
delete players_[i];
players_[i] = 0;
}
}
}
Player* TicTacToe::SelectPlayer( Field::Token token, const char* name ) const {
int selection = 0;
while ( true ) {
io::stringOut("Choose ");
io::stringOut(name);
io::stringOut(": ");
selection = io::numberIn();
switch ( selection ) {
case 1 : return new HumanPlayer( token, name );
case 2 : return new ArtificialPlayer( token, name );
case 3 : return 0;
default : io::stringOut("Wrong input!\n");
}
}
}
@@ -0,0 +1,23 @@
#ifndef _TIC_TAC_TOE_
#define _TIC_TAC_TOE_
#include "field.h"
#include "player.h"
class TicTacToe {
public:
TicTacToe();
~TicTacToe();
bool Start();
void Run();
private:
void Reset();
Player* SelectPlayer( Field::Token token, const char* name ) const;
Player* players_[2];
Field field_;
};
#endif // _TIC_TAC_TOE_
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<language_settings>
<language>C++</language>
<standard>11</standard>
</language_settings>
<source>
<source_paths>
<source_path>./src</source_path>
</source_paths>
</source>
</config>
@@ -0,0 +1,33 @@
#ifndef CODE_TUTORIAL_1_H
#define CODE_TUTORIAL_1_H
#include "utility.h"
//------------------------------------------------------------------------------
//
// 1 - THE CODE TUTORIAL
// As you already know the code view displays the snippets of code that are
// related to your currently active symbol. These snippets show the relevant
// lines in combination with some context.
// In case you discover something interesting as part of the snippet's context
// you can activate that symbol with a left-click. That way you dig deeper
// through your code base.
// Have you ever wondered what's the meaning of life, the universe and
// everything? Click the respective symbol to find out.
//
//------------------------------------------------------------------------------
class CodeTutorial
{
public:
CodeTutorial()
{
}
static int meaning_of_life_the_universe_and_everything;
};
#endif // CODE_TUTORIAL_1_H
@@ -0,0 +1,63 @@
#ifndef CODE_TUTORIAL_2_H
#define CODE_TUTORIAL_2_H
#include "code_tutorial_1.h"
//------------------------------------------------------------------------------
//
// 5 - NO MORE CONTEXT
// At this stage you see the entire file and no more context can be expanded.
// For the final part of this introduction please have a look at where the
// "unrelated_but_very_important()" function is used.
//
//------------------------------------------------------------------------------
void unrelated_but_very_important()
{
};
int calculate(int (*problem)())
{
return problem();
}
//------------------------------------------------------------------------------
//
// 4 - MORE CONTEXT
// Who would have expected such a simple question?
// Note that expanding the view didn't change the active symbol. You can
// proceed expanding the view until you hit the level of the file scope.
// So go ahead and find out what else is hidden inside this file!
//
//------------------------------------------------------------------------------
void deep_thought()
{
int (*the_question)() = [](){ return 6 * 7; };
//------------------------------------------------------------------------------
//
// 2 - CONTEXT
// We just talked about Coati providing context to the important lines of code.
// But it feels like something is missing here. What is "the_question"? And
// where does it come from?
//
// 3 - EXPANDING TO SCOPES
// Do you see the first line of this snippet? I mean the one that has just two
// dots as line number and reads "deep_thought". Actually that's the name of
// the function's scope that encapsulates the snippet. By clicking that line
// you can tell Coati to expand the view to show the entire scope.
// Give it a try!
//
//------------------------------------------------------------------------------
int the_answer = calculate(the_question);
CodeTutorial::meaning_of_life_the_universe_and_everything = the_answer;
}
#endif // CODE_TUTORIAL_2_H
@@ -0,0 +1,62 @@
#ifndef CODE_TUTORIAL_3_H
#define CODE_TUTORIAL_3_H
#include "the_central_hub.h"
#include "code_tutorial_2.h"
//------------------------------------------------------------------------------
//
// 6 - SNIPPETS AND FILES
// It looks like this function is called in two different places inside the
// same file. When two different snippets are located in the same file they
// share a single file box. The line numbers to the left indicate where each of
// these snippets is located inside the file.
//
// 7 - MERGING SNIPPETS
// The top line of each snippet shows the name of its own parent's scope.
// If you want to show the lines in between the two snippets below you can
// either expand the upper snippet's scope to show the whole file or you can
// tell the lower snippet to reveal its scope.
// Try one of these approaches now.
//
//------------------------------------------------------------------------------
void function_with_snippets()
{
unrelated_but_very_important();
//------------------------------------------------------------------------------
//
// 8 - YOU FOUND THE HIDDEN COMMENT
// Well done! As you see Coati merged the two snippets from before because
// expanding a scope would have caused them to overlap. That's all for the code
// view tutorial.
//
// 9 - EDIT YOUR CODE
// In case you wondered if you can edit your code using Coati: You can't. Coati
// is designed for code exploration, not as a text editor or an IDE. But there
// is a chance that Coati can talk to your favourite editor (that you already
// know how to operate) via plugin. For more information about available
// plugins please take a look at Coati's user manual.
//
// We hope you enjoyed this tutorial. You can follow the call below to get back
// to the central hub.
//
// P.S.
// You can also click the file name above (i guess you need to scroll up a
// little bit) to activate the file's node in case you want to explore your
// include hierarchy.
//
//------------------------------------------------------------------------------
the_central_hub();
unrelated_but_very_important();
};
#endif // CODE_TUTORIAL_3_H
@@ -0,0 +1,37 @@
#ifndef GRAPH_TUTORIAL_1_H
#define GRAPH_TUTORIAL_1_H
#include "utility.h"
//------------------------------------------------------------------------------
//
// 1 - THE GRAPH TUTORIAL
// In Coati's default window layout the graph is shown to the left, next to the
// code. It displays the structure of your project where all named symbols are
// nodes and all relations are edges. Like the code view it shows only the
// currently active symbol and all the incoming and outgoing dependencies.
//
// 2 - HOW DO I NAVIGATE THE GRAPH
// You can activate a new symbol by left-clicking on the node you are
// interested in. For example: to find out where the function
// "where_am_i_called()" is called get over to the graph and click that
// function's node.
//
//------------------------------------------------------------------------------
class GraphTutorial
{
public:
GraphTutorial()
{
}
static void where_am_i_called()
{
}
};
#endif // GRAPH_TUTORIAL_1_H
@@ -0,0 +1,66 @@
#ifndef GRAPH_TUTORIAL_2_H
#define GRAPH_TUTORIAL_2_H
#include "graph_tutorial_1.h"
//------------------------------------------------------------------------------
//
// 3 - WELL DONE
// You activated a node and both, the graph and the code view have been updated
// accordingly.
// Note that even though Coati provides a graph view it does not remove the
// need for reading code. The graph view is great for gaining a quick overview
// on relations and navigating code, but once you found something you are
// interested in you should still consider the code view to actually read up on
// all the important details.
//
// 4 - HIDDEN ELEMENTS
// In order not to flood you with information the graph is hiding a lot of
// elements. Do you see the "ClassWithHiddenMembers" for example? It actually
// contains more members than you currently see. Members that are not important
// for the current context are hidden. Nevertheless you can reveal them by
// clicking the arrow next the the class name. Try that now and read those
// members' names.
//
//------------------------------------------------------------------------------
class ClassWithHiddenMembers
{
public:
void potential_caller()
{
GraphTutorial::where_am_i_called();
}
void now_you_see_all_contents_of_this_class()
{
}
void coati_uses_different_colors()
{
}
void to_distinguish_between_functions()
{
}
int and_variables;
int to_continue_click;
//------------------------------------------------------------------------------
//
// 5 - RELATIONS
// As you see in the graph, this member is accessed at quite some places
// throughout the code base. Lets say you wonder what code causes the edge
// between "reading" and "this_last_member" to appear. What will happen if you
// click the edge?
//
//------------------------------------------------------------------------------
static int this_last_member;
};
#endif // GRAPH_TUTORIAL_2_H
@@ -0,0 +1,39 @@
#ifndef GRAPH_TUTORIAL_3_H
#define GRAPH_TUTORIAL_3_H
#include "graph_tutorial_2.h"
class ProducerOfTheLastMember
{
public:
void go()
{
ClassWithHiddenMembers::this_last_member = 42;
}
void on()
{
ClassWithHiddenMembers::this_last_member++;
}
//------------------------------------------------------------------------------
//
// 6 - FOCUSING EDGES
// Even though Coati doesn't allow to activate an edge, you can still focus on
// edges. This doesn't change the currently active symbol (which would cause
// Coati to hide everything but the edge). Instead Coati just highlights the
// relation's location in the code and scrolls you there, so you don't lose
// context.
// Try to activate an edge that comes from the "ConsumerOfTheLastMember" class.
// Which one you pick doesn't really matter for this tutorial.
//
//------------------------------------------------------------------------------
void reading()
{
ClassWithHiddenMembers::this_last_member *= 2;
}
};
#endif // GRAPH_TUTORIAL_3_H
@@ -0,0 +1,48 @@
#ifndef GRAPH_TUTORIAL_4_H
#define GRAPH_TUTORIAL_4_H
#include "graph_tutorial_2.h"
#include "the_central_hub.h"
class ConsumerOfTheLastMember
{
public:
void in()
{
ClassWithHiddenMembers::this_last_member--;
}
//------------------------------------------------------------------------------
//
// 7 - THAT'S IT
// You completed the tutorial on the graph view. There is still more to learn
// but I guess you will figure it out on your own. One last thing: If you see
// an element with a hatched background please call us. It's a runaway!
// Just kidding. Those are elements that are used within your code, but without
// a definition anywhere in your source folder. So if you click them, Coati
// will display all the relations for the element, but the code view won't show
// a definition. If you want to learn more about Coati, go back to the central
// hub. It is called in the function below but you can also try to get there
// using only the graph.
//
//------------------------------------------------------------------------------
private:
void the()
{
if (ClassWithHiddenMembers::this_last_member <= 0);
{
the_central_hub();
}
}
void codeview()
{
ClassWithHiddenMembers::this_last_member /= 2;
}
};
#endif // GRAPH_TUTORIAL_4_H
@@ -0,0 +1,36 @@
#ifndef MAIN_H
#define MAIN_H
#include "my_first_step.h"
//------------------------------------------------------------------------------
//
// WHAT IS THIS?
// This is a tutorial and it is one of the fastest ways to get to know Coati.
//
// WHERE AM I?
// This is Coati's Code View and you are looking at the main function of this
// project's program.
//
// WHY AM I HERE?
// Every time you open up a project in Coati it will go through your project in
// search for a function called "main". In case this function is defined the
// corresponding symbol is activated. Otherwise Coati will just activate the
// first thing in your codebase it happens to stumble across.
//
// WHAT CAN I DO NOW?
// Left-click the "my_first_step()" function call inside the main function.
// Lets see what happens.
//
//------------------------------------------------------------------------------
int main()
{
my_first_step();
return 0;
}
#endif // MAIN_H
@@ -0,0 +1,34 @@
#ifndef MY_FIRST_STEP_H
#define MY_FIRST_STEP_H
#include "the_central_hub.h"
//------------------------------------------------------------------------------
//
// WHAT JUST HAPPENED?
// As I mentioned earlier, Coati knows the concept of an "active" symbol. You
// just changed the active symbol by clicking on the name of a function.
//
// OK, BUT WHAT IS AN ACTIVE SYMBOL?
// Coati doesn't show your entire code base on a single screen. Even for
// relatively small projects that would be pointless - trust me on that. So
// instead of showing everything at once, Coati keeps a strongly focused view
// on your code. This focus only includes the currently active symbol and its
// direct relations. Nothing more. By changing the active symbol as you just
// did, Coati allows you to jump through the code base on your own.
//
// I THINK I GOT IT!
// Now that you understand Coati's central concept you are ready to jump
// further by activating "the_central_hub()" of this tutorial.
//
//------------------------------------------------------------------------------
void my_first_step()
{
the_central_hub();
}
#endif // MY_FIRST_STEP_H
@@ -0,0 +1,30 @@
#ifndef SEARCH_TUTORIAL_1_H
#define SEARCH_TUTORIAL_1_H
#include "utility.h"
//------------------------------------------------------------------------------
//
// 1 - THE SEARCH TUTORIAL
// If you haven't messed up anything yet, you'll find the search bar to the
// upper left of Coati's user interface. Initially it shows the name of the
// currently active symbol.
// Use the shortcut "CTRL/CMD + F" to focus the search bar. You can also just
// click it. Try that now and enter the string "find_me_if_you_can" to search
// for the respective symbol. Press enter or click the magnification glass to
// execute the search.
//
//------------------------------------------------------------------------------
class SearchTutorial
{
public:
SearchTutorial()
{
}
};
#endif // SEARCH_TUTORIAL_1_H
@@ -0,0 +1,25 @@
#ifndef SEARCH_TUTORIAL_2_H
#define SEARCH_TUTORIAL_2_H
#include "utility.h"
//------------------------------------------------------------------------------
//
// 2 - THE AUTOCOMPLETION
// I hope you have been lazy enough to not enter the whole string from start to
// finish. So you already noticed Coati's autocompletion box.
// While you enter your search request Coati already tries to find a subset of
// matching symbols to help you get where you want pretty fast.
// But that's not all Coati does. Keep an eye on the search bar while entering
// the string "aux" and activate the symbol showing up.
//
//------------------------------------------------------------------------------
void finde_me_if_you_can()
{
}
#endif // SEARCH_TUTORIAL_2_H
@@ -0,0 +1,26 @@
#ifndef SEARCH_TUTORIAL_3_H
#define SEARCH_TUTORIAL_3_H
#include "utility.h"
//------------------------------------------------------------------------------
//
// 3 - FUZZY MATCHING
// While looking for matching symbols the search bar does not only consider
// strict matches to the entered substring. Instead it uses a more fuzzy
// approach. This is really helpful when you only have a rough idea of what the
// element you are really looking for is called.
// While showing the list of results the autocompletion also display the kind
// of each of the results to the very right.
// Try to activate the class with the name "NameConflict" next.
//
//------------------------------------------------------------------------------
void autocompletion_example()
{
}
#endif // SEARCH_TUTORIAL_3_H
@@ -0,0 +1,39 @@
#ifndef SEARCH_TUTORIAL_4_H
#define SEARCH_TUTORIAL_4_H
#include "utility.h"
//------------------------------------------------------------------------------
//
// 4 - WHAT ARE THE OTHER BUTTONS?
// Well done. Lets get over the other buttons left to the search bar really
// quick.
//
// 5 - UNDO AND REDO
// You can use the buttons to the very left to undo and redo your actions. This
// may seem odd since Coati doesn't include any features to actually change
// code. Instead Coati offers these buttons to help you navigate. So they
// really come in handy in case you ask yourself something like "How did I end
// up here?"
//
// 6 - REFRESH
// The next button allows you to refresh you project in case you changed some
// of your code. The second button toggels the auto-refresh option. When
// enabled Coati refreshes your project every time it's window gets focused.
//
// 7 - WHAT'S NEXT?
// Instead of the class activate the struct with the same name as before.
//
//------------------------------------------------------------------------------
namespace a
{
class NameConflict
{
};
}
#endif // SEARCH_TUTORIAL_4_H
@@ -0,0 +1,27 @@
#ifndef SEARCH_TUTORIAL_5_H
#define SEARCH_TUTORIAL_5_H
#include "utility.h"
//------------------------------------------------------------------------------
//
// 8 - CONGRATULATONS
// You have completed the challenge of search.
// Oh, I almost forgot: You can only find nodes such as symbols via the search
// bar. It doesn't allow you to find edges like calls or inheritance. At least
// not yet.
// Try to get back to the the central hub using the search bar!
//
//------------------------------------------------------------------------------
namespace b
{
struct NameConflict
{
};
}
#endif // SEARCH_TUTORIAL_5_H
@@ -0,0 +1,33 @@
#ifndef START_EXPLORING_H
#define START_EXPLORING_H
#include "utility.h"
//------------------------------------------------------------------------------
//
// FURTHER EXPLORATION
// If you completed all the other tutorials you might want to put your new
// skills to use and do some exploration on your own.
// Here comes the bad news: Even though this tutorial contains some code that
// would compile, the code doesn't make much sense. So trying to explore this
// project any further would be rather unproductive.
// The good news is: In addition to this tutorial Coati also ships with a real
// example project that implements the game Tic-Tac-Toe! You can open the
// project via the "Project -> Recent Projects" menu.
// You can also start exploring your own projects by creating a new Coati
// project where you can add all your source and include paths.
//
//------------------------------------------------------------------------------
class StartExploring
{
public:
StartExploring()
{
}
};
#endif // START_EXPLORING_H
@@ -0,0 +1,32 @@
#ifndef THE_CENTRAL_HUB_H
#define THE_CENTRAL_HUB_H
#include "search_tutorial_1.h"
#include "graph_tutorial_1.h"
#include "code_tutorial_1.h"
#include "start_exploring.h"
//------------------------------------------------------------------------------
//
// THE HUB
// This is the central hub of Coati's tutorial. From here you can embark on
// short trips to explore the different parts of Coati. Most important: You
// will get to know how all the different parts of Coati interact.
// The function below references all the available tutorials. So pick one and
// jump right to action.
//
//------------------------------------------------------------------------------
void the_central_hub()
{
SearchTutorial* the_challenge_of_search;
GraphTutorial* reading_the_map;
CodeTutorial* explore_the_details;
StartExploring* going_beyond_this_tutorial;
}
#endif // THE_CENTRAL_HUB_H
@@ -0,0 +1,8 @@
#ifndef UTILITY_H
#define UTILITY_H
typedef unsigned int uint;
#endif // UTILITY_H
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<config>
<source>
<extensions>
<header_extensions>.h</header_extensions>
<source_extensions>.cpp</source_extensions>
</extensions>
<source_paths>
<source_path>./src</source_path>
</source_paths>
</source>
</config>
+16
View File
@@ -0,0 +1,16 @@
void lambdaCaller()
{
[](){}();
}
void lambdaSuperCaller()
{
lambdaCaller();
}
void lambdaMetaCaller()
{
[](){
lambdaCaller();
}();
}
+17
View File
@@ -0,0 +1,17 @@
/* hallo */
int a; /* hallo */
int b = 6/3/2; /* hallo */
//*
int c;
//*/
// /*
int d;
// */
/*
hallo
// */ int e = 0;
+129
View File
@@ -0,0 +1,129 @@
class Point
{
public:
Point(int x, int y)
: x(x)
, y(y)
{
}
int x;
int y;
};
class Shape
{
public:
virtual void draw() = 0;
};
class Line
: public Shape
{
public:
Line(Point start, Point end)
: start(start)
, end(end)
{
}
void draw()
{
// line drawing
}
private:
Point start;
Point end;
};
class Circle
: public Shape
{
public:
Circle(Point center, int radius)
: center(center)
, radius(radius)
{}
void draw()
{
// circle drawing
}
private:
Point center;
int radius;
};
class Image
{
public:
Image(int width, int height)
: width(width)
, height(height)
, idx(0)
{
shapes = new Shape*[10];
}
~Image()
{
for (int i = 0; i < idx; i++)
{
delete shapes[i];
}
delete [] shapes;
}
void addShape(Shape* shape)
{
if (idx < 10)
{
shapes[idx] = shape;
idx++;
}
}
void draw()
{
for (int i = 0; i < idx; i++)
{
shapes[i]->draw();
}
}
private:
Shape** shapes;
int idx;
int width;
int height;
};
void drawStickMan()
{
Image stickman(100, 200);
// head
stickman.addShape(new Circle(Point(50, 50), 25));
// torso
stickman.addShape(new Line(Point(50, 75), Point(50, 180)));
// arms
stickman.addShape(new Line(Point(50, 100), Point(10, 125)));
stickman.addShape(new Line(Point(50, 100), Point(90, 125)));
// legs
stickman.addShape(new Line(Point(50, 100), Point(10, 125)));
stickman.addShape(new Line(Point(50, 100), Point(90, 125)));
stickman.draw();
}
+3
View File
@@ -0,0 +1,3 @@
// nothing here
// except for text
+198
View File
@@ -0,0 +1,198 @@
int number = 3;
int calculate();
int calculate(long i)
{
int a = 1 + 2;
return a;
}
int calculate()
{
int a = 1 + 2;
return a;
}
int calculate(int i)
{
int a = 1 + 2;
return a;
}
#define PI 3.1415
#define CALL_CALCULATE() \
do \
{ \
calculate(); \
} \
while(0) \
int main()
{
CALL_CALCULATE();
}
int count = 0;
void countUp()
{
count += 1;
}
void countDown()
{
count -= 1;
}
void countUpTen()
{
for (int i = 0; i < 10; i++)
{
countUp();
}
}
class Person
{
public:
Person(char* name)
: name(name)
, age(0)
, weight(3)
, height(50)
{
}
char* askForName() const
{
return name;
}
void gainWeight(int gain)
{
weight += gain;
}
void grow(int gain)
{
height += gain;
}
void celebrateBirthday()
{
age += 1;
grow(5);
gainWeight(3);
}
private:
char* name;
int age;
int height;
int weight;
};
class Vehicle
{
protected:
int wheelCount;
int seatCount;
};
class Car
: public Vehicle
{
public:
Car()
{
wheelCount = 4;
seatCount = 5;
}
};
class Truck
: public Vehicle
{
public:
Truck()
{
wheelCount = 6;
seatCount = 2;
}
};
template<typename T>
T sum(T a, T b)
{
return a + b;
}
class Apple {};
class Pear {};
template<typename Fruit>
class Basket
{
public:
Fruit** field;
};
Basket<Apple> apples;
Basket<Pear> pears;
class Dog {};
class Cat
{
Dog getDog();
};
class Bird
{
Dog getDog();
Cat getCat();
};
class Fish
{
Dog getDog();
Cat getCat();
Bird getBird();
};
class Horse
: public Dog
{
Dog getDog();
Cat getCat();
Bird getBird();
Fish getFish();
};
class Building {};
class House : public Building {};
class Tower : public Building {};
class SkyScrapper : public Building {};
class Mansion : public Building {};
class Shard : public House, public Tower, public SkyScrapper, public Mansion {};
typedef unsigned int uint;
uint a = 1 + 2;
enum Size
{
SMALL,
MEDIUM,
LARGE
};
+27
View File
@@ -6,3 +6,30 @@ public:
{
}
};
template <typename T>
class Fooo
{
public:
void bar()
{
}
};
template <typename T, typename T::a::type U>
class Foooo1
{
public:
void bar()
{
}
};
template <typename T, typename T::type U>
class Foooo2
{
public:
void bar()
{
}
};
+6 -1
View File
@@ -5,4 +5,9 @@ int main()
Foo<true, int, float> ft;
ft.bar();
return 0;
}
}
@@ -0,0 +1,67 @@
#include "artificial_player.h"
ArtificialPlayer::ArtificialPlayer( Field::Token token, const char* name )
: Player( token, name ) {
}
ArtificialPlayer::~ArtificialPlayer() {
}
Field::Move ArtificialPlayer::Turn( const Field& field ) const {
Field fakeField = field.Clone();
Node node = MinMax( fakeField, token_ );
return node.move;
}
ArtificialPlayer::Node ArtificialPlayer::MinMax( Field& field, Field::Token token ) const {
Node node;
node.value = -10000;
Field::Move move;
int sameMove;
for ( int i = 0; i < 3; i++ ) {
move.row = i;
for ( int j = 0; j < 3; j++ ) {
move.col = j;
if ( !field.IsEmpty( move ) ) {
continue;
}
field.MakeMove( move, token );
int turnValue = Evaluate( field, token );
if ( !turnValue && !field.IsFull() ) {
turnValue = -MinMax( field, Field::Opponent( token ) ).value;
}
field.ClearMove( move );
if ( turnValue > node.value ) {
node.move = move;
node.value = turnValue;
sameMove = 1;
} else if ( turnValue == node.value ) {
sameMove++;
if ( 1 % sameMove == 0 ) {
node.move = move;
}
}
}
}
return node;
}
int ArtificialPlayer::Evaluate( const Field& field, Field::Token token ) const {
if ( field.SameInRow( token, 3 ) ) {
return 2;
} else if ( field.SameInRow( Field::Opponent( token ), 2 ) ) {
return -1;
} else if ( field.SameInRow( token, 2 ) > 1 ) {
return 1;
}
return 0;
}
@@ -0,0 +1,24 @@
#ifndef _ARTIFICIAL_PLAYER_
#define _ARTIFICIAL_PLAYER_
#include "player.h"
class ArtificialPlayer : public Player {
public:
ArtificialPlayer( Field::Token token, const char* name );
virtual ~ArtificialPlayer();
virtual Field::Move Turn( const Field& field ) const;
private:
struct Node {
Field::Move move;
int value;
};
Node MinMax( Field& field, Field::Token token ) const;
int Evaluate( const Field& field, Field::Token token ) const;
};
#endif // _ARTIFICIAL_PLAYER_
+126
View File
@@ -0,0 +1,126 @@
#include "field.h"
#include "io.h"
Field::Token Field::Opponent( Token token ) {
if ( token == PlayerA ) {
return PlayerB;
} else if (token == PlayerB){
return PlayerA;
} else {
return None;
}
}
Field::Field()
: left_( 9 ) {
grid_ = new Token* [3];
for ( int i = 0; i < 3 ; i++ ) {
grid_[i] = new Token[3];
}
}
Field::~Field() {
for ( int i = 0; i < 3; i++ ) {
delete [] grid_[i];
}
delete [] grid_;
}
Field Field::Clone() const {
Field field;
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
field.grid_[i][j] = grid_[i][j];
}
}
field.left_ = left_;
return field;
}
void Field::Clear() {
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
grid_[i][j] = None;
}
}
left_ = 9;
}
void Field::Show() const {
io::stringOut(" 1 2 3\n");
for ( int row = 0; row < 3; row++ ) {
io::numberOut(row + 1);
io::stringOut(" ");
for ( int col = 0; col < 3; col++ ) {
if ( grid_[row][col] == PlayerA ) {
io::stringOut(" X ");
} else if ( grid_[row][col] == PlayerB ) {
io::stringOut(" O ");
} else {
io::stringOut(" ");
}
if ( col < 2 ) {
io::stringOut("|");
}
}
if ( row < 2 ) {
io::stringOut("\n -----------\n");
}
}
io::stringOut("\n\n");
}
int Field::SameInRow( Token token, int amount ) const {
int sum = amount * token;
int count = 0;
for ( int i = 0; i < 3; i++ ) {
if ( grid_[i][0] + grid_[i][1] + grid_[i][2] == sum ) {
count++;
} else if ( grid_[0][i] + grid_[1][i] + grid_[2][i] == sum ) {
count++;
}
}
if ( grid_[0][0] + grid_[1][1] + grid_[2][2] == sum ) {
count++;
} else if ( grid_[2][0] + grid_[1][1] + grid_[0][2] == sum ) {
count++;
}
return count;
}
bool Field::InRange( const Move& move ) const {
return move.row >= 0 && move.row < 3 && move.col >= 0 && move.col < 3;
}
bool Field::IsEmpty( const Move& move ) const {
return grid_[move.row][move.col] == None;
}
bool Field::IsFull() const {
return left_ == 0;
}
void Field::MakeMove( const Move& move, Token token ) {
if ( !InRange( move ) || !IsEmpty( move ) || token == None || !left_ ) {
return;
}
grid_[move.row][move.col] = token;
left_--;
}
void Field::ClearMove( const Move& move ) {
if ( !InRange( move ) || !IsEmpty( move ) || left_ == 9 ) {
return;
}
grid_[move.row][move.col] = None;
left_++;
}
+12 -118
View File
@@ -1,9 +1,6 @@
#ifndef _FIELD_
#define _FIELD_
#include <cassert>
#include <iostream>
class Field {
public:
enum Token {
@@ -12,132 +9,29 @@ public:
PlayerB = 4
};
static Token Opponent( Token token ) {
assert( token != None );
if ( token == PlayerA ) {
return PlayerB;
} else {
return PlayerA;
}
}
static Token Opponent( Token token );
struct Move {
int row;
int col;
};
Field()
: left_( 9 ) {
grid_ = new Token* [3];
for ( int i = 0; i < 3 ; i++ ) {
grid_[i] = new Token[3];
}
}
Field();
~Field();
~Field() {
for ( int i = 0; i < 3; i++ ) {
delete grid_[i];
}
delete [] grid_;
}
Field Clone() const;
void Clear();
Field Clone() const {
Field field;
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
field.grid_[i][j] = grid_[i][j];
}
}
field.left_ = left_;
return field;
}
void Show() const;
void Clear() {
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
grid_[i][j] = None;
}
}
left_ = 9;
}
int SameInRow( Token token, int amount ) const;
void Show() const {
std::cout << " 1 2 3\n";
for ( int row = 0; row < 3; row++ ) {
std::cout << row + 1 << " ";
bool InRange( const Move& move ) const;
bool IsEmpty( const Move& move ) const;
bool IsFull() const;
for ( int col = 0; col < 3; col++ ) {
if ( grid_[row][col] == PlayerA ) {
std::cout << " X ";
} else if ( grid_[row][col] == PlayerB ) {
std::cout << " O ";
} else {
std::cout << " ";
}
if ( col < 2 ) {
std::cout << "|";
}
}
if ( row < 2 ) {
std::cout << "\n -----------\n";
}
}
std::cout << "\n\n";
}
int SameInRow( Token token, int amount ) const {
int sum = amount * token;
int count = 0;
for ( int i = 0; i < 3; i++ ) {
if ( grid_[i][0] + grid_[i][1] + grid_[i][2] == sum ) {
count++;
} else if ( grid_[0][i] + grid_[1][i] + grid_[2][i] == sum ) {
count++;
}
}
if ( grid_[0][0] + grid_[1][1] + grid_[2][2] == sum ) {
count++;
} else if ( grid_[2][0] + grid_[1][1] + grid_[0][2] == sum ) {
count++;
}
return count;
}
bool InRange( const Move& move ) const {
return move.row >= 0 && move.row < 3 && move.col >= 0 && move.col < 3;
}
bool IsEmpty( const Move& move ) const {
return grid_[move.row][move.col] == None;
}
bool IsFull() const {
return left_ == 0;
}
void MakeMove( const Move& move, Token token ) {
assert( InRange( move ) );
assert( IsEmpty( move ) );
assert( token != None );
assert( left_ );
grid_[move.row][move.col] = token;
left_--;
}
void ClearMove( const Move& move ) {
assert( InRange(move) );
assert( !IsEmpty(move) );
assert( left_ < 9 );
grid_[move.row][move.col] = None;
left_++;
}
void MakeMove( const Move& move, Token token );
void ClearMove( const Move& move );
private:
Token** grid_;
@@ -0,0 +1,49 @@
#include "human_player.h"
#include "io.h"
HumanPlayer::HumanPlayer( Field::Token token, const char* name )
: Player( token, name ) {
}
HumanPlayer::~HumanPlayer() {
}
Field::Move HumanPlayer::Turn( const Field& field ) const {
Field::Move move;
io::stringOut(name_);
io::stringOut("\n");
do {
move = Input();
move.row -= 1;
move.col -= 1;
} while ( !Check( field, move ) );
return move;
}
Field::Move HumanPlayer::Input() const {
Field::Move move;
move.row = -1;
move.col = -1;
io::stringOut("Insert row: ");
move.row = io::numberIn();
io::stringOut("Insert column: ");
move.col = io::numberIn();
io::stringOut("\n");
return move;
}
bool HumanPlayer::Check( const Field& field, const Field::Move& move ) const {
if ( !field.InRange( move ) ) {
io::stringOut("Wrong input!\n");
return false;
} else if ( !field.IsEmpty( move ) ) {
io::stringOut("Is occupied!\n");
return false;
}
return true;
}
+19
View File
@@ -0,0 +1,19 @@
#ifndef _HUMAN_PLAYER_
#define _HUMAN_PLAYER_
#include "player.h"
class HumanPlayer : public Player {
public:
HumanPlayer( Field::Token token, const char* name );
virtual ~HumanPlayer();
virtual Field::Move Turn( const Field& field ) const;
private:
Field::Move Input() const;
bool Check( const Field& field, const Field::Move& move ) const;
};
#endif // _HUMAN_PLAYER_
+23
View File
@@ -0,0 +1,23 @@
#include "io.h"
// #include <iostream>
// #include <sstream>
// #include <string>
int io::numberIn() {
// std::string input;
// getline( std::cin, input );
// std::stringstream stream( input );
int number;
// stream >> number;
return number;
}
void io::numberOut(int num) {
// std::cout << num;
}
void io::stringOut(const char* str) {
// std::cout << str;
}
+13
View File
@@ -0,0 +1,13 @@
#ifndef _IO_
#define _IO_
namespace io {
int numberIn();
void numberOut(int num);
void stringOut(const char* str);
}
#endif // _IO_
+19
View File
@@ -0,0 +1,19 @@
#include "player.h"
Player::Player( Field::Token token, const char* name )
: token_( token )
, name_( name ) {
}
Player::~Player() {
}
const Field::Token& Player::getToken() const
{
return token_;
}
const char* Player::getName() const
{
return name_;
}
+5 -17
View File
@@ -1,33 +1,21 @@
#ifndef _PLAYER_
#define _PLAYER_
#include <string>
#include "field.h"
class Player {
public:
Player( Field::Token token, const std::string& name )
: token_( token )
, name_( name ) {
}
virtual ~Player() {}
Player( Field::Token token, const char* name );
virtual ~Player();
virtual Field::Move Turn( const Field& field ) const = 0;
const Field::Token& getToken() const
{
return token_;
}
const std::string getName() const
{
return name_;
}
const Field::Token& getToken() const;
const char* getName() const;
protected:
const Field::Token token_;
const std::string name_;
const char* name_;
};
#endif // _PLAYER_
+85
View File
@@ -0,0 +1,85 @@
#include "tictactoe.h"
#include "artificial_player.h"
#include "human_player.h"
#include "io.h"
TicTacToe::TicTacToe() {
players_[0] = 0;
players_[1] = 0;
}
TicTacToe::~TicTacToe() {
Reset();
}
bool TicTacToe::Start() {
Reset();
io::stringOut("Tic Tac Toe\n\n[1] Human\n[2] Computer\n[3] Quit\n\n");
players_[0] = SelectPlayer( Field::PlayerA, "Player A" );
if ( !players_[0] ) {
return false;
}
players_[1] = SelectPlayer( Field::PlayerB, "Player B" );
if ( !players_[1] ) {
return false;
}
io::stringOut("\n");
return true;
}
void TicTacToe::Run() {
field_.Show();
int playerIndex = 0;
for ( int i = 0; i < 9; i++ ) {
Player& player = *players_[playerIndex];
field_.MakeMove( player.Turn( field_ ), player.getToken() );
field_.Show();
if ( field_.SameInRow( player.getToken(), 3 ) ) {
io::stringOut(player.getName());
io::stringOut(" won!\n\n");
return;
}
playerIndex = ( playerIndex + 1 ) % 2;
}
io::stringOut("Game ends in draw!\n\n");
}
void TicTacToe::Reset() {
field_.Clear();
for ( int i = 0; i < 2; i++ ) {
if ( players_[i] ) {
delete players_[i];
players_[i] = 0;
}
}
}
Player* TicTacToe::SelectPlayer( Field::Token token, const char* name ) const {
int selection = 0;
while ( true ) {
io::stringOut("Choose ");
io::stringOut(name);
io::stringOut(": ");
selection = io::numberIn();
switch ( selection ) {
case 1 : return new HumanPlayer( token, name );
case 2 : return new ArtificialPlayer( token, name );
case 3 : return 0;
default : io::stringOut("Wrong input!\n");
}
}
}
+6 -76
View File
@@ -1,90 +1,20 @@
#ifndef _TIC_TAC_TOE_
#define _TIC_TAC_TOE_
#include "computer.h"
#include "field.h"
#include "human.h"
#include "input.h"
#include "player.h"
class TicTacToe {
public:
TicTacToe() {
players_[0] = NULL;
players_[1] = NULL;
}
TicTacToe();
~TicTacToe();
~TicTacToe() {
Reset();
}
bool Start() {
Reset();
std::cout << "Tic Tac Toe\n\n[1] Human\n[2] Computer\n[3] Quit\n\n";
players_[0] = SelectPlayer( Field::PlayerA, "PlayerA" );
if ( !players_[0] ) {
return false;
}
players_[1] = SelectPlayer( Field::PlayerB, "PlayerB" );
if ( !players_[1] ) {
return false;
}
std::cout << '\n';
return true;
}
void Run() {
field_.Show();
int playerIndex = 0;
for ( int i = 0; i < 9; i++ ) {
Player& player = *players_[playerIndex];
field_.MakeMove( player.Turn( field_ ), player.getToken() );
field_.Show();
if ( field_.SameInRow( player.getToken(), 3 ) ) {
std::cout << player.getName() << " won!\n\n";
return;
}
playerIndex = ( playerIndex + 1 ) % 2;
}
std::cout << "Game ends in draw!\n\n";
}
bool Start();
void Run();
private:
void Reset() {
field_.Clear();
for ( int i = 0; i < 2; i++ ) {
if ( players_[i] ) {
delete players_[i];
players_[i] = NULL;
}
}
}
Player* SelectPlayer( Field::Token token, const std::string& name ) const {
int selection;
while ( true ) {
std::cout << "Choose " << name << ": ";
input::number( &selection );
switch ( selection ) {
case 1 : return new HumanPlayer( token, name );
case 2 : return new ArtificialPlayer( token, name );
case 3 : return NULL;
default : std::cout << "Wrong input!\n";
}
}
}
void Reset();
Player* SelectPlayer( Field::Token token, const char* name ) const;
Player* players_[2];
Field field_;
+147
View File
@@ -0,0 +1,147 @@
#ifndef _FIELD_
#define _FIELD_
#include <cassert>
#include <iostream>
class Field {
public:
enum Token {
None = 0,
PlayerA = 1,
PlayerB = 4
};
static Token Opponent( Token token ) {
assert( token != None );
if ( token == PlayerA ) {
return PlayerB;
} else {
return PlayerA;
}
}
struct Move {
int row;
int col;
};
Field()
: left_( 9 ) {
grid_ = new Token* [3];
for ( int i = 0; i < 3 ; i++ ) {
grid_[i] = new Token[3];
}
}
~Field() {
for ( int i = 0; i < 3; i++ ) {
delete grid_[i];
}
delete [] grid_;
}
Field Clone() const {
Field field;
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
field.grid_[i][j] = grid_[i][j];
}
}
field.left_ = left_;
return field;
}
void Clear() {
for ( int i = 0; i < 3; i++ ) {
for ( int j = 0; j < 3; j++ ) {
grid_[i][j] = None;
}
}
left_ = 9;
}
void Show() const {
std::cout << " 1 2 3\n";
for ( int row = 0; row < 3; row++ ) {
std::cout << row + 1 << " ";
for ( int col = 0; col < 3; col++ ) {
if ( grid_[row][col] == PlayerA ) {
std::cout << " X ";
} else if ( grid_[row][col] == PlayerB ) {
std::cout << " O ";
} else {
std::cout << " ";
}
if ( col < 2 ) {
std::cout << "|";
}
}
if ( row < 2 ) {
std::cout << "\n -----------\n";
}
}
std::cout << "\n\n";
}
int SameInRow( Token token, int amount ) const {
int sum = amount * token;
int count = 0;
for ( int i = 0; i < 3; i++ ) {
if ( grid_[i][0] + grid_[i][1] + grid_[i][2] == sum ) {
count++;
} else if ( grid_[0][i] + grid_[1][i] + grid_[2][i] == sum ) {
count++;
}
}
if ( grid_[0][0] + grid_[1][1] + grid_[2][2] == sum ) {
count++;
} else if ( grid_[2][0] + grid_[1][1] + grid_[0][2] == sum ) {
count++;
}
return count;
}
bool InRange( const Move& move ) const {
return move.row >= 0 && move.row < 3 && move.col >= 0 && move.col < 3;
}
bool IsEmpty( const Move& move ) const {
return grid_[move.row][move.col] == None;
}
bool IsFull() const {
return left_ == 0;
}
void MakeMove( const Move& move, Token token ) {
assert( InRange( move ) );
assert( IsEmpty( move ) );
assert( token != None );
assert( left_ );
grid_[move.row][move.col] = token;
left_--;
}
void ClearMove( const Move& move ) {
assert( InRange(move) );
assert( !IsEmpty(move) );
assert( left_ < 9 );
grid_[move.row][move.col] = None;
left_++;
}
private:
Token** grid_;
int left_;
};
#endif // _FIELD_

Some files were not shown because too many files have changed in this diff Show More