diff --git a/.gitignore b/.gitignore index c8f2cce2a..cce018e08 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.pro.user *.o *moc_* +src/moc_* *.rar debug/* release/* @@ -24,10 +25,12 @@ makefile.* Makefile.* Makefile* makefile* +!/Makefile include/Libs* .cproject .project .settings +src/moc_*.cpp *.log *.cppcheck *.rc @@ -106,3 +109,17 @@ src/ui/ui_*.h bin/douml qrc_*.cpp src/CppReverse/cpp_reverse +/bin/ +!/bin/settings.ini +!src/settings_ini.h +/install/ +.DS_Store +.qmake.stash +xcuserdata/ +Info.plist +*.xcodeproj +project.pbxproj +project.xcworkspace +qt_makeqmake.mak +qt_preprocess.mak +xcshareddata/ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..0a0b81c30 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,140 @@ + + +# Next release +[#155]: https://github.com/DoUML/douml/pull/155 +[#161]: https://github.com/DoUML/douml/pull/161 +[#167]: https://github.com/DoUML/douml/pull/167 +[#170]: https://github.com/DoUML/douml/pull/170 +[#173]: https://github.com/DoUML/douml/pull/173 +[#179]: https://github.com/DoUML/douml/pull/179 +[#194]: https://github.com/DoUML/douml/pull/194 + +* Fixed compilation on OS X El Capitan [#155] +* Fixed warning about duplicated uml entities showing up needlessly [#161] +* Build date and time automated [#161] +* Fixed mutually exclusive attribute menus when they should not be [#161] [#167] +* Fixed some keywords not being parsed by cpp reverse and roundtrip [#161] +* Some UI improvements [#161] [#194] +* Version bump [#161] +* Improvements regarding Qt5 style handling [#167] +* Crash fix and code improvements [#167] [#179] +* Missing specifiers of c++ operation added to CppReverse and CppRoundtrip [#167] +* Fix missing = sign in default and delete specifiers [#167] +* Reduce amount of warnings [#170] +* Warnings about deprecated use of Qt will be shown when compiling. [#170] +* Various improvements on Makefiles and .pro files [#170] +* The Makefile 'install' target on OS X now builds a .app bundle with all the executables inside (so that they can be launched from DoUML). For this reason only douml is still build as a bundle. Then macdeployqt adds needed frameworks and makes a .dmg file, but it's still very rough and needs more work (for instance, including all support files, translation, documentation, etc.) [#170] +* Added to the Makefile the target 'xcodeprojects' to generate Xcode projects. [#170] +* Changed some remaining "BoUML" text to "DoUML" [#170] +* Set a better size for the Image dialog box and its Browse button. [#170] +* Removed a misplaced text only appearing on Mac OS X in the Shortcut dialog. [#170] +* Fixed segmentation fault when quitting DoUML with opened project. [#170] +* Non latin1 string support is added [#173] +* Fix positioning of sequence diagrams labels [#194] +* Some dialogs are now modal [#194] +* Fix diagrams appearing twice when double clicked in browser view [#194] +* Correct tabs disappearing in the drawing settings dialog [#194] +* Fix snapshots and copying pictures of diagrams [#194] +* Fix zValue of diagrams not being saved correctly [#194] + +# v1.0.8 +* Numerous bugfixes + +# v1.0b7.4 +* Fixed the crash at editing unidirectional association. + +# v1.0b7.1 +* Fixed the crash that could occur if the user closed quick edit while editing param type +* Attribute and operations added through quick edit now appear at their proper places in main tree view +* Fixed operation propagation that got broken during previous releases + +# v1.0b7.1 +* Fixed the issue that stopped app from closing rpoperly + +# v1.0b7 + +* Previously, after "close window" button was clicked and user selected "Cancel" the app closed nevertheless. No longer the case. +* Fixed crash when reopening operation window that had different amount of KV-pairs +* Duplicated items in tree appear next to their source (valid of class, attribute, operation, extra member) +* Settings will now be craeted automatically if there is no file present. +* Fixed "relative path" for cpp generation. +* Added capability of adding enum items and class attributes to Quickedit window +* Added buttons for clipboard access and Quickedit to the toolbar +* List of recent projects now lives in settings.ini +* Updated "About" dialog and a new icon + +# v1.0b6 +* Import/Export XMI2.1 are working now. Pls test for any possible bugs before fully embracing them. + +# v1.0b5 +* Duplicating class, operation and attribute produces its name in the name request edit. +* Vastly expanded functionality of Quickedit window. +* Repeatedly pressing "ctrl-e" closes it if it is already open +* It will remember the state it was in prior to close and restore itself accordingly. +* Almost all features necessary for C++ editing are present. +* Postfix/prefix columns in quickedit table mean how parameter is actually passed in the function where: const/volatile(prefix), \*,&(postfix) +* You can add operation by clicking on +Operation button if you are currently on the operation or class node. +* You can add operation parameters by clicking on +Parameter button if you are on an attribute or operation node. +* You can delete all nodes by clicking on "Delete" column. Deleting is done in Bouml way where "deleted" node is marked as deleted but is not actually deleted until program is closed. +A thing to note - operation parameters are also deleted in this way, but they are only present in their "deleted" state until window is closed or trr is filtered. +10. You can move operation parameters within a single function (I will expand this later). To move parameters - click on their "mark" column, then right click on parameter you want to move them to and select either "Move after" or "Move before" +11. If you do not ant to see c++ columns in the table - untick "C++" checkbox on the top of the window. +!. There is a drawback to using this window atm - it knows nothing of propagation through hierarchy. Once You've edited an operation - make sure to make same edits in the others. +!!. Quickedit, at the moment, knows _nothing_ of the changes you make in the other dialogs, if you are using it in windowed mode - make sure to press refresh button on the top left after you've changed stuff! Although I'd recommend closing it immediately after you edited what you wanted and reopening with correct data later. + +Now the only major things missing from Quickedit are management of enums and adding attributes to classes. These will be added in the next version. + + +# v1.0b4 +Added a new class/operation/parameter control. It is brought up by pressing Ctlr-E on Package, Classview, Class, Operation or Attribute nodes in main tree +This control is essentially an alternative way to insert quick fixes into class hierarchy. +Things of note: +* you can quickly search for classes/operation etc... by entering text in lineedit on the top. It even picks operation parameters! +* two buttons to the left of the search lineedit allow you to expand/collapse whole levels in the tree +* "Type" of an operation node is actually its return type. +* Nodes below operations are their parameters +* Changes made into editable cells are IMMEDIATELY done to the model. So far there is no rollback once you've edited something. +* Classviews/Packages are not shown in the tree, but they are used to create it. + +Currently, the changes you can insert in this editor are limited, and some buttons are disabled but you can expect to have MUCH more control from it in later versions. +Feedback and requests will be appreciated. + + + +# v1.0b3 +* App entered endless cycle while trying to open some diagrams. Fixed + + +# v1.0b2 + +## Changes +* Previously, opened tab was saved in operation dialog between dialog opens.This turned out to be very anoying and is now disabled. + + +## Bugfixes +* cpp header file was not produced correctly on generation of new projects. +* Deploy plugin was freezing on some classes due to some weird bug which involved ->bytesAvailable function to return different value than what was written to socket. +* Mini toolbar could crash when user tried navigating above the highest node via arrow buttons. +* Some icons were not shown in minit-toolbar. +* "Unmark all" did not change the color of generator label. +* Propagating changes from abstract operation will not null op definition in subclasses. +* Clicking OK in relations dialog while ot editing relation's name produced "illegal name" error. +* static class members were incorrectly given "= {$value] " when generated in cpp headers. +* In Properties tables around the app pressing enter or any arrow button finished editing of the cell. +* Reopening class dialog did not properly reinitialize formals/inheritance/properties. +* Reopening operation dialog did not properly reinitialize exceptions. + + +## Features +* Added "Catalog" widget below class tree. This widget is used for quick tree navigation and has 3 tabs. +* "Visited" tab updates each time user clicks on a node in a tree. This node is inserted into visited and clicking on it will. + immediately scroll the main tree to it. +* "Marked" tab tracks user selection and serves double purpose of tree navigation(as in "Visited") and node deselection via rightclick menu. +* "Favourites" tab is used when user ahs often visited tree nodes and wants an easy wasy to return to the in a tree. +* Adding nodes s done by dragging them from the main tree onto favourites tabs. +* Catalog widget has line edit under tabs which serves the purpose of filtering the Visited view (only Visited atm). +* "Builtin types" tab in generation settings has been completely reworked. +* User can now search and sort it. +* User can selectively turn off languages he does not use in the table. +* When a new row is being produced it is initialized with enough defaults to make assigning UML name the only obligatory edit before clicking "OK". +* Adding new rows is now done through "Add type" button and a few options were removed from "do" menu as they no longer make sense. diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..605d7ad9e --- /dev/null +++ b/Makefile @@ -0,0 +1,219 @@ +# The directory where all the douml files will be installed, you +# can change it for instance because you don't have root permission +DOUML_LIB = /usr/lib/douml + +# The directory where the douml shell script will be installed, you +# can change it for instance because you don't have root permission +DOUML_DIR = /usr/bin + +# The directory where the doc will be installed, you +# can change it for instance because you don't have root permission +DOUML_DOC_DIR = /usr/share/doc/douml + +# The directory where the doc will be installed, you +# can change it for instance because you don't have root permission +DOUML_LOCALE_DIR = ${DOUML_LIB}/locale + +# The directory containing douml.desktop +# The copy is not done if you comment the definition +DOUML_DESKTOP_DIR = /usr/share/applications + +# The directories containing the douml icons are +# /x/apps +# The copy is not done if you comment the definition +DOUML_ICONS_PREFIX_DIR = /usr/share/icons/hicolor + +# On several Unix systems, the icons used inside the +# menus must be stored inside the pixmaps' directory. +# The copy is done if you uncomment the definition. +DOUML_UNIX_PIXMAPS_DIR = /usr/share/pixmaps + +# Using uname to detect the platform +uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + +# If not defined (local install), DoUML will be install into LOCAL_DESTDIR or "./install" directory +# Else (packaging) desktop and executable script are copied into DESTDIR but reference are / +ifndef DESTDIR + ifndef LOCAL_DESTDIR + LOCAL_DESTDIR = ${PWD}/install + endif + DESTDIR = ${LOCAL_DESTDIR} +endif + +QMAKE=qmake + +MAKE=make + +# using CONFIG variable for 'release' or 'debug' and it's case sensitive! +ifndef CONFIG + CONFIG=release +endif + +SRC_DIRS=\ + src/CppGenerator \ + src/CppReverse \ + src/CppRoundtrip \ + src/IdlGenerator \ + src/JavaCat \ + src/JavaGenerator \ + src/JavaReverse \ + src/JavaRoundtrip \ + src/PhpGenerator \ + src/PhpReverse \ + src/PlugOutUpgrade \ + src/ProjectControl \ + src/ProjectSynchro \ + src/PythonGenerator \ + src/RoundtripBody + +PLUGOUT_DIRS=genplugouts/BrowserSort \ + genplugouts/CppUtilities \ + genplugouts/deploy \ + genplugouts/FileControl \ + genplugouts/GlobalChange \ + genplugouts/gpro \ + genplugouts/HtmlDoc \ + genplugouts/import_rose \ + genplugouts/singleton \ + genplugouts/sm \ + genplugouts/uml_projection \ + genplugouts/usecasewizard \ + genplugouts/xmi \ + genplugouts/Xmi2Generator \ + genplugouts/xmi2import + +# the main program (built as a .app bundle on OS X) +MAINPROG=douml + +# all the other side programs (NOT built as .app bundle on OS X) +SIDEPROGS= \ + browsersort \ + cpp_generator \ + cpp_reverse \ + cpp_roundtrip \ + cpp_util \ + deplcl \ + file_control \ + ghtml \ + global_change \ + gpro \ + gxmi \ + gxmi2 \ + idl_generator \ + ixmi2 \ + java_catalog \ + java_generator \ + java_reverse \ + java_roundtrip \ + php_generator \ + php_reverse \ + python_generator \ + roundtrip_body \ + usecasewizard + +# all the programs +PROGS = $(MAINPROG) $(SIDEPROGS) + +compile: + ( cd src/Libs/L_UniversalModels ; $(QMAKE) -config ${CONFIG} L_UniversalModels.pro; ) || exit 1 ; $(MAKE) -C src/Libs/L_UniversalModels || exit 1 + ( cd src ; $(QMAKE) -config ${CONFIG} douml.pro; ) || exit 1 ; $(MAKE) -C src || exit 1 + for i in $(SRC_DIRS); do if [ -d $$i ]; then ( cd $$i; $(QMAKE) -config ${CONFIG}; ) || exit 1 ; $(MAKE) -C $$i || exit 1 ; fi; done + for i in $(PLUGOUT_DIRS); do if [ -d $$i ]; then ( cd $$i; $(QMAKE) -config ${CONFIG}; ) || exit 1 ; $(MAKE) -C $$i || exit 1 ; fi; done + +# Useful for debugging on OS X with XCode, this target will generate appropriate xcode projects files +xcodeprojects: $(QTPROJECTFILES) + ( cd src/Libs/L_UniversalModels ; $(QMAKE) -config ${CONFIG} -spec macx-xcode L_UniversalModels.pro; ) || exit 1 + ( cd src ; $(QMAKE) -config ${CONFIG} -spec macx-xcode douml.pro; ) || exit 1 + for i in $(SRC_DIRS); do if [ -d $$i ]; then ( cd $$i; $(QMAKE) -config ${CONFIG} -spec macx-xcode; ) || exit 1 ; fi; done + for i in $(PLUGOUT_DIRS); do if [ -d $$i ]; then ( cd $$i; $(QMAKE) -config ${CONFIG} -spec macx-xcode; ) || exit 1 ; fi; done + +install: + mkdir -p "$(DESTDIR)$(DOUML_DIR)" + if test -n "$(DOUML_ICONS_PREFIX_DIR)" ; \ + then \ + for i in 16 32 48 64; do \ + mkdir -p "$(DESTDIR)$(DOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps"; \ + cp -p douml.$$i.png "$(DESTDIR)$(DOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps/douml.png"; \ + done; \ + fi + if test -n "$(DOUML_UNIX_PIXMAPS_DIR)"; then \ + mkdir -p "$(DESTDIR)$(DOUML_UNIX_PIXMAPS_DIR)"; \ + cp -f douml.48.png "$(DESTDIR)$(DOUML_UNIX_PIXMAPS_DIR)/douml.png"; \ + fi + mkdir -p "$(DESTDIR)$(DOUML_LIB)" + cp -Rp plugouts/empty "$(DESTDIR)$(DOUML_LIB)" + mkdir -p "$(DESTDIR)$(DOUML_DOC_DIR)" + mkdir -p "$(DESTDIR)$(DOUML_LOCALE_DIR)" + cp -p *.lang "$(DESTDIR)$(DOUML_LOCALE_DIR)" +# If on Darwin/Mac OS X, we are building a .dmg for deployment of a .app bundle +ifeq ($(uname_S),Darwin) +# First we copy the douml.app bundle directory that only contains the douml executable + cp -pR bin/$(MAINPROG).app "$(DESTDIR)$(DOUML_LIB)" +# We then copy all the other side programs (executables built with qt no app bundle option) +# inside the bundle's Contents/MacOS subfolder. + for i in $(SIDEPROGS); do cp -p bin/$$i "$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app/Contents/MacOS" ; done +# We also copy the douml icon for OS X in the Resources subfolder + mkdir -p "$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app/Contents/Resources/" + cp ./douml.icns "$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app/Contents/Resources/" +# We run the macdeployqt tool to add the appropriate frameworks and +# configuration files to the bundle and to create a .dmg disk image file. +ifeq ($(CONFIG),debug) +# In debug mode we don't create the dmg file. Instead we tell macdeployqt to add the debug versions of +# the Qt frameworks, and we edit the bundle's Info.plist to set the environment variable +# DYLD_IMAGE_SUFFIX=_debug so that the app will load the debug versions of Qt libraries + /usr/libexec/PlistBuddy -c "Add :LS_Environment dict" "$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app/Contents/Info.plist" + /usr/libexec/PlistBuddy -c "Add :LS_Environment:DYLD_IMAGE_SUFFIX string '_debug'" "$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app/Contents/Info.plist" + macdeployqt "$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app" -verbose=2 -use-debug-libs \ + $(patsubst %,-executable="$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app/Contents/MacOS/%",$(SIDEPROGS)) +else + macdeployqt "$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app" -verbose=2 -dmg \ + $(patsubst %,-executable="$(DESTDIR)$(DOUML_LIB)/$(MAINPROG).app/Contents/MacOS/%",$(SIDEPROGS)) +endif +else + for i in $(PROGS); do cp -p bin/$$i "$(DESTDIR)$(DOUML_LIB)" ; done +endif + echo "#!/bin/sh" >$(DESTDIR)$(DOUML_DIR)/douml + echo "PATH=$(LOCAL_DESTDIR)$(DOUML_LIB):$$"PATH >>$(DESTDIR)$(DOUML_DIR)/douml + echo "DOUML_LIB_DIR=$(LOCAL_DESTDIR)$(DOUML_LIB)" >>$(DESTDIR)$(DOUML_DIR)/douml + echo "export PATH" >>$(DESTDIR)$(DOUML_DIR)/douml + echo "export DOUML_LIB_DIR" >>$(DESTDIR)$(DOUML_DIR)/douml + echo "exec $(LOCAL_DESTDIR)$(DOUML_LIB)/douml \"$$"@"\"" >>$(DESTDIR)$(DOUML_DIR)/douml + chmod +x "$(DESTDIR)$(DOUML_DIR)/douml" + if test -n "$(DOUML_DESKTOP_DIR)" ; \ + then \ + mkdir -p "$(DESTDIR)$(DOUML_DESKTOP_DIR)" ; \ + echo "[Desktop Entry]" > "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "Encoding=UTF-8" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "Name=DoUML" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "Type=Application" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "GenericName=Free UML 2 modeler" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "Comment=Free UML 2 modeler" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "Exec=$(LOCAL_DESTDIR)$(DOUML_DIR)/douml" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "TryExec=douml" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "Icon=douml" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + echo "Categories=Development;Building;GUIDesigner;IDE;Documentation;" >> "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" ; \ + fi + +uninstall: + rm -rf $(DESTDIR)$(DOUML_LIB) $(DESTDIR)$(DOUML_DIR)/douml + for i in 16 32 48 64; do \ + rm -f "$(DESTDIR)$(DOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps/douml.png"; \ + done + rm -f "$(DESTDIR)$(DOUML_UNIX_PIXMAPS_DIR)/douml.png" + rm -f "$(DESTDIR)$(DOUML_DESKTOP_DIR)/douml.desktop" + +clean: + for i in $(SRC_DIRS) $(PLUGOUT_DIRS); do if [ -d $$i ]; then (cd $$i; $(QMAKE) -config ${CONFIG}; $(MAKE) clean; rm -f Makefile; ) || exit 1 ; fi; done + ( cd src ; $(QMAKE) -config ${CONFIG} douml.pro; ) || exit 1 ; (cd src; $(MAKE) clean; rm -f Makefile; ) || exit 1 + ( cd src/Libs/L_UniversalModels ; $(QMAKE) -config ${CONFIG} L_UniversalModels.pro; ) || exit 1 ; (cd src/Libs/L_UniversalModels; $(MAKE) clean; rm -f Makefile; ) || exit 1 +# If on Darwin/Mac OS X we are removing the douml .app bundle +ifeq ($(uname_S),Darwin) + rm -rf "bin/$(MAINPROG).app" + for i in $(SIDEPROGS); do rm -f bin/$$i; done +else + for i in $(PROGS); do rm -f bin/$$i; done +endif + rm -rf bin/moc_release bin/moc_debug + rm -rf bin/obj_release bin/obj_debug + +.PHONY: compile clean install uninstall diff --git a/README.md b/README.md new file mode 100644 index 000000000..a7d54632a --- /dev/null +++ b/README.md @@ -0,0 +1,167 @@ +DoUML +================== + +##IMPORTANT NOTICE + +This is still a work in progress and the fact that the release is made doesn't mean that it is bug free. We recommend that you use DoUML along with source control and save your work frequently. + +**A discussion group for DoUML was created for subjects other than issues: https://groups.google.com/forum/#!forum/douml** + +___________________ + +About +----- + + + DoUML is a UML diagram editor capable of generating/reversing code in a multitude of programming + languages(namely - C++, Java, Python, idl, Php). + + DoUML is a fork of the original Bouml editor by Bruno Pages that was born when Bouml's development + abruptly came to a stop due to author's conflict with wikipedia administration. + + Not wanting to lose (possibly) best free UML modelling software an effort was made to port the + original to Qt5 and continue developing it as a community. + + DoUML is based on a source code of Bouml 4.22 but can read projects saved with versions up to 4.23 + patch 7. Support for later, commercial versions, of Bouml is possible but sample projects will be + required. + +Project status: +-------------- + + * Core editor seems to be working. It is still very rough around the edges but much easier to work + with than bouml 4.23 (I am biased, lol) + * Generators/reversers seem to be working. + * Some of the plugouts do not work yet, but these are not critical to actual modelling. + * A list of failing plugouts can be found in settings.ini file + +Bugfixes: +--------- + + * clicking left-right arrows when editing a parameter in an operation dialog will no longer switch + table cells. + * when you are inheriting from a base class, a definition is automatically produced even if it was + completely empty in base class + * changing a default value in Uml tab of an operation dialog will automatically refresh function + declaration in C++ tab. + * user aliases are no longer lost when operation is copied or when "deploy classes" is used. + +Enchancements: +-------------- + + * In Bouml when .lock file was not deleted during previous session the editor notified the user + of this fact and closed. Now it will offer the possibility to take ownership of that lock and + continue. + + * Operation and class dialogs have "up/down" buttons so user can traverse the tree without + reopening the dialogs. This will later work for other dialogs too but making dialogs + compatible with the feature is very time consuming so there's still time before that. + + * Operation, class and artifact dialogs can be moved around with a new sticky control appearing + at wherever cursor leaves the dialog. A mini toolbar will appear wherever cursor touches the + edge of the dialog. This toolbar will have mouse icon on it. + * Left click-drag on this icon - drags the window around + * Right click-drag on this icon - resizes the winow + * Scrolling on this icon switches tabs of the dialog + + * entering constructor initializers for C++ classes no longer requires navigation to properties + panel. Right clicking on a constructor produces a menu entry "Add constructor initializer" + which calls a dialog designed just for this purpose. + + * changes to inherited functions propatate above/below through the hierachy. User no longer need + to manually adjust the whole tree each time. + + * added C++ modifiers default,delete,override, final to operations + + * added non-static data initialization for C++ headers. Basically - "initial value" now works + for non-static data attributes. + + * "Up" right click menu option will appear in operation's right click menu. This option will + instantly select and scroll to container class. + + * operations, class and artifact dialogs have clipboard history button on their mini toolbar. + By clicking it user has access to recently copied chuncks of text. + + * when adding inherited functions from a base class (right click on a class node) user can now + inherit whole inteface of a base class in one click. + + * all dialogs that have mini toolbar next to them will spawn near the cursor instead of the + center of the screen. + + * user can now "move into", "move after" and "duplicate" into a parameter that has Get/Set + functions. The operation also copies/moves getters/setters. + + * getters/setters can now be marked and "move after" within the same class + + * non-english characters are now allowed in comments, init values of attributes, notes on + diagrams and all non-generatable nodes in the tree(i.e. - use cases). + + * there is now "Generate" label on the main toolbar. + Next to this label C++/Php/Python... buttons will appear according to which language is set for + the project clicking on these buttons will either generate code for currently selected node in + the tree or marked nodes in the tree. To make it obvious which will be applied "Generate" label + is color-coded. + * If its background is red - there are marked items in the tree and their nodes will be generated + * If its background is blue - there are no marked in the tree so generation will be done on user-selected node + * The generation is done on a "first generatable node upwards in the tree" Meaning - if an attribute is marked the app will traverse to containing class and generate it + * Added "Catalog" widget below class tree. This widget is used for quick tree navigation and has 3 tabs. + * "Visited" tab updates each time user clicks on a node in a tree. This node is inserted into visited and clicking on it will immediately scroll the main tree to it. + * "Marked" tab tracks user selection and serves double purpose of tree navigation(as in "Visited") and node deselection via rightclick menu. + * "Favourites" tab is used when user ahs often visited tree nodes and wants an easy wasy to return to the in a tree. + * Adding nodes s done by dragging them from the main tree onto favourites tabs. + * Catalog widget has line edit under tabs which serves the purpose of filtering the Visited view (only Visited atm). + + * Builtin types" tab in generation settings has been completely reworked. + * User can now search and sort it. + * User can selectively turn off languages he does not use in the table. + * When a new row is being added it is initialized with enough defaults to make assigning UML name the only obligatory edit before clicking "OK". + * Adding new rows is now done through "Add type" button and a few options were removed from "do" menu as they no longer make sense. + + * A totally new control can be brought up by pressing Ctlr-E on tree nodes. See changelog.txt for details. (section 1.0b4) + +Manual +------ + + Currently - the manual of Bouml version 4.22 is being used. To access it, set "Manual" path in + miscelaneous settings in application's menu. + +Compiling & Installing +---------------------- + +#### Under Linux: + + * dependencies: libqt5-dev, libboost-dev, g++ (>=4.7) + * `make` + * `make install` default directory is ${PWD}/install or `make install LOCAL_DESTDIR=[path]` + + +#### Under Windows: + + ``` + L_UniversalModels library needs to be built prior to douml compilation. It is located in src/Libs/L_UniversalModels + ``` + + * Mingw based on gcc 4.7+ + * Qt 5.4+ built with aforementioned mingw. + * Boost's headers of version 1.5+ must be visible in scope. + +#### Pre-built binaries + +Binaries are kindly provided by the community. + +- OpenSUSE binaries were provided by @gilbertoca +- Ubuntu PPA, provided by @pasgui: https://launchpad.net/%7Epasgui/+archive/ubuntu/ppa + +Be a maintainer! Contact-us through the mainling list or issues. + +Webpage +------- + +http://douml.github.io/douml/ + + *** CONTRIBUTORS NEEDED *** + +And remember - we all own a debt of gratitude to Bouml's original creator - Bruno Pages. +Without him, there'd be nothing for us to continue developing. +Current (non-free) version of original Bouml that he works on now can be found at: + http://bouml.fr diff --git a/Readme.txt b/Readme.txt deleted file mode 100644 index 78ef49eae..000000000 --- a/Readme.txt +++ /dev/null @@ -1,102 +0,0 @@ -========= -Douml version 1.0b -========= - -*** IMPORTANT NOTICE *** - This is still a work in progress and the fact that the release is made doesn't mean that it is bug free. - We recommend that you use Douml along with source control and save your work frequently. - -About - - Douml is a UML diagram editor capable of generating/reversing code in a multitude of programming languages(namely - C++, Java, Python, idl, Php) - Douml is a fork of the original Bouml editor by Bruno Pages that was born when Bouml's development abruptly came to a stop due to author's conflict with wikipedia administration. - Not wanting to lose (possibly) best free UML modelling software an effort was made to port the original to Qt4 and continue developing it as a community. - Douml is based on a source code of Bouml 4.22 but can read projects saved with versions up to 4.23 patch 7. - Support for later, commercial versions, of Bouml is possible but sample projects will be required. - -Project status: - - - Core editor seems to be working. It is still very rough around the edges but much easier to work with than bouml 4.23 (I am biased, lol) - Generators/reversers seem to be working. - Some of the plugouts do not work yet, but these are not critical to actual modelling. - A list of failing plugouts can be found in settings.ini file - - A multitude of improvements/fixes have been made to the editor. Version 1 will include these: - - Bugfixes: - -- clicking left-right arrows when editing a parameter in an operation dialog will no longer switch table cells. - -- when you are inheriting from a base class, a definition is automatically produced even if it was completely empty in base class - -- changing a default value in Uml tab of an operation dialog will automatically refresh function declaration in C++ tab. - -- user aliases are no longer lost when operation is copied or when "deploy classes" is used. - - Enchancements: - - -- In Bouml when .lock file was not deleted during previous session the editor notified the user of this fact and closed. - Now it will offer the possibility to take ownership of that lock and continue. - - -- operation and class dialogs have "up/down" buttons so user can traverse the tree without reopening the dialogs. - This will later work for other dialogs too but making dialogs compatible with the feature is very time consuming so there's still time before that. - - -- operation, class and artifact dialogs can be moved around with a new sticky control appearing at wherever cursor leaves the dialog - A mini toolbar will appear wherever cursor touches the edge of the dialog. - This toolbar will have mouse icon on it. - Left click-drag on this icon - drags the window around - Right click-drag on this icon - resizes the winow - Scrolling on this icon switches tabs of the dialog - - -- entering constructor initializers for C++ classes no longer requires navigation to properties panel. - Right clicking on a constructor produces a menu entry "Add constructor initializer" which calls a dialog designed just for this purpose. - - -- changes to inherited functions propatate above/below through the hierachy. User no longer need to manually adjust the whole tree each time. - - -- added C++ modifiers default,delete,override, final to operations - - -- added non-static data initialization for C++ headers. - Basically - "initial value" now works for non-static data attributes. - - -- "Up" right click menu option will appear in operation's right click menu. This option will instantly select and scroll to container class. - - -- operations, class and artifact dialogs have clipboard history button on their mini toolbar. By clicking it user has access to recently copied chuncks of text - - -- when adding inherited functions from a base class (right click on a class node) user can now inherit whole inteface of a base class in one click. - - -- all dialogs that have mini toolbar next to them will spawn near the cursor instead of the center of the screen. - - -- user can now "move into", "move after" and "duplicate" into a parameter that has Get/Set functions. The operation also copies/moves getters/setters. - - -- getters/setters can now be marked and "move after" within the same class - - -- non-english characters are now allowed in comments, init values of attributes, notes on diagrams and all non-generatable nodes in the tree(i.e. - use cases). - - -- there is now "Generate" label on the main toolbar. - Next to this label C++/Php/Python... buttons will appear according to which language is set for the project - clicking on these buttons will either generate code for currently selected node in the tree or marked nodes in the tree. - To make it obvious which will be applied "Generate" label is color-coded. - If its background is red - there are marked items in the tree and their nodes will be generated - If its background is blue - there are no marked in the tree so generation will be done on user-selected node - The generation is done on a "first generatable node upwards in the tree" Meaning - if an attribute is marked the app will traverse to containing class and generate it - - -Manual - Currently - the manual of Bouml version 4.22 is being used. To access it, set "Manual" path in miscelaneous settings in application's menu. - -Compiling - These are needed: - Mingw based on gcc 4.7+ - Qt 4.7+ built with aforementioned mingw. - Boost's headers of version 1.5+ must be visible in scope. - - -Webpage - http://sourceforge.net/projects/douml/ -Contact email: - doumleditor@gmail.com - !!! CONTRIBUTORS NEEDED!!! - - -And remember - we all own a debt of gratitude to Bouml's original creator - Bruno Pages. -Without him, there'd be nothing for us to continue developing. -Current(non-free) version of original Bouml that he works on now can be found at: - http://bouml.fr - diff --git a/bin/GenerationSettings_PastDefines.ini b/bin/GenerationSettings_PastDefines.ini deleted file mode 100644 index 07fd1a7ba..000000000 --- a/bin/GenerationSettings_PastDefines.ini +++ /dev/null @@ -1,96 +0,0 @@ -[General] -compatibility_save=1 - -CPP_H_CONTENT="#ifndef ${NAMESPACE}_${NAME}_H -${NAMESPACE}_${NAME}_H - -${comment} -${includes} -${declarations} -${namespace_start} -${definition} -${namespace_end} -\#endif" - -CPP_SRC_CONTENT="${comment} -${includes} -${namespace_start} -${members} -${namespace_end}" - -JAVA_SRC_CONTENT="${comment} -${package} -${imports} -${definition}"; - -PHP_SRC_CONTENT=""; - -PYTHON_SRC_CONTENT="${comment} -${import} -${definition}"; - -IDL_SRC_CONTENT="#ifndef ${MODULE}_${NAME}_H -${MODULE}_${NAME}_H -${comment} -${includes} -${module_start} -${definition} -${module_end} -\#endif" - -CPP_ATTR_DECL1=" ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value};" -CPP_ATTR_DECL2=" ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value};" -CPP_ATTR_DESCR1=" ${description}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value};" -CPP_ATTR_DESCR2=" ${description}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value};" -CPP_INDENT_VISIBILITY=" " -JAVA_ATTR_DECL1=" ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value};" -JAVA_ATTR_DECL2=" ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value};" -JAVA_ATTR_DESCR1=" ${description}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value};" -JAVA_ATTR_DESCR2=" ${description}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value};" -PHP_CLASS="${comment}${final}${abstract}class ${name}${extends}${implements} {${members}}" -PHP_ENUM="${comment}${visibility}final class ${name} {${items}}" -PHP_INTERFACE="${comment}interface ${name} {${members}}" -PHP_ATTR=" ${comment}${visibility}${const}${static}${var}${name}${value};" -PHP_ENUMITEM=" const ${name}${value};${comment}" -PHP_REL=" ${comment}${visibility}${const}${static}${var}${name}${value};" -PHP_OPER=" ${comment}${final}${visibility}${abstract}${static}function ${name}${(}${)}{ ${body}}" -PYTHON_INDENT_STEP=" " -PYTHON_CLASS="class ${name}${inherit}:${docstring}${members}" -PYTHON_ENUM="class ${name}:${docstring}${members}" -PYTHON_ATTR1="${comment}${self}${name} = ${value}" -PYTHON_ATTR2="${comment}${self}${name} = ${stereotype}()" -PYTHON_ENUMITEM="${comment}${self}${name} = ${value}" -PYTHON_REL1="${comment}${self}${name} = ${value}" -PYTHON_REL2="${comment}${self}${name} = ${stereotype}()" -PYTHON_REL_COMP="${comment}${self}${name} = ${type}()" -PYTHON_OPER="${@}${static}${abstract}def ${name}${(}${)}:${docstring}${body}" -PYTHON_INITOPER="${@}${static}${abstract}def ${name}${(}${p0}${v0}${)}:${docstring}super(${class}, ${p0}).__init__()${body}" -IDL_EXTERNAL_CLASS_DECL="${name}#include \"${name}.idl\""; -IDL_VALUETYPE_DECL="${comment}${abstract}${custom}valuetype ${name}${inherit} {${members}};"; -IDL_ATTR_DECL1=" ${comment}${readonly}${attribute}${stereotype}<${type}> ${name};" -IDL_ATTR_DECL2=" ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name};" -IDL_ATTR_DESCR1=" ${description}${readonly}${attribute}${stereotype}<${type}> ${name};" -IDL_ATTR_DESCR2=" ${description}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name};" -IDL_VALUETYPE_ATTRIBUTE_DECL0=" ${comment}${visibility}${type} ${name};" -IDL_VALUETYPE_ATTRIBUTE_DECL1=" ${comment}${visibility}${stereotype}<${type}> ${name};" -IDL_VALUETYPE_ATTRIBUTE_DECL2=" ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name};" -IDL_VALUETYPE_ATTRIBUTE_DESCR1=" ${description}${visibility}${stereotype}<${type}> ${name};" -IDL_VALUETYPE_ATTRIBUTE_DESCR2=" ${description}${visibility}${stereotype}<${type},${multiplicity}> ${name};" -IDL_CONST_ATTR_DECL1=" ${comment}const ${stereotype}<${type}> ${name}${value};" -IDL_CONST_ATTR_DECL2=" ${comment}const ${stereotype}<${type},${multiplicity}> ${name}${value};" -IDL_CONST_ATTR_DESCR1=" ${description}const ${stereotype}<${type}> ${name}${value};" -IDL_CONST_ATTR_DESCR2=" ${description}const ${stereotype}<${type},${multiplicity}> ${name}${value};" -IDL_UNION_ATTR_DECL1=" ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};"; -IDL_UNION_ATTR_DECL2=" ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};"; -IDL_UNION_ATTR_DESCR1=" ${description}case ${case} : ${readonly}${stereotype}<${type}> ${name};"; -IDL_UNION_ATTR_DESCR2=" ${description}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};"; -IDL_VALUETYPE_REL_DECL0=" ${comment}${visibility}${type} ${name};" -IDL_VALUETYPE_REL_DECL1=" ${comment}${visibility}${stereotype}<${type}> ${name};" -IDL_VALUETYPE_REL_DECL2=" ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name};" -IDL_VALUETYPE_REL_DESCR1=" ${description}${visibility}${stereotype}<${type}> ${name};" -IDL_VALUETYPE_REL_DESCR2=" ${description}${visibility}${stereotype}<${type},${multiplicity}> ${name};" diff --git a/bin/settings.ini b/bin/settings.ini deleted file mode 100644 index 3a3bf3ecf..000000000 --- a/bin/settings.ini +++ /dev/null @@ -1,10 +0,0 @@ -[General] -test=test - -[Main] -compatibility_save=1 -fileformat=77 -encoding=UTF-8 - -[Failing_Tools] -Tools="Import Rose,Uml projection,C++ state machine,Import XMI 2.x,Generate XMI 2.x,Generate XMI 1.2,Generate .pro" diff --git a/douml.icns b/douml.icns new file mode 100644 index 000000000..0eb1021db Binary files /dev/null and b/douml.icns differ diff --git a/douml.ico b/douml.ico new file mode 100644 index 000000000..bb83bdafa Binary files /dev/null and b/douml.ico differ diff --git a/douml.png b/douml.png new file mode 100644 index 000000000..f4fe512b9 Binary files /dev/null and b/douml.png differ diff --git a/douml.qrc b/douml.qrc new file mode 100644 index 000000000..6cf1d233c --- /dev/null +++ b/douml.qrc @@ -0,0 +1,9 @@ + + + douml.16.png + douml.32.png + douml.48.png + douml.64.png + douml.png + + diff --git a/douml.xcworkspace/contents.xcworkspacedata b/douml.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..c82ce6d10 --- /dev/null +++ b/douml.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/genplugouts/BrowserSort/BrowserSort.pro b/genplugouts/BrowserSort/BrowserSort.pro index dc2cd75d8..63f522586 100644 --- a/genplugouts/BrowserSort/BrowserSort.pro +++ b/genplugouts/BrowserSort/BrowserSort.pro @@ -1,6 +1,8 @@ TEMPLATE = app TARGET = browsersort -CONFIG += warn_on qt +CONFIG -= app_bundle +CONFIG += qt warn_on c++11 +DEFINES += QT_DEPRECATED_WARNINGS INCLUDEPATH += ../../src HEADERS = ./UmlActivityPin.h \ ./TransitionBehavior.h \ @@ -319,18 +321,16 @@ SOURCES = ./UmlActivityPin.cpp \ ./UmlBaseClassView.cpp \ ./UmlBaseDeepHistoryPseudoState.cpp \ ./UmlBaseShallowHistoryPseudoState.cpp -#The following line was inserted by qt3to4 -QT += network qt3support -QMAKE_CXXFLAGS += -std=gnu++11 -CONFIG(release){ - MOC_DIR = ../../bin/MOC_release/sort/ - OBJECTS_DIR = ../../bin/Obj_release/sort +DEFINES += TRUE=true FALSE=false +QT += network +DESTDIR = ../../bin +CONFIG(release, debug|release) { + DEFINES += NDEBUG + MOC_DIR = $${DESTDIR}/moc_release/browsersort + OBJECTS_DIR = $${DESTDIR}/obj_release/browsersort } - -CONFIG(debug){ - MOC_DIR = ../../bin/MOC_debug/sort/ - OBJECTS_DIR = ../../bin/Obj_debug/sort - +CONFIG(debug, debug|release) { + DEFINES += TRACE DEBUG DEBUG_DOUML + MOC_DIR = $${DESTDIR}/moc_debug/browsersort + OBJECTS_DIR = $${DESTDIR}/obj_debug/browsersort } - - DESTDIR = ../../bin diff --git a/genplugouts/BrowserSort/CppSettings.cpp b/genplugouts/BrowserSort/CppSettings.cpp index 9be970344..6fed78bdb 100644 --- a/genplugouts/BrowserSort/CppSettings.cpp +++ b/genplugouts/BrowserSort/CppSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool CppSettings::useDefaults() { UmlCom::send_cmd(cppSettingsCmd, getCppUseDefaultsCmd); @@ -22,21 +22,21 @@ bool CppSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString CppSettings::type(Q3CString s) +QByteArray CppSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_Type(Q3CString s, Q3CString v) +bool CppSettings::set_Type(QByteArray s, QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppTypeCmd, s, v); if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -49,28 +49,28 @@ bool CppSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::umlType(Q3CString s) +QByteArray CppSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::cpp); } -Q3CString CppSettings::relationStereotype(Q3CString s) +QByteArray CppSettings::relationStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_RelationStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_RelationStereotype(QByteArray s, QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppRelationStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_stereotype(s); @@ -83,28 +83,28 @@ bool CppSettings::set_RelationStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::relationUmlStereotype(Q3CString s) +QByteArray CppSettings::relationUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::classStereotype(Q3CString s) +QByteArray CppSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_ClassStereotype(QByteArray s, QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -117,31 +117,31 @@ bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::classUmlStereotype(Q3CString s) +QByteArray CppSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::include(Q3CString s) +QByteArray CppSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool CppSettings::set_Include(Q3CString s, Q3CString v) +bool CppSettings::set_Include(QByteArray s, QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppIncludeCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -152,14 +152,14 @@ bool CppSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::rootDir() +QByteArray CppSettings::rootDir() { read_if_needed_(); return _root; } -bool CppSettings::set_RootDir(Q3CString v) +bool CppSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppRootDirCmd, v); @@ -171,14 +171,14 @@ bool CppSettings::set_RootDir(Q3CString v) return FALSE; } -Q3CString CppSettings::headerContent() +QByteArray CppSettings::headerContent() { read_if_needed_(); return _h_content; } -bool CppSettings::set_HeaderContent(Q3CString v) +bool CppSettings::set_HeaderContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderContentCmd, v); @@ -190,14 +190,14 @@ bool CppSettings::set_HeaderContent(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceContent() +QByteArray CppSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool CppSettings::set_SourceContent(Q3CString v) +bool CppSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceContentCmd, v); @@ -209,14 +209,14 @@ bool CppSettings::set_SourceContent(Q3CString v) return FALSE; } -Q3CString CppSettings::headerExtension() +QByteArray CppSettings::headerExtension() { read_if_needed_(); return _h_ext; } -bool CppSettings::set_HeaderExtension(Q3CString v) +bool CppSettings::set_HeaderExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderExtensionCmd, v); @@ -228,14 +228,14 @@ bool CppSettings::set_HeaderExtension(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceExtension() +QByteArray CppSettings::sourceExtension() { read_if_needed_(); return _src_ext; } -bool CppSettings::set_SourceExtension(Q3CString v) +bool CppSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceExtensionCmd, v); @@ -266,14 +266,14 @@ bool CppSettings::set_IncludeWithPath(bool v) return FALSE; } -const Q3CString & CppSettings::enumIn() +const QByteArray & CppSettings::enumIn() { read_if_needed_(); return _enum_in; } -bool CppSettings::set_EnumIn(Q3CString v) +bool CppSettings::set_EnumIn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInCmd, v); @@ -285,14 +285,14 @@ bool CppSettings::set_EnumIn(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumOut() +const QByteArray & CppSettings::enumOut() { read_if_needed_(); return _enum_out; } -bool CppSettings::set_EnumOut(Q3CString v) +bool CppSettings::set_EnumOut(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumOutCmd, v); @@ -304,14 +304,14 @@ bool CppSettings::set_EnumOut(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumInout() +const QByteArray & CppSettings::enumInout() { read_if_needed_(); return _enum_inout; } -bool CppSettings::set_EnumInout(Q3CString v) +bool CppSettings::set_EnumInout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInOutCmd, v); @@ -323,14 +323,14 @@ bool CppSettings::set_EnumInout(Q3CString v) return FALSE; } -Q3CString CppSettings::enumReturn() +QByteArray CppSettings::enumReturn() { read_if_needed_(); return _enum_return; } -bool CppSettings::set_EnumReturn(Q3CString v) +bool CppSettings::set_EnumReturn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumReturnCmd, v); @@ -342,14 +342,14 @@ bool CppSettings::set_EnumReturn(Q3CString v) return FALSE; } -const Q3CString & CppSettings::in() +const QByteArray & CppSettings::in() { read_if_needed_(); return _in; } -bool CppSettings::set_In(Q3CString v) +bool CppSettings::set_In(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInCmd, v); @@ -361,14 +361,14 @@ bool CppSettings::set_In(Q3CString v) return FALSE; } -const Q3CString & CppSettings::out() +const QByteArray & CppSettings::out() { read_if_needed_(); return _out; } -bool CppSettings::set_Out(Q3CString v) +bool CppSettings::set_Out(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOutCmd, v); @@ -380,14 +380,14 @@ bool CppSettings::set_Out(Q3CString v) return FALSE; } -const Q3CString & CppSettings::inout() +const QByteArray & CppSettings::inout() { read_if_needed_(); return _inout; } -bool CppSettings::set_Inout(Q3CString v) +bool CppSettings::set_Inout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInOutCmd, v); @@ -399,14 +399,14 @@ bool CppSettings::set_Inout(Q3CString v) return FALSE; } -Q3CString CppSettings::Return() +QByteArray CppSettings::Return() { read_if_needed_(); return _return; } -bool CppSettings::set_Return(Q3CString v) +bool CppSettings::set_Return(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppReturnCmd, v); @@ -418,14 +418,14 @@ bool CppSettings::set_Return(Q3CString v) return FALSE; } -const Q3CString & CppSettings::classDecl() +const QByteArray & CppSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool CppSettings::set_ClassDecl(Q3CString v) +bool CppSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppClassDeclCmd, v); @@ -437,14 +437,14 @@ bool CppSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::externalClassDecl() +const QByteArray & CppSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool CppSettings::set_ExternalClassDecl(Q3CString v) +bool CppSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppExternalClassDeclCmd, v); @@ -456,14 +456,14 @@ bool CppSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::structDecl() +const QByteArray & CppSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool CppSettings::set_StructDecl(Q3CString v) +bool CppSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppStructDeclCmd, v); @@ -475,14 +475,14 @@ bool CppSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::unionDecl() +const QByteArray & CppSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool CppSettings::set_UnionDecl(Q3CString v) +bool CppSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppUnionDeclCmd, v); @@ -494,14 +494,14 @@ bool CppSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumDecl() +const QByteArray & CppSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool CppSettings::set_EnumDecl(Q3CString v) +bool CppSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumDeclCmd, v); @@ -513,14 +513,14 @@ bool CppSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::typedefDecl() +const QByteArray & CppSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool CppSettings::set_TypedefDecl(Q3CString v) +bool CppSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppTypedefDeclCmd, v); @@ -532,14 +532,14 @@ bool CppSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::attributeDecl() +const QByteArray & CppSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool CppSettings::set_AttributeDecl(Q3CString v) +bool CppSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppAttributeDeclCmd, v); @@ -551,14 +551,14 @@ bool CppSettings::set_AttributeDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumItemDecl() +const QByteArray & CppSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool CppSettings::set_EnumItemDecl(Q3CString v) +bool CppSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumItemDeclCmd, v); @@ -570,7 +570,7 @@ bool CppSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::relationDecl(bool by_value, const char * multiplicity) +const QByteArray & CppSettings::relationDecl(bool by_value, const char * multiplicity) { read_if_needed_(); @@ -589,14 +589,14 @@ bool CppSettings::set_RelationDecl(bool by_value, const char * multiplicity, con return FALSE; } -const Q3CString & CppSettings::operationDecl() +const QByteArray & CppSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool CppSettings::set_OperationDecl(Q3CString v) +bool CppSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDeclCmd, v); @@ -608,14 +608,14 @@ bool CppSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::operationDef() +const QByteArray & CppSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool CppSettings::set_OperationDef(Q3CString v) +bool CppSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDefCmd, v); @@ -665,14 +665,14 @@ bool CppSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::getName() +const QByteArray & CppSettings::getName() { read_if_needed_(); return _get_name; } -bool CppSettings::set_GetName(Q3CString v) +bool CppSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppGetNameCmd, v); @@ -760,14 +760,14 @@ bool CppSettings::set_SetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::setName() +const QByteArray & CppSettings::setName() { read_if_needed_(); return _set_name; } -bool CppSettings::set_SetName(Q3CString v) +bool CppSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSetNameCmd, v); @@ -819,51 +819,51 @@ bool CppSettings::set_IsSetParamConst(bool v) bool CppSettings::_defined; -Q3CString CppSettings::_root; +QByteArray CppSettings::_root; -Q3CString CppSettings::_in; +QByteArray CppSettings::_in; -Q3CString CppSettings::_out; +QByteArray CppSettings::_out; -Q3CString CppSettings::_inout; +QByteArray CppSettings::_inout; -Q3CString CppSettings::_return; +QByteArray CppSettings::_return; -Q3CString CppSettings::_enum_in; +QByteArray CppSettings::_enum_in; -Q3CString CppSettings::_enum_out; +QByteArray CppSettings::_enum_out; -Q3CString CppSettings::_enum_inout; +QByteArray CppSettings::_enum_inout; -Q3CString CppSettings::_enum_return; +QByteArray CppSettings::_enum_return; -Q3CString CppSettings::_class_decl; +QByteArray CppSettings::_class_decl; -Q3CString CppSettings::_external_class_decl; +QByteArray CppSettings::_external_class_decl; -Q3CString CppSettings::_struct_decl; +QByteArray CppSettings::_struct_decl; -Q3CString CppSettings::_union_decl; +QByteArray CppSettings::_union_decl; -Q3CString CppSettings::_enum_decl; +QByteArray CppSettings::_enum_decl; -Q3CString CppSettings::_typedef_decl; +QByteArray CppSettings::_typedef_decl; -Q3CString CppSettings::_attr_decl; +QByteArray CppSettings::_attr_decl; -Q3CString CppSettings::_enum_item_decl; +QByteArray CppSettings::_enum_item_decl; -Q3CString CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; +QByteArray CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; -Q3CString CppSettings::_oper_decl; +QByteArray CppSettings::_oper_decl; -Q3CString CppSettings::_oper_def; +QByteArray CppSettings::_oper_def; bool CppSettings::_force_oper_throw; aVisibility CppSettings::_get_visibility; -Q3CString CppSettings::_get_name; +QByteArray CppSettings::_get_name; bool CppSettings::_is_get_inline; @@ -873,23 +873,23 @@ bool CppSettings::_is_get_value_const; aVisibility CppSettings::_set_visibility; -Q3CString CppSettings::_set_name; +QByteArray CppSettings::_set_name; bool CppSettings::_is_set_inline; bool CppSettings::_is_set_param_const; -Q3CString CppSettings::_h_content; +QByteArray CppSettings::_h_content; -Q3CString CppSettings::_src_content; +QByteArray CppSettings::_src_content; -Q3CString CppSettings::_h_ext; +QByteArray CppSettings::_h_ext; -Q3CString CppSettings::_src_ext; +QByteArray CppSettings::_src_ext; bool CppSettings::_incl_with_path; -Q3Dict CppSettings::_map_includes; +QHash CppSettings::_map_includes; void CppSettings::read_() { @@ -922,13 +922,13 @@ void CppSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _h_content = UmlCom::read_string(); diff --git a/genplugouts/BrowserSort/CppSettings.h b/genplugouts/BrowserSort/CppSettings.h index 24507102f..282078ef3 100644 --- a/genplugouts/BrowserSort/CppSettings.h +++ b/genplugouts/BrowserSort/CppSettings.h @@ -4,10 +4,10 @@ #ifdef WITHCPP -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning C++, configured through // the 'Generation settings' dialog. @@ -31,100 +31,100 @@ class CppSettings : public UmlSettings // returns the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the C++ type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationStereotype(Q3CString s); + static QByteArray relationStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationStereotype(Q3CString s, Q3CString v); + static bool set_RelationStereotype(QByteArray s, QByteArray v); // reverse of the RelationStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString relationUmlStereotype(Q3CString s); + static QByteArray relationUmlStereotype(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static Q3CString rootDir(); + static QByteArray rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default header file content - static Q3CString headerContent(); + static QByteArray headerContent(); // set the default header file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderContent(Q3CString v); + static bool set_HeaderContent(QByteArray v); // returns the default source file content - static Q3CString sourceContent(); + static QByteArray sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the header files produced by the // C++ code generator - static Q3CString headerExtension(); + static QByteArray headerExtension(); // set the extension of the header files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderExtension(Q3CString v); + static bool set_HeaderExtension(QByteArray v); // returns the extension of the source files produced by the // C++ code generator - static Q3CString sourceExtension(); + static QByteArray sourceExtension(); // set the extension of the source files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // indicates to the code generator if the #include may specify // the path of just the file's name @@ -138,70 +138,70 @@ class CppSettings : public UmlSettings // returns the default operation 'in' parameter specification // in case its type is an enum - static const Q3CString & enumIn(); + static const QByteArray & enumIn(); // set the default operation 'in' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumIn(Q3CString v); + static bool set_EnumIn(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is an enum - static const Q3CString & enumOut(); + static const QByteArray & enumOut(); // set the default operation 'out' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumOut(Q3CString v); + static bool set_EnumOut(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is an enum - static const Q3CString & enumInout(); + static const QByteArray & enumInout(); // set the default operation 'inout' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumInout(Q3CString v); + static bool set_EnumInout(QByteArray v); // return the default operation value type form - static Q3CString enumReturn(); + static QByteArray enumReturn(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumReturn(Q3CString v); + static bool set_EnumReturn(QByteArray v); // returns the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & in(); + static const QByteArray & in(); // set the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_In(Q3CString v); + static bool set_In(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & out(); + static const QByteArray & out(); // set the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Out(Q3CString v); + static bool set_Out(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & inout(); + static const QByteArray & inout(); // set the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the @@ -209,83 +209,83 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Inout(Q3CString v); + static bool set_Inout(QByteArray v); // return the default operation value type form - static Q3CString Return(); + static QByteArray Return(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Return(Q3CString v); + static bool set_Return(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. - static const Q3CString & relationDecl(bool by_value, const char * multiplicity); + static const QByteArray & relationDecl(bool by_value, const char * multiplicity); // set the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. @@ -294,20 +294,20 @@ class CppSettings : public UmlSettings static bool set_RelationDecl(bool by_value, const char * multiplicity, const char * v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // return TRUE if the operations profile must contain 'throw()' // when the operations does not have exception @@ -331,13 +331,13 @@ class CppSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns if a 'get' operation generated through the attribute // and relation 'add get operation' menu is inline by default @@ -383,14 +383,14 @@ class CppSettings : public UmlSettings // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is inline by default @@ -421,51 +421,51 @@ class CppSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _in; + static QByteArray _in; - static Q3CString _out; + static QByteArray _out; - static Q3CString _inout; + static QByteArray _inout; - static Q3CString _return; + static QByteArray _return; - static Q3CString _enum_in; + static QByteArray _enum_in; - static Q3CString _enum_out; + static QByteArray _enum_out; - static Q3CString _enum_inout; + static QByteArray _enum_inout; - static Q3CString _enum_return; + static QByteArray _enum_return; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[2/*relation kind*/][3/*multiplicity*/]; + static QByteArray _rel_decl[2/*relation kind*/][3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _oper_def; + static QByteArray _oper_def; static bool _force_oper_throw; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_inline; @@ -475,23 +475,23 @@ class CppSettings : public UmlSettings static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_inline; static bool _is_set_param_const; - static Q3CString _h_content; + static QByteArray _h_content; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _h_ext; + static QByteArray _h_ext; - static Q3CString _src_ext; + static QByteArray _src_ext; static bool _incl_with_path; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/BrowserSort/FlowBehavior.h b/genplugouts/BrowserSort/FlowBehavior.h index 55dde8146..09f17529a 100644 --- a/genplugouts/BrowserSort/FlowBehavior.h +++ b/genplugouts/BrowserSort/FlowBehavior.h @@ -2,18 +2,18 @@ #define _FLOWBEHAVIOR_H -#include + class FlowBehavior { public: - Q3CString weight; + QByteArray weight; - Q3CString guard; + QByteArray guard; - Q3CString selection; + QByteArray selection; - Q3CString transformation; + QByteArray transformation; void read(); diff --git a/genplugouts/BrowserSort/IdlSettings.cpp b/genplugouts/BrowserSort/IdlSettings.cpp index 65f2ae619..d5b25b151 100644 --- a/genplugouts/BrowserSort/IdlSettings.cpp +++ b/genplugouts/BrowserSort/IdlSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool IdlSettings::useDefaults() { UmlCom::send_cmd(idlSettingsCmd, getIdlUseDefaultsCmd); @@ -22,21 +22,21 @@ bool IdlSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString IdlSettings::type(Q3CString s) +QByteArray IdlSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_Type(Q3CString s, Q3CString v) +bool IdlSettings::set_Type(QByteArray s, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlTypeCmd, s, v); if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -49,28 +49,28 @@ bool IdlSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::umlType(Q3CString s) +QByteArray IdlSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::idl); } -Q3CString IdlSettings::relationStereotype(const Q3CString & s) +QByteArray IdlSettings::relationStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_RelationStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_RelationStereotype(QByteArray s, QByteArray v) { - UmlCom::send_cmd(idlSettingsCmd, setIdlRelationStereotypeCmd, s, v); + UmlCom::send_cmd(idlSettingsCmd, setIdlRelationAttributeStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_stereotype(s); @@ -83,28 +83,28 @@ bool IdlSettings::set_RelationStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::relationUmlStereotype(Q3CString s) +QByteArray IdlSettings::relationUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::classStereotype(Q3CString s) +QByteArray IdlSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_ClassStereotype(QByteArray s, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -117,31 +117,31 @@ bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::classUmlStereotype(Q3CString s) +QByteArray IdlSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::include(Q3CString s) +QByteArray IdlSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool IdlSettings::set_Include(Q3CString s, Q3CString v) +bool IdlSettings::set_Include(QByteArray s, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlIncludeCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -152,14 +152,14 @@ bool IdlSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::rootDir() +const QByteArray & IdlSettings::rootDir() { read_if_needed_(); return _root; } -bool IdlSettings::set_RootDir(Q3CString v) +bool IdlSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlRootDirCmd, v); @@ -171,14 +171,14 @@ bool IdlSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceContent() +const QByteArray & IdlSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool IdlSettings::set_SourceContent(Q3CString v) +bool IdlSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceContentCmd, v); @@ -190,14 +190,14 @@ bool IdlSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceExtension() +const QByteArray & IdlSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool IdlSettings::set_SourceExtension(Q3CString v) +bool IdlSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceExtensionCmd, v); @@ -209,14 +209,14 @@ bool IdlSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::interfaceDecl() +const QByteArray & IdlSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool IdlSettings::set_InterfaceDecl(Q3CString v) +bool IdlSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlInterfaceDeclCmd, v); @@ -228,14 +228,14 @@ bool IdlSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeDecl() +const QByteArray & IdlSettings::valuetypeDecl() { read_if_needed_(); return _valuetype_decl; } -bool IdlSettings::set_ValuetypeDecl(Q3CString v) +bool IdlSettings::set_ValuetypeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeDeclCmd, v); @@ -247,14 +247,14 @@ bool IdlSettings::set_ValuetypeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::externalClassDecl() +const QByteArray & IdlSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool IdlSettings::set_ExternalClassDecl(Q3CString v) +bool IdlSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExternalClassDeclCmd, v); @@ -266,14 +266,14 @@ bool IdlSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::structDecl() +const QByteArray & IdlSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool IdlSettings::set_StructDecl(Q3CString v) +bool IdlSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlStructDeclCmd, v); @@ -285,14 +285,14 @@ bool IdlSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::typedefDecl() +const QByteArray & IdlSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool IdlSettings::set_TypedefDecl(Q3CString v) +bool IdlSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlTypedefDeclCmd, v); @@ -304,14 +304,14 @@ bool IdlSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::exceptionDecl() +const QByteArray & IdlSettings::exceptionDecl() { read_if_needed_(); return _exception_decl; } -bool IdlSettings::set_ExceptionDecl(Q3CString v) +bool IdlSettings::set_ExceptionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExceptionDeclCmd, v); @@ -323,14 +323,14 @@ bool IdlSettings::set_ExceptionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::unionDecl() +const QByteArray & IdlSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool IdlSettings::set_UnionDecl(Q3CString v) +bool IdlSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionDeclCmd, v); @@ -342,14 +342,14 @@ bool IdlSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumDecl() +const QByteArray & IdlSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool IdlSettings::set_EnumDecl(Q3CString v) +bool IdlSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumDeclCmd, v); @@ -361,14 +361,14 @@ bool IdlSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::attributeDecl() +const QByteArray & IdlSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool IdlSettings::set_AttributeDecl(Q3CString v) +bool IdlSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlAttributeDeclCmd, v); @@ -380,14 +380,14 @@ bool IdlSettings::set_AttributeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeAttributeDecl() +const QByteArray & IdlSettings::valuetypeAttributeDecl() { read_if_needed_(); return _valuetype_attr_decl; } -bool IdlSettings::set_ValuetypeAttributeDecl(Q3CString v) +bool IdlSettings::set_ValuetypeAttributeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeAttributeDeclCmd, v); @@ -399,14 +399,14 @@ bool IdlSettings::set_ValuetypeAttributeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::unionItemDecl() +const QByteArray & IdlSettings::unionItemDecl() { read_if_needed_(); return _union_item_decl; } -bool IdlSettings::set_UnionItemDecl(Q3CString v) +bool IdlSettings::set_UnionItemDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionItemDeclCmd, v); @@ -418,14 +418,14 @@ bool IdlSettings::set_UnionItemDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumItemDecl() +const QByteArray & IdlSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool IdlSettings::set_EnumItemDecl(Q3CString v) +bool IdlSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumItemDeclCmd, v); @@ -437,14 +437,14 @@ bool IdlSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::constDecl() +const QByteArray & IdlSettings::constDecl() { read_if_needed_(); return _const_decl; } -bool IdlSettings::set_ConstDecl(Q3CString v) +bool IdlSettings::set_ConstDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlConstDeclCmd, v); @@ -456,14 +456,14 @@ bool IdlSettings::set_ConstDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::relationDecl(const char * multiplicity) +const QByteArray & IdlSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlRelationDeclCmd, multiplicity, v); @@ -475,14 +475,14 @@ bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::valuetypeRelationDecl(const char * multiplicity) { read_if_needed_(); return _valuetype_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeRelationDeclCmd, multiplicity, v); @@ -494,14 +494,14 @@ bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString return FALSE; } -const Q3CString & IdlSettings::unionRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::unionRelationDecl(const char * multiplicity) { read_if_needed_(); return _union_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionRelationDeclCmd, multiplicity, v); @@ -513,14 +513,14 @@ bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::operationDecl() +const QByteArray & IdlSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool IdlSettings::set_OperationDecl(Q3CString v) +bool IdlSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlOperationDeclCmd, v); @@ -532,14 +532,14 @@ bool IdlSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::getName() +const QByteArray & IdlSettings::getName() { read_if_needed_(); return _get_name; } -bool IdlSettings::set_GetName(Q3CString v) +bool IdlSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlGetNameCmd, v); @@ -551,14 +551,14 @@ bool IdlSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::setName() +const QByteArray & IdlSettings::setName() { read_if_needed_(); return _set_name; } -bool IdlSettings::set_SetName(Q3CString v) +bool IdlSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSetNameCmd, v); @@ -591,53 +591,53 @@ bool IdlSettings::set_IsSetOneway(bool v) bool IdlSettings::_defined; -Q3CString IdlSettings::_root; +QByteArray IdlSettings::_root; -Q3CString IdlSettings::_interface_decl; +QByteArray IdlSettings::_interface_decl; -Q3CString IdlSettings::_valuetype_decl; +QByteArray IdlSettings::_valuetype_decl; -Q3CString IdlSettings::_struct_decl; +QByteArray IdlSettings::_struct_decl; -Q3CString IdlSettings::_typedef_decl; +QByteArray IdlSettings::_typedef_decl; -Q3CString IdlSettings::_exception_decl; +QByteArray IdlSettings::_exception_decl; -Q3CString IdlSettings::_union_decl; +QByteArray IdlSettings::_union_decl; -Q3CString IdlSettings::_enum_decl; +QByteArray IdlSettings::_enum_decl; -Q3CString IdlSettings::_external_class_decl; +QByteArray IdlSettings::_external_class_decl; -Q3CString IdlSettings::_attr_decl; +QByteArray IdlSettings::_attr_decl; -Q3CString IdlSettings::_valuetype_attr_decl; +QByteArray IdlSettings::_valuetype_attr_decl; -Q3CString IdlSettings::_union_item_decl; +QByteArray IdlSettings::_union_item_decl; -Q3CString IdlSettings::_enum_item_decl; +QByteArray IdlSettings::_enum_item_decl; -Q3CString IdlSettings::_const_decl; +QByteArray IdlSettings::_const_decl; -Q3CString IdlSettings::_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_union_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_union_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_oper_decl; +QByteArray IdlSettings::_oper_decl; -Q3CString IdlSettings::_get_name; +QByteArray IdlSettings::_get_name; -Q3CString IdlSettings::_set_name; +QByteArray IdlSettings::_set_name; bool IdlSettings::_is_set_oneway; -Q3CString IdlSettings::_src_content; +QByteArray IdlSettings::_src_content; -Q3CString IdlSettings::_ext; +QByteArray IdlSettings::_ext; -Q3Dict IdlSettings::_map_includes; +QHash IdlSettings::_map_includes; void IdlSettings::read_() { @@ -666,13 +666,13 @@ void IdlSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/BrowserSort/IdlSettings.h b/genplugouts/BrowserSort/IdlSettings.h index aa23439f0..8ccc92056 100644 --- a/genplugouts/BrowserSort/IdlSettings.h +++ b/genplugouts/BrowserSort/IdlSettings.h @@ -4,9 +4,9 @@ #ifdef WITHIDL -#include + #include "UmlSettings.h" -#include + // This class manages settings concerning IDL, configured through // the 'Generation settings' dialog. @@ -31,244 +31,244 @@ class IdlSettings : public UmlSettings // returns the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the IDL type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationStereotype(const Q3CString & s); + static QByteArray relationStereotype(const QByteArray & s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationStereotype(Q3CString s, Q3CString v); + static bool set_RelationStereotype(QByteArray s, QByteArray v); // reverse of the RelationStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString relationUmlStereotype(Q3CString s); + static QByteArray relationUmlStereotype(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the files produced by the Idl code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the files produced by the Idl code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of a valuetype - static const Q3CString & valuetypeDecl(); + static const QByteArray & valuetypeDecl(); // set the default definition of a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeDecl(Q3CString v); + static bool set_ValuetypeDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an exception - static const Q3CString & exceptionDecl(); + static const QByteArray & exceptionDecl(); // set the default definition of an exception // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExceptionDecl(Q3CString v); + static bool set_ExceptionDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an attribute // placed in a valuetype - static const Q3CString & valuetypeAttributeDecl(); + static const QByteArray & valuetypeAttributeDecl(); // set the default definition of an attribute // placed in a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeAttributeDecl(Q3CString v); + static bool set_ValuetypeAttributeDecl(QByteArray v); // returns the default definition of an union item - static const Q3CString & unionItemDecl(); + static const QByteArray & unionItemDecl(); // set the default definition of an union item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionItemDecl(Q3CString v); + static bool set_UnionItemDecl(QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a constant attribute - static const Q3CString & constDecl(); + static const QByteArray & constDecl(); // set the default definition of a constant attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ConstDecl(Q3CString v); + static bool set_ConstDecl(QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in a valuetype // depending on the multiplicity given in argument. - static const Q3CString & valuetypeRelationDecl(const char * multiplicity); + static const QByteArray & valuetypeRelationDecl(const char * multiplicity); // set the default definition of a relation in a valuetype // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v); + static bool set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in an union // depending on the multiplicity given in argument. - static const Q3CString & unionRelationDecl(const char * multiplicity); + static const QByteArray & unionRelationDecl(const char * multiplicity); // set the default definition of a relation in an union // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionRelationDecl(const char * multiplicity, Q3CString v); + static bool set_UnionRelationDecl(const char * multiplicity, QByteArray v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is oneway by default @@ -287,53 +287,53 @@ class IdlSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _valuetype_decl; + static QByteArray _valuetype_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _exception_decl; + static QByteArray _exception_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _valuetype_attr_decl; + static QByteArray _valuetype_attr_decl; - static Q3CString _union_item_decl; + static QByteArray _union_item_decl; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _const_decl; + static QByteArray _const_decl; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _valuetype_rel_decl[3/*multiplicity*/]; + static QByteArray _valuetype_rel_decl[3/*multiplicity*/]; - static Q3CString _union_rel_decl[3/*multiplicity*/]; + static QByteArray _union_rel_decl[3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _get_name; + static QByteArray _get_name; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_oneway; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/BrowserSort/IdlSettingsCmd.h b/genplugouts/BrowserSort/IdlSettingsCmd.h index 5eb74f465..07cbf12b6 100644 --- a/genplugouts/BrowserSort/IdlSettingsCmd.h +++ b/genplugouts/BrowserSort/IdlSettingsCmd.h @@ -8,7 +8,7 @@ enum IdlSettingsCmd { getIdlUseDefaultsCmd, setIdlUseDefaultsCmd, setIdlTypeCmd, - setIdlRelationStereotypeCmd, + setIdlRelationAttributeStereotypeCmd, setIdlClassStereotypeCmd, setIdlIncludeCmd, setIdlRootDirCmd, diff --git a/genplugouts/BrowserSort/JavaSettings.cpp b/genplugouts/BrowserSort/JavaSettings.cpp index ad3a57327..8bd7c93c0 100644 --- a/genplugouts/BrowserSort/JavaSettings.cpp +++ b/genplugouts/BrowserSort/JavaSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool JavaSettings::useDefaults() { UmlCom::send_cmd(javaSettingsCmd, getJavaUseDefaultsCmd); @@ -22,21 +22,21 @@ bool JavaSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString JavaSettings::type(const Q3CString & s) +QByteArray JavaSettings::type(const QByteArray & s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_Type(Q3CString s, Q3CString v) +bool JavaSettings::set_Type(QByteArray s, QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaTypeCmd, s, v); if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -49,28 +49,28 @@ bool JavaSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::umlType(const Q3CString & s) +QByteArray JavaSettings::umlType(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::java); } -Q3CString JavaSettings::relationStereotype(const Q3CString & s) +QByteArray JavaSettings::relationStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_RelationStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_RelationStereotype(QByteArray s, QByteArray v) { - UmlCom::send_cmd(javaSettingsCmd, setJavaRelationStereotypeCmd, s, v); + UmlCom::send_cmd(javaSettingsCmd, setJavaRelationAttributeStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_stereotype(s); @@ -83,28 +83,28 @@ bool JavaSettings::set_RelationStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::relationUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::relationUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_rel_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::classStereotype(const Q3CString & s) +QByteArray JavaSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_ClassStereotype(QByteArray s, QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -117,31 +117,31 @@ bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::classUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::get_import(const Q3CString & s) +QByteArray JavaSettings::get_import(const QByteArray & s) { read_if_needed_(); - Q3CString * r = _map_imports[s]; + QByteArray * r = _map_imports[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool JavaSettings::set_Import(Q3CString s, Q3CString v) +bool JavaSettings::set_Import(QByteArray s, QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaImportCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_imports.take(s); + QByteArray * r = _map_imports.take(s); if (!v.isEmpty()) - _map_imports.insert(s, new Q3CString(v)); + _map_imports.insert(s, new QByteArray(v)); if (r) delete r; @@ -152,14 +152,14 @@ bool JavaSettings::set_Import(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::rootDir() +const QByteArray & JavaSettings::rootDir() { read_if_needed_(); return _root; } -bool JavaSettings::set_RootDir(Q3CString v) +bool JavaSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaRootdirCmd, v); @@ -171,14 +171,14 @@ bool JavaSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceContent() +const QByteArray & JavaSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool JavaSettings::set_SourceContent(Q3CString v) +bool JavaSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceContentCmd, v); @@ -190,14 +190,14 @@ bool JavaSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceExtension() +const QByteArray & JavaSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool JavaSettings::set_SourceExtension(Q3CString v) +bool JavaSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceExtensionCmd, v); @@ -209,14 +209,14 @@ bool JavaSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::classDecl() +const QByteArray & JavaSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool JavaSettings::set_ClassDecl(Q3CString v) +bool JavaSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaClassDeclCmd, v); @@ -228,14 +228,14 @@ bool JavaSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::externalClassDecl() +const QByteArray & JavaSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool JavaSettings::set_ExternalClassDecl(Q3CString v) +bool JavaSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaExternalClassDeclCmd, v); @@ -247,14 +247,14 @@ bool JavaSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternDecl() +const QByteArray & JavaSettings::enumPatternDecl() { read_if_needed_(); return _enum_pattern_decl; } -bool JavaSettings::set_EnumPatternDecl(Q3CString v) +bool JavaSettings::set_EnumPatternDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternDeclCmd, v); @@ -266,14 +266,14 @@ bool JavaSettings::set_EnumPatternDecl(Q3CString v) return FALSE; } -Q3CString JavaSettings::enumDecl() +QByteArray JavaSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool JavaSettings::set_EnumDecl(Q3CString v) +bool JavaSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumDeclCmd, v); @@ -285,14 +285,14 @@ bool JavaSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::interfaceDecl() +const QByteArray & JavaSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool JavaSettings::set_InterfaceDecl(Q3CString v) +bool JavaSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaInterfaceDeclCmd, v); @@ -304,14 +304,14 @@ bool JavaSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::attributeDecl() +const QByteArray & JavaSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool JavaSettings::set_AttributeDecl(Q3CString v) +bool JavaSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaAttributeDeclCmd, v); @@ -323,14 +323,14 @@ bool JavaSettings::set_AttributeDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternItemDecl() +const QByteArray & JavaSettings::enumPatternItemDecl() { read_if_needed_(); return _enum_pattern_item_decl; } -bool JavaSettings::set_EnumPatternItemDecl(Q3CString v) +bool JavaSettings::set_EnumPatternItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternItemDeclCmd, v); @@ -342,14 +342,14 @@ bool JavaSettings::set_EnumPatternItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternItemCase() +const QByteArray & JavaSettings::enumPatternItemCase() { read_if_needed_(); return _enum_pattern_item_case; } -bool JavaSettings::set_EnumPatternItemCase(Q3CString v) +bool JavaSettings::set_EnumPatternItemCase(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternItemCaseCmd, v); @@ -361,14 +361,14 @@ bool JavaSettings::set_EnumPatternItemCase(Q3CString v) return FALSE; } -Q3CString JavaSettings::enumItemDecl() +QByteArray JavaSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool JavaSettings::set_EnumItemDecl(Q3CString v) +bool JavaSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumItemDeclCmd, v); @@ -380,14 +380,14 @@ bool JavaSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::relationDecl(const char * multiplicity) +const QByteArray & JavaSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool JavaSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaRelationDeclCmd, multiplicity, v); @@ -399,14 +399,14 @@ bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::operationDef() +const QByteArray & JavaSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool JavaSettings::set_OperationDef(Q3CString v) +bool JavaSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaOperationDefCmd, v); @@ -437,14 +437,14 @@ bool JavaSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & JavaSettings::getName() +const QByteArray & JavaSettings::getName() { read_if_needed_(); return _get_name; } -bool JavaSettings::set_GetName(Q3CString v) +bool JavaSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaGetNameCmd, v); @@ -456,14 +456,14 @@ bool JavaSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::setName() +const QByteArray & JavaSettings::setName() { read_if_needed_(); return _set_name; } -bool JavaSettings::set_SetName(Q3CString v) +bool JavaSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSetNameCmd, v); @@ -553,49 +553,49 @@ bool JavaSettings::set_IsSetParamFinal(bool v) bool JavaSettings::_defined; -Q3CString JavaSettings::_root; +QByteArray JavaSettings::_root; -Q3CString JavaSettings::_class_decl; +QByteArray JavaSettings::_class_decl; -Q3CString JavaSettings::_external_class_decl; +QByteArray JavaSettings::_external_class_decl; -Q3CString JavaSettings::_enum_pattern_decl; +QByteArray JavaSettings::_enum_pattern_decl; -Q3CString JavaSettings::_enum_decl; +QByteArray JavaSettings::_enum_decl; -Q3CString JavaSettings::_interface_decl; +QByteArray JavaSettings::_interface_decl; -Q3CString JavaSettings::_attr_decl; +QByteArray JavaSettings::_attr_decl; -Q3CString JavaSettings::_enum_pattern_item_decl; +QByteArray JavaSettings::_enum_pattern_item_decl; -Q3CString JavaSettings::_enum_pattern_item_case; +QByteArray JavaSettings::_enum_pattern_item_case; -Q3CString JavaSettings::_enum_item_decl; +QByteArray JavaSettings::_enum_item_decl; -Q3CString JavaSettings::_rel_decl[3/*multiplicity*/]; +QByteArray JavaSettings::_rel_decl[3/*multiplicity*/]; -Q3CString JavaSettings::_oper_def; +QByteArray JavaSettings::_oper_def; aVisibility JavaSettings::_get_visibility; -Q3CString JavaSettings::_get_name; +QByteArray JavaSettings::_get_name; bool JavaSettings::_is_get_final; aVisibility JavaSettings::_set_visibility; -Q3CString JavaSettings::_set_name; +QByteArray JavaSettings::_set_name; bool JavaSettings::_is_set_final; bool JavaSettings::_is_set_param_final; -Q3CString JavaSettings::_src_content; +QByteArray JavaSettings::_src_content; -Q3CString JavaSettings::_ext; +QByteArray JavaSettings::_ext; -Q3Dict JavaSettings::_map_imports; +QHash JavaSettings::_map_imports; void JavaSettings::read_() { @@ -624,13 +624,13 @@ void JavaSettings::read_() _map_imports.clear(); if (n > _map_imports.size()) - _map_imports.resize(n); + _map_imports.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_imports.insert(t, new Q3CString(i)); + _map_imports.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/BrowserSort/JavaSettings.h b/genplugouts/BrowserSort/JavaSettings.h index 3a8f9e19d..e646aba85 100644 --- a/genplugouts/BrowserSort/JavaSettings.h +++ b/genplugouts/BrowserSort/JavaSettings.h @@ -4,10 +4,10 @@ #ifdef WITHJAVA -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning JAVA, configured through // the 'Generation settings' dialog. @@ -31,176 +31,176 @@ class JavaSettings : public UmlSettings // returns the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(const Q3CString & s); + static QByteArray type(const QByteArray & s); // set the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the JAVA type given in argument - static Q3CString umlType(const Q3CString & s); + static QByteArray umlType(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationStereotype(const Q3CString & s); + static QByteArray relationStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationStereotype(Q3CString s, Q3CString v); + static bool set_RelationStereotype(QByteArray s, QByteArray v); // reverse of the RelationStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString relationUmlStereotype(const Q3CString & s); + static QByteArray relationUmlStereotype(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); //returns the import or other form specified in the last //'Generation settings' tab for the Java type given in argument. - static Q3CString get_import(const Q3CString & s); + static QByteArray get_import(const QByteArray & s); // set the import or other form specified in the last // 'Generation settings' tab for the Java type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Import(Q3CString s, Q3CString v); + static bool set_Import(QByteArray s, QByteArray v); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the JAVA code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the JAVA code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration implemented // through an abstract class having constant attributes - static const Q3CString & enumPatternDecl(); + static const QByteArray & enumPatternDecl(); // set the default definition of an enumeration implemented // through an abstract class having constant attributes // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternDecl(Q3CString v); + static bool set_EnumPatternDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumPatternItemDecl(); + static const QByteArray & enumPatternItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternItemDecl(Q3CString v); + static bool set_EnumPatternItemDecl(QByteArray v); //Returns the 'case' form produced in the fromInt operation //for each enumeration item - static const Q3CString & enumPatternItemCase(); + static const QByteArray & enumPatternItemCase(); // set the 'case' form produced in the fromInt operation // for each enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternItemCase(Q3CString v); + static bool set_EnumPatternItemCase(QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default visibility of a 'get' operation generated // through the attribute and relation 'add get operation' @@ -214,23 +214,23 @@ class JavaSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // return if a 'get' operation generated through the attribute // and relation 'add get operation' menu is final by default @@ -279,49 +279,49 @@ class JavaSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_pattern_decl; + static QByteArray _enum_pattern_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _enum_pattern_item_decl; + static QByteArray _enum_pattern_item_decl; - static Q3CString _enum_pattern_item_case; + static QByteArray _enum_pattern_item_case; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _oper_def; + static QByteArray _oper_def; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_final; static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_final; static bool _is_set_param_final; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_imports; + static QHash _map_imports; protected: diff --git a/genplugouts/BrowserSort/JavaSettingsCmd.h b/genplugouts/BrowserSort/JavaSettingsCmd.h index 2b197e805..8ed70d7d4 100644 --- a/genplugouts/BrowserSort/JavaSettingsCmd.h +++ b/genplugouts/BrowserSort/JavaSettingsCmd.h @@ -8,7 +8,7 @@ enum JavaSettingsCmd { getJavaUseDefaultsCmd, setJavaUseDefaultsCmd, setJavaTypeCmd, - setJavaRelationStereotypeCmd, + setJavaRelationAttributeStereotypeCmd, setJavaClassStereotypeCmd, setJavaImportCmd, setJavaRootdirCmd, diff --git a/genplugouts/BrowserSort/PackageGlobalCmd.h b/genplugouts/BrowserSort/PackageGlobalCmd.h index 76a30534b..0eed58b55 100644 --- a/genplugouts/BrowserSort/PackageGlobalCmd.h +++ b/genplugouts/BrowserSort/PackageGlobalCmd.h @@ -4,9 +4,9 @@ // Internal enum enum PackageGlobalCmd { - findNamespaceCmd, - findPackageCmd, - findModuleCmd, + findCppNamespaceCmd, + findJavaPackageCmd, + findIdlModuleCmd, getProjectCmd, isProjectModifiedCmd, saveProjectCmd diff --git a/genplugouts/BrowserSort/StateBehavior.h b/genplugouts/BrowserSort/StateBehavior.h index 91a42cb82..66ac09c00 100644 --- a/genplugouts/BrowserSort/StateBehavior.h +++ b/genplugouts/BrowserSort/StateBehavior.h @@ -2,16 +2,16 @@ #define _STATEBEHAVIOR_H -#include + class StateBehavior { public: - Q3CString on_entry; + QByteArray on_entry; - Q3CString on_exit; + QByteArray on_exit; - Q3CString do_activity; + QByteArray do_activity; void read(); diff --git a/genplugouts/BrowserSort/TransitionBehavior.h b/genplugouts/BrowserSort/TransitionBehavior.h index 856ede3c0..8714c541d 100644 --- a/genplugouts/BrowserSort/TransitionBehavior.h +++ b/genplugouts/BrowserSort/TransitionBehavior.h @@ -2,16 +2,16 @@ #define _TRANSITIONBEHAVIOR_H -#include + class TransitionBehavior { public: - Q3CString trigger; + QByteArray trigger; - Q3CString guard; + QByteArray guard; - Q3CString activity; + QByteArray activity; void read(); diff --git a/genplugouts/BrowserSort/UmlAccessVariableValueAction.h b/genplugouts/BrowserSort/UmlAccessVariableValueAction.h index dc92b3e25..8d4f9ae87 100644 --- a/genplugouts/BrowserSort/UmlAccessVariableValueAction.h +++ b/genplugouts/BrowserSort/UmlAccessVariableValueAction.h @@ -3,13 +3,13 @@ #include "UmlBaseAccessVariableValueAction.h" -#include + class UmlAccessVariableValueAction : public UmlBaseAccessVariableValueAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlAccessVariableValueAction(void * id, const Q3CString & s) : UmlBaseAccessVariableValueAction(id, s) { + UmlAccessVariableValueAction(void * id, const QByteArray & s) : UmlBaseAccessVariableValueAction(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivity.h b/genplugouts/BrowserSort/UmlActivity.h index 8f9886b0e..6f8bd5244 100644 --- a/genplugouts/BrowserSort/UmlActivity.h +++ b/genplugouts/BrowserSort/UmlActivity.h @@ -3,13 +3,13 @@ #include "UmlBaseActivity.h" -#include + class UmlActivity : public UmlBaseActivity { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivity(void * id, const Q3CString & s) : UmlBaseActivity(id, s) { + UmlActivity(void * id, const QByteArray & s) : UmlBaseActivity(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityAction.h b/genplugouts/BrowserSort/UmlActivityAction.h index f359c755a..3079e18ba 100644 --- a/genplugouts/BrowserSort/UmlActivityAction.h +++ b/genplugouts/BrowserSort/UmlActivityAction.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityAction.h" -#include + class UmlActivityAction : public UmlBaseActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityAction(void * id, const Q3CString & s) : UmlBaseActivityAction(id, s) { + UmlActivityAction(void * id, const QByteArray & s) : UmlBaseActivityAction(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityActionClasses.h b/genplugouts/BrowserSort/UmlActivityActionClasses.h index 15677a746..62369cdab 100644 --- a/genplugouts/BrowserSort/UmlActivityActionClasses.h +++ b/genplugouts/BrowserSort/UmlActivityActionClasses.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityActionClasses.h" -#include + class UmlSendObjectAction : public UmlBaseSendObjectAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlSendObjectAction(void * id, const Q3CString & s) : UmlBaseSendObjectAction(id, s) { + UmlSendObjectAction(void * id, const QByteArray & s) : UmlBaseSendObjectAction(id, s) { } }; @@ -18,7 +18,7 @@ class UmlUnmarshallAction : public UmlBaseUnmarshallAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlUnmarshallAction(void * id, const Q3CString & s) : UmlBaseUnmarshallAction(id, s) { + UmlUnmarshallAction(void * id, const QByteArray & s) : UmlBaseUnmarshallAction(id, s) { } }; @@ -27,7 +27,7 @@ class UmlSendSignalAction : public UmlBaseSendSignalAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlSendSignalAction(void * id, const Q3CString & s) : UmlBaseSendSignalAction(id, s) { + UmlSendSignalAction(void * id, const QByteArray & s) : UmlBaseSendSignalAction(id, s) { } }; @@ -36,7 +36,7 @@ class UmlBroadcastSignalAction : public UmlBaseBroadcastSignalAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlBroadcastSignalAction(void * id, const Q3CString & s) : UmlBaseBroadcastSignalAction(id, s) { + UmlBroadcastSignalAction(void * id, const QByteArray & s) : UmlBaseBroadcastSignalAction(id, s) { } }; @@ -45,7 +45,7 @@ class UmlValueSpecificationAction : public UmlBaseValueSpecificationAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlValueSpecificationAction(void * id, const Q3CString & s) : UmlBaseValueSpecificationAction(id, s) { + UmlValueSpecificationAction(void * id, const QByteArray & s) : UmlBaseValueSpecificationAction(id, s) { } }; @@ -54,7 +54,7 @@ class UmlOpaqueAction : public UmlBaseOpaqueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlOpaqueAction(void * id, const Q3CString & s) : UmlBaseOpaqueAction(id, s) { + UmlOpaqueAction(void * id, const QByteArray & s) : UmlBaseOpaqueAction(id, s) { } }; @@ -63,7 +63,7 @@ class UmlAcceptEventAction : public UmlBaseAcceptEventAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlAcceptEventAction(void * id, const Q3CString & s) : UmlBaseAcceptEventAction(id, s) { + UmlAcceptEventAction(void * id, const QByteArray & s) : UmlBaseAcceptEventAction(id, s) { } }; @@ -72,7 +72,7 @@ class UmlCallOperationAction : public UmlBaseCallOperationAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlCallOperationAction(void * id, const Q3CString & s) : UmlBaseCallOperationAction(id, s) { + UmlCallOperationAction(void * id, const QByteArray & s) : UmlBaseCallOperationAction(id, s) { } }; @@ -81,7 +81,7 @@ class UmlCallBehaviorAction : public UmlBaseCallBehaviorAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlCallBehaviorAction(void * id, const Q3CString & s) : UmlBaseCallBehaviorAction(id, s) { + UmlCallBehaviorAction(void * id, const QByteArray & s) : UmlBaseCallBehaviorAction(id, s) { } }; @@ -90,7 +90,7 @@ class UmlClearVariableValueAction : public UmlBaseClearVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlClearVariableValueAction(void * id, const Q3CString & s) : UmlBaseClearVariableValueAction(id, s) { + UmlClearVariableValueAction(void * id, const QByteArray & s) : UmlBaseClearVariableValueAction(id, s) { } }; @@ -99,7 +99,7 @@ class UmlReadVariableValueAction : public UmlBaseReadVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlReadVariableValueAction(void * id, const Q3CString & s) : UmlBaseReadVariableValueAction(id, s) { + UmlReadVariableValueAction(void * id, const QByteArray & s) : UmlBaseReadVariableValueAction(id, s) { } }; @@ -108,7 +108,7 @@ class UmlWriteVariableValueAction : public UmlBaseWriteVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlWriteVariableValueAction(void * id, const Q3CString & s) : UmlBaseWriteVariableValueAction(id, s) { + UmlWriteVariableValueAction(void * id, const QByteArray & s) : UmlBaseWriteVariableValueAction(id, s) { } }; @@ -117,7 +117,7 @@ class UmlAddVariableValueAction : public UmlBaseAddVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlAddVariableValueAction(void * id, const Q3CString & s) : UmlBaseAddVariableValueAction(id, s) { + UmlAddVariableValueAction(void * id, const QByteArray & s) : UmlBaseAddVariableValueAction(id, s) { } }; @@ -126,7 +126,7 @@ class UmlRemoveVariableValueAction : public UmlBaseRemoveVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlRemoveVariableValueAction(void * id, const Q3CString & s) : UmlBaseRemoveVariableValueAction(id, s) { + UmlRemoveVariableValueAction(void * id, const QByteArray & s) : UmlBaseRemoveVariableValueAction(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityControlNode.h b/genplugouts/BrowserSort/UmlActivityControlNode.h index 8ebf04bf7..1396fd3e2 100644 --- a/genplugouts/BrowserSort/UmlActivityControlNode.h +++ b/genplugouts/BrowserSort/UmlActivityControlNode.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityControlNode.h" -#include + class UmlActivityControlNode : public UmlBaseActivityControlNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityControlNode(void * id, const Q3CString & s) : UmlBaseActivityControlNode(id, s) { + UmlActivityControlNode(void * id, const QByteArray & s) : UmlBaseActivityControlNode(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityControlNodeClasses.h b/genplugouts/BrowserSort/UmlActivityControlNodeClasses.h index f698adeca..2be0cd946 100644 --- a/genplugouts/BrowserSort/UmlActivityControlNodeClasses.h +++ b/genplugouts/BrowserSort/UmlActivityControlNodeClasses.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityControlNodeClasses.h" -#include + class UmlInitialActivityNode : public UmlBaseInitialActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlInitialActivityNode(void * id, const Q3CString & s) : UmlBaseInitialActivityNode(id, s) { + UmlInitialActivityNode(void * id, const QByteArray & s) : UmlBaseInitialActivityNode(id, s) { } }; @@ -18,7 +18,7 @@ class UmlFlowFinalActivityNode : public UmlBaseFlowFinalActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlFlowFinalActivityNode(void * id, const Q3CString & s) : UmlBaseFlowFinalActivityNode(id, s) { + UmlFlowFinalActivityNode(void * id, const QByteArray & s) : UmlBaseFlowFinalActivityNode(id, s) { } }; @@ -27,7 +27,7 @@ class UmlActivityFinalActivityNode : public UmlBaseActivityFinalActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityFinalActivityNode(void * id, const Q3CString & s) : UmlBaseActivityFinalActivityNode(id, s) { + UmlActivityFinalActivityNode(void * id, const QByteArray & s) : UmlBaseActivityFinalActivityNode(id, s) { } }; @@ -36,7 +36,7 @@ class UmlDecisionActivityNode : public UmlBaseDecisionActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlDecisionActivityNode(void * id, const Q3CString & s) : UmlBaseDecisionActivityNode(id, s) { + UmlDecisionActivityNode(void * id, const QByteArray & s) : UmlBaseDecisionActivityNode(id, s) { } }; @@ -45,7 +45,7 @@ class UmlMergeActivityNode : public UmlBaseMergeActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlMergeActivityNode(void * id, const Q3CString & s) : UmlBaseMergeActivityNode(id, s) { + UmlMergeActivityNode(void * id, const QByteArray & s) : UmlBaseMergeActivityNode(id, s) { } }; @@ -54,7 +54,7 @@ class UmlForkActivityNode : public UmlBaseForkActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlForkActivityNode(void * id, const Q3CString & s) : UmlBaseForkActivityNode(id, s) { + UmlForkActivityNode(void * id, const QByteArray & s) : UmlBaseForkActivityNode(id, s) { } }; @@ -63,7 +63,7 @@ class UmlJoinActivityNode : public UmlBaseJoinActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlJoinActivityNode(void * id, const Q3CString & s) : UmlBaseJoinActivityNode(id, s) { + UmlJoinActivityNode(void * id, const QByteArray & s) : UmlBaseJoinActivityNode(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityDiagram.h b/genplugouts/BrowserSort/UmlActivityDiagram.h index 4b48b12f2..b45a0410a 100644 --- a/genplugouts/BrowserSort/UmlActivityDiagram.h +++ b/genplugouts/BrowserSort/UmlActivityDiagram.h @@ -4,7 +4,7 @@ #include "UmlBaseActivityDiagram.h" #include "UmlActivityItem.h" -#include + // This class manages 'activity diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -15,7 +15,7 @@ class UmlActivityDiagram : public UmlBaseActivityDiagram, public UmlActivityItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityDiagram(void * id, const Q3CString & s) : UmlBaseActivityDiagram(id, s) { + UmlActivityDiagram(void * id, const QByteArray & s) : UmlBaseActivityDiagram(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityNode.h b/genplugouts/BrowserSort/UmlActivityNode.h index 8429d2396..770c06359 100644 --- a/genplugouts/BrowserSort/UmlActivityNode.h +++ b/genplugouts/BrowserSort/UmlActivityNode.h @@ -4,13 +4,13 @@ #include "UmlBaseActivityNode.h" #include "UmlActivityItem.h" -#include + class UmlActivityNode : public UmlBaseActivityNode, public UmlActivityItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityNode(void * id, const Q3CString & s) : UmlBaseActivityNode(id, s) { + UmlActivityNode(void * id, const QByteArray & s) : UmlBaseActivityNode(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityObject.h b/genplugouts/BrowserSort/UmlActivityObject.h index f75bccd9b..22de36492 100644 --- a/genplugouts/BrowserSort/UmlActivityObject.h +++ b/genplugouts/BrowserSort/UmlActivityObject.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityObject.h" -#include + class UmlActivityObject : public UmlBaseActivityObject { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityObject(void * id, const Q3CString & s) : UmlBaseActivityObject(id, s) { + UmlActivityObject(void * id, const QByteArray & s) : UmlBaseActivityObject(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityParameter.h b/genplugouts/BrowserSort/UmlActivityParameter.h index b51b0fec0..57474b452 100644 --- a/genplugouts/BrowserSort/UmlActivityParameter.h +++ b/genplugouts/BrowserSort/UmlActivityParameter.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityParameter.h" -#include + class UmlActivityParameter : public UmlBaseActivityParameter { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityParameter(void * id, const Q3CString & s) : UmlBaseActivityParameter(id, s) { + UmlActivityParameter(void * id, const QByteArray & s) : UmlBaseActivityParameter(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityPin.h b/genplugouts/BrowserSort/UmlActivityPin.h index 5d7ae2e0f..a53330fe2 100644 --- a/genplugouts/BrowserSort/UmlActivityPin.h +++ b/genplugouts/BrowserSort/UmlActivityPin.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityPin.h" -#include + class UmlActivityPin : public UmlBaseActivityPin { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityPin(void * id, const Q3CString & s) : UmlBaseActivityPin(id, s) { + UmlActivityPin(void * id, const QByteArray & s) : UmlBaseActivityPin(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlActivityRegion.h b/genplugouts/BrowserSort/UmlActivityRegion.h index 420b4bde2..1db9fe05f 100644 --- a/genplugouts/BrowserSort/UmlActivityRegion.h +++ b/genplugouts/BrowserSort/UmlActivityRegion.h @@ -4,13 +4,13 @@ #include "UmlBaseActivityRegion.h" #include "UmlActivityItem.h" -#include + class UmlActivityRegion : public UmlBaseActivityRegion, public UmlActivityItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityRegion(void * id, const Q3CString & s) : UmlBaseActivityRegion(id, s) { + UmlActivityRegion(void * id, const QByteArray & s) : UmlBaseActivityRegion(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlArtifact.h b/genplugouts/BrowserSort/UmlArtifact.h index 75618a15c..ae1cc2571 100644 --- a/genplugouts/BrowserSort/UmlArtifact.h +++ b/genplugouts/BrowserSort/UmlArtifact.h @@ -3,7 +3,7 @@ #include "UmlBaseArtifact.h" -#include + // This class manages 'artifacts' // @@ -11,9 +11,9 @@ class UmlArtifact : public UmlBaseArtifact { public: - UmlArtifact(void * id, const Q3CString & n) : UmlBaseArtifact(id, n) {}; + UmlArtifact(void * id, const QByteArray & n) : UmlBaseArtifact(id, n) {}; - virtual int orderWeight(); + virtual int orderWeight() override; }; diff --git a/genplugouts/BrowserSort/UmlAttribute.h b/genplugouts/BrowserSort/UmlAttribute.h index 19ee0a4c6..427658b45 100644 --- a/genplugouts/BrowserSort/UmlAttribute.h +++ b/genplugouts/BrowserSort/UmlAttribute.h @@ -3,7 +3,7 @@ #include "UmlBaseAttribute.h" -#include + // This class manages 'attribute', notes that the class 'UmlClassItem' // is a mother class of the class's children. @@ -12,7 +12,7 @@ class UmlAttribute : public UmlBaseAttribute { public: - UmlAttribute(void * id, const Q3CString & n) : UmlBaseAttribute(id, n) {}; + UmlAttribute(void * id, const QByteArray & n) : UmlBaseAttribute(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseAccessVariableValueAction.h b/genplugouts/BrowserSort/UmlBaseAccessVariableValueAction.h index 311fefa08..6c3dbe588 100644 --- a/genplugouts/BrowserSort/UmlBaseAccessVariableValueAction.h +++ b/genplugouts/BrowserSort/UmlBaseAccessVariableValueAction.h @@ -3,7 +3,7 @@ #include "UmlActivityAction.h" -#include + class UmlItem; @@ -11,7 +11,7 @@ class UmlBaseAccessVariableValueAction : public UmlActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAccessVariableValueAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseAccessVariableValueAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -30,7 +30,7 @@ class UmlBaseAccessVariableValueAction : public UmlActivityAction protected: - virtual void read_uml_(); + virtual void read_uml_() override; }; diff --git a/genplugouts/BrowserSort/UmlBaseActivity.cpp b/genplugouts/BrowserSort/UmlBaseActivity.cpp index 2f992ddd1..45801f46c 100644 --- a/genplugouts/BrowserSort/UmlBaseActivity.cpp +++ b/genplugouts/BrowserSort/UmlBaseActivity.cpp @@ -5,7 +5,7 @@ #include "UmlClassView.h" #include "UmlActivityDiagram.h" //Added by qt3to4: -#include +#include UmlActivity * UmlBaseActivity::create(UmlClassView * parent, const char * s) { @@ -17,7 +17,7 @@ anItemKind UmlBaseActivity::kind() return anActivity; } -const Q3CString & UmlBaseActivity::preCondition() +const QByteArray & UmlBaseActivity::preCondition() { read_if_needed_(); return _pre_condition; @@ -28,7 +28,7 @@ bool UmlBaseActivity::set_PreCondition(const char * v) return set_it_(_pre_condition, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::postCondition() +const QByteArray & UmlBaseActivity::postCondition() { read_if_needed_(); return _post_condition; @@ -40,7 +40,7 @@ bool UmlBaseActivity::set_PostCondition(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivity::cppPreCondition() +const QByteArray & UmlBaseActivity::cppPreCondition() { read_if_needed_(); return _cpp_pre_condition; @@ -51,7 +51,7 @@ bool UmlBaseActivity::set_CppPreCondition(const char * v) return set_it_(_cpp_pre_condition, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::cppPostCondition() +const QByteArray & UmlBaseActivity::cppPostCondition() { read_if_needed_(); return _cpp_post_condition; @@ -64,7 +64,7 @@ bool UmlBaseActivity::set_CppPostCondition(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivity::javaPreCondition() +const QByteArray & UmlBaseActivity::javaPreCondition() { read_if_needed_(); return _java_pre_condition; @@ -75,7 +75,7 @@ bool UmlBaseActivity::set_JavaPreCondition(const char * v) return set_it_(_java_pre_condition, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::javaPostCondition() +const QByteArray & UmlBaseActivity::javaPostCondition() { read_if_needed_(); return _java_post_condition; diff --git a/genplugouts/BrowserSort/UmlBaseActivity.h b/genplugouts/BrowserSort/UmlBaseActivity.h index a0eca47eb..591850504 100644 --- a/genplugouts/BrowserSort/UmlBaseActivity.h +++ b/genplugouts/BrowserSort/UmlBaseActivity.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlActivity; class UmlClassView; @@ -21,18 +21,18 @@ class UmlBaseActivity : public UmlItem static UmlActivity * create(UmlClassView * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivity(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivity(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the pre condition - const Q3CString & preCondition(); + const QByteArray & preCondition(); // set the pre condition // @@ -40,7 +40,7 @@ class UmlBaseActivity : public UmlItem bool set_PreCondition(const char * v); // return the post condition - const Q3CString & postCondition(); + const QByteArray & postCondition(); // set the post condition // @@ -49,7 +49,7 @@ class UmlBaseActivity : public UmlItem #ifdef WITHCPP // return the pre condition in C++ - const Q3CString & cppPreCondition(); + const QByteArray & cppPreCondition(); // set the pre condition in C++ // @@ -57,7 +57,7 @@ class UmlBaseActivity : public UmlItem bool set_CppPreCondition(const char * v); // return the post condition in C++ - const Q3CString & cppPostCondition(); + const QByteArray & cppPostCondition(); // set the post condition in C++ // @@ -67,7 +67,7 @@ class UmlBaseActivity : public UmlItem #ifdef WITHJAVA // return the pre condition in Java - const Q3CString & javaPreCondition(); + const QByteArray & javaPreCondition(); // set the pre condition in Java // @@ -75,7 +75,7 @@ class UmlBaseActivity : public UmlItem bool set_JavaPreCondition(const char * v); // return the post condition in Java - const Q3CString & javaPostCondition(); + const QByteArray & javaPostCondition(); // set the post condition in Java // @@ -113,24 +113,24 @@ class UmlBaseActivity : public UmlItem // if 'del' is true the sub items are deleted in C++, and removed from the // internal dictionnary in C++ and Java (to allow it to be garbaged), // you will have to call Children() to re-access to them - virtual void unload(bool = FALSE, bool = FALSE); + virtual void unload(bool = FALSE, bool = FALSE) override; private: - Q3CString _pre_condition; + QByteArray _pre_condition; - Q3CString _post_condition; + QByteArray _post_condition; #ifdef WITHCPP - Q3CString _cpp_pre_condition; + QByteArray _cpp_pre_condition; - Q3CString _cpp_post_condition; + QByteArray _cpp_post_condition; #endif #ifdef WITHJAVA - Q3CString _java_pre_condition; + QByteArray _java_pre_condition; - Q3CString _java_post_condition; + QByteArray _java_post_condition; #endif bool _read_only; @@ -141,7 +141,7 @@ class UmlBaseActivity : public UmlItem protected: - virtual void read_uml_(); + virtual void read_uml_() override; #ifdef WITHCPP virtual void read_cpp_(); diff --git a/genplugouts/BrowserSort/UmlBaseActivityAction.cpp b/genplugouts/BrowserSort/UmlBaseActivityAction.cpp index fb47b7b1b..de084771d 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityAction.cpp +++ b/genplugouts/BrowserSort/UmlBaseActivityAction.cpp @@ -3,9 +3,9 @@ #include "UmlBaseActivityAction.h" #include "UmlDiagram.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlBaseActivityAction::preCondition() +const QByteArray & UmlBaseActivityAction::preCondition() { read_if_needed_(); return _pre_condition; @@ -16,7 +16,7 @@ bool UmlBaseActivityAction::set_PreCondition(const char * v) return set_it_(_pre_condition, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::postCondition() +const QByteArray & UmlBaseActivityAction::postCondition() { read_if_needed_(); return _post_condition; @@ -28,7 +28,7 @@ bool UmlBaseActivityAction::set_PostCondition(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivityAction::cppPreCondition() +const QByteArray & UmlBaseActivityAction::cppPreCondition() { read_if_needed_(); return _cpp_pre_condition; @@ -39,7 +39,7 @@ bool UmlBaseActivityAction::set_CppPreCondition(const char * v) return set_it_(_cpp_pre_condition, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::cppPostCondition() +const QByteArray & UmlBaseActivityAction::cppPostCondition() { read_if_needed_(); return _cpp_post_condition; @@ -52,7 +52,7 @@ bool UmlBaseActivityAction::set_CppPostCondition(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivityAction::javaPreCondition() +const QByteArray & UmlBaseActivityAction::javaPreCondition() { read_if_needed_(); return _java_pre_condition; @@ -63,7 +63,7 @@ bool UmlBaseActivityAction::set_JavaPreCondition(const char * v) return set_it_(_java_pre_condition, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::javaPostCondition() +const QByteArray & UmlBaseActivityAction::javaPostCondition() { read_if_needed_(); return _java_post_condition; diff --git a/genplugouts/BrowserSort/UmlBaseActivityAction.h b/genplugouts/BrowserSort/UmlBaseActivityAction.h index 4a06ccffe..612326f18 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityAction.h +++ b/genplugouts/BrowserSort/UmlBaseActivityAction.h @@ -3,7 +3,7 @@ #include "UmlActivityNode.h" -#include + class UmlDiagram; @@ -11,13 +11,13 @@ class UmlBaseActivityAction : public UmlActivityNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityAction(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityAction(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } public: // return the pre condition - const Q3CString & preCondition(); + const QByteArray & preCondition(); // set the pre condition // @@ -25,7 +25,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_PreCondition(const char * v); // return the post condition - const Q3CString & postCondition(); + const QByteArray & postCondition(); // set the post condition // @@ -34,7 +34,7 @@ class UmlBaseActivityAction : public UmlActivityNode #ifdef WITHCPP // return the pre condition in C++ - const Q3CString & cppPreCondition(); + const QByteArray & cppPreCondition(); // set the pre condition in C++ // @@ -42,7 +42,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_CppPreCondition(const char * v); // return the post condition in C++ - const Q3CString & cppPostCondition(); + const QByteArray & cppPostCondition(); // set the post condition in C++ // @@ -52,7 +52,7 @@ class UmlBaseActivityAction : public UmlActivityNode #ifdef WITHJAVA // return the pre condition in Java - const Q3CString & javaPreCondition(); + const QByteArray & javaPreCondition(); // set the pre condition in Java // @@ -60,7 +60,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_JavaPreCondition(const char * v); // return the post condition in Java - const Q3CString & javaPostCondition(); + const QByteArray & javaPostCondition(); // set the post condition in Java // @@ -82,38 +82,38 @@ class UmlBaseActivityAction : public UmlActivityNode // if 'del' is true the sub items are deleted in C++, and removed from the // internal dictionnary in C++ and Java (to allow it to be garbaged), // you will have to call Children() to re-access to them - virtual void unload(bool = FALSE, bool = FALSE); + virtual void unload(bool = FALSE, bool = FALSE) override; private: - Q3CString _pre_condition; + QByteArray _pre_condition; - Q3CString _post_condition; + QByteArray _post_condition; #ifdef WITHCPP - Q3CString _cpp_pre_condition; + QByteArray _cpp_pre_condition; - Q3CString _cpp_post_condition; + QByteArray _cpp_post_condition; #endif #ifdef WITHJAVA - Q3CString _java_pre_condition; + QByteArray _java_pre_condition; - Q3CString _java_post_condition; + QByteArray _java_post_condition; #endif UmlDiagram * _assoc_diagram; protected: - virtual void read_uml_(); + virtual void read_uml_() override; #ifdef WITHCPP - virtual void read_cpp_(); + virtual void read_cpp_() override; #endif #ifdef WITHJAVA - virtual void read_java_(); + virtual void read_java_() override; #endif }; diff --git a/genplugouts/BrowserSort/UmlBaseActivityActionClasses.cpp b/genplugouts/BrowserSort/UmlBaseActivityActionClasses.cpp index c94136abc..41c5e828e 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityActionClasses.cpp +++ b/genplugouts/BrowserSort/UmlBaseActivityActionClasses.cpp @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "UmlOperation.h" //Added by qt3to4: -#include +#include UmlSendObjectAction * UmlBaseSendObjectAction::create(UmlItem * parent, const char * s) { @@ -57,7 +57,7 @@ anItemKind UmlBaseValueSpecificationAction::kind() return aValueSpecificationAction; } -const Q3CString & UmlBaseValueSpecificationAction::value() +const QByteArray & UmlBaseValueSpecificationAction::value() { read_if_needed_(); return _value; @@ -69,7 +69,7 @@ bool UmlBaseValueSpecificationAction::set_Value(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseValueSpecificationAction::cppValue() +const QByteArray & UmlBaseValueSpecificationAction::cppValue() { read_if_needed_(); return _cpp_value; @@ -82,7 +82,7 @@ bool UmlBaseValueSpecificationAction::set_CppValue(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseValueSpecificationAction::javaValue() +const QByteArray & UmlBaseValueSpecificationAction::javaValue() { read_if_needed_(); return _java_value; @@ -138,7 +138,7 @@ anItemKind UmlBaseOpaqueAction::kind() return anOpaqueAction; } -const Q3CString & UmlBaseOpaqueAction::behavior() +const QByteArray & UmlBaseOpaqueAction::behavior() { read_if_needed_(); return _behavior; @@ -150,7 +150,7 @@ bool UmlBaseOpaqueAction::set_Behavior(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseOpaqueAction::cppBehavior() +const QByteArray & UmlBaseOpaqueAction::cppBehavior() { read_if_needed_(); return _cpp_behavior; @@ -163,7 +163,7 @@ bool UmlBaseOpaqueAction::set_CppBehavior(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseOpaqueAction::javaBehavior() +const QByteArray & UmlBaseOpaqueAction::javaBehavior() { read_if_needed_(); return _java_behavior; @@ -241,7 +241,7 @@ bool UmlBaseAcceptEventAction::set_isTimeEvent(bool v) return set_it_(_timeevent, v, setTimeEventCmd); } -const Q3CString & UmlBaseAcceptEventAction::trigger() +const QByteArray & UmlBaseAcceptEventAction::trigger() { read_if_needed_(); return _trigger; @@ -253,7 +253,7 @@ bool UmlBaseAcceptEventAction::set_Trigger(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseAcceptEventAction::cppTrigger() +const QByteArray & UmlBaseAcceptEventAction::cppTrigger() { read_if_needed_(); return _cpp_trigger; @@ -266,7 +266,7 @@ bool UmlBaseAcceptEventAction::set_CppTrigger(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseAcceptEventAction::javaTrigger() +const QByteArray & UmlBaseAcceptEventAction::javaTrigger() { read_if_needed_(); return _java_trigger; diff --git a/genplugouts/BrowserSort/UmlBaseActivityActionClasses.h b/genplugouts/BrowserSort/UmlBaseActivityActionClasses.h index 1a3b14b5f..61217e32e 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityActionClasses.h +++ b/genplugouts/BrowserSort/UmlBaseActivityActionClasses.h @@ -4,7 +4,7 @@ #include "UmlActivityAction.h" #include "anItemKind.h" -#include + #include "UmlOnSignalAction.h" #include "UmlAccessVariableValueAction.h" @@ -36,12 +36,12 @@ class UmlBaseSendObjectAction : public UmlActivityAction static UmlSendObjectAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSendObjectAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseSendObjectAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } }; @@ -57,12 +57,12 @@ class UmlBaseUnmarshallAction : public UmlActivityAction static UmlUnmarshallAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUnmarshallAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseUnmarshallAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } }; @@ -78,12 +78,12 @@ class UmlBaseSendSignalAction : public UmlOnSignalAction static UmlSendSignalAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSendSignalAction(void * id, const Q3CString & s) : UmlOnSignalAction(id, s) { + UmlBaseSendSignalAction(void * id, const QByteArray & s) : UmlOnSignalAction(id, s) { } }; @@ -99,12 +99,12 @@ class UmlBaseBroadcastSignalAction : public UmlOnSignalAction static UmlBroadcastSignalAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseBroadcastSignalAction(void * id, const Q3CString & s) : UmlOnSignalAction(id, s) { + UmlBaseBroadcastSignalAction(void * id, const QByteArray & s) : UmlOnSignalAction(id, s) { } }; @@ -120,18 +120,18 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction static UmlValueSpecificationAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseValueSpecificationAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseValueSpecificationAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the value - const Q3CString & value(); + const QByteArray & value(); // set the value // @@ -140,7 +140,7 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction #ifdef WITHCPP // return the value in C++ - const Q3CString & cppValue(); + const QByteArray & cppValue(); // set the value in C++ // @@ -150,7 +150,7 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction #ifdef WITHJAVA // return the value in Java - const Q3CString & javaValue(); + const QByteArray & javaValue(); // set the value in Java // @@ -164,30 +164,30 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction // if 'del' is true the sub items are deleted in C++, and removed from the // internal dictionnary in C++ and Java (to allow it to be garbaged), // you will have to call Children() to re-access to them - virtual void unload(bool = FALSE, bool = FALSE); + virtual void unload(bool = FALSE, bool = FALSE) override; private: - Q3CString _value; + QByteArray _value; #ifdef WITHCPP - Q3CString _cpp_value; + QByteArray _cpp_value; #endif #ifdef WITHJAVA - Q3CString _java_value; + QByteArray _java_value; #endif protected: - virtual void read_uml_(); + virtual void read_uml_() override; #ifdef WITHCPP - virtual void read_cpp_(); + virtual void read_cpp_() override; #endif #ifdef WITHJAVA - virtual void read_java_(); + virtual void read_java_() override; #endif }; @@ -203,18 +203,18 @@ class UmlBaseOpaqueAction : public UmlActivityAction static UmlOpaqueAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOpaqueAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseOpaqueAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the behavior - const Q3CString & behavior(); + const QByteArray & behavior(); // set the behavior // @@ -223,7 +223,7 @@ class UmlBaseOpaqueAction : public UmlActivityAction #ifdef WITHCPP // return the behavior in C++ - const Q3CString & cppBehavior(); + const QByteArray & cppBehavior(); // set the behavior in C++ // @@ -233,7 +233,7 @@ class UmlBaseOpaqueAction : public UmlActivityAction #ifdef WITHJAVA // return the behavior in Java - const Q3CString & javaBehavior(); + const QByteArray & javaBehavior(); // set the behavior in Java // @@ -247,30 +247,30 @@ class UmlBaseOpaqueAction : public UmlActivityAction // if 'del' is true the sub items are deleted in C++, and removed from the // internal dictionnary in C++ and Java (to allow it to be garbaged), // you will have to call Children() to re-access to them - virtual void unload(bool = FALSE, bool = FALSE); + virtual void unload(bool = FALSE, bool = FALSE) override; private: - Q3CString _behavior; + QByteArray _behavior; #ifdef WITHCPP - Q3CString _cpp_behavior; + QByteArray _cpp_behavior; #endif #ifdef WITHJAVA - Q3CString _java_behavior; + QByteArray _java_behavior; #endif protected: - virtual void read_uml_(); + virtual void read_uml_() override; #ifdef WITHCPP - virtual void read_cpp_(); + virtual void read_cpp_() override; #endif #ifdef WITHJAVA - virtual void read_java_(); + virtual void read_java_() override; #endif }; @@ -286,12 +286,12 @@ class UmlBaseAcceptEventAction : public UmlActivityAction static UmlAcceptEventAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAcceptEventAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseAcceptEventAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -313,7 +313,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction bool set_isTimeEvent(bool v); // return the trigger - const Q3CString & trigger(); + const QByteArray & trigger(); // set the trigger // @@ -322,7 +322,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction #ifdef WITHCPP // return the trigger in C++ - const Q3CString & cppTrigger(); + const QByteArray & cppTrigger(); // set the trigger in C++ // @@ -332,7 +332,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction #ifdef WITHJAVA // return the trigger in Java - const Q3CString & javaTrigger(); + const QByteArray & javaTrigger(); // set the trigger in Java // @@ -346,7 +346,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction // if 'del' is true the sub items are deleted in C++, and removed from the // internal dictionnary in C++ and Java (to allow it to be garbaged), // you will have to call Children() to re-access to them - virtual void unload(bool = FALSE, bool = FALSE); + virtual void unload(bool = FALSE, bool = FALSE) override; private: @@ -354,26 +354,26 @@ class UmlBaseAcceptEventAction : public UmlActivityAction bool _timeevent; - Q3CString _trigger; + QByteArray _trigger; #ifdef WITHCPP - Q3CString _cpp_trigger; + QByteArray _cpp_trigger; #endif #ifdef WITHJAVA - Q3CString _java_trigger; + QByteArray _java_trigger; #endif protected: - virtual void read_uml_(); + virtual void read_uml_() override; #ifdef WITHCPP - virtual void read_cpp_(); + virtual void read_cpp_() override; #endif #ifdef WITHJAVA - virtual void read_java_(); + virtual void read_java_() override; #endif }; @@ -389,12 +389,12 @@ class UmlBaseCallOperationAction : public UmlActivityAction static UmlCallOperationAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCallOperationAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseCallOperationAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -423,7 +423,7 @@ class UmlBaseCallOperationAction : public UmlActivityAction protected: - virtual void read_uml_(); + virtual void read_uml_() override; }; @@ -438,12 +438,12 @@ class UmlBaseCallBehaviorAction : public UmlActivityAction static UmlCallBehaviorAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCallBehaviorAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseCallBehaviorAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -472,7 +472,7 @@ class UmlBaseCallBehaviorAction : public UmlActivityAction protected: - virtual void read_uml_(); + virtual void read_uml_() override; }; @@ -487,12 +487,12 @@ class UmlBaseClearVariableValueAction : public UmlAccessVariableValueAction static UmlClearVariableValueAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClearVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseClearVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -508,12 +508,12 @@ class UmlBaseReadVariableValueAction : public UmlAccessVariableValueAction static UmlReadVariableValueAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseReadVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseReadVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -529,12 +529,12 @@ class UmlBaseWriteVariableValueAction : public UmlAccessVariableValueAction static UmlWriteVariableValueAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseWriteVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseWriteVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -550,12 +550,12 @@ class UmlBaseAddVariableValueAction : public UmlAccessVariableValueAction static UmlAddVariableValueAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAddVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseAddVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } @@ -574,7 +574,7 @@ class UmlBaseAddVariableValueAction : public UmlAccessVariableValueAction protected: - virtual void read_uml_(); + virtual void read_uml_() override; }; @@ -589,12 +589,12 @@ class UmlBaseRemoveVariableValueAction : public UmlAccessVariableValueAction static UmlRemoveVariableValueAction * create(UmlItem * parent, const char * s); // returns the kind of the item - virtual anItemKind kind(); + virtual anItemKind kind() override; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRemoveVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseRemoveVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } @@ -613,7 +613,7 @@ class UmlBaseRemoveVariableValueAction : public UmlAccessVariableValueAction protected: - virtual void read_uml_(); + virtual void read_uml_() override; }; diff --git a/genplugouts/BrowserSort/UmlBaseActivityControlNode.h b/genplugouts/BrowserSort/UmlBaseActivityControlNode.h index 9f1c0931a..3d07467c1 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityControlNode.h +++ b/genplugouts/BrowserSort/UmlBaseActivityControlNode.h @@ -3,13 +3,13 @@ #include "UmlActivityNode.h" -#include + class UmlBaseActivityControlNode : public UmlActivityNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityControlNode(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityControlNode(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseActivityControlNodeClasses.h b/genplugouts/BrowserSort/UmlBaseActivityControlNodeClasses.h index 84dd781f7..1ef579e8c 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityControlNodeClasses.h +++ b/genplugouts/BrowserSort/UmlBaseActivityControlNodeClasses.h @@ -4,7 +4,7 @@ #include "UmlActivityControlNode.h" #include "anItemKind.h" -#include + class UmlInitialActivityNode; class UmlItem; @@ -31,7 +31,7 @@ class UmlBaseInitialActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInitialActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseInitialActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -52,7 +52,7 @@ class UmlBaseFlowFinalActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFlowFinalActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseFlowFinalActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -73,7 +73,7 @@ class UmlBaseActivityFinalActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityFinalActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseActivityFinalActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -94,7 +94,7 @@ class UmlBaseDecisionActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDecisionActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseDecisionActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -115,7 +115,7 @@ class UmlBaseMergeActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseMergeActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseMergeActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -136,7 +136,7 @@ class UmlBaseForkActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseForkActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseForkActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -157,7 +157,7 @@ class UmlBaseJoinActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJoinActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseJoinActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseActivityDiagram.h b/genplugouts/BrowserSort/UmlBaseActivityDiagram.h index 8ed6ca9d6..67d2ff8af 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseActivityDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlActivityDiagram; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseActivityDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseActivityDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseActivityNode.h b/genplugouts/BrowserSort/UmlBaseActivityNode.h index 9018d75ce..54536ed90 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityNode.h +++ b/genplugouts/BrowserSort/UmlBaseActivityNode.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + class UmlBaseActivityNode : public UmlItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityNode(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivityNode(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseActivityObject.cpp b/genplugouts/BrowserSort/UmlBaseActivityObject.cpp index 748e7c22b..f96d4a344 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityObject.cpp +++ b/genplugouts/BrowserSort/UmlBaseActivityObject.cpp @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "UmlActivityDiagram.h" //Added by qt3to4: -#include +#include UmlActivityObject * UmlBaseActivityObject::create(UmlItem * parent, const char * s) { @@ -28,7 +28,7 @@ bool UmlBaseActivityObject::set_Type(const UmlTypeSpec & v) return set_it_(_type, v, setTypeCmd); } -const Q3CString & UmlBaseActivityObject::multiplicity() +const QByteArray & UmlBaseActivityObject::multiplicity() { read_if_needed_(); return _multiplicity; @@ -39,7 +39,7 @@ bool UmlBaseActivityObject::set_Multiplicity(const char * v) return set_it_(_multiplicity, v, setMultiplicityCmd); } -const Q3CString & UmlBaseActivityObject::inState() +const QByteArray & UmlBaseActivityObject::inState() { read_if_needed_(); return _in_state; @@ -50,7 +50,7 @@ bool UmlBaseActivityObject::set_InState(const char * v) return set_it_(_in_state, v, setInStateCmd); } -const Q3CString & UmlBaseActivityObject::selection() +const QByteArray & UmlBaseActivityObject::selection() { read_if_needed_(); return _selection; @@ -62,7 +62,7 @@ bool UmlBaseActivityObject::set_Selection(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivityObject::cppSelection() +const QByteArray & UmlBaseActivityObject::cppSelection() { read_if_needed_(); return _cpp_selection; @@ -75,7 +75,7 @@ bool UmlBaseActivityObject::set_CppSelection(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivityObject::javaSelection() +const QByteArray & UmlBaseActivityObject::javaSelection() { read_if_needed_(); return _java_selection; diff --git a/genplugouts/BrowserSort/UmlBaseActivityObject.h b/genplugouts/BrowserSort/UmlBaseActivityObject.h index 5c1938905..8b331ae01 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityObject.h +++ b/genplugouts/BrowserSort/UmlBaseActivityObject.h @@ -4,7 +4,7 @@ #include "UmlActivityNode.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" #include "anOrdering.h" @@ -28,7 +28,7 @@ class UmlBaseActivityObject : public UmlActivityNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityObject(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityObject(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } @@ -42,7 +42,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_Type(const UmlTypeSpec & v); // return the multiplicity - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // set the multiplicity // @@ -50,7 +50,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_Multiplicity(const char * v); // return the inState attribute - const Q3CString & inState(); + const QByteArray & inState(); // set the inState attribute // @@ -58,7 +58,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_InState(const char * v); // return the selection in OCL - const Q3CString & selection(); + const QByteArray & selection(); // set the selection in OCL // @@ -67,7 +67,7 @@ class UmlBaseActivityObject : public UmlActivityNode #ifdef WITHCPP // return the selection in C++ - const Q3CString & cppSelection(); + const QByteArray & cppSelection(); // set the selection in C++ // @@ -77,7 +77,7 @@ class UmlBaseActivityObject : public UmlActivityNode #ifdef WITHJAVA // return the selection in Java - const Q3CString & javaSelection(); + const QByteArray & javaSelection(); // set the selection in Java // @@ -123,18 +123,18 @@ class UmlBaseActivityObject : public UmlActivityNode UmlTypeSpec _type; - Q3CString _multiplicity; + QByteArray _multiplicity; - Q3CString _in_state; + QByteArray _in_state; - Q3CString _selection; + QByteArray _selection; #ifdef WITHCPP - Q3CString _cpp_selection; + QByteArray _cpp_selection; #endif #ifdef WITHJAVA - Q3CString _java_selection; + QByteArray _java_selection; #endif anOrdering _ordering : 8; diff --git a/genplugouts/BrowserSort/UmlBaseActivityParameter.cpp b/genplugouts/BrowserSort/UmlBaseActivityParameter.cpp index 067b1ba5c..0e5dd560c 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityParameter.cpp +++ b/genplugouts/BrowserSort/UmlBaseActivityParameter.cpp @@ -4,7 +4,7 @@ #include "UmlActivityParameter.h" #include "UmlActivity.h" //Added by qt3to4: -#include +#include UmlActivityParameter * UmlBaseActivityParameter::create(UmlActivity * parent, const char * s) { @@ -16,7 +16,7 @@ anItemKind UmlBaseActivityParameter::kind() return anActivityParameter; } -const Q3CString & UmlBaseActivityParameter::defaultValue() +const QByteArray & UmlBaseActivityParameter::defaultValue() { read_if_needed_(); return _default_value; diff --git a/genplugouts/BrowserSort/UmlBaseActivityParameter.h b/genplugouts/BrowserSort/UmlBaseActivityParameter.h index 1f05aabe8..fcdd9cecc 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityParameter.h +++ b/genplugouts/BrowserSort/UmlBaseActivityParameter.h @@ -4,7 +4,7 @@ #include "UmlPinParameter.h" #include "anItemKind.h" -#include + class UmlActivityParameter; class UmlActivity; @@ -25,13 +25,13 @@ class UmlBaseActivityParameter : public UmlPinParameter protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityParameter(void * id, const Q3CString & s) : UmlPinParameter(id, s) { + UmlBaseActivityParameter(void * id, const QByteArray & s) : UmlPinParameter(id, s) { } public: // return the default value - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // set the default value // @@ -48,7 +48,7 @@ class UmlBaseActivityParameter : public UmlPinParameter private: - Q3CString _default_value; + QByteArray _default_value; protected: diff --git a/genplugouts/BrowserSort/UmlBaseActivityPin.h b/genplugouts/BrowserSort/UmlBaseActivityPin.h index 52f5d4072..9ef909129 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityPin.h +++ b/genplugouts/BrowserSort/UmlBaseActivityPin.h @@ -4,7 +4,7 @@ #include "UmlPinParameter.h" #include "anItemKind.h" -#include + class UmlActivityPin; class UmlActivityAction; @@ -25,7 +25,7 @@ class UmlBaseActivityPin : public UmlPinParameter protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityPin(void * id, const Q3CString & s) : UmlPinParameter(id, s) { + UmlBaseActivityPin(void * id, const QByteArray & s) : UmlPinParameter(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseActivityRegion.h b/genplugouts/BrowserSort/UmlBaseActivityRegion.h index 95e516e75..cf3b637c1 100644 --- a/genplugouts/BrowserSort/UmlBaseActivityRegion.h +++ b/genplugouts/BrowserSort/UmlBaseActivityRegion.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + class UmlActivityDiagram; @@ -11,7 +11,7 @@ class UmlBaseActivityRegion : public UmlItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityRegion(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivityRegion(void * id, const QByteArray & s) : UmlItem(id, s) { } diff --git a/genplugouts/BrowserSort/UmlBaseArtifact.cpp b/genplugouts/BrowserSort/UmlBaseArtifact.cpp index 86e17851e..36fca0e65 100644 --- a/genplugouts/BrowserSort/UmlBaseArtifact.cpp +++ b/genplugouts/BrowserSort/UmlBaseArtifact.cpp @@ -7,7 +7,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlArtifact * UmlBaseArtifact::create(UmlDeploymentView * parent, const char * s) { return (UmlArtifact *) parent->create_(anArtifact, s); @@ -37,7 +37,7 @@ bool UmlBaseArtifact::set_AssociatedDiagram(UmlDeploymentDiagram * d) return FALSE; } -const Q3PtrVector & UmlBaseArtifact::associatedClasses() +const QVector & UmlBaseArtifact::associatedClasses() { read_if_needed_(); @@ -51,8 +51,9 @@ bool UmlBaseArtifact::addAssociatedClass(UmlClass * cl) if (UmlCom::read_bool()) { if (_defined) { - _assoc_classes.resize(_assoc_classes.size() + 1); - _assoc_classes.insert(_assoc_classes.size() - 1, cl); + //_assoc_classes.reserve(_assoc_classes.size() + 1); + //_assoc_classes.insert(_assoc_classes.size() - 1, cl); + _assoc_classes.append(cl); } return TRUE; @@ -68,7 +69,7 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) if (UmlCom::read_bool()) { if (_defined) { - unsigned index = (unsigned) _assoc_classes.findRef(cl); + unsigned index = (unsigned) _assoc_classes.indexOf(cl); if (((int) index) == -1) // theo impossible @@ -77,9 +78,9 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) unsigned last = _assoc_classes.size() - 1; if (index != last) - _assoc_classes.insert(index, _assoc_classes[last]); + _assoc_classes[index] = _assoc_classes[last]; - _assoc_classes.resize(last); + _assoc_classes.reserve(last); } return TRUE; @@ -88,9 +89,9 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) return FALSE; } -bool UmlBaseArtifact::set_AssociatedClasses(const Q3PtrVector & l) +bool UmlBaseArtifact::set_AssociatedClasses(const QVector & l) { - UmlCom::send_cmd(_identifier, setAssocClassesCmd, (const Q3PtrVector &) l); + UmlCom::send_cmd(_identifier, setAssocClassesCmd, (const QVector &) l); if (UmlCom::read_bool()) { if (_defined) @@ -102,7 +103,7 @@ bool UmlBaseArtifact::set_AssociatedClasses(const Q3PtrVector & l) return FALSE; } -const Q3PtrVector & UmlBaseArtifact::associatedArtifacts() +const QVector & UmlBaseArtifact::associatedArtifacts() { read_if_needed_(); @@ -116,8 +117,9 @@ bool UmlBaseArtifact::addAssociatedArtifact(UmlArtifact * cp) if (UmlCom::read_bool()) { if (_defined) { - _associated.resize(_associated.size() + 1); - _associated.insert(_associated.size() - 1, cp); + //_associated.resize(_associated.size() + 1); + //_associated.insert(_associated.size() - 1, cp); + _associated.append(cp); } return TRUE; @@ -133,7 +135,7 @@ bool UmlBaseArtifact::removeAssociatedArtifact(UmlArtifact * cp) if (UmlCom::read_bool()) { if (_defined) { - unsigned index = (unsigned) _associated.findRef(cp); + unsigned index = (unsigned) _associated.indexOf(cp); if (((int) index) == -1) // theo impossible @@ -142,7 +144,7 @@ bool UmlBaseArtifact::removeAssociatedArtifact(UmlArtifact * cp) unsigned last = _associated.size() - 1; if (index != last) - _associated.insert(index, _associated[last]); + _associated[index] = _associated[last]; _associated.resize(last); } @@ -166,54 +168,54 @@ bool UmlBaseArtifact::removeAllAssociatedArtifacts() } #ifdef WITHCPP -const Q3CString & UmlBaseArtifact::cppHeader() +const QByteArray & UmlBaseArtifact::cppHeader() { read_if_needed_(); return _cpp_h; } -bool UmlBaseArtifact::set_CppHeader(const Q3CString & s) +bool UmlBaseArtifact::set_CppHeader(const QByteArray & s) { return set_it_(_cpp_h, s, setCppHCmd); } -const Q3CString & UmlBaseArtifact::cppSource() +const QByteArray & UmlBaseArtifact::cppSource() { read_if_needed_(); return _cpp_src; } -bool UmlBaseArtifact::set_CppSource(const Q3CString & s) +bool UmlBaseArtifact::set_CppSource(const QByteArray & s) { return set_it_(_cpp_src, s, setCppSrcCmd); } #endif #ifdef WITHJAVA -const Q3CString & UmlBaseArtifact::javaSource() +const QByteArray & UmlBaseArtifact::javaSource() { read_if_needed_(); return _java_src; } -bool UmlBaseArtifact::set_JavaSource(const Q3CString & s) +bool UmlBaseArtifact::set_JavaSource(const QByteArray & s) { return set_it_(_java_src, s, setJavaSrcCmd); } #endif #ifdef WITHIDL -const Q3CString & UmlBaseArtifact::idlSource() +const QByteArray & UmlBaseArtifact::idlSource() { read_if_needed_(); return _idl_src; } -bool UmlBaseArtifact::set_IdlSource(const Q3CString & s) +bool UmlBaseArtifact::set_IdlSource(const QByteArray & s) { return set_it_(_idl_src, s, setIdlSrcCmd); } @@ -248,13 +250,13 @@ void UmlBaseArtifact::read_uml_() _assoc_classes.resize(n); for (index = 0; index != n; index += 1) - _assoc_classes.insert(index, (UmlClass *) UmlBaseItem::read_()); + _assoc_classes[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _associated.resize(n); for (index = 0; index != n; index += 1) - _associated.insert(index, (UmlArtifact *) UmlBaseItem::read_()); + _associated[index] = (UmlArtifact *) UmlBaseItem::read_(); } #ifdef WITHCPP diff --git a/genplugouts/BrowserSort/UmlBaseArtifact.h b/genplugouts/BrowserSort/UmlBaseArtifact.h index 7ff662554..0fce0ece3 100644 --- a/genplugouts/BrowserSort/UmlBaseArtifact.h +++ b/genplugouts/BrowserSort/UmlBaseArtifact.h @@ -4,9 +4,9 @@ #include "UmlItem.h" #include "anItemKind.h" -#include -#include + + #include "UmlClass.h" // to avoid destructor problem class UmlArtifact; @@ -38,7 +38,7 @@ class UmlBaseArtifact : public UmlItem // returns (in Java a copy of) the optional associated classes // significant when the artifact is stereotyped <> - const Q3PtrVector & associatedClasses(); + const QVector & associatedClasses(); // adds 'cl' at the end of the associated classes list, returns false // if 'cl' is already an associate class. @@ -57,11 +57,11 @@ class UmlBaseArtifact : public UmlItem // significant when the artifact is stereotyped <> // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_AssociatedClasses(const Q3PtrVector & l); + bool set_AssociatedClasses(const QVector & l); // returns (in Java a copy of) the associated artifacts list // significant when the artifact is not stereotyped <> - const Q3PtrVector & associatedArtifacts(); + const QVector & associatedArtifacts(); // adds an associated artifacts, returns false if 'cp' is already // an associate artifact. @@ -84,40 +84,40 @@ class UmlBaseArtifact : public UmlItem #ifdef WITHCPP // returns the C++ header file definition - const Q3CString & cppHeader(); + const QByteArray & cppHeader(); // to set the C++ header file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppHeader(const Q3CString & s); + bool set_CppHeader(const QByteArray & s); // returns the C++ source file definition - const Q3CString & cppSource(); + const QByteArray & cppSource(); // to set the C++ source file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppSource(const Q3CString & s); + bool set_CppSource(const QByteArray & s); #endif #ifdef WITHJAVA // returns the Java file definition - const Q3CString & javaSource(); + const QByteArray & javaSource(); // to set the Java file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaSource(const Q3CString & s); + bool set_JavaSource(const QByteArray & s); #endif #ifdef WITHIDL // returns the Idl file definition - const Q3CString & idlSource(); + const QByteArray & idlSource(); // to set the Idl file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlSource(const Q3CString & s); + bool set_IdlSource(const QByteArray & s); #endif // to unload the object to free memory, it will be reloaded @@ -129,22 +129,22 @@ class UmlBaseArtifact : public UmlItem private: UmlDeploymentDiagram * _assoc_diagram; - Q3PtrVector _assoc_classes; + QVector _assoc_classes; - Q3PtrVector _associated; + QVector _associated; #ifdef WITHCPP - Q3CString _cpp_h; + QByteArray _cpp_h; - Q3CString _cpp_src; + QByteArray _cpp_src; #endif #ifdef WITHJAVA - Q3CString _java_src; + QByteArray _java_src; #endif #ifdef WITHIDL - Q3CString _idl_src; + QByteArray _idl_src; #endif @@ -172,11 +172,11 @@ class UmlBaseArtifact : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseArtifact(void * id, const Q3CString & n); + UmlBaseArtifact(void * id, const QByteArray & n); }; -inline UmlBaseArtifact::UmlBaseArtifact(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseArtifact::UmlBaseArtifact(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/BrowserSort/UmlBaseAttribute.cpp b/genplugouts/BrowserSort/UmlBaseAttribute.cpp index f5a6d51bd..b6700e578 100644 --- a/genplugouts/BrowserSort/UmlBaseAttribute.cpp +++ b/genplugouts/BrowserSort/UmlBaseAttribute.cpp @@ -6,7 +6,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlAttribute * UmlBaseAttribute::create(UmlClass * parent, const char * s) { return (UmlAttribute *) parent->create_(anAttribute, s); @@ -29,7 +29,7 @@ bool UmlBaseAttribute::set_isReadOnly(bool y) return set_it_(_read_only, y, setIsReadOnlyCmd); } -const Q3CString & UmlBaseAttribute::defaultValue() +const QByteArray & UmlBaseAttribute::defaultValue() { read_if_needed_(); @@ -121,7 +121,7 @@ bool UmlBaseAttribute::set_isJavaTransient(bool y) #endif #ifdef WITHIDL -Q3CString UmlBaseAttribute::idlCase() +QByteArray UmlBaseAttribute::idlCase() { read_if_needed_(); diff --git a/genplugouts/BrowserSort/UmlBaseAttribute.h b/genplugouts/BrowserSort/UmlBaseAttribute.h index 3ce2c69c1..0fc286acc 100644 --- a/genplugouts/BrowserSort/UmlBaseAttribute.h +++ b/genplugouts/BrowserSort/UmlBaseAttribute.h @@ -4,7 +4,7 @@ #include "UmlClassMember.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" class UmlAttribute; @@ -35,7 +35,7 @@ class UmlBaseAttribute : public UmlClassMember bool set_isReadOnly(bool y); // returns the default attribute value, may be an empty string - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // to set the default attribute value ("" allowed) // @@ -89,7 +89,7 @@ class UmlBaseAttribute : public UmlClassMember #ifdef WITHIDL // in case the attribute is an IDL union's member returns the // corresponding 'case', an empty string in case it is not specified - Q3CString idlCase(); + QByteArray idlCase(); // to set the 'case' even the attribute is not (already) known as // an IDL union's member @@ -119,7 +119,7 @@ class UmlBaseAttribute : public UmlClassMember bool _java_transient; #endif - Q3CString _default_value; + QByteArray _default_value; UmlTypeSpec _type; @@ -131,13 +131,13 @@ class UmlBaseAttribute : public UmlClassMember // exclusive with idl_explicit_case UmlAttribute * _idl_case; - Q3CString _idl_explicit_case; + QByteArray _idl_explicit_case; #endif public: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAttribute(void * id, const Q3CString & n); + UmlBaseAttribute(void * id, const QByteArray & n); protected: @@ -165,7 +165,7 @@ class UmlBaseAttribute : public UmlClassMember }; -inline UmlBaseAttribute::UmlBaseAttribute(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseAttribute::UmlBaseAttribute(void * id, const QByteArray & n) : UmlClassMember(id, n) { _get_oper = 0; _set_oper = 0; diff --git a/genplugouts/BrowserSort/UmlBaseChoicePseudoState.h b/genplugouts/BrowserSort/UmlBaseChoicePseudoState.h index fb682dd91..8d15fc093 100644 --- a/genplugouts/BrowserSort/UmlBaseChoicePseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseChoicePseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlChoicePseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseChoicePseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseChoicePseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseChoicePseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseClass.cpp b/genplugouts/BrowserSort/UmlBaseClass.cpp index 72861919d..e522d3d9a 100644 --- a/genplugouts/BrowserSort/UmlBaseClass.cpp +++ b/genplugouts/BrowserSort/UmlBaseClass.cpp @@ -10,8 +10,8 @@ #include "UmlCom.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include -#include +#include +#include UmlClass * UmlBaseClass::create(UmlItem * parent, const char * s) { return (UmlClass *) parent->create_(aClass, s); @@ -46,11 +46,11 @@ bool UmlBaseClass::set_BaseType(const UmlTypeSpec & t) return set_it_(_base_type, t, setBaseTypeCmd); } -Q3ValueList UmlBaseClass::formals() +QList UmlBaseClass::formals() { UmlCom::send_cmd(_identifier, formalsCmd); - Q3ValueList formals; + QList formals; for (unsigned n = UmlCom::read_unsigned(); n; n -= 1) { UmlFormalParameter f; @@ -82,11 +82,11 @@ bool UmlBaseClass::replaceFormal(unsigned int rank, const UmlFormalParameter & f return UmlCom::read_bool(); } -Q3ValueList UmlBaseClass::actuals() +QList UmlBaseClass::actuals() { UmlCom::send_cmd(_identifier, actualsCmd); - Q3ValueList actuals; + QList actuals; for (unsigned n = UmlCom::read_unsigned(); n; n -= 1) { UmlActualParameter a; @@ -131,17 +131,17 @@ UmlArtifact * UmlBaseClass::associatedArtifact() return (UmlArtifact *) UmlBaseItem::read_(); } -const Q3PtrVector UmlBaseClass::associatedComponents() +const QVector UmlBaseClass::associatedComponents() { UmlCom::send_cmd(_identifier, assocComponentCmd); - Q3PtrVector result; + QVector result; unsigned n = UmlCom::read_unsigned(); result.resize(n); for (unsigned index = 0; index != n; index += 1) - result.insert(index, (UmlComponent *) UmlBaseItem::read_()); + result[index] = (UmlComponent *) UmlBaseItem::read_(); return result; } @@ -299,7 +299,7 @@ bool UmlBaseClass::set_isIdlCustom(bool y) } #endif -UmlClass * UmlBaseClass::get(const Q3CString & n, const UmlPackage * p) +UmlClass * UmlBaseClass::get(const QByteArray & n, const UmlPackage * p) { if (p == 0) { UmlClass * x = _classes[n]; @@ -325,15 +325,15 @@ void UmlBaseClass::unload(bool rec, bool del) UmlBaseClassItem::unload(rec, del); } -bool UmlBaseClass::set_Name(const Q3CString & s) +bool UmlBaseClass::set_Name(const QByteArray & s) { if (!UmlBaseItem::set_Name(s)) return FALSE; - const Q3PtrVector ch = children(); - Q3CString destr = "~" + name(); + const QVector ch = children(); + QByteArray destr = "~" + name(); - for (unsigned i = 0; i != ch.size(); i += 1) { + for (int i = 0; i != ch.size(); i += 1) { if (ch[i]->kind() == anOperation) { if (ch[i]->name() == name()) ch[i]->set_Name(s); @@ -345,9 +345,9 @@ bool UmlBaseClass::set_Name(const Q3CString & s) return TRUE; } -Q3Dict UmlBaseClass::_classes(1001); +QHash UmlBaseClass::_classes; -UmlBaseClass::UmlBaseClass(void * id, const Q3CString & n) +UmlBaseClass::UmlBaseClass(void * id, const QByteArray & n) : UmlClassMember(id, n) { _assoc_diagram = 0; @@ -355,7 +355,7 @@ UmlBaseClass::UmlBaseClass(void * id, const Q3CString & n) _classes.insert(n, (UmlClass *) this); if ((_classes.count() / 2) >= _classes.size()) - _classes.resize(_classes.size() * 2 - 1); + _classes.reserve(_classes.size() * 2 - 1); } void UmlBaseClass::read_uml_() diff --git a/genplugouts/BrowserSort/UmlBaseClass.h b/genplugouts/BrowserSort/UmlBaseClass.h index 7d411a8c5..d72487c0b 100644 --- a/genplugouts/BrowserSort/UmlBaseClass.h +++ b/genplugouts/BrowserSort/UmlBaseClass.h @@ -5,12 +5,8 @@ #include "UmlClassMember.h" #include "anItemKind.h" #include "UmlTypeSpec.h" -#include -#include - -#include -#include - +#include +#include #include "UmlFormalParameter.h" #include "UmlActualParameter.h" class UmlClass; @@ -55,7 +51,7 @@ class UmlBaseClass : public UmlClassMember bool set_BaseType(const UmlTypeSpec & t); // returns (a copy of) the formals list - Q3ValueList formals(); + QList formals(); // remove the formal of the given rank (0...), returns 0 on error // @@ -78,7 +74,7 @@ class UmlBaseClass : public UmlClassMember bool replaceFormal(unsigned int rank, const UmlFormalParameter & formal); // returns (a copy of) the actuals list - Q3ValueList actuals(); + QList actuals(); // replace the actual value at the given rank (0...) // @@ -101,7 +97,7 @@ class UmlBaseClass : public UmlClassMember // returns the components realizing or providing the class. // To set them refer to the UmlBaseComponent's operation setAssociatedClasses() - const Q3PtrVector associatedComponents(); + const QVector associatedComponents(); #ifdef WITHCPP // returns TRUE if the class is external, its definition @@ -185,7 +181,7 @@ class UmlBaseClass : public UmlClassMember //exist, else 0/null. In case the package is specified (not 0/null), //the returned class will be defined in a sub-level of the package. - static UmlClass * get(const Q3CString & n, const UmlPackage * p); + static UmlClass * get(const QByteArray & n, const UmlPackage * p); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -198,13 +194,13 @@ class UmlBaseClass : public UmlClassMember // to set the name // // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Name(const Q3CString & s); + virtual bool set_Name(const QByteArray & s); friend class UmlBaseRelation; friend class UmlBaseArtifact; private: - static Q3Dict _classes; + static QHash _classes; bool _abstract; @@ -241,7 +237,7 @@ class UmlBaseClass : public UmlClassMember protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClass(void * id, const Q3CString & n); + UmlBaseClass(void * id, const QByteArray & n); //internal, do NOT use it diff --git a/genplugouts/BrowserSort/UmlBaseClassDiagram.h b/genplugouts/BrowserSort/UmlBaseClassDiagram.h index e0990d31f..a3f406b00 100644 --- a/genplugouts/BrowserSort/UmlBaseClassDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseClassDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlClassDiagram; class UmlClassView; @@ -26,7 +26,7 @@ class UmlBaseClassDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseClassDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseClassItem.cpp b/genplugouts/BrowserSort/UmlBaseClassItem.cpp index 345c1a18d..8babd321f 100644 --- a/genplugouts/BrowserSort/UmlBaseClassItem.cpp +++ b/genplugouts/BrowserSort/UmlBaseClassItem.cpp @@ -3,9 +3,9 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include #ifdef WITHCPP -const Q3CString & UmlBaseClassItem::cppDecl() +const QByteArray & UmlBaseClassItem::cppDecl() { read_if_needed_(); @@ -19,7 +19,7 @@ bool UmlBaseClassItem::set_CppDecl(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseClassItem::javaDecl() +const QByteArray & UmlBaseClassItem::javaDecl() { read_if_needed_(); @@ -33,7 +33,7 @@ bool UmlBaseClassItem::set_JavaDecl(const char * s) #endif #ifdef WITHIDL -const Q3CString & UmlBaseClassItem::idlDecl() +const QByteArray & UmlBaseClassItem::idlDecl() { read_if_needed_(); diff --git a/genplugouts/BrowserSort/UmlBaseClassItem.h b/genplugouts/BrowserSort/UmlBaseClassItem.h index 2569d9776..c5348dadc 100644 --- a/genplugouts/BrowserSort/UmlBaseClassItem.h +++ b/genplugouts/BrowserSort/UmlBaseClassItem.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + // Mother class of the all the class's items including the class themself class UmlBaseClassItem : public UmlItem @@ -12,7 +12,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHCPP // return the C++ declaration - const Q3CString & cppDecl(); + const QByteArray & cppDecl(); // to set the C++ declaration // @@ -23,7 +23,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHJAVA // return the Java defininition - const Q3CString & javaDecl(); + const QByteArray & javaDecl(); // to set the Java definition // @@ -34,7 +34,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHIDL // return the IDL declaration - const Q3CString & idlDecl(); + const QByteArray & idlDecl(); // set the IDL declaration // @@ -50,20 +50,20 @@ class UmlBaseClassItem : public UmlItem private: #ifdef WITHCPP - Q3CString _cpp_decl; + QByteArray _cpp_decl; #endif #ifdef WITHJAVA - Q3CString _java_decl; + QByteArray _java_decl; #endif #ifdef WITHIDL - Q3CString _idl_decl; + QByteArray _idl_decl; #endif protected: - UmlBaseClassItem(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseClassItem(void * id, const QByteArray & n) : UmlItem(id, n) {}; #ifdef WITHCPP //internal, do NOT use it diff --git a/genplugouts/BrowserSort/UmlBaseClassMember.cpp b/genplugouts/BrowserSort/UmlBaseClassMember.cpp index eafbf7355..ab0696da4 100644 --- a/genplugouts/BrowserSort/UmlBaseClassMember.cpp +++ b/genplugouts/BrowserSort/UmlBaseClassMember.cpp @@ -3,7 +3,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include bool UmlBaseClassMember::isClassMember() { read_if_needed_(); @@ -70,7 +70,7 @@ bool UmlBaseClassMember::set_CppVisibility(aVisibility v) #endif #ifdef WITHJAVA -Q3CString UmlBaseClassMember::javaAnnotations() +QByteArray UmlBaseClassMember::javaAnnotations() { read_if_needed_(); diff --git a/genplugouts/BrowserSort/UmlBaseClassMember.h b/genplugouts/BrowserSort/UmlBaseClassMember.h index 520bfe17a..0c7fcbb87 100644 --- a/genplugouts/BrowserSort/UmlBaseClassMember.h +++ b/genplugouts/BrowserSort/UmlBaseClassMember.h @@ -4,7 +4,7 @@ #include "UmlClassItem.h" #include "aVisibility.h" -#include + #include "UmlBaseClassItem.h" // This class manages 'true' class's items : attributes, relation, @@ -57,7 +57,7 @@ class UmlBaseClassMember : public UmlClassItem #ifdef WITHJAVA // returns the Java annotations - Q3CString javaAnnotations(); + QByteArray javaAnnotations(); // set the Java annotations // @@ -79,7 +79,7 @@ class UmlBaseClassMember : public UmlClassItem protected: - UmlBaseClassMember(void * id, const Q3CString & n) : UmlClassItem(id, n) {}; + UmlBaseClassMember(void * id, const QByteArray & n) : UmlClassItem(id, n) {}; //internal, do NOT use it @@ -102,7 +102,7 @@ class UmlBaseClassMember : public UmlClassItem private: #ifdef WITHJAVA - Q3CString _java_annotation; + QByteArray _java_annotation; #endif }; diff --git a/genplugouts/BrowserSort/UmlBaseClassView.h b/genplugouts/BrowserSort/UmlBaseClassView.h index 5687a666f..cec17090f 100644 --- a/genplugouts/BrowserSort/UmlBaseClassView.h +++ b/genplugouts/BrowserSort/UmlBaseClassView.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlClassView; class UmlPackage; @@ -44,7 +44,7 @@ class UmlBaseClassView : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassView(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseClassView(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseCollaborationDiagram.h b/genplugouts/BrowserSort/UmlBaseCollaborationDiagram.h index 0a49b41e6..39c8eb5db 100644 --- a/genplugouts/BrowserSort/UmlBaseCollaborationDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseCollaborationDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlCollaborationDiagram; class UmlItem; @@ -26,7 +26,7 @@ class UmlBaseCollaborationDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCollaborationDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseCollaborationDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseComponent.cpp b/genplugouts/BrowserSort/UmlBaseComponent.cpp index 0fe6d1aed..fa399b975 100644 --- a/genplugouts/BrowserSort/UmlBaseComponent.cpp +++ b/genplugouts/BrowserSort/UmlBaseComponent.cpp @@ -35,28 +35,28 @@ bool UmlBaseComponent::set_AssociatedDiagram(UmlComponentDiagram * d) return FALSE; } -const Q3PtrVector & UmlBaseComponent::realizedClasses() +const QVector & UmlBaseComponent::realizedClasses() { read_if_needed_(); return _realized; } -const Q3PtrVector & UmlBaseComponent::providedClasses() +const QVector & UmlBaseComponent::providedClasses() { read_if_needed_(); return _provided; } -const Q3PtrVector & UmlBaseComponent::requiredClasses() +const QVector & UmlBaseComponent::requiredClasses() { read_if_needed_(); return _required; } -bool UmlBaseComponent::set_AssociatedClasses(const Q3PtrVector & realized, const Q3PtrVector & provided, const Q3PtrVector & required) +bool UmlBaseComponent::set_AssociatedClasses(const QVector & realized, const QVector & provided, const QVector & required) { UmlCom::send_cmd(_identifier, setAssocClassesCmd, realized, provided, required); @@ -96,18 +96,18 @@ void UmlBaseComponent::read_uml_() _realized.resize(n); for (index = 0; index != n; index += 1) - _realized.insert(index, (UmlClass *) UmlBaseItem::read_()); + _realized[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _provided.resize(n); for (index = 0; index != n; index += 1) - _provided.insert(index, (UmlClass *) UmlBaseItem::read_()); + _provided[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _required.resize(n); for (index = 0; index != n; index += 1) - _required.insert(index, (UmlClass *) UmlBaseItem::read_()); + _required[index] = (UmlClass *) UmlBaseItem::read_(); } diff --git a/genplugouts/BrowserSort/UmlBaseComponent.h b/genplugouts/BrowserSort/UmlBaseComponent.h index 80f18c1e0..5d077c045 100644 --- a/genplugouts/BrowserSort/UmlBaseComponent.h +++ b/genplugouts/BrowserSort/UmlBaseComponent.h @@ -4,9 +4,9 @@ #include "UmlItem.h" #include "anItemKind.h" -#include -#include + + #include "UmlClass.h" // to avoid destructor problem class UmlComponent; @@ -37,18 +37,18 @@ class UmlBaseComponent : public UmlItem bool set_AssociatedDiagram(UmlComponentDiagram * d); // returns (in Java a copy of) the optional realized classes - const Q3PtrVector & realizedClasses(); + const QVector & realizedClasses(); // returns (in Java a copy of) the optional provided classes - const Q3PtrVector & providedClasses(); + const QVector & providedClasses(); // returns (in Java a copy of) the optional required classes - const Q3PtrVector & requiredClasses(); + const QVector & requiredClasses(); // set the realized, provided and required classes lists // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_AssociatedClasses(const Q3PtrVector & realized, const Q3PtrVector & provided, const Q3PtrVector & required); + bool set_AssociatedClasses(const QVector & realized, const QVector & provided, const QVector & required); // to unload the object to free memory, it will be reloaded // automatically if needed. args unused @@ -58,11 +58,11 @@ class UmlBaseComponent : public UmlItem private: UmlComponentDiagram * _assoc_diagram; - Q3PtrVector _realized; + QVector _realized; - Q3PtrVector _provided; + QVector _provided; - Q3PtrVector _required; + QVector _required; protected: @@ -71,11 +71,11 @@ class UmlBaseComponent : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponent(void * id, const Q3CString & n); + UmlBaseComponent(void * id, const QByteArray & n); }; -inline UmlBaseComponent::UmlBaseComponent(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseComponent::UmlBaseComponent(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/BrowserSort/UmlBaseComponentDiagram.h b/genplugouts/BrowserSort/UmlBaseComponentDiagram.h index 43466da7c..b235e0717 100644 --- a/genplugouts/BrowserSort/UmlBaseComponentDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseComponentDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlComponentDiagram; class UmlComponentView; @@ -26,7 +26,7 @@ class UmlBaseComponentDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponentDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseComponentDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseComponentView.h b/genplugouts/BrowserSort/UmlBaseComponentView.h index 0cb5c0769..a8ff514fb 100644 --- a/genplugouts/BrowserSort/UmlBaseComponentView.h +++ b/genplugouts/BrowserSort/UmlBaseComponentView.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlComponentView; class UmlPackage; @@ -26,7 +26,7 @@ class UmlBaseComponentView : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponentView(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseComponentView(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseDeepHistoryPseudoState.h b/genplugouts/BrowserSort/UmlBaseDeepHistoryPseudoState.h index 0ac36e22d..9224eb152 100644 --- a/genplugouts/BrowserSort/UmlBaseDeepHistoryPseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseDeepHistoryPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlDeepHistoryPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseDeepHistoryPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeepHistoryPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseDeepHistoryPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseDeployment.h b/genplugouts/BrowserSort/UmlBaseDeployment.h index b268e0c17..b16902170 100644 --- a/genplugouts/BrowserSort/UmlBaseDeployment.h +++ b/genplugouts/BrowserSort/UmlBaseDeployment.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + // Manage the deployments class UmlBaseDeployment : public UmlItem { protected: - UmlBaseDeployment(void * id, Q3CString n) : UmlItem(id, n) {}; + UmlBaseDeployment(void * id, QByteArray n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseDeploymentDiagram.h b/genplugouts/BrowserSort/UmlBaseDeploymentDiagram.h index 8f2aacbd5..db1cfc67d 100644 --- a/genplugouts/BrowserSort/UmlBaseDeploymentDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseDeploymentDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlDeploymentDiagram; class UmlDeploymentView; @@ -26,7 +26,7 @@ class UmlBaseDeploymentDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeploymentDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseDeploymentDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseDeploymentView.h b/genplugouts/BrowserSort/UmlBaseDeploymentView.h index 08c540330..df550cb1b 100644 --- a/genplugouts/BrowserSort/UmlBaseDeploymentView.h +++ b/genplugouts/BrowserSort/UmlBaseDeploymentView.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlDeploymentView; class UmlPackage; @@ -26,7 +26,7 @@ class UmlBaseDeploymentView : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeploymentView(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseDeploymentView(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseDiagram.cpp b/genplugouts/BrowserSort/UmlBaseDiagram.cpp index e1ceb269d..d0fb2d705 100644 --- a/genplugouts/BrowserSort/UmlBaseDiagram.cpp +++ b/genplugouts/BrowserSort/UmlBaseDiagram.cpp @@ -3,8 +3,8 @@ #include "UmlCom.h" //Added by qt3to4: -#include -bool UmlBaseDiagram::saveIn(const Q3CString & s) const +#include +bool UmlBaseDiagram::saveIn(const QByteArray & s) const { UmlCom::send_cmd(_identifier, saveInCmd, (const char *)s); //[rageek] Fix prototype return UmlCom::read_bool(); diff --git a/genplugouts/BrowserSort/UmlBaseDiagram.h b/genplugouts/BrowserSort/UmlBaseDiagram.h index 9cf05ff22..19e34654b 100644 --- a/genplugouts/BrowserSort/UmlBaseDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseDiagram.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + // Mother class of all the classes managing the diagrams class UmlBaseDiagram : public UmlItem @@ -18,12 +18,12 @@ class UmlBaseDiagram : public UmlItem // - else the default diagram aspect, which is probably not as you want // // On error return FALSE in C++, produce a RuntimeException in Java - bool saveIn(const Q3CString & s) const; + bool saveIn(const QByteArray & s) const; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDiagram(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseDiagram(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseEntryPointPseudoState.h b/genplugouts/BrowserSort/UmlBaseEntryPointPseudoState.h index dbfd3ef1a..60dd28bb0 100644 --- a/genplugouts/BrowserSort/UmlBaseEntryPointPseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseEntryPointPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlEntryPointPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseEntryPointPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseEntryPointPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseEntryPointPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseExitPointPseudoState.h b/genplugouts/BrowserSort/UmlBaseExitPointPseudoState.h index ff2ad12bc..29563f22b 100644 --- a/genplugouts/BrowserSort/UmlBaseExitPointPseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseExitPointPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlExitPointPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseExitPointPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExitPointPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseExitPointPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseExpansionNode.h b/genplugouts/BrowserSort/UmlBaseExpansionNode.h index 41bcbece2..6642afe1b 100644 --- a/genplugouts/BrowserSort/UmlBaseExpansionNode.h +++ b/genplugouts/BrowserSort/UmlBaseExpansionNode.h @@ -4,7 +4,7 @@ #include "UmlActivityObject.h" #include "anItemKind.h" -#include + class UmlExpansionNode; class UmlExpansionRegion; @@ -25,7 +25,7 @@ class UmlBaseExpansionNode : public UmlActivityObject protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExpansionNode(void * id, const Q3CString & s) : UmlActivityObject(id, s) { + UmlBaseExpansionNode(void * id, const QByteArray & s) : UmlActivityObject(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseExpansionRegion.h b/genplugouts/BrowserSort/UmlBaseExpansionRegion.h index 913b4ec4a..2ca1994ad 100644 --- a/genplugouts/BrowserSort/UmlBaseExpansionRegion.h +++ b/genplugouts/BrowserSort/UmlBaseExpansionRegion.h @@ -4,7 +4,7 @@ #include "UmlActivityRegion.h" #include "anItemKind.h" -#include + #include "anExpansionKind.h" class UmlExpansionRegion; @@ -26,7 +26,7 @@ class UmlBaseExpansionRegion : public UmlActivityRegion protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExpansionRegion(void * id, const Q3CString & s) : UmlActivityRegion(id, s) { + UmlBaseExpansionRegion(void * id, const QByteArray & s) : UmlActivityRegion(id, s) { } diff --git a/genplugouts/BrowserSort/UmlBaseExtraClassMember.cpp b/genplugouts/BrowserSort/UmlBaseExtraClassMember.cpp index 2bb66cd9e..2dd2228c3 100644 --- a/genplugouts/BrowserSort/UmlBaseExtraClassMember.cpp +++ b/genplugouts/BrowserSort/UmlBaseExtraClassMember.cpp @@ -5,7 +5,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlExtraClassMember * UmlBaseExtraClassMember::create(UmlClass * parent, const char * name) { return (UmlExtraClassMember *) parent->create_(anExtraClassMember, name); @@ -29,7 +29,7 @@ bool UmlBaseExtraClassMember::set_isCppInline(bool y) return set_it_(_cpp_inline, y, setIsCppInlineCmd); } -const Q3CString & UmlBaseExtraClassMember::cppDef() +const QByteArray & UmlBaseExtraClassMember::cppDef() { read_if_needed_(); diff --git a/genplugouts/BrowserSort/UmlBaseExtraClassMember.h b/genplugouts/BrowserSort/UmlBaseExtraClassMember.h index e2b9d4f30..4f07b5583 100644 --- a/genplugouts/BrowserSort/UmlBaseExtraClassMember.h +++ b/genplugouts/BrowserSort/UmlBaseExtraClassMember.h @@ -4,7 +4,7 @@ #include "UmlClassItem.h" #include "anItemKind.h" -#include + class UmlExtraClassMember; class UmlClass; @@ -37,7 +37,7 @@ class UmlBaseExtraClassMember : public UmlClassItem // returns the operation's definition in C++, notes that the declaration // is returned by the inherited ClassItemBase::CppDecl() operation - const Q3CString & cppDef(); + const QByteArray & cppDef(); // sets the operation's definition in C++, notes that the declaration // is set through the inherited ClassItemBase::set_CppDecl() operation @@ -56,12 +56,12 @@ class UmlBaseExtraClassMember : public UmlClassItem bool _cpp_inline; - Q3CString _cpp_def; + QByteArray _cpp_def; #endif protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExtraClassMember(void * id, const Q3CString & n) : UmlClassItem(id, n) {}; + UmlBaseExtraClassMember(void * id, const QByteArray & n) : UmlClassItem(id, n) {}; #ifdef WITHCPP //internal, do NOT use it diff --git a/genplugouts/BrowserSort/UmlBaseFinalState.h b/genplugouts/BrowserSort/UmlBaseFinalState.h index 16e0816cf..2fa133da6 100644 --- a/genplugouts/BrowserSort/UmlBaseFinalState.h +++ b/genplugouts/BrowserSort/UmlBaseFinalState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlFinalState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseFinalState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFinalState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseFinalState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseFlow.cpp b/genplugouts/BrowserSort/UmlBaseFlow.cpp index 5da07fbe8..b05e3eb62 100644 --- a/genplugouts/BrowserSort/UmlBaseFlow.cpp +++ b/genplugouts/BrowserSort/UmlBaseFlow.cpp @@ -4,7 +4,7 @@ #include "UmlFlow.h" #include "UmlActivityNode.h" //Added by qt3to4: -#include +#include anItemKind UmlBaseFlow::kind() { @@ -29,7 +29,7 @@ UmlActivityNode * UmlBaseFlow::target() return _target; } -const Q3CString & UmlBaseFlow::weight() +const QByteArray & UmlBaseFlow::weight() { read_if_needed_(); return _uml.weight; @@ -40,7 +40,7 @@ bool UmlBaseFlow::set_Weight(const char * v) return set_it_(_uml.weight, v, setUmlActivityCmd); } -const Q3CString & UmlBaseFlow::guard() +const QByteArray & UmlBaseFlow::guard() { read_if_needed_(); return _uml.guard; @@ -51,7 +51,7 @@ bool UmlBaseFlow::set_Guard(const char * v) return set_it_(_uml.guard, v, setUmlGuardCmd); } -const Q3CString & UmlBaseFlow::selection() +const QByteArray & UmlBaseFlow::selection() { read_if_needed_(); return _uml.selection; @@ -62,7 +62,7 @@ bool UmlBaseFlow::set_Selection(const char * v) return set_it_(_uml.selection, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::transformation() +const QByteArray & UmlBaseFlow::transformation() { read_if_needed_(); return _uml.transformation; @@ -74,7 +74,7 @@ bool UmlBaseFlow::set_Transformation(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseFlow::cppWeight() +const QByteArray & UmlBaseFlow::cppWeight() { read_if_needed_(); return _cpp.weight; @@ -85,7 +85,7 @@ bool UmlBaseFlow::set_CppWeight(const char * v) return set_it_(_cpp.weight, v, setCppActivityCmd); } -const Q3CString & UmlBaseFlow::cppGuard() +const QByteArray & UmlBaseFlow::cppGuard() { read_if_needed_(); return _cpp.guard; @@ -96,7 +96,7 @@ bool UmlBaseFlow::set_CppGuard(const char * v) return set_it_(_cpp.guard, v, setCppGuardCmd); } -const Q3CString & UmlBaseFlow::cppSelection() +const QByteArray & UmlBaseFlow::cppSelection() { read_if_needed_(); return _cpp.selection; @@ -107,7 +107,7 @@ bool UmlBaseFlow::set_CppSelection(const char * v) return set_it_(_cpp.selection, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::cppTransformation() +const QByteArray & UmlBaseFlow::cppTransformation() { read_if_needed_(); return _cpp.transformation; @@ -120,7 +120,7 @@ bool UmlBaseFlow::set_CppTransformation(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseFlow::javaWeight() +const QByteArray & UmlBaseFlow::javaWeight() { read_if_needed_(); return _java.weight; @@ -131,7 +131,7 @@ bool UmlBaseFlow::set_JavaWeight(const char * v) return set_it_(_java.weight, v, setJavaActivityCmd); } -const Q3CString & UmlBaseFlow::javaGuard() +const QByteArray & UmlBaseFlow::javaGuard() { read_if_needed_(); return _java.guard; @@ -142,7 +142,7 @@ bool UmlBaseFlow::set_JavaGuard(const char * v) return set_it_(_java.guard, v, setJavaGuardCmd); } -const Q3CString & UmlBaseFlow::javaSelection() +const QByteArray & UmlBaseFlow::javaSelection() { read_if_needed_(); return _java.selection; @@ -153,7 +153,7 @@ bool UmlBaseFlow::set_JavaSelection(const char * v) return set_it_(_java.selection, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::javaTransformation() +const QByteArray & UmlBaseFlow::javaTransformation() { read_if_needed_(); return _java.transformation; diff --git a/genplugouts/BrowserSort/UmlBaseFlow.h b/genplugouts/BrowserSort/UmlBaseFlow.h index b50ce3323..4edb40caf 100644 --- a/genplugouts/BrowserSort/UmlBaseFlow.h +++ b/genplugouts/BrowserSort/UmlBaseFlow.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "FlowBehavior.h" class UmlFlow; @@ -27,7 +27,7 @@ class UmlBaseFlow : public UmlItem virtual UmlActivityNode * target(); // return the weight in OCL - const Q3CString & weight(); + const QByteArray & weight(); // set the weight in OCL // @@ -35,7 +35,7 @@ class UmlBaseFlow : public UmlItem bool set_Weight(const char * v); // return the guard in OCL - const Q3CString & guard(); + const QByteArray & guard(); // set the guard in OCL // @@ -43,7 +43,7 @@ class UmlBaseFlow : public UmlItem bool set_Guard(const char * v); // return the selection in OCL - const Q3CString & selection(); + const QByteArray & selection(); // set the selection in OCL // @@ -51,7 +51,7 @@ class UmlBaseFlow : public UmlItem bool set_Selection(const char * v); // return the transformation in OCL - const Q3CString & transformation(); + const QByteArray & transformation(); // set the transformation in OCL // @@ -60,7 +60,7 @@ class UmlBaseFlow : public UmlItem #ifdef WITHCPP // return the weight in C++ - const Q3CString & cppWeight(); + const QByteArray & cppWeight(); // set the weight in C++ // @@ -68,7 +68,7 @@ class UmlBaseFlow : public UmlItem bool set_CppWeight(const char * v); // return the guard in C++ - const Q3CString & cppGuard(); + const QByteArray & cppGuard(); // set the guard in C++ // @@ -76,7 +76,7 @@ class UmlBaseFlow : public UmlItem bool set_CppGuard(const char * v); // return the selection in C++ - const Q3CString & cppSelection(); + const QByteArray & cppSelection(); // set the selection in C++ // @@ -84,7 +84,7 @@ class UmlBaseFlow : public UmlItem bool set_CppSelection(const char * v); // return the transformation in C++ - const Q3CString & cppTransformation(); + const QByteArray & cppTransformation(); // set the transformation in C++ // @@ -94,7 +94,7 @@ class UmlBaseFlow : public UmlItem #ifdef WITHJAVA // return the weight in Java - const Q3CString & javaWeight(); + const QByteArray & javaWeight(); // set the weight in Java // @@ -102,7 +102,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaWeight(const char * v); // return the guard in Java - const Q3CString & javaGuard(); + const QByteArray & javaGuard(); // set the guard in Java // @@ -110,7 +110,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaGuard(const char * v); // return the selection in Java - const Q3CString & javaSelection(); + const QByteArray & javaSelection(); // set the selection in Java // @@ -118,7 +118,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaSelection(const char * v); // return the transformation in Java - const Q3CString & javaTransformation(); + const QByteArray & javaTransformation(); // set the transformation in Java // @@ -161,7 +161,7 @@ class UmlBaseFlow : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFlow(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseFlow(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseForkPseudoState.h b/genplugouts/BrowserSort/UmlBaseForkPseudoState.h index 009499bfa..9dfa5025c 100644 --- a/genplugouts/BrowserSort/UmlBaseForkPseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseForkPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlForkPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseForkPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseForkPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseForkPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseFormalParameter.h b/genplugouts/BrowserSort/UmlBaseFormalParameter.h index 84867aec4..70b9e6d68 100644 --- a/genplugouts/BrowserSort/UmlBaseFormalParameter.h +++ b/genplugouts/BrowserSort/UmlBaseFormalParameter.h @@ -2,7 +2,7 @@ #define _UMLBASEFORMALPARAMETER_H -#include + #include "UmlTypeSpec.h" // This class manages 'formal parameters' of a template class. For instance 'T' in @@ -14,12 +14,12 @@ class UmlBaseFormalParameter UmlBaseFormalParameter() {}; // returns the name of the formal - const Q3CString & name() const { + const QByteArray & name() const { return _name; }; // returns the type of a formal, probably "class" - const Q3CString & type() const { + const QByteArray & type() const { return _type; }; @@ -35,10 +35,10 @@ class UmlBaseFormalParameter friend class UmlBaseClass; protected: - Q3CString _name; + QByteArray _name; // "class" ... - Q3CString _type; + QByteArray _type; UmlTypeSpec _default_value; diff --git a/genplugouts/BrowserSort/UmlBaseInitialPseudoState.h b/genplugouts/BrowserSort/UmlBaseInitialPseudoState.h index 88dae1cc6..2f31e4340 100644 --- a/genplugouts/BrowserSort/UmlBaseInitialPseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseInitialPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlInitialPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseInitialPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInitialPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseInitialPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseInterruptibleActivityRegion.h b/genplugouts/BrowserSort/UmlBaseInterruptibleActivityRegion.h index 70f988488..de6e56aed 100644 --- a/genplugouts/BrowserSort/UmlBaseInterruptibleActivityRegion.h +++ b/genplugouts/BrowserSort/UmlBaseInterruptibleActivityRegion.h @@ -4,7 +4,7 @@ #include "UmlActivityRegion.h" #include "anItemKind.h" -#include + class UmlInterruptibleActivityRegion; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseInterruptibleActivityRegion : public UmlActivityRegion protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInterruptibleActivityRegion(void * id, const Q3CString & s) : UmlActivityRegion(id, s) { + UmlBaseInterruptibleActivityRegion(void * id, const QByteArray & s) : UmlActivityRegion(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseItem.cpp b/genplugouts/BrowserSort/UmlBaseItem.cpp index 23699eca4..b67cb9122 100644 --- a/genplugouts/BrowserSort/UmlBaseItem.cpp +++ b/genplugouts/BrowserSort/UmlBaseItem.cpp @@ -56,33 +56,33 @@ #include "UmlActivityControlNodeClasses.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include +#include -bool UmlBaseItem::set_Name(const Q3CString & s) +bool UmlBaseItem::set_Name(const QByteArray & s) { return set_it_(_name, s, setNameCmd); } -const Q3CString & UmlBaseItem::stereotype() +const QByteArray & UmlBaseItem::stereotype() { read_if_needed_(); return _stereotype; } -bool UmlBaseItem::set_Stereotype(const Q3CString & s) +bool UmlBaseItem::set_Stereotype(const QByteArray & s) { return set_it_(_stereotype, s, setStereotypeCmd); } -const Q3CString & UmlBaseItem::description() +const QByteArray & UmlBaseItem::description() { read_if_needed_(); return _description; } -bool UmlBaseItem::set_Description(const Q3CString & s) +bool UmlBaseItem::set_Description(const QByteArray & s) { return set_it_(_description, s, setDescriptionCmd); } @@ -98,7 +98,7 @@ UmlItem * UmlBaseItem::parent() return _parent; } -const Q3PtrVector UmlBaseItem::children() +const QVector UmlBaseItem::children() { if (_children == 0) read_children_(); @@ -118,11 +118,11 @@ bool UmlBaseItem::set_childrenVisible(bool y) return UmlCom::read_bool(); } -bool UmlBaseItem::propertyValue(const Q3CString & k, Q3CString & v) +bool UmlBaseItem::propertyValue(const QByteArray & k, QByteArray & v) { read_if_needed_(); - Q3CString * s = _dict[k]; + QByteArray * s = _dict[k]; if (s == 0) return FALSE; @@ -132,7 +132,7 @@ bool UmlBaseItem::propertyValue(const Q3CString & k, Q3CString & v) } -bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) +bool UmlBaseItem::set_PropertyValue(const QByteArray & k, const QByteArray & v) { read_if_needed_(); @@ -140,10 +140,10 @@ bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) if (UmlCom::read_bool()) { if (_defined) { - Q3CString * s = _dict[k]; + QByteArray * s = _dict[k]; if (s == 0) - _dict.insert(k, new Q3CString(v)); + _dict.insert(k, new QByteArray(v)); else *s = v; } @@ -154,7 +154,7 @@ bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) return FALSE; } -const Q3Dict UmlBaseItem::properties() +const QHash UmlBaseItem::properties() { read_if_needed_(); @@ -163,8 +163,7 @@ const Q3Dict UmlBaseItem::properties() bool UmlBaseItem::moveAfter(const UmlItem * x) { - UmlCom::send_cmd(_identifier, moveAfterCmd, (x != 0) ? ((UmlBaseItem *)x)->_identifier : 0); - + UmlCom::send_cmd(_identifier, moveAfterCmd, x!=0?((UmlBaseItem *)x)->_identifier:0); if (UmlCom::read_bool()) { ((UmlBaseItem *)parent())->reread_children_if_needed_(); return TRUE; @@ -173,7 +172,7 @@ bool UmlBaseItem::moveAfter(const UmlItem * x) return FALSE; } -Q3CString UmlBaseItem::supportFile() +QByteArray UmlBaseItem::supportFile() { UmlCom::send_cmd(_identifier, supportFileCmd); return UmlCom::read_string(); @@ -185,7 +184,7 @@ bool UmlBaseItem::isWritable() return UmlCom::read_bool(); } -int UmlBaseItem::apply(Q3CString cmd) +int UmlBaseItem::apply(QByteArray cmd) { UmlCom::send_cmd(_identifier, applyCmd, (const char *)cmd); //[rageek] Fix prototype return (int) UmlCom::read_unsigned(); @@ -203,11 +202,11 @@ bool UmlBaseItem::set_isMarked(bool y) return set_it_(_marked, y, setMarkedCmd); } -const Q3PtrVector UmlBaseItem::referencedBy() +const QVector UmlBaseItem::referencedBy() { UmlCom::send_cmd(_identifier, referencedByCmd); - Q3PtrVector result; + QVector result; UmlCom::read_item_list(result); return result; @@ -222,7 +221,7 @@ void UmlBaseItem::unload(bool rec, bool del) if (_children != 0) { if (rec) { - for (unsigned chindex = 0; chindex != _children->size(); chindex += 1) { + for (int chindex = 0; chindex != _children->size(); chindex += 1) { _children->at(chindex)->unload(TRUE, del); if (del) @@ -241,17 +240,17 @@ bool UmlBaseItem::isToolRunning(int id) return UmlCom::read_bool(); } -const Q3PtrVector UmlBaseItem::markedItems() +const QVector UmlBaseItem::markedItems() { UmlCom::send_cmd(miscGlobalCmd, allMarkedCmd); - Q3PtrVector result; + QVector result; UmlCom::read_item_list(result); return result; } -Q3PtrDict UmlBaseItem::_all(997); +QHash UmlBaseItem::_all; void UmlBaseItem::read_if_needed_() { @@ -266,11 +265,11 @@ void UmlBaseItem::read_if_needed_() read_idl_(); # else ... WITHIDL must be defined when WITHCPP and WITHJAVA are both defined -# endif -# else + # endif + # else # ifdef WITHIDL ... WITHJAVA must be defined when WITHCPP and WITHIDL are both defined -# else + # else UmlCom::send_cmd(_identifier, getCppDefCmd); read_uml_(); read_cpp_(); @@ -280,7 +279,7 @@ void UmlBaseItem::read_if_needed_() # ifdef WITHJAVA # ifdef WITHIDL ... WITHCPP must be defined when WITHIDL and WITHJAVA are both defined -# else + # else UmlCom::send_cmd(_identifier, getJavaDefCmd); read_uml_(); read_java_(); @@ -328,9 +327,9 @@ void UmlBaseItem::read_uml_() unsigned n = UmlCom::read_unsigned(); while (n--) { - Q3CString k = UmlCom::read_string(); + QByteArray k = UmlCom::read_string(); - _dict.insert(k, new Q3CString(UmlCom::read_string())); + _dict.insert(k, new QByteArray(UmlCom::read_string())); } _description = UmlCom::read_string(); @@ -359,7 +358,7 @@ void UmlBaseItem::read_idl_() void UmlBaseItem::read_children_() { UmlCom::send_cmd(_identifier, childrenCmd); - _children = new Q3PtrVector; + _children = new QVector; UmlCom::read_item_list(*_children); @@ -413,7 +412,7 @@ bool UmlBaseItem::set_it_(aDirection & r, aDirection v, OnInstanceCmd cmd) return FALSE; } -bool UmlBaseItem::set_it_(Q3CString & r, const char * v, OnInstanceCmd cmd) +bool UmlBaseItem::set_it_(QByteArray & r, const char * v, OnInstanceCmd cmd) { UmlCom::send_cmd(_identifier, cmd, v); @@ -450,7 +449,7 @@ UmlItem * UmlBaseItem::read_() const char * name = UmlCom::read_string(); #ifndef WIN32 - //cout << "UmlBaseItem::read id " << id << " kind " << kind << " name " << name << '\n'; + //qDebug() << "UmlBaseItem::read id " << id << " kind " << kind << " name " << name << '\n'; #endif UmlItem * result = _all[id]; @@ -669,20 +668,20 @@ UmlItem * UmlBaseItem::read_() //return new UmlPartition(id, name); default: UmlCom::bye(); - UmlCom::fatal_error(Q3CString("unknown item type ") + Q3CString().setNum(kind)); + UmlCom::fatal_error(QByteArray("unknown item type ") + QByteArray().setNum(kind)); } } return result; } -UmlBaseItem::UmlBaseItem(void * id, const Q3CString & n) +UmlBaseItem::UmlBaseItem(void * id, const QByteArray & n) : _defined(FALSE), _identifier(id), _name(n), _parent(0), _children(0) { _all.insert(id, (UmlItem *) this); if (_all.count() / _all.size() > 10) - _all.resize(_all.size() * 2 - 1); + _all.reserve(_all.size() * 2 - 1); } UmlBaseItem::~UmlBaseItem() diff --git a/genplugouts/BrowserSort/UmlBaseItem.h b/genplugouts/BrowserSort/UmlBaseItem.h index 2b53bf114..ddeeb9d02 100644 --- a/genplugouts/BrowserSort/UmlBaseItem.h +++ b/genplugouts/BrowserSort/UmlBaseItem.h @@ -3,16 +3,11 @@ #include "anItemKind.h" -#include -#include - -#include -#include -//#include "OnInstanceCmd.h" #include "Tools/ApiCmd.h" #include "aVisibility.h" #include "aDirection.h" - +#include +#include class UmlItem; class UmlTypeSpec; @@ -39,35 +34,35 @@ class UmlBaseItem virtual anItemKind kind() = 0; // returns the name - const Q3CString & name() { + const QByteArray & name() { return _name; }; // to set the name // // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Name(const Q3CString & s); + virtual bool set_Name(const QByteArray & s); // returns the stereotype - const Q3CString & stereotype(); + const QByteArray & stereotype(); // to set the stereotype // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Stereotype(const Q3CString & s); + virtual bool set_Stereotype(const QByteArray & s); // returns the description - const Q3CString & description(); + const QByteArray & description(); // to set the description // On error return FALSE in C++, produce a RuntimeException in Java - bool set_Description(const Q3CString & s); + bool set_Description(const QByteArray & s); // returns the parent (0/null if it is applied on the project itself), // to go all over the browser tree UmlItem * parent(); // returns (in Java : a copy of) the children list, to go all over the browser tree - const Q3PtrVector children(); + const QVector children(); // return TRUE if the children exist and are visible (independently // of the scroll bar) in the browser, else FALSE @@ -92,16 +87,16 @@ class UmlBaseItem // // These properties may be edited through the object dialog last tab // named 'user' - bool propertyValue(const Q3CString & k, Q3CString & v); + bool propertyValue(const QByteArray & k, QByteArray & v); // to set (may be insert a new) the value 'v' associated to the key 'k' // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PropertyValue(const Q3CString & k, const Q3CString & v); + bool set_PropertyValue(const QByteArray & k, const QByteArray & v); // returns all the properties of the object through (in Java a copy of) a dictionnary - const Q3Dict properties(); + const QHash properties(); // If the parameter is null, move the current item to be // the first child of its parent. Else the current item and @@ -136,7 +131,7 @@ class UmlBaseItem // external type and edited through the last Idl tab of the // 'Generation Settings' dialog is saved in the file 'idl_includes' // - Q3CString supportFile(); + QByteArray supportFile(); // return TRUE in case the item may be modified, i.e. it is not // an API base 'plug-out' class and the corresponding file(s) are not @@ -144,7 +139,7 @@ class UmlBaseItem bool isWritable(); // Apply asynchronously the tool on the item, returns an identifier to call isToolDone() - int apply(Q3CString cmd); + int apply(QByteArray cmd); //return TRUE in case the item is marked bool isMarked(); @@ -157,7 +152,7 @@ class UmlBaseItem // The result may contains UmlAttribute, UmlRelations, UmlNcRelations, // UmlOperation (their bodies are not taken into account) , UmlClass // and UmlComponents. - const Q3PtrVector referencedBy(); + const QVector referencedBy(); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -170,7 +165,7 @@ class UmlBaseItem // 'id' is an identifier returned by apply(), indicates if the tool is still running static bool isToolRunning(int id); - static const Q3PtrVector markedItems(); + static const QVector markedItems(); friend class UmlBaseClassItem; friend class UmlBaseAttribute; @@ -206,23 +201,23 @@ class UmlBaseItem bool _marked; - void * _identifier; + void * _identifier = 0; - Q3CString _name; + QByteArray _name; // Note : protected in Java for internal reason, but do NOT // access to this field yourself ! - Q3CString _stereotype; + QByteArray _stereotype; - Q3CString _description; + QByteArray _description; UmlItem * _parent; - Q3PtrVector * _children; + QVector * _children; - Q3Dict _dict; + QHash _dict; - static Q3PtrDict _all; + static QHash _all; protected: @@ -278,7 +273,7 @@ class UmlBaseItem //internal, do NOT use it - bool set_it_(Q3CString & r, const char * v, OnInstanceCmd cmd); + bool set_it_(QByteArray & r, const char * v, OnInstanceCmd cmd); //internal, do NOT use it @@ -291,7 +286,7 @@ class UmlBaseItem public: // the constructor, do not call it yourself ! - UmlBaseItem(void * id, const Q3CString & n); + UmlBaseItem(void * id, const QByteArray & n); // the destructor, do not delete objects yourself !!!!!!!!!! virtual ~UmlBaseItem(); diff --git a/genplugouts/BrowserSort/UmlBaseJoinPseudoState.h b/genplugouts/BrowserSort/UmlBaseJoinPseudoState.h index 31976dfff..c95cfff9c 100644 --- a/genplugouts/BrowserSort/UmlBaseJoinPseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseJoinPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlJoinPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseJoinPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJoinPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseJoinPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseJunctionPseudoState.h b/genplugouts/BrowserSort/UmlBaseJunctionPseudoState.h index 9b76d88e7..96cdfe959 100644 --- a/genplugouts/BrowserSort/UmlBaseJunctionPseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseJunctionPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlJunctionPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseJunctionPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJunctionPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseJunctionPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseNcRelation.h b/genplugouts/BrowserSort/UmlBaseNcRelation.h index 7418e3406..0ad29c67b 100644 --- a/genplugouts/BrowserSort/UmlBaseNcRelation.h +++ b/genplugouts/BrowserSort/UmlBaseNcRelation.h @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "aRelationKind.h" #include "anItemKind.h" -#include + class UmlNcRelation; @@ -43,11 +43,11 @@ class UmlBaseNcRelation : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseNcRelation(void * id, const Q3CString & n); + UmlBaseNcRelation(void * id, const QByteArray & n); }; -inline UmlBaseNcRelation::UmlBaseNcRelation(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseNcRelation::UmlBaseNcRelation(void * id, const QByteArray & n) : UmlItem(id, n) { _target = 0; } diff --git a/genplugouts/BrowserSort/UmlBaseNode.h b/genplugouts/BrowserSort/UmlBaseNode.h index 07a980e66..208e951f2 100644 --- a/genplugouts/BrowserSort/UmlBaseNode.h +++ b/genplugouts/BrowserSort/UmlBaseNode.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlNode; class UmlDeploymentDiagram; @@ -38,7 +38,7 @@ class UmlBaseNode : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseNode(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseNode(void * id, const QByteArray & n) : UmlItem(id, n) {}; //internal, do NOT use it diff --git a/genplugouts/BrowserSort/UmlBaseObjectDiagram.h b/genplugouts/BrowserSort/UmlBaseObjectDiagram.h index dfe6983ef..720256a2d 100644 --- a/genplugouts/BrowserSort/UmlBaseObjectDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseObjectDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlObjectDiagram; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseObjectDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseObjectDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseObjectDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseOnSignalAction.cpp b/genplugouts/BrowserSort/UmlBaseOnSignalAction.cpp index 8c887e113..aec5db337 100644 --- a/genplugouts/BrowserSort/UmlBaseOnSignalAction.cpp +++ b/genplugouts/BrowserSort/UmlBaseOnSignalAction.cpp @@ -2,9 +2,9 @@ #include "UmlCom.h" #include "UmlBaseOnSignalAction.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlBaseOnSignalAction::signal() +const QByteArray & UmlBaseOnSignalAction::signal() { read_if_needed_(); return _signal; @@ -16,7 +16,7 @@ bool UmlBaseOnSignalAction::set_Signal(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseOnSignalAction::cppSignal() +const QByteArray & UmlBaseOnSignalAction::cppSignal() { read_if_needed_(); return _cpp_signal; @@ -29,7 +29,7 @@ bool UmlBaseOnSignalAction::set_CppSignal(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseOnSignalAction::javaSignal() +const QByteArray & UmlBaseOnSignalAction::javaSignal() { read_if_needed_(); return _java_signal; diff --git a/genplugouts/BrowserSort/UmlBaseOnSignalAction.h b/genplugouts/BrowserSort/UmlBaseOnSignalAction.h index 6ad499b79..0d648e38c 100644 --- a/genplugouts/BrowserSort/UmlBaseOnSignalAction.h +++ b/genplugouts/BrowserSort/UmlBaseOnSignalAction.h @@ -3,19 +3,19 @@ #include "UmlActivityAction.h" -#include + class UmlBaseOnSignalAction : public UmlActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOnSignalAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseOnSignalAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the signal - const Q3CString & signal(); + const QByteArray & signal(); // set the signal // @@ -24,7 +24,7 @@ class UmlBaseOnSignalAction : public UmlActivityAction #ifdef WITHCPP // return the signal in C++ - const Q3CString & cppSignal(); + const QByteArray & cppSignal(); // set the signal in C++ // @@ -34,7 +34,7 @@ class UmlBaseOnSignalAction : public UmlActivityAction #ifdef WITHJAVA // return the signal in Java - const Q3CString & javaSignal(); + const QByteArray & javaSignal(); // set the signal in Java // @@ -52,14 +52,14 @@ class UmlBaseOnSignalAction : public UmlActivityAction private: - Q3CString _signal; + QByteArray _signal; #ifdef WITHCPP - Q3CString _cpp_signal; + QByteArray _cpp_signal; #endif #ifdef WITHJAVA - Q3CString _java_signal; + QByteArray _java_signal; #endif diff --git a/genplugouts/BrowserSort/UmlBaseOperation.cpp b/genplugouts/BrowserSort/UmlBaseOperation.cpp index 26096f11c..cb0f4ff19 100644 --- a/genplugouts/BrowserSort/UmlBaseOperation.cpp +++ b/genplugouts/BrowserSort/UmlBaseOperation.cpp @@ -7,8 +7,8 @@ #include "UmlBaseClass.h" #include "UmlClassMember.h" //Added by qt3to4: -#include -#include +#include +#include UmlOperation * UmlBaseOperation::create(UmlClass * parent, const char * s) { return (UmlOperation *) parent->create_(anOperation, s); @@ -54,7 +54,7 @@ bool UmlBaseOperation::set_ReturnType(const UmlTypeSpec & t) return set_it_(_return_type, t, setReturnTypeCmd); } -const Q3ValueList UmlBaseOperation::params() +const QList UmlBaseOperation::params() { read_if_needed_(); @@ -68,7 +68,7 @@ bool UmlBaseOperation::addParameter(unsigned rank, const UmlParameter & p) if (UmlCom::read_bool()) { if (_defined) - _params.insert(_params.at(rank), p); + _params.insert(rank, p); return TRUE; } @@ -82,7 +82,9 @@ bool UmlBaseOperation::removeParameter(unsigned rank) if (UmlCom::read_bool()) { if (_defined) - _params.remove(_params.at(rank)); + { + _params.removeAt(rank); + } return TRUE; } @@ -105,7 +107,7 @@ bool UmlBaseOperation::replaceParameter(unsigned rank, const UmlParameter & p) return FALSE; } -const Q3ValueList UmlBaseOperation::exceptions() +const QList UmlBaseOperation::exceptions() { read_if_needed_(); @@ -118,7 +120,7 @@ bool UmlBaseOperation::addException(unsigned rank, const UmlTypeSpec & t) if (UmlCom::read_bool()) { if (_defined) - _exceptions.insert(_exceptions.at(rank), t); + _exceptions.insert(rank, t); return TRUE; } @@ -132,7 +134,9 @@ bool UmlBaseOperation::removeException(unsigned rank) if (UmlCom::read_bool()) { if (_defined) - _exceptions.remove(_exceptions.at(rank)); + { + _exceptions.removeAt(rank); + } return TRUE; } @@ -245,7 +249,7 @@ bool UmlBaseOperation::set_isCppInline(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::cppDef() +const QByteArray & UmlBaseOperation::cppDef() { read_if_needed_(); @@ -257,7 +261,7 @@ bool UmlBaseOperation::set_CppDef(const char * s) return set_it_(_cpp_def, s, setCppDefCmd); } -Q3CString UmlBaseOperation::cppBody() +QByteArray UmlBaseOperation::cppBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, cppBodyCmd); @@ -271,7 +275,7 @@ bool UmlBaseOperation::set_CppBody(const char * s) return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::cppNameSpec() +const QByteArray & UmlBaseOperation::cppNameSpec() { read_if_needed_(); @@ -323,7 +327,7 @@ bool UmlBaseOperation::set_isJavaSynchronized(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::javaDef() +const QByteArray & UmlBaseOperation::javaDef() { return javaDecl(); } @@ -333,7 +337,7 @@ bool UmlBaseOperation::set_JavaDef(const char * s) return set_JavaDecl(s); } -Q3CString UmlBaseOperation::javaBody() +QByteArray UmlBaseOperation::javaBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, javaBodyCmd); @@ -347,7 +351,7 @@ bool UmlBaseOperation::set_JavaBody(const char * s) return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::javaNameSpec() +const QByteArray & UmlBaseOperation::javaNameSpec() { read_if_needed_(); @@ -380,7 +384,7 @@ bool UmlBaseOperation::set_isIdlOneway(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::idlNameSpec() +const QByteArray & UmlBaseOperation::idlNameSpec() { read_if_needed_(); diff --git a/genplugouts/BrowserSort/UmlBaseOperation.h b/genplugouts/BrowserSort/UmlBaseOperation.h index a17e88a74..d4ce85ea5 100644 --- a/genplugouts/BrowserSort/UmlBaseOperation.h +++ b/genplugouts/BrowserSort/UmlBaseOperation.h @@ -5,8 +5,8 @@ #include "UmlClassMember.h" #include "anItemKind.h" #include "UmlTypeSpec.h" -#include -#include +#include + #include "UmlParameter.h" class UmlOperation; @@ -44,7 +44,7 @@ class UmlBaseOperation : public UmlClassMember bool set_ReturnType(const UmlTypeSpec & t); // returns (in java a copy of) the parameters list - const Q3ValueList params(); + const QList params(); // adds a parameter at the given rank (0...) // @@ -62,7 +62,7 @@ class UmlBaseOperation : public UmlClassMember bool replaceParameter(unsigned rank, const UmlParameter & p); // returns the exceptions - const Q3ValueList exceptions(); + const QList exceptions(); // adds the exception at the given rank (0...) // @@ -122,7 +122,7 @@ class UmlBaseOperation : public UmlClassMember // returns the operation's definition in C++, notes that the declaration // is returned by the inherited ClassItemBase::CppDecl() operation - const Q3CString & cppDef(); + const QByteArray & cppDef(); // sets the operation's definition in C++, notes that the declaration // is set through the inherited ClassItemBase::set_CppDecl() operation @@ -131,9 +131,9 @@ class UmlBaseOperation : public UmlClassMember bool set_CppDef(const char * s); // returns the operation's body in C++, useless if the def does not - // contains ${body}. Note that the body is get each time from BOUML + // contains ${body}. Note that the body is get each time from DOUML // for memory size reason - Q3CString cppBody(); + QByteArray cppBody(); // sets the operation's body in C++, useless if the def does not // contains ${body} @@ -143,7 +143,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's C++ name must be generated - const Q3CString & cppNameSpec(); + const QByteArray & cppNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's C++ name must be generated @@ -171,7 +171,7 @@ class UmlBaseOperation : public UmlClassMember // returns the operation's definition in Java, notes that it is // already made by the inherited JavaDecl operation - const Q3CString & javaDef(); + const QByteArray & javaDef(); // sets the operation's definition in Java, notes that it is // already made by the inherited set_JavaDecl operation @@ -180,9 +180,9 @@ class UmlBaseOperation : public UmlClassMember bool set_JavaDef(const char * s); // returns the operation's body in Java++, useless if the def does - // not contains ${body} Note that the body is get each time from BOUML + // not contains ${body} Note that the body is get each time from DOUML // for memory size reason - Q3CString javaBody(); + QByteArray javaBody(); // sets the operation's body in Java, useless if the def does not // contains ${body} @@ -192,7 +192,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's JAVA name must be generated - const Q3CString & javaNameSpec(); + const QByteArray & javaNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's JAVA name must be generated @@ -212,7 +212,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's IDL name must be generated - const Q3CString & idlNameSpec(); + const QByteArray & idlNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's IDL name must be generated @@ -254,22 +254,22 @@ class UmlBaseOperation : public UmlClassMember UmlTypeSpec _return_type; - Q3ValueList _params; + QList _params; - Q3ValueList _exceptions; + QList _exceptions; #ifdef WITHCPP - Q3CString _cpp_def; + QByteArray _cpp_def; - Q3CString _cpp_name_spec; + QByteArray _cpp_name_spec; #endif #ifdef WITHJAVA - Q3CString _java_name_spec; + QByteArray _java_name_spec; #endif #ifdef WITHIDL - Q3CString _idl_name_spec; + QByteArray _idl_name_spec; #endif // exclusive with set_of @@ -281,7 +281,7 @@ class UmlBaseOperation : public UmlClassMember protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOperation(void * id, const Q3CString & n); + UmlBaseOperation(void * id, const QByteArray & n); //internal, do NOT use it @@ -307,7 +307,7 @@ class UmlBaseOperation : public UmlClassMember }; -inline UmlBaseOperation::UmlBaseOperation(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseOperation::UmlBaseOperation(void * id, const QByteArray & n) : UmlClassMember(id, n) { _get_of = 0; _set_of = 0; diff --git a/genplugouts/BrowserSort/UmlBasePackage.cpp b/genplugouts/BrowserSort/UmlBasePackage.cpp index 5a07c0346..11a6b77ab 100644 --- a/genplugouts/BrowserSort/UmlBasePackage.cpp +++ b/genplugouts/BrowserSort/UmlBasePackage.cpp @@ -7,7 +7,7 @@ #include "Tools/ApiCmd.h" //#include "Tools/ApiCmd.h" //Added by qt3to4: -#include +#include UmlPackage * UmlBasePackage::create(UmlPackage * parent, const char * name) { return (UmlPackage *) parent->create_(aPackage, name); @@ -38,111 +38,111 @@ bool UmlBasePackage::set_AssociatedDiagram(UmlDiagram * d) } #ifdef WITHCPP -const Q3CString & UmlBasePackage::cppSrcDir() +const QByteArray & UmlBasePackage::cppSrcDir() { read_if_needed_(); return _cpp_src_dir; } -bool UmlBasePackage::set_CppSrcDir(const Q3CString & s) +bool UmlBasePackage::set_CppSrcDir(const QByteArray & s) { return set_it_(_cpp_src_dir, s, setCppSrcDirCmd); } -const Q3CString & UmlBasePackage::cppHDir() +const QByteArray & UmlBasePackage::cppHDir() { read_if_needed_(); return _cpp_h_dir; } -bool UmlBasePackage::set_CppHDir(const Q3CString & s) +bool UmlBasePackage::set_CppHDir(const QByteArray & s) { return set_it_(_cpp_h_dir, s, setCppHDirCmd); } -Q3CString UmlBasePackage::cppNamespace() +QByteArray UmlBasePackage::cppNamespace() { read_if_needed_(); return _cpp_namespace; } -bool UmlBasePackage::set_CppNamespace(const Q3CString & s) +bool UmlBasePackage::set_CppNamespace(const QByteArray & s) { return set_it_(_cpp_namespace, s, setCppNamespaceCmd); } -UmlPackage * UmlBasePackage::findNamespace(const Q3CString & n) const +UmlPackage * UmlBasePackage::findNamespace(const QByteArray & n) const { - UmlCom::send_cmd(packageGlobalCmd, findNamespaceCmd, _identifier, n); + UmlCom::send_cmd(packageGlobalCmd, findCppNamespaceCmd, _identifier, n); return (UmlPackage *) UmlBaseItem::read_(); } #endif #ifdef WITHJAVA -const Q3CString & UmlBasePackage::javaDir() +const QByteArray & UmlBasePackage::javaDir() { read_if_needed_(); return _java_dir; } -bool UmlBasePackage::set_JavaDir(const Q3CString & s) +bool UmlBasePackage::set_JavaDir(const QByteArray & s) { return set_it_(_java_dir, s, setJavaDirCmd); } -Q3CString UmlBasePackage::javaPackage() +QByteArray UmlBasePackage::javaPackage() { read_if_needed_(); return _java_package; } -bool UmlBasePackage::set_JavaPackage(const Q3CString & s) +bool UmlBasePackage::set_JavaPackage(const QByteArray & s) { return set_it_(_java_package, s, setJavaPackageCmd); } -UmlPackage * UmlBasePackage::findPackage(const Q3CString & n) const +UmlPackage * UmlBasePackage::findPackage(const QByteArray & n) const { - UmlCom::send_cmd(packageGlobalCmd, findPackageCmd, _identifier, n); + UmlCom::send_cmd(packageGlobalCmd, findJavaPackageCmd, _identifier, n); return (UmlPackage *) UmlBaseItem::read_(); } #endif #ifdef WITHIDL -const Q3CString & UmlBasePackage::idlDir() +const QByteArray & UmlBasePackage::idlDir() { read_if_needed_(); return _idl_dir; } -bool UmlBasePackage::set_IdlDir(const Q3CString & s) +bool UmlBasePackage::set_IdlDir(const QByteArray & s) { return set_it_(_idl_dir, s, setIdlDirCmd); } -Q3CString UmlBasePackage::idlModule() +QByteArray UmlBasePackage::idlModule() { read_if_needed_(); return _idl_module; } -bool UmlBasePackage::set_IdlModule(const Q3CString & s) +bool UmlBasePackage::set_IdlModule(const QByteArray & s) { return set_it_(_idl_module, s, setIdlModuleCmd); } -UmlPackage * UmlBasePackage::findModule(const Q3CString & n) const +UmlPackage * UmlBasePackage::findModule(const QByteArray & n) const { - UmlCom::send_cmd(packageGlobalCmd, findModuleCmd, _identifier, n); + UmlCom::send_cmd(packageGlobalCmd, findIdlModuleCmd, _identifier, n); return (UmlPackage *) UmlBaseItem::read_(); } @@ -167,7 +167,7 @@ void UmlBasePackage::saveProject() UmlCom::send_cmd(packageGlobalCmd, saveProjectCmd); } -void UmlBasePackage::loadProject(Q3CString p) +void UmlBasePackage::loadProject(QByteArray p) { UmlCom::send_cmd(miscGlobalCmd, loadCmd, (const char *) p); } diff --git a/genplugouts/BrowserSort/UmlBasePackage.h b/genplugouts/BrowserSort/UmlBasePackage.h index 25983d22b..914798364 100644 --- a/genplugouts/BrowserSort/UmlBasePackage.h +++ b/genplugouts/BrowserSort/UmlBasePackage.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlPackage; class UmlDiagram; @@ -34,87 +34,87 @@ class UmlBasePackage : public UmlItem #ifdef WITHCPP // returns the path where the C++ source files are generated by the // c++ generator. - const Q3CString & cppSrcDir(); + const QByteArray & cppSrcDir(); // to set the path where the C++ source files are generated by the // C++ generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppSrcDir(const Q3CString & s); + bool set_CppSrcDir(const QByteArray & s); // returns the path where the C++ header files are generated by the // C++ generator. - const Q3CString & cppHDir(); + const QByteArray & cppHDir(); // to set the path where the C++ header files are generated by the // C++ generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppHDir(const Q3CString & s); + bool set_CppHDir(const QByteArray & s); //returns the namespace name associed to the package - Q3CString cppNamespace(); + QByteArray cppNamespace(); //to set the namespace name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppNamespace(const Q3CString & s); + bool set_CppNamespace(const QByteArray & s); // returns a sub package of the current one having the c++ namespace 'n' // (including the current one), else 0/null - UmlPackage * findNamespace(const Q3CString & n) const; + UmlPackage * findNamespace(const QByteArray & n) const; #endif #ifdef WITHJAVA // returns the path where the JAVA files are generated by the // JAVA generator. - const Q3CString & javaDir(); + const QByteArray & javaDir(); // to set the path where the JAVA files are generated by the // JAVA generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaDir(const Q3CString & s); + bool set_JavaDir(const QByteArray & s); //returns the java package name associed to the package - Q3CString javaPackage(); + QByteArray javaPackage(); // to set the java package name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaPackage(const Q3CString & s); + bool set_JavaPackage(const QByteArray & s); // returns a sub package of the current one having the Java package 'n' // (including the current one), else 0/null - UmlPackage * findPackage(const Q3CString & n) const; + UmlPackage * findPackage(const QByteArray & n) const; #endif #ifdef WITHIDL // returns the path where the IDL files are generated by the // IDL generator. - const Q3CString & idlDir(); + const QByteArray & idlDir(); // to set the path where the IDL files are generated by the // IDL generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlDir(const Q3CString & s); + bool set_IdlDir(const QByteArray & s); //returns the module name associed to the package - Q3CString idlModule(); + QByteArray idlModule(); // to set the module name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlModule(const Q3CString & s); + bool set_IdlModule(const QByteArray & s); // returns a sub package of the current one having the IDL module 'n' // (including the current one), else 0/null - UmlPackage * findModule(const Q3CString & n) const; + UmlPackage * findModule(const QByteArray & n) const; #endif // Returns the project @@ -127,12 +127,12 @@ class UmlBasePackage : public UmlItem //save the project if needed static void saveProject(); - //Does nothing in case an edition is on going under BOUML. Else : + //Does nothing in case an edition is on going under DOUML. Else : //close the current project (in case it is not saved the last modifications are lost), //load the specified one, and all the communications with the plug-outs including the //current one are closed. - static void loadProject(Q3CString p); + static void loadProject(QByteArray p); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -147,25 +147,25 @@ class UmlBasePackage : public UmlItem UmlDiagram * _assoc_diagram; #ifdef WITHCPP - Q3CString _cpp_src_dir; + QByteArray _cpp_src_dir; - Q3CString _cpp_h_dir; + QByteArray _cpp_h_dir; - Q3CString _cpp_namespace; + QByteArray _cpp_namespace; #endif #ifdef WITHJAVA - Q3CString _java_dir; + QByteArray _java_dir; - Q3CString _java_package; + QByteArray _java_package; #endif #ifdef WITHIDL - Q3CString _idl_dir; + QByteArray _idl_dir; - Q3CString _idl_module; + QByteArray _idl_module; #endif @@ -194,11 +194,11 @@ class UmlBasePackage : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBasePackage(void * id, const Q3CString & n); + UmlBasePackage(void * id, const QByteArray & n); }; -inline UmlBasePackage::UmlBasePackage(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBasePackage::UmlBasePackage(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/BrowserSort/UmlBaseParameterSet.cpp b/genplugouts/BrowserSort/UmlBaseParameterSet.cpp index 307417d45..2c680249f 100644 --- a/genplugouts/BrowserSort/UmlBaseParameterSet.cpp +++ b/genplugouts/BrowserSort/UmlBaseParameterSet.cpp @@ -15,15 +15,15 @@ anItemKind UmlBaseParameterSet::kind() return aParameterSet; } -const Q3PtrVector & UmlBaseParameterSet::pins() +const QVector & UmlBaseParameterSet::pins() { read_if_needed_(); return _pins; } -bool UmlBaseParameterSet::set_Pins(const Q3PtrVector & v) +bool UmlBaseParameterSet::set_Pins(const QVector & v) { - UmlCom::send_cmd(_identifier, replaceParameterCmd, (const Q3PtrVector &) v); + UmlCom::send_cmd(_identifier, replaceParameterCmd, (const QVector &) v); if (UmlCom::read_bool()) { if (_defined) _pins = v; @@ -43,6 +43,6 @@ void UmlBaseParameterSet::unload(bool rec, bool del) void UmlBaseParameterSet::read_uml_() { UmlBaseItem::read_uml_(); - UmlCom::read_item_list((Q3PtrVector &) _pins); + UmlCom::read_item_list((QVector &) _pins); } diff --git a/genplugouts/BrowserSort/UmlBaseParameterSet.h b/genplugouts/BrowserSort/UmlBaseParameterSet.h index 21ad661b0..5e4f93f66 100644 --- a/genplugouts/BrowserSort/UmlBaseParameterSet.h +++ b/genplugouts/BrowserSort/UmlBaseParameterSet.h @@ -1,11 +1,11 @@ #ifndef _UMLBASEPARAMETERSET_H #define _UMLBASEPARAMETERSET_H - +#include #include "UmlItem.h" #include "anItemKind.h" -#include -#include + + class UmlActivityParameter; @@ -28,16 +28,16 @@ class UmlBaseParameterSet : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseParameterSet(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseParameterSet(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the pins part of the parameter set - const Q3PtrVector & pins(); + const QVector & pins(); // set the pins - bool set_Pins(const Q3PtrVector & v); + bool set_Pins(const QVector & v); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -49,7 +49,7 @@ class UmlBaseParameterSet : public UmlItem private: - Q3PtrVector _pins; + QVector _pins; protected: diff --git a/genplugouts/BrowserSort/UmlBasePinParameter.h b/genplugouts/BrowserSort/UmlBasePinParameter.h index 77cc462eb..898abf523 100644 --- a/genplugouts/BrowserSort/UmlBasePinParameter.h +++ b/genplugouts/BrowserSort/UmlBasePinParameter.h @@ -3,7 +3,7 @@ #include "UmlActivityObject.h" -#include + #include "aDirection.h" #include "aParameterEffectKind.h" @@ -11,7 +11,7 @@ class UmlBasePinParameter : public UmlActivityObject { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBasePinParameter(void * id, const Q3CString & s) : UmlActivityObject(id, s) { + UmlBasePinParameter(void * id, const QByteArray & s) : UmlActivityObject(id, s) { } diff --git a/genplugouts/BrowserSort/UmlBaseRegion.h b/genplugouts/BrowserSort/UmlBaseRegion.h index 58a9f8b78..efd32acb9 100644 --- a/genplugouts/BrowserSort/UmlBaseRegion.h +++ b/genplugouts/BrowserSort/UmlBaseRegion.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlRegion; class UmlState; @@ -25,7 +25,7 @@ class UmlBaseRegion : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRegion(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseRegion(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseRelation.cpp b/genplugouts/BrowserSort/UmlBaseRelation.cpp index d635eaa27..4ad62f168 100644 --- a/genplugouts/BrowserSort/UmlBaseRelation.cpp +++ b/genplugouts/BrowserSort/UmlBaseRelation.cpp @@ -7,7 +7,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlRelation * UmlBaseRelation::create(aRelationKind kind, UmlClass * start, UmlClass * end) { UmlCom::send_cmd(start->_identifier, createCmd, aRelation, @@ -70,7 +70,7 @@ bool UmlBaseRelation::set_isReadOnly(bool y) return set_it_(_read_only, y, setIsReadOnlyCmd); } -const Q3CString & UmlBaseRelation::defaultValue() +const QByteArray & UmlBaseRelation::defaultValue() { read_if_needed_(); @@ -82,7 +82,7 @@ bool UmlBaseRelation::set_DefaultValue(const char * s) return set_it_(_default_value, s, setDefaultValueCmd); } -bool UmlBaseRelation::set_Stereotype(const Q3CString & s) +bool UmlBaseRelation::set_Stereotype(const QByteArray & s) { if (UmlBaseItem::set_Stereotype(s)) { UmlBaseRelation * other = (UmlBaseRelation *) UmlBaseItem::read_(); @@ -124,7 +124,7 @@ bool UmlBaseRelation::set_Association(const UmlTypeSpec & t) return FALSE; } -const Q3CString & UmlBaseRelation::roleName() +const QByteArray & UmlBaseRelation::roleName() { read_if_needed_(); @@ -136,7 +136,7 @@ bool UmlBaseRelation::set_RoleName(const char * s) return set_it_(_role_name, s, setRoleNameCmd); } -const Q3CString & UmlBaseRelation::multiplicity() +const QByteArray & UmlBaseRelation::multiplicity() { read_if_needed_(); @@ -268,7 +268,7 @@ bool UmlBaseRelation::set_isIdlTruncatableInheritance(bool y) return FALSE; } -Q3CString UmlBaseRelation::idlCase() +QByteArray UmlBaseRelation::idlCase() { read_if_needed_(); diff --git a/genplugouts/BrowserSort/UmlBaseRelation.h b/genplugouts/BrowserSort/UmlBaseRelation.h index ce0fd509a..a9a65090c 100644 --- a/genplugouts/BrowserSort/UmlBaseRelation.h +++ b/genplugouts/BrowserSort/UmlBaseRelation.h @@ -5,7 +5,7 @@ #include "UmlClassMember.h" #include "aRelationKind.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" class UmlRelation; @@ -44,7 +44,7 @@ class UmlBaseRelation : public UmlClassMember bool set_isReadOnly(bool y); // returns the default relation value, may be an empty string - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // to set the default relation value ("" allowed) // @@ -56,7 +56,7 @@ class UmlBaseRelation : public UmlClassMember // On error return FALSE in C++, produce a RuntimeException in Java // redefined in case the relation is bidirectional to set the stereotype // of the relation corresponding to the other direction - virtual bool set_Stereotype(const Q3CString & s); + virtual bool set_Stereotype(const QByteArray & s); // returns the 'end' class (the 'start' class is the parent of the relation) no set ! UmlClass * roleType(); @@ -70,7 +70,7 @@ class UmlBaseRelation : public UmlClassMember bool set_Association(const UmlTypeSpec & t); // returns the name of the role - const Q3CString & roleName(); + const QByteArray & roleName(); // to set the name of the role // @@ -78,7 +78,7 @@ class UmlBaseRelation : public UmlClassMember bool set_RoleName(const char * s); // returns the multiplicity (may be an empty string) - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // to set the multiplicity // @@ -141,7 +141,7 @@ class UmlBaseRelation : public UmlClassMember // in case the relation is an IDL union's member returns the // corresponding 'case', an empty string in case it is not specified - Q3CString idlCase(); + QByteArray idlCase(); // to set the 'case' even the relation is not (already) known as // an IDL union's member @@ -180,13 +180,13 @@ class UmlBaseRelation : public UmlClassMember aRelationKind _rel_kind : 8; - Q3CString _default_value; + QByteArray _default_value; UmlClass * _role_type; - Q3CString _role_name; + QByteArray _role_name; - Q3CString _multiplicity; + QByteArray _multiplicity; UmlTypeSpec _association; @@ -198,7 +198,7 @@ class UmlBaseRelation : public UmlClassMember UmlAttribute * _idl_case; #ifdef WITHIDL - Q3CString _idl_explicit_case; + QByteArray _idl_explicit_case; #endif @@ -226,11 +226,11 @@ class UmlBaseRelation : public UmlClassMember #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRelation(void * id, const Q3CString & n); + UmlBaseRelation(void * id, const QByteArray & n); }; -inline UmlBaseRelation::UmlBaseRelation(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseRelation::UmlBaseRelation(void * id, const QByteArray & n) : UmlClassMember(id, n) { _role_type = 0; _get_oper = 0; diff --git a/genplugouts/BrowserSort/UmlBaseSequenceDiagram.h b/genplugouts/BrowserSort/UmlBaseSequenceDiagram.h index 2025fab49..b2e83e1af 100644 --- a/genplugouts/BrowserSort/UmlBaseSequenceDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseSequenceDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlSequenceDiagram; class UmlItem; @@ -26,7 +26,7 @@ class UmlBaseSequenceDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSequenceDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseSequenceDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseShallowHistoryPseudoState.h b/genplugouts/BrowserSort/UmlBaseShallowHistoryPseudoState.h index 92bf0ce18..cb82c3ec1 100644 --- a/genplugouts/BrowserSort/UmlBaseShallowHistoryPseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseShallowHistoryPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlShallowHistoryPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseShallowHistoryPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseShallowHistoryPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseShallowHistoryPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseState.cpp b/genplugouts/BrowserSort/UmlBaseState.cpp index c47523cff..05370f44f 100644 --- a/genplugouts/BrowserSort/UmlBaseState.cpp +++ b/genplugouts/BrowserSort/UmlBaseState.cpp @@ -4,7 +4,7 @@ #include "UmlState.h" #include "UmlStateDiagram.h" //Added by qt3to4: -#include +#include UmlState * UmlBaseState::create(UmlItem * parent, const char * s) { @@ -16,7 +16,7 @@ anItemKind UmlBaseState::kind() return aState; } -const Q3CString & UmlBaseState::entryBehavior() +const QByteArray & UmlBaseState::entryBehavior() { read_if_needed_(); return _uml.on_entry; @@ -27,7 +27,7 @@ bool UmlBaseState::set_EntryBehavior(const char * s) return set_it_(_uml.on_entry, s, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseState::exitBehavior() +const QByteArray & UmlBaseState::exitBehavior() { read_if_needed_(); return _uml.on_exit; @@ -38,7 +38,7 @@ bool UmlBaseState::set_ExitBehavior(const char * s) return set_it_(_uml.on_exit, s, setUmlExitBehaviorCmd); } -const Q3CString & UmlBaseState::doActivity() +const QByteArray & UmlBaseState::doActivity() { read_if_needed_(); return _uml.do_activity; @@ -50,7 +50,7 @@ bool UmlBaseState::set_DoActivity(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseState::cppEntryBehavior() +const QByteArray & UmlBaseState::cppEntryBehavior() { read_if_needed_(); return _cpp.on_entry; @@ -61,7 +61,7 @@ bool UmlBaseState::set_CppEntryBehavior(const char * s) return set_it_(_cpp.on_entry, s, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseState::cppExitBehavior() +const QByteArray & UmlBaseState::cppExitBehavior() { read_if_needed_(); return _cpp.on_exit; @@ -72,7 +72,7 @@ bool UmlBaseState::set_CppExitBehavior(const char * s) return set_it_(_cpp.on_exit, s, setCppExitBehaviorCmd); } -const Q3CString & UmlBaseState::cppDoActivity() +const QByteArray & UmlBaseState::cppDoActivity() { read_if_needed_(); return _cpp.do_activity; @@ -85,7 +85,7 @@ bool UmlBaseState::set_CppDoActivity(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseState::javaEntryBehavior() +const QByteArray & UmlBaseState::javaEntryBehavior() { read_if_needed_(); return _java.on_entry; @@ -96,7 +96,7 @@ bool UmlBaseState::set_JavaEntryBehavior(const char * s) return set_it_(_java.on_entry, s, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseState::javaExitBehavior() +const QByteArray & UmlBaseState::javaExitBehavior() { read_if_needed_(); return _java.on_exit; @@ -107,7 +107,7 @@ bool UmlBaseState::set_JavaExitBehavior(const char * s) return set_it_(_java.on_exit, s, setJavaExitBehaviorCmd); } -const Q3CString & UmlBaseState::javaDoActivity() +const QByteArray & UmlBaseState::javaDoActivity() { read_if_needed_(); return _java.do_activity; diff --git a/genplugouts/BrowserSort/UmlBaseState.h b/genplugouts/BrowserSort/UmlBaseState.h index efc98a1af..bb578e0ab 100644 --- a/genplugouts/BrowserSort/UmlBaseState.h +++ b/genplugouts/BrowserSort/UmlBaseState.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "StateBehavior.h" class UmlState; @@ -26,13 +26,13 @@ class UmlBaseState : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseState(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseState(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the entry behavior in OCL - const Q3CString & entryBehavior(); + const QByteArray & entryBehavior(); // set the entry behavior in OCL // @@ -40,7 +40,7 @@ class UmlBaseState : public UmlItem bool set_EntryBehavior(const char * s); // return the exit behavior in OCL - const Q3CString & exitBehavior(); + const QByteArray & exitBehavior(); // set the exit behavior in OCL // @@ -48,7 +48,7 @@ class UmlBaseState : public UmlItem bool set_ExitBehavior(const char * s); // return the activity in OCL - const Q3CString & doActivity(); + const QByteArray & doActivity(); // set the activity in OCL // @@ -57,7 +57,7 @@ class UmlBaseState : public UmlItem #ifdef WITHCPP // return the entry behavior in C++ - const Q3CString & cppEntryBehavior(); + const QByteArray & cppEntryBehavior(); // set the entry behavior in C++ // @@ -65,7 +65,7 @@ class UmlBaseState : public UmlItem bool set_CppEntryBehavior(const char * s); // return the exit behavior in C++ - const Q3CString & cppExitBehavior(); + const QByteArray & cppExitBehavior(); // set the exit behavior in C++ // @@ -73,7 +73,7 @@ class UmlBaseState : public UmlItem bool set_CppExitBehavior(const char * s); // return the activity in C++ - const Q3CString & cppDoActivity(); + const QByteArray & cppDoActivity(); // set the activity in C++ // @@ -83,7 +83,7 @@ class UmlBaseState : public UmlItem #ifdef WITHJAVA // return the entry behavior in Java - const Q3CString & javaEntryBehavior(); + const QByteArray & javaEntryBehavior(); // set the entry behavior in Java // @@ -91,7 +91,7 @@ class UmlBaseState : public UmlItem bool set_JavaEntryBehavior(const char * s); // return the exit behavior in Java - const Q3CString & javaExitBehavior(); + const QByteArray & javaExitBehavior(); // set the exit behavior in Java // @@ -99,7 +99,7 @@ class UmlBaseState : public UmlItem bool set_JavaExitBehavior(const char * s); // return the activity in Java - const Q3CString & javaDoActivity(); + const QByteArray & javaDoActivity(); // set the activity in Java // diff --git a/genplugouts/BrowserSort/UmlBaseStateAction.cpp b/genplugouts/BrowserSort/UmlBaseStateAction.cpp index 1f080b00e..1879387b9 100644 --- a/genplugouts/BrowserSort/UmlBaseStateAction.cpp +++ b/genplugouts/BrowserSort/UmlBaseStateAction.cpp @@ -4,7 +4,7 @@ #include "UmlStateAction.h" #include "UmlState.h" //Added by qt3to4: -#include +#include UmlStateAction * UmlBaseStateAction::create(UmlState * parent) { @@ -16,7 +16,7 @@ anItemKind UmlBaseStateAction::kind() return aStateAction; } -const Q3CString & UmlBaseStateAction::expression() +const QByteArray & UmlBaseStateAction::expression() { read_if_needed_(); return _uml; @@ -28,7 +28,7 @@ bool UmlBaseStateAction::set_Expression(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseStateAction::cppExpression() +const QByteArray & UmlBaseStateAction::cppExpression() { read_if_needed_(); return _cpp; @@ -41,7 +41,7 @@ bool UmlBaseStateAction::set_CppExpression(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseStateAction::javaExpression() +const QByteArray & UmlBaseStateAction::javaExpression() { read_if_needed_(); return _java; diff --git a/genplugouts/BrowserSort/UmlBaseStateAction.h b/genplugouts/BrowserSort/UmlBaseStateAction.h index 0432258b3..9c74adf3f 100644 --- a/genplugouts/BrowserSort/UmlBaseStateAction.h +++ b/genplugouts/BrowserSort/UmlBaseStateAction.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlStateAction; class UmlState; @@ -25,13 +25,13 @@ class UmlBaseStateAction : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseStateAction(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseStateAction(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the expression in OCL - const Q3CString & expression(); + const QByteArray & expression(); // set the expression in OCL // @@ -40,7 +40,7 @@ class UmlBaseStateAction : public UmlItem #ifdef WITHCPP // return the expression in C++ - const Q3CString & cppExpression(); + const QByteArray & cppExpression(); // set the expression in C++ // @@ -50,7 +50,7 @@ class UmlBaseStateAction : public UmlItem #ifdef WITHJAVA // return the expression in Java - const Q3CString & javaExpression(); + const QByteArray & javaExpression(); // set the expression in Java // @@ -68,14 +68,14 @@ class UmlBaseStateAction : public UmlItem private: - Q3CString _uml; + QByteArray _uml; #ifdef WITHCPP - Q3CString _cpp; + QByteArray _cpp; #endif #ifdef WITHJAVA - Q3CString _java; + QByteArray _java; #endif diff --git a/genplugouts/BrowserSort/UmlBaseStateDiagram.h b/genplugouts/BrowserSort/UmlBaseStateDiagram.h index ea7e37ee0..d3c5bd101 100644 --- a/genplugouts/BrowserSort/UmlBaseStateDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseStateDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlStateDiagram; class UmlState; @@ -25,7 +25,7 @@ class UmlBaseStateDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseStateDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseStateDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseTerminatePseudoState.h b/genplugouts/BrowserSort/UmlBaseTerminatePseudoState.h index e8553f4be..5328f4055 100644 --- a/genplugouts/BrowserSort/UmlBaseTerminatePseudoState.h +++ b/genplugouts/BrowserSort/UmlBaseTerminatePseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlTerminatePseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseTerminatePseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseTerminatePseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseTerminatePseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseTransition.cpp b/genplugouts/BrowserSort/UmlBaseTransition.cpp index 3516921f8..f9dd2341f 100644 --- a/genplugouts/BrowserSort/UmlBaseTransition.cpp +++ b/genplugouts/BrowserSort/UmlBaseTransition.cpp @@ -3,7 +3,7 @@ #include "UmlBaseTransition.h" #include "UmlTransition.h" //Added by qt3to4: -#include +#include anItemKind UmlBaseTransition::kind() { @@ -28,7 +28,7 @@ UmlItem * UmlBaseTransition::target() return _target; } -const Q3CString & UmlBaseTransition::trigger() +const QByteArray & UmlBaseTransition::trigger() { read_if_needed_(); return _uml.trigger; @@ -39,7 +39,7 @@ bool UmlBaseTransition::set_Trigger(const char * s) return set_it_(_uml.trigger, s, setUmlTriggerCmd); } -const Q3CString & UmlBaseTransition::guard() +const QByteArray & UmlBaseTransition::guard() { read_if_needed_(); return _uml.guard; @@ -50,7 +50,7 @@ bool UmlBaseTransition::set_Guard(const char * s) return set_it_(_uml.guard, s, setUmlGuardCmd); } -const Q3CString & UmlBaseTransition::activity() +const QByteArray & UmlBaseTransition::activity() { read_if_needed_(); return _uml.activity; @@ -62,7 +62,7 @@ bool UmlBaseTransition::set_Activity(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseTransition::cppTrigger() +const QByteArray & UmlBaseTransition::cppTrigger() { read_if_needed_(); return _cpp.trigger; @@ -73,7 +73,7 @@ bool UmlBaseTransition::set_CppTrigger(const char * s) return set_it_(_cpp.trigger, s, setCppTriggerCmd); } -const Q3CString & UmlBaseTransition::cppGuard() +const QByteArray & UmlBaseTransition::cppGuard() { read_if_needed_(); return _cpp.guard; @@ -84,7 +84,7 @@ bool UmlBaseTransition::set_CppGuard(const char * s) return set_it_(_cpp.guard, s, setCppGuardCmd); } -const Q3CString & UmlBaseTransition::cppActivity() +const QByteArray & UmlBaseTransition::cppActivity() { read_if_needed_(); return _cpp.activity; @@ -97,7 +97,7 @@ bool UmlBaseTransition::set_CppActivity(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseTransition::javaTrigger() +const QByteArray & UmlBaseTransition::javaTrigger() { read_if_needed_(); return _java.trigger; @@ -108,7 +108,7 @@ bool UmlBaseTransition::set_JavaTrigger(const char * s) return set_it_(_java.trigger, s, setJavaTriggerCmd); } -const Q3CString & UmlBaseTransition::javaGuard() +const QByteArray & UmlBaseTransition::javaGuard() { read_if_needed_(); return _java.guard; @@ -119,7 +119,7 @@ bool UmlBaseTransition::set_JavaGuard(const char * s) return set_it_(_java.guard, s, setJavaGuardCmd); } -const Q3CString & UmlBaseTransition::javaActivity() +const QByteArray & UmlBaseTransition::javaActivity() { read_if_needed_(); return _java.activity; diff --git a/genplugouts/BrowserSort/UmlBaseTransition.h b/genplugouts/BrowserSort/UmlBaseTransition.h index bb98f97d1..f72122ca5 100644 --- a/genplugouts/BrowserSort/UmlBaseTransition.h +++ b/genplugouts/BrowserSort/UmlBaseTransition.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "TransitionBehavior.h" class UmlTransition; @@ -26,7 +26,7 @@ class UmlBaseTransition : public UmlItem virtual UmlItem * target(); // return the trigger in OCL - const Q3CString & trigger(); + const QByteArray & trigger(); // set the trigger in OCL // @@ -34,7 +34,7 @@ class UmlBaseTransition : public UmlItem bool set_Trigger(const char * s); // return the guard in OCL - const Q3CString & guard(); + const QByteArray & guard(); // set the guard in OCL // @@ -42,7 +42,7 @@ class UmlBaseTransition : public UmlItem bool set_Guard(const char * s); // return the activity in OCL - const Q3CString & activity(); + const QByteArray & activity(); // set the activity in OCL // @@ -51,7 +51,7 @@ class UmlBaseTransition : public UmlItem #ifdef WITHCPP // return the trigger in C++ - const Q3CString & cppTrigger(); + const QByteArray & cppTrigger(); // set the trigger in C++ // @@ -59,7 +59,7 @@ class UmlBaseTransition : public UmlItem bool set_CppTrigger(const char * s); // return the guard in C++ - const Q3CString & cppGuard(); + const QByteArray & cppGuard(); // set the guard in C++ // @@ -67,7 +67,7 @@ class UmlBaseTransition : public UmlItem bool set_CppGuard(const char * s); // return the activity in C++ - const Q3CString & cppActivity(); + const QByteArray & cppActivity(); // set the activity in C++ // @@ -77,7 +77,7 @@ class UmlBaseTransition : public UmlItem #ifdef WITHJAVA // return the trigger in Java - const Q3CString & javaTrigger(); + const QByteArray & javaTrigger(); // set the trigger in Java // @@ -85,7 +85,7 @@ class UmlBaseTransition : public UmlItem bool set_JavaTrigger(const char * s); // return the guard in Java - const Q3CString & javaGuard(); + const QByteArray & javaGuard(); // set the guard in Java // @@ -93,7 +93,7 @@ class UmlBaseTransition : public UmlItem bool set_JavaGuard(const char * s); // return the activity in Java - const Q3CString & javaActivity(); + const QByteArray & javaActivity(); // set the activity in Java // @@ -136,7 +136,7 @@ class UmlBaseTransition : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseTransition(void * id, const Q3CString & n) : UmlItem(id, n) { + UmlBaseTransition(void * id, const QByteArray & n) : UmlItem(id, n) { } }; diff --git a/genplugouts/BrowserSort/UmlBaseUseCase.cpp b/genplugouts/BrowserSort/UmlBaseUseCase.cpp index 5a3a32ccd..bee601a21 100644 --- a/genplugouts/BrowserSort/UmlBaseUseCase.cpp +++ b/genplugouts/BrowserSort/UmlBaseUseCase.cpp @@ -37,5 +37,7 @@ void UmlBaseUseCase::read_uml_() { _assoc_diagram = (UmlUseCaseDiagram *) UmlBaseItem::read_(); UmlBaseItem::read_uml_(); + _extension_points = UmlCom::read_string(); + } diff --git a/genplugouts/BrowserSort/UmlBaseUseCase.h b/genplugouts/BrowserSort/UmlBaseUseCase.h index 1bdef8f61..cc8fdbe8c 100644 --- a/genplugouts/BrowserSort/UmlBaseUseCase.h +++ b/genplugouts/BrowserSort/UmlBaseUseCase.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlUseCase; class UmlUseCaseDiagram; @@ -33,6 +33,7 @@ class UmlBaseUseCase : public UmlItem private: + QByteArray _extension_points; UmlUseCaseDiagram * _assoc_diagram; @@ -42,7 +43,7 @@ class UmlBaseUseCase : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCase(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseUseCase(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseUseCaseDiagram.h b/genplugouts/BrowserSort/UmlBaseUseCaseDiagram.h index fd2481e49..f2a8dfb95 100644 --- a/genplugouts/BrowserSort/UmlBaseUseCaseDiagram.h +++ b/genplugouts/BrowserSort/UmlBaseUseCaseDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlUseCaseDiagram; class UmlItem; @@ -26,7 +26,7 @@ class UmlBaseUseCaseDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCaseDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseUseCaseDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBaseUseCaseView.h b/genplugouts/BrowserSort/UmlBaseUseCaseView.h index e289a3543..17498b275 100644 --- a/genplugouts/BrowserSort/UmlBaseUseCaseView.h +++ b/genplugouts/BrowserSort/UmlBaseUseCaseView.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlUseCaseView; @@ -25,7 +25,7 @@ class UmlBaseUseCaseView : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCaseView(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseUseCaseView(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlBuiltin.h b/genplugouts/BrowserSort/UmlBuiltin.h index 4f5c16f41..5312a6d74 100644 --- a/genplugouts/BrowserSort/UmlBuiltin.h +++ b/genplugouts/BrowserSort/UmlBuiltin.h @@ -1,32 +1,30 @@ #ifndef _UMLBUILTIN_H #define _UMLBUILTIN_H - - -#include +#include // Internal class used to memorize the types defined through the first 'generation settings' tab struct UmlBuiltin { - Q3CString uml; + QByteArray uml; #ifdef WITHCPP - Q3CString cpp; + QByteArray cpp; - Q3CString cpp_in; + QByteArray cpp_in; - Q3CString cpp_out; + QByteArray cpp_out; - Q3CString cpp_inout; + QByteArray cpp_inout; #endif - Q3CString cpp_return; + QByteArray cpp_return; #ifdef WITHJAVA - Q3CString java; + QByteArray java; #endif #ifdef WITHIDL - Q3CString idl; + QByteArray idl; #endif }; diff --git a/genplugouts/BrowserSort/UmlClass.h b/genplugouts/BrowserSort/UmlClass.h index 10418b7e1..bea5a50d8 100644 --- a/genplugouts/BrowserSort/UmlClass.h +++ b/genplugouts/BrowserSort/UmlClass.h @@ -3,7 +3,7 @@ #include "UmlBaseClass.h" -#include + // This class manages 'classes', notes that the class 'ClassItem' // is a mother class of the class's children. @@ -12,7 +12,7 @@ class UmlClass : public UmlBaseClass { public: - UmlClass(void * id, const Q3CString & n) : UmlBaseClass(id, n) {}; + UmlClass(void * id, const QByteArray & n) : UmlBaseClass(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlClassDiagram.h b/genplugouts/BrowserSort/UmlClassDiagram.h index f0bb6f0bb..930e620bd 100644 --- a/genplugouts/BrowserSort/UmlClassDiagram.h +++ b/genplugouts/BrowserSort/UmlClassDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseClassDiagram.h" -#include + // This class manages 'class diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlClassDiagram : public UmlBaseClassDiagram { public: - UmlClassDiagram(void * id, const Q3CString & n) : UmlBaseClassDiagram(id, n) {}; + UmlClassDiagram(void * id, const QByteArray & n) : UmlBaseClassDiagram(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlClassItem.h b/genplugouts/BrowserSort/UmlClassItem.h index bf64f4dbb..7c4a888f7 100644 --- a/genplugouts/BrowserSort/UmlClassItem.h +++ b/genplugouts/BrowserSort/UmlClassItem.h @@ -3,7 +3,7 @@ #include "UmlBaseClassItem.h" -#include + // This class globaly manages class's children including UmlClassExtraMember // @@ -11,7 +11,7 @@ class UmlClassItem : public UmlBaseClassItem { public: - UmlClassItem(void * id, const Q3CString & n) : UmlBaseClassItem(id, n) {}; + UmlClassItem(void * id, const QByteArray & n) : UmlBaseClassItem(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlClassMember.h b/genplugouts/BrowserSort/UmlClassMember.h index 9119443c6..35fdddb52 100644 --- a/genplugouts/BrowserSort/UmlClassMember.h +++ b/genplugouts/BrowserSort/UmlClassMember.h @@ -2,7 +2,7 @@ #define _UMLCLASSMEMBER_H -#include + #include "UmlBaseClassMember.h" // This class globaly manages class's relations, attributes, operations @@ -12,7 +12,7 @@ class UmlClassMember : public UmlBaseClassMember { public: - UmlClassMember(void * id, const Q3CString & n) : UmlBaseClassMember(id, n) {}; + UmlClassMember(void * id, const QByteArray & n) : UmlBaseClassMember(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlClassView.h b/genplugouts/BrowserSort/UmlClassView.h index de08d4d31..e9fbf9b0c 100644 --- a/genplugouts/BrowserSort/UmlClassView.h +++ b/genplugouts/BrowserSort/UmlClassView.h @@ -3,7 +3,7 @@ #include "UmlBaseClassView.h" -#include + // This class manages 'class view' // @@ -13,7 +13,7 @@ class UmlClassView : public UmlBaseClassView public: virtual void sort(); - UmlClassView(void * id, const Q3CString & n) : UmlBaseClassView(id, n) {}; + UmlClassView(void * id, const QByteArray & n) : UmlBaseClassView(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlCollaborationDiagram.h b/genplugouts/BrowserSort/UmlCollaborationDiagram.h index f39737990..7000ff950 100644 --- a/genplugouts/BrowserSort/UmlCollaborationDiagram.h +++ b/genplugouts/BrowserSort/UmlCollaborationDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseCollaborationDiagram.h" -#include + // This class manages 'collaboration diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlCollaborationDiagram : public UmlBaseCollaborationDiagram { public: - UmlCollaborationDiagram(void * id, const Q3CString & n) : UmlBaseCollaborationDiagram(id, n) {}; + UmlCollaborationDiagram(void * id, const QByteArray & n) : UmlBaseCollaborationDiagram(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlCom.cpp b/genplugouts/BrowserSort/UmlCom.cpp index efdba45e2..feaadfe5a 100644 --- a/genplugouts/BrowserSort/UmlCom.cpp +++ b/genplugouts/BrowserSort/UmlCom.cpp @@ -1,21 +1,20 @@ #include "UmlCom.h" - -#include -//Added by qt3to4: -#include - +#include +#include #include "UmlCom.h" #include "UmlItem.h" #include "UmlTypeSpec.h" #include "UmlClass.h" #include "UmlSettings.h" #include "Tools/ApiCmd.h" +#include bool UmlCom::connect(unsigned int port) { - sock = new Q3SocketDevice(Q3SocketDevice::Stream); - sock->setAddressReusable(TRUE); - + sock = new QTcpSocket(/*QTcpSocket::Stream*/0); +#ifdef habip + //sock->setAddressReusable(TRUE); +#endif buffer_in_size = 1024; buffer_in = new char[buffer_in_size]; buffer_in_end = p_buffer_in = 0; @@ -28,7 +27,8 @@ bool UmlCom::connect(unsigned int port) ha.setAddress("127.0.0.1"); - if (sock->connect(ha, port)) { + sock->connectToHost(ha, port); + if (sock->waitForConnected()) { // send API version write_unsigned(25); flush(); @@ -65,11 +65,11 @@ void UmlCom::close() sock = 0; } -Q3SocketDevice * UmlCom::sock; +QTcpSocket * UmlCom::sock; char * UmlCom::buffer_in; -unsigned int UmlCom::buffer_in_size; +size_t UmlCom::buffer_in_size; char * UmlCom::p_buffer_in; @@ -79,11 +79,11 @@ char * UmlCom::buffer_out; char * UmlCom::p_buffer_out; -unsigned int UmlCom::buffer_out_size; +size_t UmlCom::buffer_out_size; -void UmlCom::check_size_out(unsigned int len) +void UmlCom::check_size_out(size_t len) { - unsigned used = p_buffer_out - buffer_out; + ptrdiff_t used = p_buffer_out - buffer_out; if ((used + len) >= buffer_out_size) { buffer_out_size = used + len + 1024; @@ -100,13 +100,13 @@ void UmlCom::check_size_out(unsigned int len) void UmlCom::read_if_needed() { #ifdef TRACE - //cout << "UmlCom::read_if_needed " << buffer_in_end - p_buffer_in << '\n'; + //qDebug() << "UmlCom::read_if_needed " << buffer_in_end - p_buffer_in << '\n'; #endif if (p_buffer_in == buffer_in_end) { read_buffer(4); #ifdef TRACE - cout << "UmlCom::read " << ((((unsigned char *) buffer_in)[0] << 24) + (((unsigned char *) buffer_in)[1] << 16) + (((unsigned char *) buffer_in)[2] << 8) + ((unsigned char *) buffer_in)[3]) << " bytes\n"; + qDebug() << "UmlCom::read " << ((((unsigned char *) buffer_in)[0] << 24) + (((unsigned char *) buffer_in)[1] << 16) + (((unsigned char *) buffer_in)[2] << 8) + ((unsigned char *) buffer_in)[3]) << " bytes\n"; #endif read_buffer((((unsigned char *) buffer_in)[0] << 24) + (((unsigned char *) buffer_in)[1] << 16) + @@ -115,10 +115,10 @@ void UmlCom::read_if_needed() } } -void UmlCom::read_buffer(unsigned int len) +void UmlCom::read_buffer(size_t len) { #ifdef TRACE - //cout << "enter UmlCom::read_buffer(" << len << ")\n"; + //qDebug() << "enter UmlCom::read_buffer(" << len << ")\n"; #endif if (buffer_in_size < len) { @@ -127,16 +127,16 @@ void UmlCom::read_buffer(unsigned int len) buffer_in = new char[buffer_in_size]; } - int remainder = (int) len; - int nread; + qint64 remainder = len; + qint64 nread; char * p = buffer_in; for (;;) { - if ((nread = sock->readBlock(p, remainder)) == -1) { + if ((nread = sock->read(p, remainder)) == -1) { if (sock->error() != 0) { #ifdef TRACE - cout << "UmlCom::read_buffer ERROR, already " << p - buffer_in - << " remainder " << remainder << '\n'; + qDebug() << "UmlCom::read_buffer ERROR, already " << p - buffer_in + << " remainder " << remainder << '\n'; #endif fatal_error("UmlCom read error"); } @@ -145,18 +145,18 @@ void UmlCom::read_buffer(unsigned int len) } #ifdef TRACE - //cout << "UmlCom a lu " << nread << '\n'; + //qDebug() << "UmlCom a lu " << nread << '\n'; #endif if ((remainder -= nread) == 0) break; p += nread; - sock->waitForMore(100); + sock->waitForReadyRead(100); } #ifdef TRACE - //cout << "exit UmlCom::read_buffer()\n"; + //qDebug() << "exit UmlCom::read_buffer()\n"; #endif p_buffer_in = buffer_in; @@ -202,7 +202,7 @@ void UmlCom::write_string(const char * p) if (p == 0) p = ""; - unsigned len = strlen(p) + 1; + size_t len = strlen(p) + 1; check_size_out(len); memcpy(p_buffer_out, p, len); @@ -212,7 +212,7 @@ void UmlCom::write_string(const char * p) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ")\n"; #endif write_char(f); @@ -223,7 +223,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, char arg) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << (int) arg << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << (int) arg << ")\n"; #endif write_char(f); @@ -235,7 +235,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, char arg) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ")\n"; #endif write_char(f); @@ -247,7 +247,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ")\n"; #endif write_char(f); @@ -259,7 +259,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id, const char * n) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ", " << ((n) ? n : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ", " << ((n) ? n : "") << ")\n"; #endif write_char(f); @@ -272,7 +272,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id, const char * n) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s, const char * v) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; #endif write_char(f); @@ -285,7 +285,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s, const char void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, bool b, const char * s, const char * v) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << b << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << b << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; #endif write_char(f); @@ -299,7 +299,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, bool b, const char * s, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ")\n"; #endif write_char(onInstanceCmd); @@ -311,7 +311,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg) ? arg : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg) ? arg : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -324,7 +324,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, char arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((int) arg) << '\n'; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((int) arg) << '\n'; #endif write_char(onInstanceCmd); @@ -337,7 +337,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, char arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg << '\n'; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg << '\n'; #endif write_char(onInstanceCmd); @@ -350,7 +350,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const UmlTypeSpec & arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -372,7 +372,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const UmlTypeSpec & ar void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg1) ? arg1 : "") << ", " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg1) ? arg1 : "") << ", " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -386,7 +386,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -400,7 +400,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, const void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, aRelationKind arg2, const void * id2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << arg2 << ", " << id2 << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << arg2 << ", " << id2 << ")\n"; #endif write_char(onInstanceCmd); @@ -415,7 +415,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, aRela void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", id1)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", id1)\n"; #endif write_char(onInstanceCmd); @@ -428,7 +428,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", id1, " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", id1, " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -442,7 +442,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1, cons void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, const UmlTypeSpec & arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -464,8 +464,8 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, const char * arg2, const char * arg3, const UmlTypeSpec & arg4, const UmlTypeSpec & arg5) { -#ifdef DEBUGBOUML - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << \", \"" << arg2 << "\", \"" << arg3 << "\", " << ", UmlTypeSpec, UmlTypeSpec)\n"; +#ifdef DEBUG_DOUML + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << "\", \"" << arg2 << "\", \"" << arg3 << "\", " << ", UmlTypeSpec, UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -498,7 +498,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, char arg2, const char * arg3, const char * arg4, const UmlTypeSpec & arg5) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << (int) arg2 << ", " << ((arg3) ? arg3 : "") << ", " << ((arg4) ? arg4 : "") << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << (int) arg2 << ", " << ((arg3) ? arg3 : "") << ", " << ((arg4) ? arg4 : "") << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -521,10 +521,10 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, cha flush(); } -void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l) +void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", const Q3PtrVector & l)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", const QVector & l)\n"; #endif write_char(onInstanceCmd); @@ -541,10 +541,10 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3) +void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l1, const QVector & l2, const QVector & l3) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", const QVector & l1, const QVector & l2, const QVector & l3)\n"; #endif write_char(onInstanceCmd); @@ -578,7 +578,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & v) +void UmlCom::read_item_list(QVector & v) { unsigned n = read_unsigned(); v.resize(n); #ifdef TRACE - //cout << "UmlCom::read_item_list " << n << " items\n"; + //qDebug() << "UmlCom::read_item_list " << n << " items\n"; #endif for (unsigned index = 0; index != n; index += 1) - v.insert(index, UmlBaseItem::read_()); + //v.insert(index, UmlBaseItem::read_()); + v[index] = UmlBaseItem::read_(); } -void UmlCom::fatal_error(const Q3CString & -#ifdef DEBUG_BOUML +void UmlCom::fatal_error(const QByteArray & +#ifdef DEBUG_DOUML msg #endif ) { -#ifdef DEBUG_BOUML - cout << msg << '\n'; +#ifdef DEBUG_DOUML + qDebug() << msg << '\n'; #endif throw 0; @@ -673,7 +674,7 @@ void UmlCom::fatal_error(const Q3CString & void UmlCom::flush() { if (sock != 0) { - int len = p_buffer_out - buffer_out - 4; + ptrdiff_t len = p_buffer_out - buffer_out - 4; /* the four first bytes of buffer_out are free to contains the length */ buffer_out[0] = len >> 24; buffer_out[1] = len >> 16; @@ -684,7 +685,7 @@ void UmlCom::flush() p_buffer_out = buffer_out; for (;;) { - int sent = sock->writeBlock(p_buffer_out, len); + qint64 sent = sock->write(p_buffer_out, len); if (sent == -1) { close(); // to not try to send "bye" ! diff --git a/genplugouts/BrowserSort/UmlCom.h b/genplugouts/BrowserSort/UmlCom.h index cc9a2a255..509f1e371 100644 --- a/genplugouts/BrowserSort/UmlCom.h +++ b/genplugouts/BrowserSort/UmlCom.h @@ -1,25 +1,21 @@ #ifndef _UMLCOM_H #define _UMLCOM_H - -#include -////#include "CmdFamily.h" -////#include "OnInstanceCmd.h" #include "Tools/ApiCmd.h" #include "anItemKind.h" #include "aRelationKind.h" -#include -#include -#include + + + #include class UmlItem; class UmlTypeSpec; class UmlClass; -class Q3SocketDevice; +class QTcpSocket; class UmlItem; class UmlTypeSpec; class UmlClass; @@ -66,11 +62,11 @@ class UmlCom static void close(); private: - static Q3SocketDevice * sock; + static QTcpSocket * sock; static char * buffer_in; - static unsigned int buffer_in_size; + static size_t buffer_in_size; static char * p_buffer_in; @@ -80,19 +76,19 @@ class UmlCom static char * p_buffer_out; - static unsigned int buffer_out_size; + static size_t buffer_out_size; protected: //internal, do NOT use it - static void check_size_out(unsigned int len); + static void check_size_out(size_t len); //internal, do NOT use it static void read_if_needed(); //internal, do NOT use it - static void read_buffer(unsigned int len); + static void read_buffer(size_t len); //internal, do NOT use it static void write_bool(bool b); @@ -174,8 +170,8 @@ class UmlCom static void send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, char arg2, const char * arg3, const char * arg4, const UmlTypeSpec & arg5); //internal, do NOT use it - static void send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l); - static void send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3); + static void send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l); + static void send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l1, const QVector & l2, const QVector & l3); //internal, do NOT use it @@ -198,10 +194,10 @@ class UmlCom static unsigned int read_unsigned(); // internal, do NOT use it - static void read_item_list(Q3PtrVector & v); + static void read_item_list(QVector & v); //internal, do NOT use it - static void fatal_error(const Q3CString & msg); + static void fatal_error(const QByteArray & msg); //internal, do NOT use it static void flush(); diff --git a/genplugouts/BrowserSort/UmlComponent.h b/genplugouts/BrowserSort/UmlComponent.h index 940404d29..b421d5c52 100644 --- a/genplugouts/BrowserSort/UmlComponent.h +++ b/genplugouts/BrowserSort/UmlComponent.h @@ -3,7 +3,7 @@ #include "UmlBaseComponent.h" -#include + // This class manages 'components' // @@ -11,7 +11,7 @@ class UmlComponent : public UmlBaseComponent { public: - UmlComponent(void * id, const Q3CString & n) : UmlBaseComponent(id, n) {}; + UmlComponent(void * id, const QByteArray & n) : UmlBaseComponent(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlComponentDiagram.h b/genplugouts/BrowserSort/UmlComponentDiagram.h index 80ee3b0f0..0a1cb5bb2 100644 --- a/genplugouts/BrowserSort/UmlComponentDiagram.h +++ b/genplugouts/BrowserSort/UmlComponentDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseComponentDiagram.h" -#include + // This class manages 'ccomponent diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlComponentDiagram : public UmlBaseComponentDiagram { public: - UmlComponentDiagram(void * id, const Q3CString & n) : UmlBaseComponentDiagram(id, n) {}; + UmlComponentDiagram(void * id, const QByteArray & n) : UmlBaseComponentDiagram(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlComponentView.h b/genplugouts/BrowserSort/UmlComponentView.h index 1588d2d71..86e6889b1 100644 --- a/genplugouts/BrowserSort/UmlComponentView.h +++ b/genplugouts/BrowserSort/UmlComponentView.h @@ -3,7 +3,7 @@ #include "UmlBaseComponentView.h" -#include + // This class manages 'component view' // @@ -13,7 +13,7 @@ class UmlComponentView : public UmlBaseComponentView public: virtual void sort(); - UmlComponentView(void * id, const Q3CString & n) : UmlBaseComponentView(id, n) {}; + UmlComponentView(void * id, const QByteArray & n) : UmlBaseComponentView(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlDeploymentDiagram.h b/genplugouts/BrowserSort/UmlDeploymentDiagram.h index 1639ef52a..e2dcb1b09 100644 --- a/genplugouts/BrowserSort/UmlDeploymentDiagram.h +++ b/genplugouts/BrowserSort/UmlDeploymentDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseDeploymentDiagram.h" -#include + // This class manages 'deployment diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlDeploymentDiagram : public UmlBaseDeploymentDiagram { public: - UmlDeploymentDiagram(void * id, const Q3CString & n) : UmlBaseDeploymentDiagram(id, n) {}; + UmlDeploymentDiagram(void * id, const QByteArray & n) : UmlBaseDeploymentDiagram(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlDeploymentView.h b/genplugouts/BrowserSort/UmlDeploymentView.h index 9a0060704..e490c3f50 100644 --- a/genplugouts/BrowserSort/UmlDeploymentView.h +++ b/genplugouts/BrowserSort/UmlDeploymentView.h @@ -3,7 +3,7 @@ #include "UmlBaseDeploymentView.h" -#include + // This class manages 'deployment view' // @@ -13,7 +13,7 @@ class UmlDeploymentView : public UmlBaseDeploymentView public: virtual void sort(); - UmlDeploymentView(void * id, const Q3CString & n) : UmlBaseDeploymentView(id, n) {}; + UmlDeploymentView(void * id, const QByteArray & n) : UmlBaseDeploymentView(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlDiagram.h b/genplugouts/BrowserSort/UmlDiagram.h index ffee38e5c..99e0f81e4 100644 --- a/genplugouts/BrowserSort/UmlDiagram.h +++ b/genplugouts/BrowserSort/UmlDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseDiagram.h" -#include + // This class allows to manage extra class member, mainly defined fot C++ // it allows to insert C++ pre-processor directive (even they may be placed @@ -14,7 +14,7 @@ class UmlDiagram : public UmlBaseDiagram { public: - UmlDiagram(void * id, const Q3CString & n) : UmlBaseDiagram(id, n) {}; + UmlDiagram(void * id, const QByteArray & n) : UmlBaseDiagram(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlEntryPointPseudoState.h b/genplugouts/BrowserSort/UmlEntryPointPseudoState.h index 838a4bf5b..3fd7f6eca 100644 --- a/genplugouts/BrowserSort/UmlEntryPointPseudoState.h +++ b/genplugouts/BrowserSort/UmlEntryPointPseudoState.h @@ -3,13 +3,13 @@ #include "UmlBaseEntryPointPseudoState.h" -#include + class UmlEntryPointPseudoState : public UmlBaseEntryPointPseudoState { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlEntryPointPseudoState(void * id, const Q3CString & s) : UmlBaseEntryPointPseudoState(id, s) { + UmlEntryPointPseudoState(void * id, const QByteArray & s) : UmlBaseEntryPointPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlExitPointPseudoState.h b/genplugouts/BrowserSort/UmlExitPointPseudoState.h index 1a57b8230..e63c68782 100644 --- a/genplugouts/BrowserSort/UmlExitPointPseudoState.h +++ b/genplugouts/BrowserSort/UmlExitPointPseudoState.h @@ -3,13 +3,13 @@ #include "UmlBaseExitPointPseudoState.h" -#include + class UmlExitPointPseudoState : public UmlBaseExitPointPseudoState { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExitPointPseudoState(void * id, const Q3CString & s) : UmlBaseExitPointPseudoState(id, s) { + UmlExitPointPseudoState(void * id, const QByteArray & s) : UmlBaseExitPointPseudoState(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlExpansionNode.h b/genplugouts/BrowserSort/UmlExpansionNode.h index 65d1cff2a..e2dbd5565 100644 --- a/genplugouts/BrowserSort/UmlExpansionNode.h +++ b/genplugouts/BrowserSort/UmlExpansionNode.h @@ -3,13 +3,13 @@ #include "UmlBaseExpansionNode.h" -#include + class UmlExpansionNode : public UmlBaseExpansionNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExpansionNode(void * id, const Q3CString & s) : UmlBaseExpansionNode(id, s) { + UmlExpansionNode(void * id, const QByteArray & s) : UmlBaseExpansionNode(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlExpansionRegion.h b/genplugouts/BrowserSort/UmlExpansionRegion.h index cfe999374..6d9130ca6 100644 --- a/genplugouts/BrowserSort/UmlExpansionRegion.h +++ b/genplugouts/BrowserSort/UmlExpansionRegion.h @@ -3,13 +3,13 @@ #include "UmlBaseExpansionRegion.h" -#include + class UmlExpansionRegion : public UmlBaseExpansionRegion { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExpansionRegion(void * id, const Q3CString & s) : UmlBaseExpansionRegion(id, s) { + UmlExpansionRegion(void * id, const QByteArray & s) : UmlBaseExpansionRegion(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlExtraClassMember.h b/genplugouts/BrowserSort/UmlExtraClassMember.h index cf0b2bf47..95b851b8d 100644 --- a/genplugouts/BrowserSort/UmlExtraClassMember.h +++ b/genplugouts/BrowserSort/UmlExtraClassMember.h @@ -3,7 +3,7 @@ #include "UmlBaseExtraClassMember.h" -#include + // This class allows to manage extra class member, It allows to insert // C++ pre-processor directive (even they may be placed in the other member @@ -14,7 +14,7 @@ class UmlExtraClassMember : public UmlBaseExtraClassMember { public: - UmlExtraClassMember(void * id, const Q3CString & n) : UmlBaseExtraClassMember(id, n) {}; + UmlExtraClassMember(void * id, const QByteArray & n) : UmlBaseExtraClassMember(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlFlow.h b/genplugouts/BrowserSort/UmlFlow.h index 6e78a8c4b..e31afeb31 100644 --- a/genplugouts/BrowserSort/UmlFlow.h +++ b/genplugouts/BrowserSort/UmlFlow.h @@ -4,12 +4,12 @@ #include "UmlBaseFlow.h" #include "UmlActivityItem.h" -#include + class UmlFlow : public UmlBaseFlow, public UmlActivityItem { public: - UmlFlow(void * id, const Q3CString & n) : UmlBaseFlow(id, n) { + UmlFlow(void * id, const QByteArray & n) : UmlBaseFlow(id, n) { } }; diff --git a/genplugouts/BrowserSort/UmlInterruptibleActivityRegion.h b/genplugouts/BrowserSort/UmlInterruptibleActivityRegion.h index 0f78665c1..a696f6b2d 100644 --- a/genplugouts/BrowserSort/UmlInterruptibleActivityRegion.h +++ b/genplugouts/BrowserSort/UmlInterruptibleActivityRegion.h @@ -3,13 +3,13 @@ #include "UmlBaseInterruptibleActivityRegion.h" -#include + class UmlInterruptibleActivityRegion : public UmlBaseInterruptibleActivityRegion { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlInterruptibleActivityRegion(void * id, const Q3CString & s) : UmlBaseInterruptibleActivityRegion(id, s) { + UmlInterruptibleActivityRegion(void * id, const QByteArray & s) : UmlBaseInterruptibleActivityRegion(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlItem.cpp b/genplugouts/BrowserSort/UmlItem.cpp index b49e121b6..ec965f3b6 100644 --- a/genplugouts/BrowserSort/UmlItem.cpp +++ b/genplugouts/BrowserSort/UmlItem.cpp @@ -3,7 +3,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include + UmlItem::~UmlItem() { } @@ -20,7 +20,7 @@ int UmlItem::orderWeight() void UmlItem::sortChildren() { - const Q3PtrVector & qv = children(); + const QVector & qv = children(); if (!qv.isEmpty()) { unsigned sz = qv.size(); @@ -31,10 +31,14 @@ void UmlItem::sortChildren() v.resize(sz); for (u = 0; u != sz; u += 1) - v.insert(u, qv[u]); + v[u] = qv[u]; // sort in memory +#ifdef habip v.sort(); +#else + std::sort(v.begin(), v.end()); +#endif // update browser UmlItem * previous = 0; @@ -46,7 +50,7 @@ void UmlItem::sortChildren() } } -int VectorOfUmlItem::compareItems(Q3PtrCollection::Item d1, Q3PtrCollection::Item d2) +int VectorOfUmlItem::compareItems(UmlItem *d1, UmlItem* d2) { UmlItem * e1 = (UmlItem *) d1; UmlItem * e2 = (UmlItem *) d2; diff --git a/genplugouts/BrowserSort/UmlItem.h b/genplugouts/BrowserSort/UmlItem.h index dbcde4db9..9f9ec370f 100644 --- a/genplugouts/BrowserSort/UmlItem.h +++ b/genplugouts/BrowserSort/UmlItem.h @@ -1,13 +1,8 @@ #ifndef _UMLITEM_H #define _UMLITEM_H - #include "UmlBaseItem.h" -#include -#include -//Added by qt3to4: -#include - +#include // This class is a mother class for all the other Uml* classes, this // allows to generalize their management, declare virtual operations etc ... @@ -16,7 +11,7 @@ class UmlItem : public UmlBaseItem { public: - UmlItem(void * id, const Q3CString & n) : UmlBaseItem(id, n) {}; + UmlItem(void * id, const QByteArray & n) : UmlBaseItem(id, n) {}; virtual ~UmlItem(); @@ -28,10 +23,10 @@ class UmlItem : public UmlBaseItem }; -class VectorOfUmlItem : public Q3PtrVector +class VectorOfUmlItem : public QVector { public: - int compareItems(Q3PtrCollection::Item d1, Q3PtrCollection::Item d2); + int compareItems(UmlItem *d1, UmlItem *d2); }; diff --git a/genplugouts/BrowserSort/UmlNcRelation.h b/genplugouts/BrowserSort/UmlNcRelation.h index 08dc2c2b2..b785e3609 100644 --- a/genplugouts/BrowserSort/UmlNcRelation.h +++ b/genplugouts/BrowserSort/UmlNcRelation.h @@ -3,7 +3,7 @@ #include "UmlBaseNcRelation.h" -#include + //This class manages 'relations' between non class objects // @@ -11,7 +11,7 @@ class UmlNcRelation : public UmlBaseNcRelation { public: - UmlNcRelation(void * id, const Q3CString & n) : UmlBaseNcRelation(id, n) {}; + UmlNcRelation(void * id, const QByteArray & n) : UmlBaseNcRelation(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlNode.h b/genplugouts/BrowserSort/UmlNode.h index a530a3ebf..3a1911c5b 100644 --- a/genplugouts/BrowserSort/UmlNode.h +++ b/genplugouts/BrowserSort/UmlNode.h @@ -3,7 +3,7 @@ #include "UmlBaseNode.h" -#include + // This class manages 'nodes' // @@ -11,7 +11,7 @@ class UmlNode : public UmlBaseNode { public: - UmlNode(void * id, const Q3CString & n) : UmlBaseNode(id, n) {}; + UmlNode(void * id, const QByteArray & n) : UmlBaseNode(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlObjectDiagram.h b/genplugouts/BrowserSort/UmlObjectDiagram.h index ba429242a..c194e4613 100644 --- a/genplugouts/BrowserSort/UmlObjectDiagram.h +++ b/genplugouts/BrowserSort/UmlObjectDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseObjectDiagram.h" -#include + // This class manages 'object diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -14,7 +14,7 @@ class UmlObjectDiagram : public UmlBaseObjectDiagram { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlObjectDiagram(void * id, const Q3CString & s) : UmlBaseObjectDiagram(id, s) { + UmlObjectDiagram(void * id, const QByteArray & s) : UmlBaseObjectDiagram(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlOnSignalAction.h b/genplugouts/BrowserSort/UmlOnSignalAction.h index 158c0ddc0..82fd5747f 100644 --- a/genplugouts/BrowserSort/UmlOnSignalAction.h +++ b/genplugouts/BrowserSort/UmlOnSignalAction.h @@ -3,13 +3,13 @@ #include "UmlBaseOnSignalAction.h" -#include + class UmlOnSignalAction : public UmlBaseOnSignalAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlOnSignalAction(void * id, const Q3CString & s) : UmlBaseOnSignalAction(id, s) { + UmlOnSignalAction(void * id, const QByteArray & s) : UmlBaseOnSignalAction(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlOperation.h b/genplugouts/BrowserSort/UmlOperation.h index eec043152..f4c9e6547 100644 --- a/genplugouts/BrowserSort/UmlOperation.h +++ b/genplugouts/BrowserSort/UmlOperation.h @@ -3,7 +3,7 @@ #include "UmlBaseOperation.h" -#include + // This class manages 'operations', notes that the class 'UmlClassItem' // is a mother class of all the class's children. @@ -12,7 +12,7 @@ class UmlOperation : public UmlBaseOperation { public: - UmlOperation(void * id, const Q3CString & n) : UmlBaseOperation(id, n) {}; + UmlOperation(void * id, const QByteArray & n) : UmlBaseOperation(id, n) {}; }; diff --git a/genplugouts/BrowserSort/UmlPackage.h b/genplugouts/BrowserSort/UmlPackage.h index b1c79924d..63313f16f 100644 --- a/genplugouts/BrowserSort/UmlPackage.h +++ b/genplugouts/BrowserSort/UmlPackage.h @@ -3,7 +3,7 @@ #include "UmlBasePackage.h" -#include + // This class manages a 'package', notes that the project itself is a package // @@ -11,7 +11,7 @@ class UmlPackage : public UmlBasePackage { public: - UmlPackage(void * id, const Q3CString & n) : UmlBasePackage(id, n) {}; + UmlPackage(void * id, const QByteArray & n) : UmlBasePackage(id, n) {}; virtual void sort(); diff --git a/genplugouts/BrowserSort/UmlParameter.h b/genplugouts/BrowserSort/UmlParameter.h index ef6f522b0..4b18f0e02 100644 --- a/genplugouts/BrowserSort/UmlParameter.h +++ b/genplugouts/BrowserSort/UmlParameter.h @@ -4,7 +4,7 @@ #include "aDirection.h" #include "UmlTypeSpec.h" -#include + // Represent an operation's parameter @@ -13,9 +13,9 @@ struct UmlParameter { UmlTypeSpec type; - Q3CString name; + QByteArray name; - Q3CString default_value; + QByteArray default_value; }; diff --git a/genplugouts/BrowserSort/UmlParameterSet.h b/genplugouts/BrowserSort/UmlParameterSet.h index 781e77c1d..1116bee16 100644 --- a/genplugouts/BrowserSort/UmlParameterSet.h +++ b/genplugouts/BrowserSort/UmlParameterSet.h @@ -3,13 +3,13 @@ #include "UmlBaseParameterSet.h" -#include + class UmlParameterSet : public UmlBaseParameterSet { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlParameterSet(void * id, const Q3CString & s) : UmlBaseParameterSet(id, s) { + UmlParameterSet(void * id, const QByteArray & s) : UmlBaseParameterSet(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlPinParameter.h b/genplugouts/BrowserSort/UmlPinParameter.h index d48cb7343..3d3283d6b 100644 --- a/genplugouts/BrowserSort/UmlPinParameter.h +++ b/genplugouts/BrowserSort/UmlPinParameter.h @@ -3,13 +3,13 @@ #include "UmlBasePinParameter.h" -#include + class UmlPinParameter : public UmlBasePinParameter { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlPinParameter(void * id, const Q3CString & s) : UmlBasePinParameter(id, s) { + UmlPinParameter(void * id, const QByteArray & s) : UmlBasePinParameter(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlPseudoState.h b/genplugouts/BrowserSort/UmlPseudoState.h index 075761ec7..1c350a942 100644 --- a/genplugouts/BrowserSort/UmlPseudoState.h +++ b/genplugouts/BrowserSort/UmlPseudoState.h @@ -2,7 +2,7 @@ #define _UMLPSEUDOSTATE_H -#include + #include "UmlItem.h" #include "UmlStateItem.h" @@ -10,7 +10,7 @@ class UmlPseudoState : public UmlStateItem, public UmlItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlPseudoState(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlPseudoState(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlRegion.h b/genplugouts/BrowserSort/UmlRegion.h index d3f32cb7b..d0ce11dde 100644 --- a/genplugouts/BrowserSort/UmlRegion.h +++ b/genplugouts/BrowserSort/UmlRegion.h @@ -4,13 +4,13 @@ #include "UmlBaseRegion.h" #include "UmlStateItem.h" -#include + class UmlRegion : public UmlBaseRegion, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlRegion(void * id, const Q3CString & s) : UmlBaseRegion(id, s) { + UmlRegion(void * id, const QByteArray & s) : UmlBaseRegion(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlRelation.h b/genplugouts/BrowserSort/UmlRelation.h index def10e743..4568f833d 100644 --- a/genplugouts/BrowserSort/UmlRelation.h +++ b/genplugouts/BrowserSort/UmlRelation.h @@ -3,7 +3,7 @@ #include "UmlBaseRelation.h" -#include + // This class manages 'relations' between classes, notes that the class 'UmlClassItem' // is a mother class of all the class's children. @@ -12,7 +12,7 @@ class UmlRelation : public UmlBaseRelation { public: - UmlRelation(void * id, const Q3CString & n) : UmlBaseRelation(id, n) {}; + UmlRelation(void * id, const QByteArray & n) : UmlBaseRelation(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlSequenceDiagram.h b/genplugouts/BrowserSort/UmlSequenceDiagram.h index 6d89b12b3..fe73bedf3 100644 --- a/genplugouts/BrowserSort/UmlSequenceDiagram.h +++ b/genplugouts/BrowserSort/UmlSequenceDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseSequenceDiagram.h" -#include + // This class manages 'sequence diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlSequenceDiagram : public UmlBaseSequenceDiagram { public: - UmlSequenceDiagram(void * id, const Q3CString & n) : UmlBaseSequenceDiagram(id, n) {}; + UmlSequenceDiagram(void * id, const QByteArray & n) : UmlBaseSequenceDiagram(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlSettings.cpp b/genplugouts/BrowserSort/UmlSettings.cpp index b3013e645..e13a72a2e 100644 --- a/genplugouts/BrowserSort/UmlSettings.cpp +++ b/genplugouts/BrowserSort/UmlSettings.cpp @@ -6,15 +6,15 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include -Q3CString UmlSettings::artifactDescription() +#include +QByteArray UmlSettings::artifactDescription() { read_if_needed_(); return _artifact_default_description; } -bool UmlSettings::set_ArtifactDescription(Q3CString v) +bool UmlSettings::set_ArtifactDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultArtifactDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -26,14 +26,14 @@ bool UmlSettings::set_ArtifactDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::classDescription() +QByteArray UmlSettings::classDescription() { read_if_needed_(); return _class_default_description; } -bool UmlSettings::set_ClassDescription(Q3CString v) +bool UmlSettings::set_ClassDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultClassDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -45,14 +45,14 @@ bool UmlSettings::set_ClassDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::operationDescription() +QByteArray UmlSettings::operationDescription() { read_if_needed_(); return _operation_default_description; } -bool UmlSettings::set_OperationDescription(Q3CString v) +bool UmlSettings::set_OperationDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultOperationDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -64,14 +64,14 @@ bool UmlSettings::set_OperationDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::attributeDescription() +QByteArray UmlSettings::attributeDescription() { read_if_needed_(); return _attribute_default_description; } -bool UmlSettings::set_AttributeDescription(Q3CString v) +bool UmlSettings::set_AttributeDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultAttributeDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -83,14 +83,14 @@ bool UmlSettings::set_AttributeDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::relationDescription() +QByteArray UmlSettings::relationDescription() { read_if_needed_(); return _relation_default_description; } -bool UmlSettings::set_RelationDescription(Q3CString v) +bool UmlSettings::set_RelationDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultRelationDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -104,39 +104,39 @@ bool UmlSettings::set_RelationDescription(Q3CString v) bool UmlSettings::_defined; -Q3CString UmlSettings::_artifact_default_description; +QByteArray UmlSettings::_artifact_default_description; -Q3CString UmlSettings::_class_default_description; +QByteArray UmlSettings::_class_default_description; -Q3CString UmlSettings::_operation_default_description; +QByteArray UmlSettings::_operation_default_description; -Q3CString UmlSettings::_attribute_default_description; +QByteArray UmlSettings::_attribute_default_description; -Q3CString UmlSettings::_relation_default_description; +QByteArray UmlSettings::_relation_default_description; -Q3Dict UmlSettings::_map_builtins; +QHash UmlSettings::_map_builtins; UmlBuiltin * UmlSettings::_builtins; -Q3Dict UmlSettings::_map_relation_stereotypes; +QHash UmlSettings::_map_relation_stereotypes; UmlStereotype * UmlSettings::_relation_stereotypes; -Q3Dict UmlSettings::_map_class_stereotypes; +QHash UmlSettings::_map_class_stereotypes; UmlStereotype * UmlSettings::_class_stereotypes; void UmlSettings::read_() { - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); _builtins = new UmlBuiltin[n]; if (n / 2 > _map_builtins.size()) - _map_builtins.resize(_map_builtins.size() * 2 - 1); + _map_builtins.reserve(_map_builtins.size() * 2 - 1); for (index = 0; index != n; index += 1) { _builtins[index].uml = UmlCom::read_string(); @@ -148,7 +148,7 @@ void UmlSettings::read_() _relation_stereotypes = new UmlStereotype[n]; if (n / 2 > _map_relation_stereotypes.size()) - _map_relation_stereotypes.resize(_map_relation_stereotypes.size() * 2 - 1); + _map_relation_stereotypes.reserve(_map_relation_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { _relation_stereotypes[index].uml = UmlCom::read_string(); @@ -161,7 +161,7 @@ void UmlSettings::read_() _class_stereotypes = new UmlStereotype[n]; if (n / 2 > _map_class_stereotypes.size()) - _map_class_stereotypes.resize(_map_class_stereotypes.size() * 2 - 1); + _map_class_stereotypes.reserve(_map_class_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { _class_stereotypes[index].uml = UmlCom::read_string(); @@ -185,18 +185,18 @@ void UmlSettings::read_if_needed_() } } -unsigned UmlSettings::multiplicity_column(const Q3CString & mult) +unsigned UmlSettings::multiplicity_column(const QByteArray & mult) { if (mult.isEmpty() || (mult == "1")) return 0; - if ((mult == "*") || (mult.find("..") != -1)) + if ((mult == "*") || (mult.indexOf("..") != -1)) return 1; return 2; } -Q3CString UmlSettings::uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f) +QByteArray UmlSettings::uml_type(const QByteArray & t, QByteArray UmlBuiltin::* f) { unsigned index = _map_builtins.count(); @@ -207,7 +207,7 @@ Q3CString UmlSettings::uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f) return 0; } -Q3CString UmlSettings::uml_rel_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f) +QByteArray UmlSettings::uml_rel_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f) { unsigned index = _map_relation_stereotypes.count(); @@ -218,7 +218,7 @@ Q3CString UmlSettings::uml_rel_stereotype(const Q3CString & t, Q3CString UmlSter return 0; } -Q3CString UmlSettings::uml_class_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f) +QByteArray UmlSettings::uml_class_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f) { unsigned index = _map_class_stereotypes.count(); @@ -229,15 +229,15 @@ Q3CString UmlSettings::uml_class_stereotype(const Q3CString & t, Q3CString UmlSt return 0; } -UmlBuiltin * UmlSettings::add_type(const Q3CString & s) +UmlBuiltin * UmlSettings::add_type(const QByteArray & s) { - unsigned n = _map_builtins.count(); - unsigned index; + int n = _map_builtins.count(); + int index; UmlBuiltin * builtins = new UmlBuiltin[n + 1]; if (n / 2 > _map_builtins.size()) - _map_builtins.resize(_map_builtins.size() * 2 - 1); + _map_builtins.reserve(_map_builtins.size() * 2 - 1); for (index = 0; index != n; index += 1) builtins[index] = _builtins[index]; @@ -265,15 +265,15 @@ UmlBuiltin * UmlSettings::add_type(const Q3CString & s) } -UmlStereotype * UmlSettings::add_rel_stereotype(const Q3CString & s) +UmlStereotype * UmlSettings::add_rel_stereotype(const QByteArray & s) { - unsigned n = _map_relation_stereotypes.count(); - unsigned index; + int n = _map_relation_stereotypes.count(); + int index; UmlStereotype * relation_stereotypes = new UmlStereotype[n + 1]; if (n / 2 > _map_relation_stereotypes.size()) - _map_relation_stereotypes.resize(_map_relation_stereotypes.size() * 2 - 1); + _map_relation_stereotypes.reserve(_map_relation_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) relation_stereotypes[index] = _relation_stereotypes[index]; @@ -298,15 +298,15 @@ UmlStereotype * UmlSettings::add_rel_stereotype(const Q3CString & s) } -UmlStereotype * UmlSettings::add_class_stereotype(const Q3CString & s) +UmlStereotype * UmlSettings::add_class_stereotype(const QByteArray & s) { - unsigned n = _map_class_stereotypes.count(); - unsigned index; + int n = _map_class_stereotypes.count(); + int index; UmlStereotype * class_stereotypes = new UmlStereotype[n + 1]; if (n / 2 > _map_class_stereotypes.size()) - _map_class_stereotypes.resize(_map_class_stereotypes.size() * 2 - 1); + _map_class_stereotypes.reserve(_map_class_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) class_stereotypes[index] = _class_stereotypes[index]; diff --git a/genplugouts/BrowserSort/UmlSettings.h b/genplugouts/BrowserSort/UmlSettings.h index 57d228d02..bb327286f 100644 --- a/genplugouts/BrowserSort/UmlSettings.h +++ b/genplugouts/BrowserSort/UmlSettings.h @@ -1,10 +1,7 @@ #ifndef _UMLSETTINGS_H #define _UMLSETTINGS_H - - -#include -#include - +#include +#include struct UmlBuiltin; struct UmlStereotype; @@ -19,44 +16,44 @@ class UmlSettings { public: // return the default description - static Q3CString artifactDescription(); + static QByteArray artifactDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ArtifactDescription(Q3CString v); + static bool set_ArtifactDescription(QByteArray v); // return the default description - static Q3CString classDescription(); + static QByteArray classDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDescription(Q3CString v); + static bool set_ClassDescription(QByteArray v); // return the default description - static Q3CString operationDescription(); + static QByteArray operationDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDescription(Q3CString v); + static bool set_OperationDescription(QByteArray v); // return the default description - static Q3CString attributeDescription(); + static QByteArray attributeDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDescription(Q3CString v); + static bool set_AttributeDescription(QByteArray v); // return the default description - static Q3CString relationDescription(); + static QByteArray relationDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDescription(Q3CString v); + static bool set_RelationDescription(QByteArray v); protected: @@ -65,25 +62,25 @@ class UmlSettings static bool _defined; - static Q3CString _artifact_default_description; + static QByteArray _artifact_default_description; - static Q3CString _class_default_description; + static QByteArray _class_default_description; - static Q3CString _operation_default_description; + static QByteArray _operation_default_description; - static Q3CString _attribute_default_description; + static QByteArray _attribute_default_description; - static Q3CString _relation_default_description; + static QByteArray _relation_default_description; - static Q3Dict _map_builtins; + static QHash _map_builtins; static UmlBuiltin * _builtins; - static Q3Dict _map_relation_stereotypes; + static QHash _map_relation_stereotypes; static UmlStereotype * _relation_stereotypes; - static Q3Dict _map_class_stereotypes; + static QHash _map_class_stereotypes; static UmlStereotype * _class_stereotypes; @@ -97,31 +94,31 @@ class UmlSettings //internal, do NOT use it - static unsigned multiplicity_column(const Q3CString & mult); + static unsigned multiplicity_column(const QByteArray & mult); //internal, do NOT use it - static Q3CString uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f); + static QByteArray uml_type(const QByteArray & t, QByteArray UmlBuiltin::* f); //internal, do NOT use it - static Q3CString uml_rel_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f); + static QByteArray uml_rel_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f); //internal, do NOT use it - static Q3CString uml_class_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f); + static QByteArray uml_class_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f); //internal, do NOT use it - static UmlBuiltin * add_type(const Q3CString & s); + static UmlBuiltin * add_type(const QByteArray & s); //internal, do NOT use it - static UmlStereotype * add_rel_stereotype(const Q3CString & s); + static UmlStereotype * add_rel_stereotype(const QByteArray & s); //internal, do NOT use it - static UmlStereotype * add_class_stereotype(const Q3CString & s); + static UmlStereotype * add_class_stereotype(const QByteArray & s); }; diff --git a/genplugouts/BrowserSort/UmlState.h b/genplugouts/BrowserSort/UmlState.h index 6633712d6..010221a7e 100644 --- a/genplugouts/BrowserSort/UmlState.h +++ b/genplugouts/BrowserSort/UmlState.h @@ -4,13 +4,13 @@ #include "UmlBaseState.h" #include "UmlStateItem.h" -#include + class UmlState : public UmlBaseState, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlState(void * id, const Q3CString & s) : UmlBaseState(id, s) { + UmlState(void * id, const QByteArray & s) : UmlBaseState(id, s) { } virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlStateDiagram.h b/genplugouts/BrowserSort/UmlStateDiagram.h index f49b5fb44..c639f9193 100644 --- a/genplugouts/BrowserSort/UmlStateDiagram.h +++ b/genplugouts/BrowserSort/UmlStateDiagram.h @@ -4,13 +4,13 @@ #include "UmlBaseStateDiagram.h" #include "UmlStateItem.h" -#include + class UmlStateDiagram : public UmlBaseStateDiagram, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlStateDiagram(void * id, const Q3CString & s) : UmlBaseStateDiagram(id, s) { + UmlStateDiagram(void * id, const QByteArray & s) : UmlBaseStateDiagram(id, s) { } }; diff --git a/genplugouts/BrowserSort/UmlStereotype.h b/genplugouts/BrowserSort/UmlStereotype.h index 290517202..0ba9f3d9b 100644 --- a/genplugouts/BrowserSort/UmlStereotype.h +++ b/genplugouts/BrowserSort/UmlStereotype.h @@ -1,24 +1,24 @@ #ifndef _UMLSTEREOTYPE_H #define _UMLSTEREOTYPE_H +#include -#include // Internal class used to know how what code is produced for a stereotype in each language struct UmlStereotype { - Q3CString uml; + QByteArray uml; #ifdef WITHCPP - Q3CString cpp; + QByteArray cpp; #endif #ifdef WITHJAVA - Q3CString java; + QByteArray java; #endif #ifdef WITHIDL - Q3CString idl; + QByteArray idl; #endif }; diff --git a/genplugouts/BrowserSort/UmlTransition.h b/genplugouts/BrowserSort/UmlTransition.h index 3edd626c7..59ccc3e65 100644 --- a/genplugouts/BrowserSort/UmlTransition.h +++ b/genplugouts/BrowserSort/UmlTransition.h @@ -4,12 +4,12 @@ #include "UmlBaseTransition.h" #include "UmlStateItem.h" -#include + class UmlTransition : public UmlBaseTransition, public UmlStateItem { public: - UmlTransition(void * id, const Q3CString & n) : UmlBaseTransition(id, n) { + UmlTransition(void * id, const QByteArray & n) : UmlBaseTransition(id, n) { } }; diff --git a/genplugouts/BrowserSort/UmlTypeSpec.cpp b/genplugouts/BrowserSort/UmlTypeSpec.cpp index 4bcfebb95..ec194d414 100644 --- a/genplugouts/BrowserSort/UmlTypeSpec.cpp +++ b/genplugouts/BrowserSort/UmlTypeSpec.cpp @@ -2,9 +2,9 @@ #include "UmlTypeSpec.h" #include "UmlClass.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlTypeSpec::toString() const +const QByteArray & UmlTypeSpec::toString() const { return (type) ? type->name() : explicit_type; } diff --git a/genplugouts/BrowserSort/UmlTypeSpec.h b/genplugouts/BrowserSort/UmlTypeSpec.h index 1c939ea94..6f4a78c19 100644 --- a/genplugouts/BrowserSort/UmlTypeSpec.h +++ b/genplugouts/BrowserSort/UmlTypeSpec.h @@ -1,9 +1,6 @@ #ifndef _UMLTYPESPEC_H #define _UMLTYPESPEC_H - - -#include - +#include class UmlClass; // this class memorize a type specification, which may be @@ -15,7 +12,7 @@ class UmlTypeSpec { public: // significant in case type == 0 - Q3CString explicit_type; + QByteArray explicit_type; // if != 0 the class representing the type UmlClass * type; @@ -23,7 +20,7 @@ class UmlTypeSpec UmlTypeSpec() : type(0) {}; // returns the type as a string in all cases - const Q3CString & toString() const; + const QByteArray & toString() const; }; diff --git a/genplugouts/BrowserSort/UmlUseCase.h b/genplugouts/BrowserSort/UmlUseCase.h index 104c90586..57ed02480 100644 --- a/genplugouts/BrowserSort/UmlUseCase.h +++ b/genplugouts/BrowserSort/UmlUseCase.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCase.h" -#include + // This class manages 'use case' // @@ -13,7 +13,7 @@ class UmlUseCase : public UmlBaseUseCase public: virtual void sort(); - UmlUseCase(void * id, const Q3CString & n) : UmlBaseUseCase(id, n) {}; + UmlUseCase(void * id, const QByteArray & n) : UmlBaseUseCase(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlUseCaseDiagram.h b/genplugouts/BrowserSort/UmlUseCaseDiagram.h index fa0da495a..ed28cfe79 100644 --- a/genplugouts/BrowserSort/UmlUseCaseDiagram.h +++ b/genplugouts/BrowserSort/UmlUseCaseDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCaseDiagram.h" -#include + // This class manages 'use case diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlUseCaseDiagram : public UmlBaseUseCaseDiagram { public: - UmlUseCaseDiagram(void * id, const Q3CString & n) : UmlBaseUseCaseDiagram(id, n) {}; + UmlUseCaseDiagram(void * id, const QByteArray & n) : UmlBaseUseCaseDiagram(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/BrowserSort/UmlUseCaseView.h b/genplugouts/BrowserSort/UmlUseCaseView.h index d4ab8b388..35b8ec322 100644 --- a/genplugouts/BrowserSort/UmlUseCaseView.h +++ b/genplugouts/BrowserSort/UmlUseCaseView.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCaseView.h" -#include + // This class manages 'use case view' // @@ -13,7 +13,7 @@ class UmlUseCaseView : public UmlBaseUseCaseView public: virtual void sort(); - UmlUseCaseView(void * id, const Q3CString & n) : UmlBaseUseCaseView(id, n) {}; + UmlUseCaseView(void * id, const QByteArray & n) : UmlBaseUseCaseView(id, n) {}; virtual int orderWeight(); diff --git a/genplugouts/CppUtilities/ConstrDestrCopyDialog.cpp b/genplugouts/CppUtilities/ConstrDestrCopyDialog.cpp index e38bca4af..cc49d3c7c 100644 --- a/genplugouts/CppUtilities/ConstrDestrCopyDialog.cpp +++ b/genplugouts/CppUtilities/ConstrDestrCopyDialog.cpp @@ -5,18 +5,19 @@ #include "ConstrDestrCopyDialog.h" #include "UmlClass.h" -#include -#include -#include +#include + +#include #include #include #include -#include -#include +#include +#include #include -//Added by qt3to4: -#include +#include #include "Logging/QsLog.h" +#include + class FunctionTracer { public: @@ -39,11 +40,12 @@ ConstrDestrCopyDialog::ConstrDestrCopyDialog(UmlClass * cl, bool have_constructo bool have_destructor, bool have_copy, bool have_const_copy, bool have_assignment, bool have_const_assignment) - : QDialog(0, 0, TRUE), target(cl) + : QDialog(0), target(cl) { - Q3VBoxLayout * vbox = new Q3VBoxLayout(this); - Q3HGroupBox * g; - Q3PtrList labels; + setModal(true); + QVBoxLayout * vbox = new QVBoxLayout(this); + GridBox * g; + QList labels; QLabel * lbl; vbox->setSpacing(5); @@ -57,32 +59,36 @@ ConstrDestrCopyDialog::ConstrDestrCopyDialog(UmlClass * cl, bool have_constructo // constructor - g = new Q3HGroupBox(this); + g = new GridBox(2, this); vbox->addWidget(g); - labels.append(new QLabel((have_constructor) + labels.append(lbl = new QLabel((have_constructor) ? "the class already have contructor " : "the class doesn't have contructor ", g)); + g->addWidget(lbl); - Q3HBox * h = new Q3HBox(g); + HHBox * h; + g->addWidget(h = new HHBox(g)); - add_constr = new QCheckBox("add constructor", h); - constr_explicit = new QCheckBox("explicit", h); + h->addWidget(add_constr = new QCheckBox("add constructor", h)); + h->addWidget(constr_explicit = new QCheckBox("explicit", h)); // destructor if (! have_destructor) { - g = new Q3HGroupBox(this); + g = new GridBox(2,this); vbox->addWidget(g); - labels.append(new QLabel("the class doesn't have destructor ", + labels.append(lbl = new QLabel("the class doesn't have destructor ", g)); + g->addWidget(lbl); - h = new Q3HBox(g); + h = new HHBox(g); + g->addWidget(h); - add_destr = new QCheckBox("add destructor", h); - virtual_destr = new QCheckBox("virtual", h); + h->addWidget(add_destr = new QCheckBox("add destructor", h)); + h->addWidget(virtual_destr = new QCheckBox("virtual", h)); } else add_destr = 0; @@ -93,39 +99,42 @@ ConstrDestrCopyDialog::ConstrDestrCopyDialog(UmlClass * cl, bool have_constructo add_copy = 0; if (!have_const_copy) { - g = new Q3HGroupBox(this); + g = new GridBox(2, this); vbox->addWidget(g); - labels.append(new QLabel("the class doesn't have copy contructor \nwith const argument ", + labels.append(lbl = new QLabel("the class doesn't have copy contructor \nwith const argument ", g)); - add_const_copy = new QCheckBox("add copy constructor\nwith const argument", - g); + g->addWidget(lbl); + g->addWidget(add_const_copy = new QCheckBox("add copy constructor\nwith const argument", + g)); } else add_const_copy = 0; } else if (!have_const_copy) { - g = new Q3HGroupBox(this); + g = new GridBox(2, this); vbox->addWidget(g); - labels.append(new QLabel("the class doesn't have copy contructor ", + labels.append(lbl = new QLabel("the class doesn't have copy contructor ", g)); - - Q3VBox * v = new Q3VBox(g); - - add_const_copy = new QCheckBox("add copy constructor\nwith const argument", - v); - add_copy = new QCheckBox("add copy constructor\nwith non const argument", - v); + g->addWidget(lbl); + + VVBox * v = new VVBox(g); + g->addWidget(v); + v->addWidget(add_const_copy = new QCheckBox("add copy constructor\nwith const argument", + v)); + v->addWidget(add_copy = new QCheckBox("add copy constructor\nwith non const argument", + v)); } else { - g = new Q3HGroupBox(this); + g = new GridBox(2,this); vbox->addWidget(g); - labels.append(new QLabel("the class doesn't have copy contructor \nwith non const argument ", + labels.append(lbl = new QLabel("the class doesn't have copy contructor \nwith non const argument ", + g)); + g->addWidget(lbl); + g->addWidget(add_copy = new QCheckBox("add copy constructor\nwith non const argument", g)); - add_copy = new QCheckBox("add copy constructor\nwith non const argument", - g); add_const_copy = 0; } @@ -135,38 +144,42 @@ ConstrDestrCopyDialog::ConstrDestrCopyDialog(UmlClass * cl, bool have_constructo add_assign = 0; if (!have_const_assignment) { - g = new Q3HGroupBox(this); + g = new GridBox(2, this); vbox->addWidget(g); - labels.append(new QLabel("the class doesn't have assignment\noperator with const argument ", + labels.append(lbl = new QLabel("the class doesn't have assignment\noperator with const argument ", g)); - add_const_assign = new QCheckBox("add assignment\nwith const argument", - g); + g->addWidget(lbl); + g->addWidget(add_const_assign = new QCheckBox("add assignment\nwith const argument", + g)); } else add_const_assign = 0; } else if (!have_const_assignment) { - g = new Q3HGroupBox(this); + g = new GridBox(2, this); vbox->addWidget(g); - labels.append(new QLabel("the class doesn't have assignment operator ", g)); + labels.append(lbl = new QLabel("the class doesn't have assignment operator ", g)); - Q3VBox * v = new Q3VBox(g); + g->addWidget(lbl); + VVBox * v = new VVBox(g); + g->addWidget(v); - add_const_assign = new QCheckBox("add assignment\nwith const argument", - v); - add_assign = new QCheckBox("add assignment\nwith non const argument", - v); + v->addWidget(add_const_assign = new QCheckBox("add assignment\nwith const argument", + v)); + v->addWidget(add_assign = new QCheckBox("add assignment\nwith non const argument", + v)); } else { - g = new Q3HGroupBox(this); + g = new GridBox(2,this); vbox->addWidget(g); - labels.append(new QLabel("the class doesn't have assignment operator \nwith non const argument ", + labels.append(lbl = new QLabel("the class doesn't have assignment operator \nwith non const argument ", g)); - add_assign = new QCheckBox("add assignment\nwith non const argument", - g); + g->addWidget(lbl); + g->addWidget(add_assign = new QCheckBox("add assignment\nwith non const argument", + g)); add_const_assign = 0; } @@ -174,24 +187,26 @@ ConstrDestrCopyDialog::ConstrDestrCopyDialog(UmlClass * cl, bool have_constructo QSize sz(labels.first()->sizeHint()); - while ((lbl = labels.next()) != 0) { + foreach (lbl,labels) { if (lbl->sizeHint().width() > sz.width()) sz.setWidth(lbl->sizeHint().width()); } - for (lbl = labels.first(); lbl != 0; lbl = labels.next()) { + foreach (lbl,labels) { sz.setHeight(lbl->sizeHint().height()); lbl->setFixedSize(sz); } // ok & cancel buttons - Q3HBox * hbox = new Q3HBox(this); + HHBox * hbox = new HHBox(this); vbox->addWidget(hbox); QPushButton * ok = new QPushButton("&OK", hbox); QPushButton * cancel = new QPushButton("&Cancel", hbox); + hbox->addWidget(ok); + hbox->addWidget(cancel); QSize bs(cancel->sizeHint()); @@ -206,53 +221,27 @@ ConstrDestrCopyDialog::ConstrDestrCopyDialog(UmlClass * cl, bool have_constructo void ConstrDestrCopyDialog::polish() { - QDialog::polish(); - - // try to read .doumlrc - // note : QFile fp(QDir::home().absFilePath(".doumlrc")) doesn't work - // if the path contains non latin1 characters, for instance cyrillic ! - QString s = QDir::home().absFilePath(".doumlrc"); - FILE * fp = fopen((const char *) s, "r"); - -#ifdef WIN32 - - if (fp == 0) { - QString hd = getenv("USERPROFILE"); - - if (! hd.isEmpty()) { - QDir d(hd); - QString s2 = d.absFilePath(".doumlrc"); - - fp = fopen((const char *) s2, "r"); - } - } - -#endif - - if (fp != 0) { - char line[512]; - - while (fgets(line, sizeof(line) - 1, fp) != 0) { - if (!strncmp(line, "DESKTOP ", 8)) { - int l, t, r, b; - - if (sscanf(line + 8, "%d %d %d %d", &l, &t, &r, &b) == 4) { - if (!((r == 0) && (t == 0) && (r == 0) && (b == 0)) && - !((r < 0) || (t < 0) || (r < 0) || (b < 0)) && - !((r <= l) || (b <= t))) { - int cx = (r + l) / 2; - int cy = (t + b) / 2; - - move(x() + cx - (x() + width() / 2), - y() + cy - (y() + height() / 2)); - } - } - - break; - } - } - - fclose(fp); + QDialog::ensurePolished(); + + QSettings settings(QSettings::IniFormat, QSettings::UserScope, "DoUML", "settings"); + settings.setIniCodec("UTF-8"); + int l, t, r, b; + l = settings.value("Desktop/left", -1).toInt(); + r = settings.value("Desktop/right", -1).toInt(); + t = settings.value("Desktop/top", -1).toInt(); + b = settings.value("Desktop/bottom", -1).toInt(); + + if(l != -1 && r != -1 && t != -1 && b != -1) + { + if (!((r == 0) && (t == 0) && (r == 0) && (b == 0)) && + !((r < 0) || (t < 0) || (r < 0) || (b < 0)) && + !((r <= l) || (b <= t))) + { + int cx = (r + l) / 2; + int cy = (t + b) / 2; + + move(x() + cx - (x() + width() / 2), y() + cy - (y() + height() / 2)); + } } } diff --git a/genplugouts/CppUtilities/CppSettings.cpp b/genplugouts/CppUtilities/CppSettings.cpp index f95daa113..a326a89fe 100644 --- a/genplugouts/CppUtilities/CppSettings.cpp +++ b/genplugouts/CppUtilities/CppSettings.cpp @@ -10,7 +10,7 @@ #include "UmlStereotype.h" #include "Logging/QsLog.h" //Added by qt3to4: -#include +#include bool CppSettings::useDefaults() { UmlCom::send_cmd(cppSettingsCmd, getCppUseDefaultsCmd); @@ -23,22 +23,22 @@ bool CppSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString CppSettings::type(Q3CString s) +QByteArray CppSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_Type(Q3CString s, Q3CString v) +bool CppSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppTypeCmd, (const char *)s, (const char *)v); //[rageek] Fix Prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -51,29 +51,29 @@ bool CppSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::umlType(Q3CString s) +QByteArray CppSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::cpp); } -Q3CString CppSettings::relationAttributeStereotype(Q3CString s) +QByteArray CppSettings::relationAttributeStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix Prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -86,29 +86,29 @@ bool CppSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::relationAttributeUmlStereotype(Q3CString s) +QByteArray CppSettings::relationAttributeUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::classStereotype(Q3CString s) +QByteArray CppSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppClassStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix Prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -121,32 +121,32 @@ bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::classUmlStereotype(Q3CString s) +QByteArray CppSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::include(Q3CString s) +QByteArray CppSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool CppSettings::set_Include(Q3CString s, Q3CString v) +bool CppSettings::set_Include(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppIncludeCmd, (const char *)s, (const char *)v); //[rageek] Fix Prototype if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -157,14 +157,14 @@ bool CppSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::rootDir() +QByteArray CppSettings::rootDir() { read_if_needed_(); return _root; } -bool CppSettings::set_RootDir(Q3CString v) +bool CppSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppRootDirCmd, (const char *)v); //[rageek] Fix Prototype @@ -176,14 +176,14 @@ bool CppSettings::set_RootDir(Q3CString v) return FALSE; } -Q3CString CppSettings::headerContent() +QByteArray CppSettings::headerContent() { read_if_needed_(); return _h_content; } -bool CppSettings::set_HeaderContent(Q3CString v) +bool CppSettings::set_HeaderContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderContentCmd, (const char *)v); //[rageek] Fix Prototype @@ -195,14 +195,14 @@ bool CppSettings::set_HeaderContent(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceContent() +QByteArray CppSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool CppSettings::set_SourceContent(Q3CString v) +bool CppSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceContentCmd, (const char *)v); //[rageek] Fix Prototype @@ -214,14 +214,14 @@ bool CppSettings::set_SourceContent(Q3CString v) return FALSE; } -Q3CString CppSettings::headerExtension() +QByteArray CppSettings::headerExtension() { read_if_needed_(); return _h_ext; } -bool CppSettings::set_HeaderExtension(Q3CString v) +bool CppSettings::set_HeaderExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderExtensionCmd, (const char *)v); //[rageek] Fix Prototype @@ -233,14 +233,14 @@ bool CppSettings::set_HeaderExtension(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceExtension() +QByteArray CppSettings::sourceExtension() { read_if_needed_(); return _src_ext; } -bool CppSettings::set_SourceExtension(Q3CString v) +bool CppSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceExtensionCmd, (const char *)v); //[rageek] Fix Prototype @@ -353,14 +353,14 @@ bool CppSettings::set_IsGenerateJavadocStyleComment(bool v) return FALSE; } -const Q3CString & CppSettings::enumIn() +const QByteArray & CppSettings::enumIn() { read_if_needed_(); return _enum_in; } -bool CppSettings::set_EnumIn(Q3CString v) +bool CppSettings::set_EnumIn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInCmd, (const char *)v); //[rageek] Fix Prototype @@ -372,14 +372,14 @@ bool CppSettings::set_EnumIn(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumOut() +const QByteArray & CppSettings::enumOut() { read_if_needed_(); return _enum_out; } -bool CppSettings::set_EnumOut(Q3CString v) +bool CppSettings::set_EnumOut(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumOutCmd, (const char *)v); //[rageek] Fix Prototype @@ -391,14 +391,14 @@ bool CppSettings::set_EnumOut(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumInout() +const QByteArray & CppSettings::enumInout() { read_if_needed_(); return _enum_inout; } -bool CppSettings::set_EnumInout(Q3CString v) +bool CppSettings::set_EnumInout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInOutCmd, (const char *)v); //[rageek] Fix Prototype @@ -410,14 +410,14 @@ bool CppSettings::set_EnumInout(Q3CString v) return FALSE; } -Q3CString CppSettings::enumReturn() +QByteArray CppSettings::enumReturn() { read_if_needed_(); return _enum_return; } -bool CppSettings::set_EnumReturn(Q3CString v) +bool CppSettings::set_EnumReturn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumReturnCmd, (const char *)v); //[rageek] Fix Prototype @@ -429,22 +429,22 @@ bool CppSettings::set_EnumReturn(Q3CString v) return FALSE; } -Q3CString CppSettings::builtinIn(Q3CString s) +QByteArray CppSettings::builtinIn(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_in : Q3CString(); + return (b) ? b->cpp_in : QByteArray(); } -bool CppSettings::set_BuiltinIn(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinIn(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppInCmd, (const char *)type, (const char *)form); //[rageek] Fix Prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -457,22 +457,22 @@ bool CppSettings::set_BuiltinIn(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinOut(Q3CString s) +QByteArray CppSettings::builtinOut(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_out : Q3CString(); + return (b) ? b->cpp_out : QByteArray(); } -bool CppSettings::set_BuiltinOut(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinOut(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppOutCmd, (const char *)type, (const char *)form); //[rageek] Fix Prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -485,22 +485,22 @@ bool CppSettings::set_BuiltinOut(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinInOut(Q3CString s) +QByteArray CppSettings::builtinInOut(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_inout : Q3CString(); + return (b) ? b->cpp_inout : QByteArray(); } -bool CppSettings::set_BuiltinInOut(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinInOut(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppInOutCmd, (const char *)type, (const char *)form); //[rageek] Fix Prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -513,22 +513,22 @@ bool CppSettings::set_BuiltinInOut(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinReturn(Q3CString s) +QByteArray CppSettings::builtinReturn(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_return : Q3CString(); + return (b) ? b->cpp_return : QByteArray(); } -bool CppSettings::set_BuiltinReturn(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinReturn(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppReturnCmd, (const char *)type, (const char *)form); //[rageek] Fix Prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -541,14 +541,14 @@ bool CppSettings::set_BuiltinReturn(Q3CString type, Q3CString form) return FALSE; } -const Q3CString & CppSettings::in() +const QByteArray & CppSettings::in() { read_if_needed_(); return _in; } -bool CppSettings::set_In(Q3CString v) +bool CppSettings::set_In(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInCmd, (const char *)v, ""); //[rageek] Fix Prototype @@ -560,14 +560,14 @@ bool CppSettings::set_In(Q3CString v) return FALSE; } -const Q3CString & CppSettings::out() +const QByteArray & CppSettings::out() { read_if_needed_(); return _out; } -bool CppSettings::set_Out(Q3CString v) +bool CppSettings::set_Out(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOutCmd, (const char *)v, ""); //[rageek] Fix Prototype @@ -579,14 +579,14 @@ bool CppSettings::set_Out(Q3CString v) return FALSE; } -const Q3CString & CppSettings::inout() +const QByteArray & CppSettings::inout() { read_if_needed_(); return _inout; } -bool CppSettings::set_Inout(Q3CString v) +bool CppSettings::set_Inout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInOutCmd, (const char *)v, ""); //[rageek] Fix Prototype @@ -598,14 +598,14 @@ bool CppSettings::set_Inout(Q3CString v) return FALSE; } -Q3CString CppSettings::Return() +QByteArray CppSettings::Return() { read_if_needed_(); return _return; } -bool CppSettings::set_Return(Q3CString v) +bool CppSettings::set_Return(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppReturnCmd, (const char *)v, ""); //[rageek] Fix Prototype @@ -617,14 +617,14 @@ bool CppSettings::set_Return(Q3CString v) return FALSE; } -const Q3CString & CppSettings::classDecl() +const QByteArray & CppSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool CppSettings::set_ClassDecl(Q3CString v) +bool CppSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppClassDeclCmd, (const char *)v); //[rageek] Fix Prototype @@ -636,14 +636,14 @@ bool CppSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::externalClassDecl() +const QByteArray & CppSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool CppSettings::set_ExternalClassDecl(Q3CString v) +bool CppSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppExternalClassDeclCmd, (const char *)v); //[rageek] Fix Prototype @@ -655,14 +655,14 @@ bool CppSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::structDecl() +const QByteArray & CppSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool CppSettings::set_StructDecl(Q3CString v) +bool CppSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppStructDeclCmd, (const char *)v); //[rageek] Fix Prototype @@ -674,14 +674,14 @@ bool CppSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::unionDecl() +const QByteArray & CppSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool CppSettings::set_UnionDecl(Q3CString v) +bool CppSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppUnionDeclCmd, (const char *)v); //[rageek] Fix Prototype @@ -693,14 +693,14 @@ bool CppSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumDecl() +const QByteArray & CppSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool CppSettings::set_EnumDecl(Q3CString v) +bool CppSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumDeclCmd, (const char *)v); //[rageek] Fix Prototype @@ -712,14 +712,14 @@ bool CppSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::typedefDecl() +const QByteArray & CppSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool CppSettings::set_TypedefDecl(Q3CString v) +bool CppSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppTypedefDeclCmd, (const char *)v); //[rageek] Fix Prototype @@ -731,14 +731,14 @@ bool CppSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::attributeDecl(const char * multiplicity) +const QByteArray & CppSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool CppSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool CppSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppAttributeDeclCmd, multiplicity, (const char *)v); //[rageek] Fix Prototype @@ -751,14 +751,14 @@ bool CppSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumItemDecl() +const QByteArray & CppSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool CppSettings::set_EnumItemDecl(Q3CString v) +bool CppSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumItemDeclCmd, (const char *)v); //[rageek] Fix Prototype @@ -770,7 +770,7 @@ bool CppSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::relationDecl(bool by_value, const char * multiplicity) +const QByteArray & CppSettings::relationDecl(bool by_value, const char * multiplicity) { read_if_needed_(); @@ -790,14 +790,14 @@ bool CppSettings::set_RelationDecl(bool by_value, const char * multiplicity, con return FALSE; } -const Q3CString & CppSettings::operationDecl() +const QByteArray & CppSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool CppSettings::set_OperationDecl(Q3CString v) +bool CppSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDeclCmd, (const char *)v); //[rageek] Fix Prototype @@ -809,7 +809,7 @@ bool CppSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::operationDef() +const QByteArray & CppSettings::operationDef() { QLOG_INFO() << "2.1"; read_if_needed_(); @@ -817,7 +817,7 @@ const Q3CString & CppSettings::operationDef() return _oper_def; } -bool CppSettings::set_OperationDef(Q3CString v) +bool CppSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDefCmd, (const char *)v); //[rageek] Fix Prototype @@ -867,14 +867,14 @@ bool CppSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::getName() +const QByteArray & CppSettings::getName() { read_if_needed_(); return _get_name; } -bool CppSettings::set_GetName(Q3CString v) +bool CppSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppGetNameCmd, (const char *)v); //[rageek] Fix Prototype @@ -962,14 +962,14 @@ bool CppSettings::set_SetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::setName() +const QByteArray & CppSettings::setName() { read_if_needed_(); return _set_name; } -bool CppSettings::set_SetName(Q3CString v) +bool CppSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSetNameCmd, (const char *)v); //[rageek] Fix Prototype @@ -1040,51 +1040,51 @@ bool CppSettings::set_IsSetParamRef(bool v) bool CppSettings::_defined; -Q3CString CppSettings::_root; +QByteArray CppSettings::_root; -Q3CString CppSettings::_in; +QByteArray CppSettings::_in; -Q3CString CppSettings::_out; +QByteArray CppSettings::_out; -Q3CString CppSettings::_inout; +QByteArray CppSettings::_inout; -Q3CString CppSettings::_return; +QByteArray CppSettings::_return; -Q3CString CppSettings::_enum_in; +QByteArray CppSettings::_enum_in; -Q3CString CppSettings::_enum_out; +QByteArray CppSettings::_enum_out; -Q3CString CppSettings::_enum_inout; +QByteArray CppSettings::_enum_inout; -Q3CString CppSettings::_enum_return; +QByteArray CppSettings::_enum_return; -Q3CString CppSettings::_class_decl; +QByteArray CppSettings::_class_decl; -Q3CString CppSettings::_external_class_decl; +QByteArray CppSettings::_external_class_decl; -Q3CString CppSettings::_struct_decl; +QByteArray CppSettings::_struct_decl; -Q3CString CppSettings::_union_decl; +QByteArray CppSettings::_union_decl; -Q3CString CppSettings::_enum_decl; +QByteArray CppSettings::_enum_decl; -Q3CString CppSettings::_typedef_decl; +QByteArray CppSettings::_typedef_decl; -Q3CString CppSettings::_attr_decl[3/*multiplicity*/]; +QByteArray CppSettings::_attr_decl[3/*multiplicity*/]; -Q3CString CppSettings::_enum_item_decl; +QByteArray CppSettings::_enum_item_decl; -Q3CString CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; +QByteArray CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; -Q3CString CppSettings::_oper_decl; +QByteArray CppSettings::_oper_decl; -Q3CString CppSettings::_oper_def; +QByteArray CppSettings::_oper_def; bool CppSettings::_force_oper_throw; aVisibility CppSettings::_get_visibility; -Q3CString CppSettings::_get_name; +QByteArray CppSettings::_get_name; bool CppSettings::_is_get_inline; @@ -1094,7 +1094,7 @@ bool CppSettings::_is_get_value_const; aVisibility CppSettings::_set_visibility; -Q3CString CppSettings::_set_name; +QByteArray CppSettings::_set_name; bool CppSettings::_is_set_inline; @@ -1102,13 +1102,13 @@ bool CppSettings::_is_set_param_const; bool CppSettings::_is_set_param_ref; -Q3CString CppSettings::_h_content; +QByteArray CppSettings::_h_content; -Q3CString CppSettings::_src_content; +QByteArray CppSettings::_src_content; -Q3CString CppSettings::_h_ext; +QByteArray CppSettings::_h_ext; -Q3CString CppSettings::_src_ext; +QByteArray CppSettings::_src_ext; bool CppSettings::_incl_with_path; @@ -1120,14 +1120,14 @@ bool CppSettings::_is_force_namespace_gen; bool CppSettings::_is_generate_javadoc_comment; -Q3Dict CppSettings::_map_includes; +QHash CppSettings::_map_includes; void CppSettings::read_() { _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -1153,13 +1153,13 @@ void CppSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _h_content = UmlCom::read_string(); diff --git a/genplugouts/CppUtilities/CppSettings.h b/genplugouts/CppUtilities/CppSettings.h index c455cc67f..d21574f87 100644 --- a/genplugouts/CppUtilities/CppSettings.h +++ b/genplugouts/CppUtilities/CppSettings.h @@ -4,10 +4,10 @@ #ifdef WITHCPP -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning C++, configured through // the 'Generation settings' dialog. @@ -31,100 +31,100 @@ class CppSettings : public UmlSettings // returns the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the C++ type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(Q3CString s); + static QByteArray relationAttributeStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString relationAttributeUmlStereotype(Q3CString s); + static QByteArray relationAttributeUmlStereotype(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static Q3CString rootDir(); + static QByteArray rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default header file content - static Q3CString headerContent(); + static QByteArray headerContent(); // set the default header file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderContent(Q3CString v); + static bool set_HeaderContent(QByteArray v); // returns the default source file content - static Q3CString sourceContent(); + static QByteArray sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the header files produced by the // C++ code generator - static Q3CString headerExtension(); + static QByteArray headerExtension(); // set the extension of the header files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderExtension(Q3CString v); + static bool set_HeaderExtension(QByteArray v); // returns the extension of the source files produced by the // C++ code generator - static Q3CString sourceExtension(); + static QByteArray sourceExtension(); // set the extension of the source files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // indicates to the code generator if the #include may specify // the path of just the file's name @@ -175,47 +175,47 @@ class CppSettings : public UmlSettings // returns the default operation 'in' parameter specification // in case its type is an enum - static const Q3CString & enumIn(); + static const QByteArray & enumIn(); // set the default operation 'in' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumIn(Q3CString v); + static bool set_EnumIn(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is an enum - static const Q3CString & enumOut(); + static const QByteArray & enumOut(); // set the default operation 'out' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumOut(Q3CString v); + static bool set_EnumOut(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is an enum - static const Q3CString & enumInout(); + static const QByteArray & enumInout(); // set the default operation 'inout' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumInout(Q3CString v); + static bool set_EnumInout(QByteArray v); // return the default operation value type form - static Q3CString enumReturn(); + static QByteArray enumReturn(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumReturn(Q3CString v); + static bool set_EnumReturn(QByteArray v); // returns the default operation 'in' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinIn(Q3CString s); + static QByteArray builtinIn(QByteArray s); // set the default operation 'in' parameter specification // in case its type is specified in the first 'Generation @@ -223,13 +223,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinIn(Q3CString type, Q3CString form); + static bool set_BuiltinIn(QByteArray type, QByteArray form); // returns the default operation 'out' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinOut(Q3CString s); + static QByteArray builtinOut(QByteArray s); // set the default operation 'out' parameter specification // in case its type is specified in the first 'Generation @@ -237,13 +237,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinOut(Q3CString type, Q3CString form); + static bool set_BuiltinOut(QByteArray type, QByteArray form); // returns the default operation 'inout' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinInOut(Q3CString s); + static QByteArray builtinInOut(QByteArray s); // set the default operation 'inout' parameter specification // in case its type is specified in the first 'Generation @@ -251,13 +251,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinInOut(Q3CString type, Q3CString form); + static bool set_BuiltinInOut(QByteArray type, QByteArray form); // returns the default operation 'return' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinReturn(Q3CString s); + static QByteArray builtinReturn(QByteArray s); // set the default operation 'return' parameter specification // in case its type is specified in the first 'Generation @@ -265,36 +265,36 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinReturn(Q3CString type, Q3CString form); + static bool set_BuiltinReturn(QByteArray type, QByteArray form); // returns the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & in(); + static const QByteArray & in(); // set the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_In(Q3CString v); + static bool set_In(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & out(); + static const QByteArray & out(); // set the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Out(Q3CString v); + static bool set_Out(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & inout(); + static const QByteArray & inout(); // set the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the @@ -302,83 +302,83 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Inout(Q3CString v); + static bool set_Inout(QByteArray v); // return the default operation value type form - static Q3CString Return(); + static QByteArray Return(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Return(Q3CString v); + static bool set_Return(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. - static const Q3CString & relationDecl(bool by_value, const char * multiplicity); + static const QByteArray & relationDecl(bool by_value, const char * multiplicity); // set the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. @@ -387,20 +387,20 @@ class CppSettings : public UmlSettings static bool set_RelationDecl(bool by_value, const char * multiplicity, const char * v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // return TRUE if the operations profile must contain 'throw()' // when the operations does not have exception @@ -424,13 +424,13 @@ class CppSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns if a 'get' operation generated through the attribute // and relation 'add get operation' menu is inline by default @@ -476,14 +476,14 @@ class CppSettings : public UmlSettings // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is inline by default @@ -524,51 +524,51 @@ class CppSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _in; + static QByteArray _in; - static Q3CString _out; + static QByteArray _out; - static Q3CString _inout; + static QByteArray _inout; - static Q3CString _return; + static QByteArray _return; - static Q3CString _enum_in; + static QByteArray _enum_in; - static Q3CString _enum_out; + static QByteArray _enum_out; - static Q3CString _enum_inout; + static QByteArray _enum_inout; - static Q3CString _enum_return; + static QByteArray _enum_return; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[2/*relation kind*/][3/*multiplicity*/]; + static QByteArray _rel_decl[2/*relation kind*/][3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _oper_def; + static QByteArray _oper_def; static bool _force_oper_throw; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_inline; @@ -578,7 +578,7 @@ class CppSettings : public UmlSettings static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_inline; @@ -586,13 +586,13 @@ class CppSettings : public UmlSettings static bool _is_set_param_ref; - static Q3CString _h_content; + static QByteArray _h_content; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _h_ext; + static QByteArray _h_ext; - static Q3CString _src_ext; + static QByteArray _src_ext; static bool _incl_with_path; @@ -604,7 +604,7 @@ class CppSettings : public UmlSettings static bool _is_generate_javadoc_comment; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/CppUtilities/CppUtilities.pro b/genplugouts/CppUtilities/CppUtilities.pro index b089fcc90..7fefc7402 100644 --- a/genplugouts/CppUtilities/CppUtilities.pro +++ b/genplugouts/CppUtilities/CppUtilities.pro @@ -1,7 +1,11 @@ +#ok TEMPLATE = app TARGET = cpp_util -CONFIG += warn_on qt -DEFINES = WITHCPP TRACE +CONFIG -= app_bundle +CONFIG += qt warn_on c++11 +QMAKE_POST_LINK = " " +DEFINES += QT_DEPRECATED_WARNINGS +DEFINES += WITHCPP TRACE INCLUDEPATH += ../../src HEADERS = ./UmlBasePackage.h \ ./UmlFragmentCompartment.h \ @@ -204,7 +208,10 @@ HEADERS = ./UmlBasePackage.h \ ./UmlBaseTypeSpec.h \ Logging/QsLogDest.h \ Logging/QsLog.h \ - Logging/QsDebugOutput.h + Logging/QsDebugOutput.h \ + gridbox.h \ + hhbox.h \ + vvbox.h SOURCES = ./UmlBasePackage.cpp \ ./UmlFragmentCompartment.cpp \ ./UmlBaseUseCase.cpp \ @@ -407,24 +414,22 @@ SOURCES = ./UmlBasePackage.cpp \ ./UmlBaseTypeSpec.cpp \ Logging/QsLogDest.cpp \ Logging/QsLog.cpp \ - Logging/QsDebugOutput.cpp + Logging/QsDebugOutput.cpp \ + gridbox.cpp \ + hhbox.cpp \ + vvbox.cpp -#The following line was inserted by qt3to4 -QT += network qt3support - -Release{ - - - MOC_DIR = bin/douml/MOC_release - OBJECTS_DIR = bin/douml/Obj_release +QT += network widgets +DEFINES += TRUE=true FALSE=false +DESTDIR = ../../bin +CONFIG(release, debug|release) { + DEFINES += NDEBUG + MOC_DIR = $${DESTDIR}/moc_release/cpp_util + OBJECTS_DIR = $${DESTDIR}/obj_release/cpp_util } - -Debug{ - MOC_DIR = bin/douml/MOC_Debug - OBJECTS_DIR = bin/douml/Obj_Debug - +CONFIG(debug, debug|release) { + DEFINES += TRACE DEBUG DEBUG_DOUML + MOC_DIR = $${DESTDIR}/moc_debug/cpp_util + OBJECTS_DIR = $${DESTDIR}/obj_debug/cpp_util } - UI_DIR = src/ui - DESTDIR = ../../bin - -QMAKE_CXXFLAGS += -std=gnu++11 +UI_DIR = src/ui diff --git a/genplugouts/CppUtilities/FlowBehavior.h b/genplugouts/CppUtilities/FlowBehavior.h index 55dde8146..09f17529a 100644 --- a/genplugouts/CppUtilities/FlowBehavior.h +++ b/genplugouts/CppUtilities/FlowBehavior.h @@ -2,18 +2,18 @@ #define _FLOWBEHAVIOR_H -#include + class FlowBehavior { public: - Q3CString weight; + QByteArray weight; - Q3CString guard; + QByteArray guard; - Q3CString selection; + QByteArray selection; - Q3CString transformation; + QByteArray transformation; void read(); diff --git a/genplugouts/CppUtilities/IdlSettings.cpp b/genplugouts/CppUtilities/IdlSettings.cpp index 60ceb5c64..7d74a37a5 100644 --- a/genplugouts/CppUtilities/IdlSettings.cpp +++ b/genplugouts/CppUtilities/IdlSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool IdlSettings::useDefaults() { UmlCom::send_cmd(idlSettingsCmd, getIdlUseDefaultsCmd); @@ -22,22 +22,22 @@ bool IdlSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString IdlSettings::type(Q3CString s) +QByteArray IdlSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_Type(Q3CString s, Q3CString v) +bool IdlSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlTypeCmd, s, v); if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -50,29 +50,29 @@ bool IdlSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::umlType(Q3CString s) +QByteArray IdlSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::idl); } -Q3CString IdlSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray IdlSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlRelationAttributeStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -85,29 +85,29 @@ bool IdlSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::relationAttributeUmlStereotype(Q3CString s) +QByteArray IdlSettings::relationAttributeUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::classStereotype(Q3CString s) +QByteArray IdlSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -120,32 +120,32 @@ bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::classUmlStereotype(Q3CString s) +QByteArray IdlSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::include(Q3CString s) +QByteArray IdlSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool IdlSettings::set_Include(Q3CString s, Q3CString v) +bool IdlSettings::set_Include(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlIncludeCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -156,14 +156,14 @@ bool IdlSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::rootDir() +const QByteArray & IdlSettings::rootDir() { read_if_needed_(); return _root; } -bool IdlSettings::set_RootDir(Q3CString v) +bool IdlSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlRootDirCmd, v); @@ -175,14 +175,14 @@ bool IdlSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceContent() +const QByteArray & IdlSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool IdlSettings::set_SourceContent(Q3CString v) +bool IdlSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceContentCmd, v); @@ -194,14 +194,14 @@ bool IdlSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceExtension() +const QByteArray & IdlSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool IdlSettings::set_SourceExtension(Q3CString v) +bool IdlSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceExtensionCmd, v); @@ -213,14 +213,14 @@ bool IdlSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::interfaceDecl() +const QByteArray & IdlSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool IdlSettings::set_InterfaceDecl(Q3CString v) +bool IdlSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlInterfaceDeclCmd, v); @@ -232,14 +232,14 @@ bool IdlSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeDecl() +const QByteArray & IdlSettings::valuetypeDecl() { read_if_needed_(); return _valuetype_decl; } -bool IdlSettings::set_ValuetypeDecl(Q3CString v) +bool IdlSettings::set_ValuetypeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeDeclCmd, v); @@ -251,14 +251,14 @@ bool IdlSettings::set_ValuetypeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::externalClassDecl() +const QByteArray & IdlSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool IdlSettings::set_ExternalClassDecl(Q3CString v) +bool IdlSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExternalClassDeclCmd, v); @@ -270,14 +270,14 @@ bool IdlSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::structDecl() +const QByteArray & IdlSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool IdlSettings::set_StructDecl(Q3CString v) +bool IdlSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlStructDeclCmd, v); @@ -289,14 +289,14 @@ bool IdlSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::typedefDecl() +const QByteArray & IdlSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool IdlSettings::set_TypedefDecl(Q3CString v) +bool IdlSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlTypedefDeclCmd, v); @@ -308,14 +308,14 @@ bool IdlSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::exceptionDecl() +const QByteArray & IdlSettings::exceptionDecl() { read_if_needed_(); return _exception_decl; } -bool IdlSettings::set_ExceptionDecl(Q3CString v) +bool IdlSettings::set_ExceptionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExceptionDeclCmd, v); @@ -327,14 +327,14 @@ bool IdlSettings::set_ExceptionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::unionDecl() +const QByteArray & IdlSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool IdlSettings::set_UnionDecl(Q3CString v) +bool IdlSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionDeclCmd, v); @@ -346,14 +346,14 @@ bool IdlSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumDecl() +const QByteArray & IdlSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool IdlSettings::set_EnumDecl(Q3CString v) +bool IdlSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumDeclCmd, v); @@ -365,14 +365,14 @@ bool IdlSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::attributeDecl(const char * multiplicity) +const QByteArray & IdlSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlAttributeDeclCmd, multiplicity, v); @@ -385,14 +385,14 @@ bool IdlSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeAttributeDecl(const char * multiplicity) +const QByteArray & IdlSettings::valuetypeAttributeDecl(const char * multiplicity) { read_if_needed_(); return _valuetype_attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeAttributeDeclCmd, multiplicity, v); @@ -405,14 +405,14 @@ bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, Q3CStrin return FALSE; } -const Q3CString & IdlSettings::unionItemDecl(const char * multiplicity) +const QByteArray & IdlSettings::unionItemDecl(const char * multiplicity) { read_if_needed_(); return _union_item_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_UnionItemDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_UnionItemDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlUnionItemDeclCmd, multiplicity, v); @@ -425,14 +425,14 @@ bool IdlSettings::set_UnionItemDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumItemDecl() +const QByteArray & IdlSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool IdlSettings::set_EnumItemDecl(Q3CString v) +bool IdlSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumItemDeclCmd, v); @@ -444,14 +444,14 @@ bool IdlSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::constDecl(const char * multiplicity) +const QByteArray & IdlSettings::constDecl(const char * multiplicity) { read_if_needed_(); return _const_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ConstDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ConstDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlConstDeclCmd, multiplicity, v); @@ -464,14 +464,14 @@ bool IdlSettings::set_ConstDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::relationDecl(const char * multiplicity) +const QByteArray & IdlSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlRelationDeclCmd, multiplicity, v); @@ -484,14 +484,14 @@ bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::valuetypeRelationDecl(const char * multiplicity) { read_if_needed_(); return _valuetype_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeRelationDeclCmd, multiplicity, v); @@ -504,14 +504,14 @@ bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString return FALSE; } -const Q3CString & IdlSettings::unionRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::unionRelationDecl(const char * multiplicity) { read_if_needed_(); return _union_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlUnionRelationDeclCmd, multiplicity, v); @@ -524,14 +524,14 @@ bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::operationDecl() +const QByteArray & IdlSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool IdlSettings::set_OperationDecl(Q3CString v) +bool IdlSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlOperationDeclCmd, v); @@ -543,14 +543,14 @@ bool IdlSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::getName() +const QByteArray & IdlSettings::getName() { read_if_needed_(); return _get_name; } -bool IdlSettings::set_GetName(Q3CString v) +bool IdlSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlGetNameCmd, v); @@ -562,14 +562,14 @@ bool IdlSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::setName() +const QByteArray & IdlSettings::setName() { read_if_needed_(); return _set_name; } -bool IdlSettings::set_SetName(Q3CString v) +bool IdlSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSetNameCmd, v); @@ -602,53 +602,53 @@ bool IdlSettings::set_IsSetOneway(bool v) bool IdlSettings::_defined; -Q3CString IdlSettings::_root; +QByteArray IdlSettings::_root; -Q3CString IdlSettings::_interface_decl; +QByteArray IdlSettings::_interface_decl; -Q3CString IdlSettings::_valuetype_decl; +QByteArray IdlSettings::_valuetype_decl; -Q3CString IdlSettings::_struct_decl; +QByteArray IdlSettings::_struct_decl; -Q3CString IdlSettings::_typedef_decl; +QByteArray IdlSettings::_typedef_decl; -Q3CString IdlSettings::_exception_decl; +QByteArray IdlSettings::_exception_decl; -Q3CString IdlSettings::_union_decl; +QByteArray IdlSettings::_union_decl; -Q3CString IdlSettings::_enum_decl; +QByteArray IdlSettings::_enum_decl; -Q3CString IdlSettings::_external_class_decl; +QByteArray IdlSettings::_external_class_decl; -Q3CString IdlSettings::_attr_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_attr_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_valuetype_attr_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_valuetype_attr_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_union_item_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_union_item_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_enum_item_decl; +QByteArray IdlSettings::_enum_item_decl; -Q3CString IdlSettings::_const_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_const_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_union_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_union_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_oper_decl; +QByteArray IdlSettings::_oper_decl; -Q3CString IdlSettings::_get_name; +QByteArray IdlSettings::_get_name; -Q3CString IdlSettings::_set_name; +QByteArray IdlSettings::_set_name; bool IdlSettings::_is_set_oneway; -Q3CString IdlSettings::_src_content; +QByteArray IdlSettings::_src_content; -Q3CString IdlSettings::_ext; +QByteArray IdlSettings::_ext; -Q3Dict IdlSettings::_map_includes; +QHash IdlSettings::_map_includes; void IdlSettings::read_() { @@ -677,13 +677,13 @@ void IdlSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/CppUtilities/IdlSettings.h b/genplugouts/CppUtilities/IdlSettings.h index d28a0bf7a..86e0b1473 100644 --- a/genplugouts/CppUtilities/IdlSettings.h +++ b/genplugouts/CppUtilities/IdlSettings.h @@ -4,9 +4,9 @@ #ifdef WITHIDL -#include + #include "UmlSettings.h" -#include + // This class manages settings concerning IDL, configured through // the 'Generation settings' dialog. @@ -31,244 +31,244 @@ class IdlSettings : public UmlSettings // returns the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the IDL type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString relationAttributeUmlStereotype(Q3CString s); + static QByteArray relationAttributeUmlStereotype(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the files produced by the Idl code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the files produced by the Idl code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of a valuetype - static const Q3CString & valuetypeDecl(); + static const QByteArray & valuetypeDecl(); // set the default definition of a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeDecl(Q3CString v); + static bool set_ValuetypeDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an exception - static const Q3CString & exceptionDecl(); + static const QByteArray & exceptionDecl(); // set the default definition of an exception // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExceptionDecl(Q3CString v); + static bool set_ExceptionDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an attribute // placed in a valuetype depending on the multiplicity - static const Q3CString & valuetypeAttributeDecl(const char * multiplicity); + static const QByteArray & valuetypeAttributeDecl(const char * multiplicity); // set the default definition of an attribute // placed in a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeAttributeDecl(const char * multiplicity, Q3CString v); + static bool set_ValuetypeAttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an union item depending on the multiplicity - static const Q3CString & unionItemDecl(const char * multiplicity); + static const QByteArray & unionItemDecl(const char * multiplicity); // set the default definition of an union item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionItemDecl(const char * multiplicity, Q3CString v); + static bool set_UnionItemDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a constant attribute depending on the multiplicity - static const Q3CString & constDecl(const char * multiplicity); + static const QByteArray & constDecl(const char * multiplicity); // set the default definition of a constant attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ConstDecl(const char * multiplicity, Q3CString v); + static bool set_ConstDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in a valuetype // depending on the multiplicity given in argument. - static const Q3CString & valuetypeRelationDecl(const char * multiplicity); + static const QByteArray & valuetypeRelationDecl(const char * multiplicity); // set the default definition of a relation in a valuetype // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v); + static bool set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in an union // depending on the multiplicity given in argument. - static const Q3CString & unionRelationDecl(const char * multiplicity); + static const QByteArray & unionRelationDecl(const char * multiplicity); // set the default definition of a relation in an union // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionRelationDecl(const char * multiplicity, Q3CString v); + static bool set_UnionRelationDecl(const char * multiplicity, QByteArray v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is oneway by default @@ -287,53 +287,53 @@ class IdlSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _valuetype_decl; + static QByteArray _valuetype_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _exception_decl; + static QByteArray _exception_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _valuetype_attr_decl[3/*multiplicity*/]; + static QByteArray _valuetype_attr_decl[3/*multiplicity*/]; - static Q3CString _union_item_decl[3/*multiplicity*/]; + static QByteArray _union_item_decl[3/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _const_decl[3/*multiplicity*/]; + static QByteArray _const_decl[3/*multiplicity*/]; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _valuetype_rel_decl[3/*multiplicity*/]; + static QByteArray _valuetype_rel_decl[3/*multiplicity*/]; - static Q3CString _union_rel_decl[3/*multiplicity*/]; + static QByteArray _union_rel_decl[3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _get_name; + static QByteArray _get_name; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_oneway; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/CppUtilities/JavaSettings.cpp b/genplugouts/CppUtilities/JavaSettings.cpp index cd3123306..5bb6c4747 100644 --- a/genplugouts/CppUtilities/JavaSettings.cpp +++ b/genplugouts/CppUtilities/JavaSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool JavaSettings::useDefaults() { UmlCom::send_cmd(javaSettingsCmd, getJavaUseDefaultsCmd); @@ -22,22 +22,22 @@ bool JavaSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString JavaSettings::type(const Q3CString & s) +QByteArray JavaSettings::type(const QByteArray & s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_Type(Q3CString s, Q3CString v) +bool JavaSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaTypeCmd, s, v); if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -50,29 +50,29 @@ bool JavaSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::umlType(const Q3CString & s) +QByteArray JavaSettings::umlType(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::java); } -Q3CString JavaSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray JavaSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaRelationAttributeStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -85,29 +85,29 @@ bool JavaSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::relationAttributeUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::relationAttributeUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::classStereotype(const Q3CString & s) +QByteArray JavaSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -120,32 +120,32 @@ bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::classUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::get_import(const Q3CString & s) +QByteArray JavaSettings::get_import(const QByteArray & s) { read_if_needed_(); - Q3CString * r = _map_imports[s]; + QByteArray * r = _map_imports[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool JavaSettings::set_Import(Q3CString s, Q3CString v) +bool JavaSettings::set_Import(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaImportCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_imports.take(s); + QByteArray * r = _map_imports.take(s); if (!v.isEmpty()) - _map_imports.insert(s, new Q3CString(v)); + _map_imports.insert(s, new QByteArray(v)); if (r) delete r; @@ -156,14 +156,14 @@ bool JavaSettings::set_Import(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::rootDir() +const QByteArray & JavaSettings::rootDir() { read_if_needed_(); return _root; } -bool JavaSettings::set_RootDir(Q3CString v) +bool JavaSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaRootdirCmd, v); @@ -175,14 +175,14 @@ bool JavaSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceContent() +const QByteArray & JavaSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool JavaSettings::set_SourceContent(Q3CString v) +bool JavaSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceContentCmd, v); @@ -194,14 +194,14 @@ bool JavaSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceExtension() +const QByteArray & JavaSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool JavaSettings::set_SourceExtension(Q3CString v) +bool JavaSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceExtensionCmd, v); @@ -251,14 +251,14 @@ bool JavaSettings::set_IsForcePackagePrefixGeneration(bool v) return FALSE; } -const Q3CString & JavaSettings::classDecl() +const QByteArray & JavaSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool JavaSettings::set_ClassDecl(Q3CString v) +bool JavaSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaClassDeclCmd, v); @@ -270,14 +270,14 @@ bool JavaSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::externalClassDecl() +const QByteArray & JavaSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool JavaSettings::set_ExternalClassDecl(Q3CString v) +bool JavaSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaExternalClassDeclCmd, v); @@ -289,14 +289,14 @@ bool JavaSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternDecl() +const QByteArray & JavaSettings::enumPatternDecl() { read_if_needed_(); return _enum_pattern_decl; } -bool JavaSettings::set_EnumPatternDecl(Q3CString v) +bool JavaSettings::set_EnumPatternDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternDeclCmd, v); @@ -308,14 +308,14 @@ bool JavaSettings::set_EnumPatternDecl(Q3CString v) return FALSE; } -Q3CString JavaSettings::enumDecl() +QByteArray JavaSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool JavaSettings::set_EnumDecl(Q3CString v) +bool JavaSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumDeclCmd, v); @@ -327,14 +327,14 @@ bool JavaSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::interfaceDecl() +const QByteArray & JavaSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool JavaSettings::set_InterfaceDecl(Q3CString v) +bool JavaSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaInterfaceDeclCmd, v); @@ -346,14 +346,14 @@ bool JavaSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::attributeDecl(const char * multiplicity) +const QByteArray & JavaSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool JavaSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool JavaSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaAttributeDeclCmd, multiplicity, v); @@ -366,14 +366,14 @@ bool JavaSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternItemDecl() +const QByteArray & JavaSettings::enumPatternItemDecl() { read_if_needed_(); return _enum_pattern_item_decl; } -bool JavaSettings::set_EnumPatternItemDecl(Q3CString v) +bool JavaSettings::set_EnumPatternItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternItemDeclCmd, v); @@ -385,14 +385,14 @@ bool JavaSettings::set_EnumPatternItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternItemCase() +const QByteArray & JavaSettings::enumPatternItemCase() { read_if_needed_(); return _enum_pattern_item_case; } -bool JavaSettings::set_EnumPatternItemCase(Q3CString v) +bool JavaSettings::set_EnumPatternItemCase(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternItemCaseCmd, v); @@ -404,14 +404,14 @@ bool JavaSettings::set_EnumPatternItemCase(Q3CString v) return FALSE; } -Q3CString JavaSettings::enumItemDecl() +QByteArray JavaSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool JavaSettings::set_EnumItemDecl(Q3CString v) +bool JavaSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumItemDeclCmd, v); @@ -423,14 +423,14 @@ bool JavaSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::relationDecl(const char * multiplicity) +const QByteArray & JavaSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool JavaSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaRelationDeclCmd, multiplicity, v); @@ -443,14 +443,14 @@ bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::operationDef() +const QByteArray & JavaSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool JavaSettings::set_OperationDef(Q3CString v) +bool JavaSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaOperationDefCmd, v); @@ -481,14 +481,14 @@ bool JavaSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & JavaSettings::getName() +const QByteArray & JavaSettings::getName() { read_if_needed_(); return _get_name; } -bool JavaSettings::set_GetName(Q3CString v) +bool JavaSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaGetNameCmd, v); @@ -500,14 +500,14 @@ bool JavaSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::setName() +const QByteArray & JavaSettings::setName() { read_if_needed_(); return _set_name; } -bool JavaSettings::set_SetName(Q3CString v) +bool JavaSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSetNameCmd, v); @@ -597,53 +597,53 @@ bool JavaSettings::set_IsSetParamFinal(bool v) bool JavaSettings::_defined; -Q3CString JavaSettings::_root; +QByteArray JavaSettings::_root; -Q3CString JavaSettings::_class_decl; +QByteArray JavaSettings::_class_decl; -Q3CString JavaSettings::_external_class_decl; +QByteArray JavaSettings::_external_class_decl; -Q3CString JavaSettings::_enum_pattern_decl; +QByteArray JavaSettings::_enum_pattern_decl; -Q3CString JavaSettings::_enum_decl; +QByteArray JavaSettings::_enum_decl; -Q3CString JavaSettings::_interface_decl; +QByteArray JavaSettings::_interface_decl; -Q3CString JavaSettings::_attr_decl[3/*multiplicity*/]; +QByteArray JavaSettings::_attr_decl[3/*multiplicity*/]; -Q3CString JavaSettings::_enum_pattern_item_decl; +QByteArray JavaSettings::_enum_pattern_item_decl; -Q3CString JavaSettings::_enum_pattern_item_case; +QByteArray JavaSettings::_enum_pattern_item_case; -Q3CString JavaSettings::_enum_item_decl; +QByteArray JavaSettings::_enum_item_decl; -Q3CString JavaSettings::_rel_decl[3/*multiplicity*/]; +QByteArray JavaSettings::_rel_decl[3/*multiplicity*/]; -Q3CString JavaSettings::_oper_def; +QByteArray JavaSettings::_oper_def; aVisibility JavaSettings::_get_visibility; -Q3CString JavaSettings::_get_name; +QByteArray JavaSettings::_get_name; bool JavaSettings::_is_get_final; aVisibility JavaSettings::_set_visibility; -Q3CString JavaSettings::_set_name; +QByteArray JavaSettings::_set_name; bool JavaSettings::_is_set_final; bool JavaSettings::_is_set_param_final; -Q3CString JavaSettings::_src_content; +QByteArray JavaSettings::_src_content; -Q3CString JavaSettings::_ext; +QByteArray JavaSettings::_ext; bool JavaSettings::_is_generate_javadoc_comment; bool JavaSettings::_is_force_package_gen; -Q3Dict JavaSettings::_map_imports; +QHash JavaSettings::_map_imports; void JavaSettings::read_() { @@ -672,13 +672,13 @@ void JavaSettings::read_() _map_imports.clear(); if (n > _map_imports.size()) - _map_imports.resize(n); + _map_imports.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_imports.insert(t, new Q3CString(i)); + _map_imports.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/CppUtilities/JavaSettings.h b/genplugouts/CppUtilities/JavaSettings.h index 2c0fc5e18..12192156a 100644 --- a/genplugouts/CppUtilities/JavaSettings.h +++ b/genplugouts/CppUtilities/JavaSettings.h @@ -4,10 +4,10 @@ #ifdef WITHJAVA -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning JAVA, configured through // the 'Generation settings' dialog. @@ -31,80 +31,80 @@ class JavaSettings : public UmlSettings // returns the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(const Q3CString & s); + static QByteArray type(const QByteArray & s); // set the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the JAVA type given in argument - static Q3CString umlType(const Q3CString & s); + static QByteArray umlType(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString relationAttributeUmlStereotype(const Q3CString & s); + static QByteArray relationAttributeUmlStereotype(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); //returns the import or other form specified in the last //'Generation settings' tab for the Java type given in argument. - static Q3CString get_import(const Q3CString & s); + static QByteArray get_import(const QByteArray & s); // set the import or other form specified in the last // 'Generation settings' tab for the Java type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Import(Q3CString s, Q3CString v); + static bool set_Import(QByteArray s, QByteArray v); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the JAVA code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the JAVA code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // return if generate Javadoc style comment static bool isGenerateJavadocStyleComment(); @@ -126,100 +126,100 @@ class JavaSettings : public UmlSettings static bool set_IsForcePackagePrefixGeneration(bool v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration implemented // through an abstract class having constant attributes - static const Q3CString & enumPatternDecl(); + static const QByteArray & enumPatternDecl(); // set the default definition of an enumeration implemented // through an abstract class having constant attributes // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternDecl(Q3CString v); + static bool set_EnumPatternDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumPatternItemDecl(); + static const QByteArray & enumPatternItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternItemDecl(Q3CString v); + static bool set_EnumPatternItemDecl(QByteArray v); //Returns the 'case' form produced in the fromInt operation //for each enumeration item - static const Q3CString & enumPatternItemCase(); + static const QByteArray & enumPatternItemCase(); // set the 'case' form produced in the fromInt operation // for each enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternItemCase(Q3CString v); + static bool set_EnumPatternItemCase(QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default visibility of a 'get' operation generated // through the attribute and relation 'add get operation' @@ -233,23 +233,23 @@ class JavaSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // return if a 'get' operation generated through the attribute // and relation 'add get operation' menu is final by default @@ -298,53 +298,53 @@ class JavaSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_pattern_decl; + static QByteArray _enum_pattern_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _enum_pattern_item_decl; + static QByteArray _enum_pattern_item_decl; - static Q3CString _enum_pattern_item_case; + static QByteArray _enum_pattern_item_case; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _oper_def; + static QByteArray _oper_def; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_final; static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_final; static bool _is_set_param_final; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; static bool _is_generate_javadoc_comment; static bool _is_force_package_gen; - static Q3Dict _map_imports; + static QHash _map_imports; protected: diff --git a/genplugouts/CppUtilities/PhpSettings.cpp b/genplugouts/CppUtilities/PhpSettings.cpp index bd3def979..d193d646f 100644 --- a/genplugouts/CppUtilities/PhpSettings.cpp +++ b/genplugouts/CppUtilities/PhpSettings.cpp @@ -8,7 +8,7 @@ #include "Tools/ApiCmd.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include #ifdef WITHJAVA #include "JavaSettings.h" #endif @@ -24,22 +24,22 @@ bool PhpSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString PhpSettings::classStereotype(const Q3CString & s) +QByteArray PhpSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->php : s; } -bool PhpSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool PhpSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(phpSettingsCmd, setPhpClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -52,21 +52,21 @@ bool PhpSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PhpSettings::classUmlStereotype(const Q3CString & s) +QByteArray PhpSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::php); } -const Q3CString & PhpSettings::rootDir() +const QByteArray & PhpSettings::rootDir() { read_if_needed_(); return _root; } -bool PhpSettings::set_RootDir(Q3CString v) +bool PhpSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpRootdirCmd, v); @@ -78,14 +78,14 @@ bool PhpSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::sourceContent() +const QByteArray & PhpSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool PhpSettings::set_SourceContent(Q3CString v) +bool PhpSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSourceContentCmd, v); @@ -97,14 +97,14 @@ bool PhpSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::sourceExtension() +const QByteArray & PhpSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool PhpSettings::set_SourceExtension(Q3CString v) +bool PhpSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSourceExtensionCmd, v); @@ -135,14 +135,14 @@ bool PhpSettings::set_IsGenerateJavadocStyleComment(bool v) return FALSE; } -const Q3CString & PhpSettings::classDecl() +const QByteArray & PhpSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool PhpSettings::set_ClassDecl(Q3CString v) +bool PhpSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpClassDeclCmd, v); @@ -154,14 +154,14 @@ bool PhpSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::externalClassDecl() +const QByteArray & PhpSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool PhpSettings::set_ExternalClassDecl(Q3CString v) +bool PhpSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpExternalClassDeclCmd, v); @@ -173,14 +173,14 @@ bool PhpSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -Q3CString PhpSettings::enumDecl() +QByteArray PhpSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool PhpSettings::set_EnumDecl(Q3CString v) +bool PhpSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpEnumDeclCmd, v); @@ -192,14 +192,14 @@ bool PhpSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::interfaceDecl() +const QByteArray & PhpSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool PhpSettings::set_InterfaceDecl(Q3CString v) +bool PhpSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpInterfaceDeclCmd, v); @@ -211,14 +211,14 @@ bool PhpSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::attributeDecl() +const QByteArray & PhpSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool PhpSettings::set_AttributeDecl(Q3CString v) +bool PhpSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpAttributeDeclCmd, v); @@ -230,14 +230,14 @@ bool PhpSettings::set_AttributeDecl(Q3CString v) return FALSE; } -Q3CString PhpSettings::enumItemDecl() +QByteArray PhpSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool PhpSettings::set_EnumItemDecl(Q3CString v) +bool PhpSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpEnumItemDeclCmd, v); @@ -249,14 +249,14 @@ bool PhpSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::relationDecl() +const QByteArray & PhpSettings::relationDecl() { read_if_needed_(); return _rel_decl; } -bool PhpSettings::set_RelationDecl(Q3CString v) +bool PhpSettings::set_RelationDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpRelationDeclCmd, v); @@ -268,14 +268,14 @@ bool PhpSettings::set_RelationDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::operationDef() +const QByteArray & PhpSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool PhpSettings::set_OperationDef(Q3CString v) +bool PhpSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpOperationDefCmd, v); @@ -315,14 +315,14 @@ bool PhpSettings::set_GetVisibility(aVisibility v) #endif } -const Q3CString & PhpSettings::getName() +const QByteArray & PhpSettings::getName() { read_if_needed_(); return _get_name; } -bool PhpSettings::set_GetName(Q3CString v) +bool PhpSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpGetNameCmd, v); @@ -334,14 +334,14 @@ bool PhpSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::setName() +const QByteArray & PhpSettings::setName() { read_if_needed_(); return _set_name; } -bool PhpSettings::set_SetName(Q3CString v) +bool PhpSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSetNameCmd, v); @@ -421,29 +421,29 @@ bool PhpSettings::set_SetVisibility(aVisibility v) bool PhpSettings::_defined; -Q3CString PhpSettings::_root; +QByteArray PhpSettings::_root; -Q3CString PhpSettings::_class_decl; +QByteArray PhpSettings::_class_decl; -Q3CString PhpSettings::_external_class_decl; +QByteArray PhpSettings::_external_class_decl; -Q3CString PhpSettings::_enum_decl; +QByteArray PhpSettings::_enum_decl; -Q3CString PhpSettings::_interface_decl; +QByteArray PhpSettings::_interface_decl; -Q3CString PhpSettings::_attr_decl; +QByteArray PhpSettings::_attr_decl; -Q3CString PhpSettings::_enum_item_decl; +QByteArray PhpSettings::_enum_item_decl; -Q3CString PhpSettings::_rel_decl; +QByteArray PhpSettings::_rel_decl; -Q3CString PhpSettings::_oper_def; +QByteArray PhpSettings::_oper_def; #ifndef WITHJAVA aVisibility PhpSettings::_get_visibility; #endif -Q3CString PhpSettings::_get_name; +QByteArray PhpSettings::_get_name; bool PhpSettings::_is_get_final; @@ -451,15 +451,30 @@ bool PhpSettings::_is_get_final; aVisibility PhpSettings::_set_visibility; #endif -Q3CString PhpSettings::_set_name; +QByteArray PhpSettings::_set_name; bool PhpSettings::_is_set_final; -Q3CString PhpSettings::_src_content; +QByteArray PhpSettings::_src_content; -Q3CString PhpSettings::_ext; +QByteArray PhpSettings::_ext; + +WrapperStr PhpSettings::_dir_regexp; + +bool PhpSettings::_dir_regexp_case_sensitive; + +WrapperStr PhpSettings::_file_regexp; + +bool PhpSettings::_file_regexp_case_sensitive; bool PhpSettings::_is_generate_javadoc_comment; +bool PhpSettings::_req_with_path; + +bool PhpSettings::_is_relative_path; + +bool PhpSettings::_is_root_relative_path; + +bool PhpSettings::_is_force_namespace_gen; void PhpSettings::read_() { @@ -497,6 +512,17 @@ void PhpSettings::read_() _set_name = UmlCom::read_string(); _is_set_final = UmlCom::read_bool(); _is_generate_javadoc_comment = UmlCom::read_bool(); + _req_with_path = UmlCom::read_bool(); + _is_relative_path = UmlCom::read_bool(); + _is_root_relative_path = UmlCom::read_bool(); + + _dir_regexp = UmlCom::read_string(); + _dir_regexp_case_sensitive = UmlCom::read_bool(); + + _file_regexp = UmlCom::read_string(); + _file_regexp_case_sensitive = UmlCom::read_bool(); + + _is_force_namespace_gen = UmlCom::read_bool(); } void PhpSettings::read_if_needed_() diff --git a/genplugouts/CppUtilities/PhpSettings.h b/genplugouts/CppUtilities/PhpSettings.h index 2f83561bc..4b33afd05 100644 --- a/genplugouts/CppUtilities/PhpSettings.h +++ b/genplugouts/CppUtilities/PhpSettings.h @@ -4,7 +4,7 @@ #ifdef WITHPHP -#include + #include "aVisibility.h" #include "UmlSettings.h" @@ -29,41 +29,41 @@ class PhpSettings : public UmlSettings // returns the PHP stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the PHP stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the PHP one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the PHP code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the PHP code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // return if generate Javadoc style comment static bool isGenerateJavadocStyleComment(); @@ -74,68 +74,68 @@ class PhpSettings : public UmlSettings static bool set_IsGenerateJavadocStyleComment(bool v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of an relation - static const Q3CString & relationDecl(); + static const QByteArray & relationDecl(); // set the default definition of an relation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(Q3CString v); + static bool set_RelationDecl(QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default visibility of a 'get' operation generated // through the attribute and relation 'add get operation' @@ -153,23 +153,23 @@ class PhpSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // return if a 'get' operation generated through the attribute // and relation 'add get operation' menu is final by default @@ -212,29 +212,29 @@ class PhpSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl; + static QByteArray _rel_decl; - static Q3CString _oper_def; + static QByteArray _oper_def; #ifndef WITHJAVA static aVisibility _get_visibility; #endif - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_final; @@ -242,16 +242,32 @@ class PhpSettings : public UmlSettings static aVisibility _set_visibility; #endif - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_final; - static Q3CString _src_content; + static QByteArray _src_content; + + static QByteArray _ext; + + static WrapperStr _dir_regexp; + + static bool _dir_regexp_case_sensitive; + + static WrapperStr _file_regexp; - static Q3CString _ext; + static bool _file_regexp_case_sensitive; static bool _is_generate_javadoc_comment; + static bool _req_with_path; + + static bool _is_relative_path; + + static bool _is_root_relative_path; + + static bool _is_force_namespace_gen; + protected: static void read_(); diff --git a/genplugouts/CppUtilities/PythonSettings.cpp b/genplugouts/CppUtilities/PythonSettings.cpp index b2cebb2cc..e43ebd605 100644 --- a/genplugouts/CppUtilities/PythonSettings.cpp +++ b/genplugouts/CppUtilities/PythonSettings.cpp @@ -7,7 +7,7 @@ #include "Tools/ApiCmd.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool PythonSettings::isPython_2_2() { read_if_needed_(); @@ -26,7 +26,7 @@ bool PythonSettings::set_IsPython_2_2(bool y) return FALSE; } -const Q3CString & PythonSettings::indentStep() +const QByteArray & PythonSettings::indentStep() { read_if_needed_(); return _indent_step; @@ -56,22 +56,22 @@ bool PythonSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString PythonSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray PythonSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->python : s; } -bool PythonSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool PythonSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonRelationAttributeStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -84,29 +84,29 @@ bool PythonSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PythonSettings::relationAttributeUmlStereotype(const Q3CString & s) +QByteArray PythonSettings::relationAttributeUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::python); } -Q3CString PythonSettings::classStereotype(const Q3CString & s) +QByteArray PythonSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->python : s; } -bool PythonSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool PythonSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -119,32 +119,32 @@ bool PythonSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PythonSettings::classUmlStereotype(const Q3CString & s) +QByteArray PythonSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::python); } -Q3CString PythonSettings::get_import(const Q3CString & s) +QByteArray PythonSettings::get_import(const QByteArray & s) { read_if_needed_(); - Q3CString * r = _map_imports[s]; + QByteArray * r = _map_imports[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool PythonSettings::set_Import(Q3CString s, Q3CString v) +bool PythonSettings::set_Import(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonImportCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_imports.take(s); + QByteArray * r = _map_imports.take(s); if (!v.isEmpty()) - _map_imports.insert(s, new Q3CString(v)); + _map_imports.insert(s, new QByteArray(v)); if (r) delete r; @@ -155,14 +155,14 @@ bool PythonSettings::set_Import(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & PythonSettings::rootDir() +const QByteArray & PythonSettings::rootDir() { read_if_needed_(); return _root; } -bool PythonSettings::set_RootDir(Q3CString v) +bool PythonSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonRootdirCmd, v); @@ -174,14 +174,14 @@ bool PythonSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::sourceContent() +const QByteArray & PythonSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool PythonSettings::set_SourceContent(Q3CString v) +bool PythonSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSourceContentCmd, v); @@ -193,14 +193,14 @@ bool PythonSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::sourceExtension() +const QByteArray & PythonSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool PythonSettings::set_SourceExtension(Q3CString v) +bool PythonSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSourceExtensionCmd, v); @@ -212,14 +212,14 @@ bool PythonSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::classDecl() +const QByteArray & PythonSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool PythonSettings::set_ClassDecl(Q3CString v) +bool PythonSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonClassDeclCmd, v); @@ -231,14 +231,14 @@ bool PythonSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::externalClassDecl() +const QByteArray & PythonSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool PythonSettings::set_ExternalClassDecl(Q3CString v) +bool PythonSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonExternalClassDeclCmd, v); @@ -250,14 +250,14 @@ bool PythonSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -Q3CString PythonSettings::enumDecl() +QByteArray PythonSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool PythonSettings::set_EnumDecl(Q3CString v) +bool PythonSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonEnumDeclCmd, v); @@ -269,14 +269,14 @@ bool PythonSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::attributeDecl(const char * multiplicity) +const QByteArray & PythonSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[mult_column(multiplicity)]; } -bool PythonSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool PythonSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonAttributeDeclCmd, multiplicity, v); @@ -289,14 +289,14 @@ bool PythonSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -Q3CString PythonSettings::enumItemDecl() +QByteArray PythonSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool PythonSettings::set_EnumItemDecl(Q3CString v) +bool PythonSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonEnumItemDeclCmd, v); @@ -308,7 +308,7 @@ bool PythonSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::relationDecl(bool by_value, const char * multiplicity) +const QByteArray & PythonSettings::relationDecl(bool by_value, const char * multiplicity) { read_if_needed_(); @@ -328,14 +328,14 @@ bool PythonSettings::set_RelationDecl(bool by_value, const char * multiplicity, return FALSE; } -const Q3CString & PythonSettings::operationDef() +const QByteArray & PythonSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool PythonSettings::set_OperationDef(Q3CString v) +bool PythonSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonOperationDefCmd, v); @@ -347,14 +347,14 @@ bool PythonSettings::set_OperationDef(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::initOperationDef() +const QByteArray & PythonSettings::initOperationDef() { read_if_needed_(); return _initoper_def; } -bool PythonSettings::set_InitOperationDef(Q3CString v) +bool PythonSettings::set_InitOperationDef(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonInitOperationDefCmd, v); @@ -366,14 +366,14 @@ bool PythonSettings::set_InitOperationDef(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::getName() +const QByteArray & PythonSettings::getName() { read_if_needed_(); return _get_name; } -bool PythonSettings::set_GetName(Q3CString v) +bool PythonSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonGetNameCmd, v); @@ -385,14 +385,14 @@ bool PythonSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::setName() +const QByteArray & PythonSettings::setName() { read_if_needed_(); return _set_name; } -bool PythonSettings::set_SetName(Q3CString v) +bool PythonSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSetNameCmd, v); @@ -404,7 +404,7 @@ bool PythonSettings::set_SetName(Q3CString v) return FALSE; } -unsigned PythonSettings::mult_column(const Q3CString & mult) +unsigned PythonSettings::mult_column(const QByteArray & mult) { return (mult.isEmpty() || (mult == "1")) ? 0 : 1; } @@ -413,35 +413,35 @@ bool PythonSettings::_defined; bool PythonSettings::_2_2; -Q3CString PythonSettings::_indent_step; +QByteArray PythonSettings::_indent_step; -Q3CString PythonSettings::_root; +QByteArray PythonSettings::_root; -Q3CString PythonSettings::_class_decl; +QByteArray PythonSettings::_class_decl; -Q3CString PythonSettings::_external_class_decl; +QByteArray PythonSettings::_external_class_decl; -Q3CString PythonSettings::_enum_decl; +QByteArray PythonSettings::_enum_decl; -Q3CString PythonSettings::_attr_decl[2/*multiplicity*/]; +QByteArray PythonSettings::_attr_decl[2/*multiplicity*/]; -Q3CString PythonSettings::_enum_item_decl; +QByteArray PythonSettings::_enum_item_decl; -Q3CString PythonSettings::_rel_decl[2/*relation kind*/][2/*multiplicity*/]; +QByteArray PythonSettings::_rel_decl[2/*relation kind*/][2/*multiplicity*/]; -Q3CString PythonSettings::_oper_def; +QByteArray PythonSettings::_oper_def; -Q3CString PythonSettings::_initoper_def; +QByteArray PythonSettings::_initoper_def; -Q3CString PythonSettings::_get_name; +QByteArray PythonSettings::_get_name; -Q3CString PythonSettings::_set_name; +QByteArray PythonSettings::_set_name; -Q3CString PythonSettings::_src_content; +QByteArray PythonSettings::_src_content; -Q3CString PythonSettings::_ext; +QByteArray PythonSettings::_ext; -Q3Dict PythonSettings::_map_imports; +QHash PythonSettings::_map_imports; void PythonSettings::read_() { @@ -468,13 +468,13 @@ void PythonSettings::read_() _map_imports.clear(); if (n > _map_imports.size()) - _map_imports.resize(n); + _map_imports.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_imports.insert(t, new Q3CString(i)); + _map_imports.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/CppUtilities/PythonSettings.h b/genplugouts/CppUtilities/PythonSettings.h index 9b3b004a6..3d16578e1 100644 --- a/genplugouts/CppUtilities/PythonSettings.h +++ b/genplugouts/CppUtilities/PythonSettings.h @@ -4,9 +4,9 @@ #ifdef WITHPYTHON -#include + #include "UmlSettings.h" -#include + // This class manages settings concerning PYTHON, configured through // the 'Generation settings' dialog. @@ -26,7 +26,7 @@ class PythonSettings : public UmlSettings static bool set_IsPython_2_2(bool y); // return the default indent step - static const Q3CString & indentStep(); + static const QByteArray & indentStep(); // set default indent step // @@ -45,109 +45,109 @@ class PythonSettings : public UmlSettings // returns the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the PYTHON one given in argument - static Q3CString relationAttributeUmlStereotype(const Q3CString & s); + static QByteArray relationAttributeUmlStereotype(const QByteArray & s); // returns the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the PYTHON one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); //returns the import or other form specified in the last //'Generation settings' tab for the Python type given in argument. - static Q3CString get_import(const Q3CString & s); + static QByteArray get_import(const QByteArray & s); // set the import or other form specified in the last // 'Generation settings' tab for the Python type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Import(Q3CString s, Q3CString v); + static bool set_Import(QByteArray s, QByteArray v); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the PYTHON code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the PYTHON code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. - static const Q3CString & relationDecl(bool by_value, const char * multiplicity); + static const QByteArray & relationDecl(bool by_value, const char * multiplicity); // set the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. @@ -156,85 +156,85 @@ class PythonSettings : public UmlSettings static bool set_RelationDecl(bool by_value, const char * multiplicity, const char * v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default definition of __init__ - static const Q3CString & initOperationDef(); + static const QByteArray & initOperationDef(); // set the default definition of __init__ // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InitOperationDef(Q3CString v); + static bool set_InitOperationDef(QByteArray v); // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); private: // never called ! PythonSettings() {}; - static unsigned mult_column(const Q3CString & mult); + static unsigned mult_column(const QByteArray & mult); static bool _defined; static bool _2_2; - static Q3CString _indent_step; + static QByteArray _indent_step; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _attr_decl[2/*multiplicity*/]; + static QByteArray _attr_decl[2/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[2/*relation kind*/][2/*multiplicity*/]; + static QByteArray _rel_decl[2/*relation kind*/][2/*multiplicity*/]; - static Q3CString _oper_def; + static QByteArray _oper_def; protected: - static Q3CString _initoper_def; + static QByteArray _initoper_def; private: - static Q3CString _get_name; + static QByteArray _get_name; - static Q3CString _set_name; + static QByteArray _set_name; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_imports; + static QHash _map_imports; protected: diff --git a/genplugouts/CppUtilities/SlotAttribute.h b/genplugouts/CppUtilities/SlotAttribute.h index d1c59eabf..bbbe69d0d 100644 --- a/genplugouts/CppUtilities/SlotAttribute.h +++ b/genplugouts/CppUtilities/SlotAttribute.h @@ -1,21 +1,18 @@ #ifndef _SLOTATTRIBUTE_H #define _SLOTATTRIBUTE_H - - -#include - +#include class UmlAttribute; struct SlotAttribute { UmlAttribute * attribute; - Q3CString value; + QByteArray value; // because of QValueList use SlotAttribute() : attribute(0) { } - SlotAttribute(UmlAttribute * a, Q3CString v) : attribute(a), value(v) { + SlotAttribute(UmlAttribute * a, QByteArray v) : attribute(a), value(v) { } }; diff --git a/genplugouts/CppUtilities/StateBehavior.h b/genplugouts/CppUtilities/StateBehavior.h index 91a42cb82..66ac09c00 100644 --- a/genplugouts/CppUtilities/StateBehavior.h +++ b/genplugouts/CppUtilities/StateBehavior.h @@ -2,16 +2,16 @@ #define _STATEBEHAVIOR_H -#include + class StateBehavior { public: - Q3CString on_entry; + QByteArray on_entry; - Q3CString on_exit; + QByteArray on_exit; - Q3CString do_activity; + QByteArray do_activity; void read(); diff --git a/genplugouts/CppUtilities/TransitionBehavior.h b/genplugouts/CppUtilities/TransitionBehavior.h index 856ede3c0..8714c541d 100644 --- a/genplugouts/CppUtilities/TransitionBehavior.h +++ b/genplugouts/CppUtilities/TransitionBehavior.h @@ -2,16 +2,16 @@ #define _TRANSITIONBEHAVIOR_H -#include + class TransitionBehavior { public: - Q3CString trigger; + QByteArray trigger; - Q3CString guard; + QByteArray guard; - Q3CString activity; + QByteArray activity; void read(); diff --git a/genplugouts/CppUtilities/UmlAccessVariableValueAction.h b/genplugouts/CppUtilities/UmlAccessVariableValueAction.h index dc92b3e25..8d4f9ae87 100644 --- a/genplugouts/CppUtilities/UmlAccessVariableValueAction.h +++ b/genplugouts/CppUtilities/UmlAccessVariableValueAction.h @@ -3,13 +3,13 @@ #include "UmlBaseAccessVariableValueAction.h" -#include + class UmlAccessVariableValueAction : public UmlBaseAccessVariableValueAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlAccessVariableValueAction(void * id, const Q3CString & s) : UmlBaseAccessVariableValueAction(id, s) { + UmlAccessVariableValueAction(void * id, const QByteArray & s) : UmlBaseAccessVariableValueAction(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivity.h b/genplugouts/CppUtilities/UmlActivity.h index 8f9886b0e..6f8bd5244 100644 --- a/genplugouts/CppUtilities/UmlActivity.h +++ b/genplugouts/CppUtilities/UmlActivity.h @@ -3,13 +3,13 @@ #include "UmlBaseActivity.h" -#include + class UmlActivity : public UmlBaseActivity { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivity(void * id, const Q3CString & s) : UmlBaseActivity(id, s) { + UmlActivity(void * id, const QByteArray & s) : UmlBaseActivity(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityAction.h b/genplugouts/CppUtilities/UmlActivityAction.h index f359c755a..3079e18ba 100644 --- a/genplugouts/CppUtilities/UmlActivityAction.h +++ b/genplugouts/CppUtilities/UmlActivityAction.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityAction.h" -#include + class UmlActivityAction : public UmlBaseActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityAction(void * id, const Q3CString & s) : UmlBaseActivityAction(id, s) { + UmlActivityAction(void * id, const QByteArray & s) : UmlBaseActivityAction(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityActionClasses.h b/genplugouts/CppUtilities/UmlActivityActionClasses.h index 8c1eeb1b1..8632a6331 100644 --- a/genplugouts/CppUtilities/UmlActivityActionClasses.h +++ b/genplugouts/CppUtilities/UmlActivityActionClasses.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityActionClasses.h" -#include + class UmlSendObjectAction : public UmlBaseSendObjectAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlSendObjectAction(void * id, const Q3CString & s) : UmlBaseSendObjectAction(id, s) { + UmlSendObjectAction(void * id, const QByteArray & s) : UmlBaseSendObjectAction(id, s) { } }; @@ -18,7 +18,7 @@ class UmlUnmarshallAction : public UmlBaseUnmarshallAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlUnmarshallAction(void * id, const Q3CString & s) : UmlBaseUnmarshallAction(id, s) { + UmlUnmarshallAction(void * id, const QByteArray & s) : UmlBaseUnmarshallAction(id, s) { } }; @@ -27,7 +27,7 @@ class UmlSendSignalAction : public UmlBaseSendSignalAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlSendSignalAction(void * id, const Q3CString & s) : UmlBaseSendSignalAction(id, s) { + UmlSendSignalAction(void * id, const QByteArray & s) : UmlBaseSendSignalAction(id, s) { } }; @@ -36,7 +36,7 @@ class UmlBroadcastSignalAction : public UmlBaseBroadcastSignalAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlBroadcastSignalAction(void * id, const Q3CString & s) : UmlBaseBroadcastSignalAction(id, s) { + UmlBroadcastSignalAction(void * id, const QByteArray & s) : UmlBaseBroadcastSignalAction(id, s) { } }; @@ -45,7 +45,7 @@ class UmlValueSpecificationAction : public UmlBaseValueSpecificationAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlValueSpecificationAction(void * id, const Q3CString & s) : UmlBaseValueSpecificationAction(id, s) { + UmlValueSpecificationAction(void * id, const QByteArray & s) : UmlBaseValueSpecificationAction(id, s) { } }; @@ -54,7 +54,7 @@ class UmlOpaqueAction : public UmlBaseOpaqueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlOpaqueAction(void * id, const Q3CString & s) : UmlBaseOpaqueAction(id, s) { + UmlOpaqueAction(void * id, const QByteArray & s) : UmlBaseOpaqueAction(id, s) { } }; @@ -63,7 +63,7 @@ class UmlAcceptEventAction : public UmlBaseAcceptEventAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlAcceptEventAction(void * id, const Q3CString & s) : UmlBaseAcceptEventAction(id, s) { + UmlAcceptEventAction(void * id, const QByteArray & s) : UmlBaseAcceptEventAction(id, s) { } }; @@ -72,7 +72,7 @@ class UmlCallOperationAction : public UmlBaseCallOperationAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlCallOperationAction(void * id, const Q3CString & s) : UmlBaseCallOperationAction(id, s) { + UmlCallOperationAction(void * id, const QByteArray & s) : UmlBaseCallOperationAction(id, s) { } }; @@ -81,7 +81,7 @@ class UmlCallBehaviorAction : public UmlBaseCallBehaviorAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlCallBehaviorAction(void * id, const Q3CString & s) : UmlBaseCallBehaviorAction(id, s) { + UmlCallBehaviorAction(void * id, const QByteArray & s) : UmlBaseCallBehaviorAction(id, s) { } }; @@ -90,7 +90,7 @@ class UmlClearVariableValueAction : public UmlBaseClearVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlClearVariableValueAction(void * id, const Q3CString & s) : UmlBaseClearVariableValueAction(id, s) { + UmlClearVariableValueAction(void * id, const QByteArray & s) : UmlBaseClearVariableValueAction(id, s) { } }; @@ -99,7 +99,7 @@ class UmlReadVariableValueAction : public UmlBaseReadVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlReadVariableValueAction(void * id, const Q3CString & s) : UmlBaseReadVariableValueAction(id, s) { + UmlReadVariableValueAction(void * id, const QByteArray & s) : UmlBaseReadVariableValueAction(id, s) { } }; @@ -108,7 +108,7 @@ class UmlWriteVariableValueAction : public UmlBaseWriteVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlWriteVariableValueAction(void * id, const Q3CString & s) : UmlBaseWriteVariableValueAction(id, s) { + UmlWriteVariableValueAction(void * id, const QByteArray & s) : UmlBaseWriteVariableValueAction(id, s) { } }; @@ -117,7 +117,7 @@ class UmlAddVariableValueAction : public UmlBaseAddVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlAddVariableValueAction(void * id, const Q3CString & s) : UmlBaseAddVariableValueAction(id, s) { + UmlAddVariableValueAction(void * id, const QByteArray & s) : UmlBaseAddVariableValueAction(id, s) { } }; @@ -126,7 +126,7 @@ class UmlRemoveVariableValueAction : public UmlBaseRemoveVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlRemoveVariableValueAction(void * id, const Q3CString & s) : UmlBaseRemoveVariableValueAction(id, s) { + UmlRemoveVariableValueAction(void * id, const QByteArray & s) : UmlBaseRemoveVariableValueAction(id, s) { } }; @@ -135,7 +135,7 @@ class UmlAcceptCallAction : public UmlBaseAcceptCallAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlAcceptCallAction(void * id, const Q3CString & s) : UmlBaseAcceptCallAction(id, s) { + UmlAcceptCallAction(void * id, const QByteArray & s) : UmlBaseAcceptCallAction(id, s) { } }; @@ -144,7 +144,7 @@ class UmlReplyAction : public UmlBaseReplyAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlReplyAction(void * id, const Q3CString & s) : UmlBaseReplyAction(id, s) { + UmlReplyAction(void * id, const QByteArray & s) : UmlBaseReplyAction(id, s) { } }; @@ -153,7 +153,7 @@ class UmlCreateObjectAction : public UmlBaseCreateObjectAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlCreateObjectAction(void * id, const Q3CString & s) : UmlBaseCreateObjectAction(id, s) { + UmlCreateObjectAction(void * id, const QByteArray & s) : UmlBaseCreateObjectAction(id, s) { } }; @@ -162,7 +162,7 @@ class UmlDestroyObjectAction : public UmlBaseDestroyObjectAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlDestroyObjectAction(void * id, const Q3CString & s) : UmlBaseDestroyObjectAction(id, s) { + UmlDestroyObjectAction(void * id, const QByteArray & s) : UmlBaseDestroyObjectAction(id, s) { } }; @@ -171,7 +171,7 @@ class UmlTestIdentityAction : public UmlBaseTestIdentityAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlTestIdentityAction(void * id, const Q3CString & s) : UmlBaseTestIdentityAction(id, s) { + UmlTestIdentityAction(void * id, const QByteArray & s) : UmlBaseTestIdentityAction(id, s) { } }; @@ -180,7 +180,7 @@ class UmlRaiseExceptionAction : public UmlBaseRaiseExceptionAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlRaiseExceptionAction(void * id, const Q3CString & s) : UmlBaseRaiseExceptionAction(id, s) { + UmlRaiseExceptionAction(void * id, const QByteArray & s) : UmlBaseRaiseExceptionAction(id, s) { } }; @@ -189,7 +189,7 @@ class UmlReduceAction : public UmlBaseReduceAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlReduceAction(void * id, const Q3CString & s) : UmlBaseReduceAction(id, s) { + UmlReduceAction(void * id, const QByteArray & s) : UmlBaseReduceAction(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityControlNode.h b/genplugouts/CppUtilities/UmlActivityControlNode.h index 8ebf04bf7..1396fd3e2 100644 --- a/genplugouts/CppUtilities/UmlActivityControlNode.h +++ b/genplugouts/CppUtilities/UmlActivityControlNode.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityControlNode.h" -#include + class UmlActivityControlNode : public UmlBaseActivityControlNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityControlNode(void * id, const Q3CString & s) : UmlBaseActivityControlNode(id, s) { + UmlActivityControlNode(void * id, const QByteArray & s) : UmlBaseActivityControlNode(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityControlNodeClasses.h b/genplugouts/CppUtilities/UmlActivityControlNodeClasses.h index f698adeca..2be0cd946 100644 --- a/genplugouts/CppUtilities/UmlActivityControlNodeClasses.h +++ b/genplugouts/CppUtilities/UmlActivityControlNodeClasses.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityControlNodeClasses.h" -#include + class UmlInitialActivityNode : public UmlBaseInitialActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlInitialActivityNode(void * id, const Q3CString & s) : UmlBaseInitialActivityNode(id, s) { + UmlInitialActivityNode(void * id, const QByteArray & s) : UmlBaseInitialActivityNode(id, s) { } }; @@ -18,7 +18,7 @@ class UmlFlowFinalActivityNode : public UmlBaseFlowFinalActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlFlowFinalActivityNode(void * id, const Q3CString & s) : UmlBaseFlowFinalActivityNode(id, s) { + UmlFlowFinalActivityNode(void * id, const QByteArray & s) : UmlBaseFlowFinalActivityNode(id, s) { } }; @@ -27,7 +27,7 @@ class UmlActivityFinalActivityNode : public UmlBaseActivityFinalActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityFinalActivityNode(void * id, const Q3CString & s) : UmlBaseActivityFinalActivityNode(id, s) { + UmlActivityFinalActivityNode(void * id, const QByteArray & s) : UmlBaseActivityFinalActivityNode(id, s) { } }; @@ -36,7 +36,7 @@ class UmlDecisionActivityNode : public UmlBaseDecisionActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlDecisionActivityNode(void * id, const Q3CString & s) : UmlBaseDecisionActivityNode(id, s) { + UmlDecisionActivityNode(void * id, const QByteArray & s) : UmlBaseDecisionActivityNode(id, s) { } }; @@ -45,7 +45,7 @@ class UmlMergeActivityNode : public UmlBaseMergeActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlMergeActivityNode(void * id, const Q3CString & s) : UmlBaseMergeActivityNode(id, s) { + UmlMergeActivityNode(void * id, const QByteArray & s) : UmlBaseMergeActivityNode(id, s) { } }; @@ -54,7 +54,7 @@ class UmlForkActivityNode : public UmlBaseForkActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlForkActivityNode(void * id, const Q3CString & s) : UmlBaseForkActivityNode(id, s) { + UmlForkActivityNode(void * id, const QByteArray & s) : UmlBaseForkActivityNode(id, s) { } }; @@ -63,7 +63,7 @@ class UmlJoinActivityNode : public UmlBaseJoinActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlJoinActivityNode(void * id, const Q3CString & s) : UmlBaseJoinActivityNode(id, s) { + UmlJoinActivityNode(void * id, const QByteArray & s) : UmlBaseJoinActivityNode(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityDiagram.h b/genplugouts/CppUtilities/UmlActivityDiagram.h index 4b48b12f2..b45a0410a 100644 --- a/genplugouts/CppUtilities/UmlActivityDiagram.h +++ b/genplugouts/CppUtilities/UmlActivityDiagram.h @@ -4,7 +4,7 @@ #include "UmlBaseActivityDiagram.h" #include "UmlActivityItem.h" -#include + // This class manages 'activity diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -15,7 +15,7 @@ class UmlActivityDiagram : public UmlBaseActivityDiagram, public UmlActivityItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityDiagram(void * id, const Q3CString & s) : UmlBaseActivityDiagram(id, s) { + UmlActivityDiagram(void * id, const QByteArray & s) : UmlBaseActivityDiagram(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityNode.h b/genplugouts/CppUtilities/UmlActivityNode.h index 8429d2396..770c06359 100644 --- a/genplugouts/CppUtilities/UmlActivityNode.h +++ b/genplugouts/CppUtilities/UmlActivityNode.h @@ -4,13 +4,13 @@ #include "UmlBaseActivityNode.h" #include "UmlActivityItem.h" -#include + class UmlActivityNode : public UmlBaseActivityNode, public UmlActivityItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityNode(void * id, const Q3CString & s) : UmlBaseActivityNode(id, s) { + UmlActivityNode(void * id, const QByteArray & s) : UmlBaseActivityNode(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityObject.h b/genplugouts/CppUtilities/UmlActivityObject.h index f75bccd9b..22de36492 100644 --- a/genplugouts/CppUtilities/UmlActivityObject.h +++ b/genplugouts/CppUtilities/UmlActivityObject.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityObject.h" -#include + class UmlActivityObject : public UmlBaseActivityObject { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityObject(void * id, const Q3CString & s) : UmlBaseActivityObject(id, s) { + UmlActivityObject(void * id, const QByteArray & s) : UmlBaseActivityObject(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityParameter.h b/genplugouts/CppUtilities/UmlActivityParameter.h index b51b0fec0..57474b452 100644 --- a/genplugouts/CppUtilities/UmlActivityParameter.h +++ b/genplugouts/CppUtilities/UmlActivityParameter.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityParameter.h" -#include + class UmlActivityParameter : public UmlBaseActivityParameter { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityParameter(void * id, const Q3CString & s) : UmlBaseActivityParameter(id, s) { + UmlActivityParameter(void * id, const QByteArray & s) : UmlBaseActivityParameter(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityPartition.h b/genplugouts/CppUtilities/UmlActivityPartition.h index 60c79b24b..e8b884bf0 100644 --- a/genplugouts/CppUtilities/UmlActivityPartition.h +++ b/genplugouts/CppUtilities/UmlActivityPartition.h @@ -4,13 +4,13 @@ #include "UmlBaseActivityPartition.h" #include "UmlActivityItem.h" -#include + class UmlActivityPartition : public UmlBaseActivityPartition, public UmlActivityItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityPartition(void * id, const Q3CString & s) : UmlBaseActivityPartition(id, s) { + UmlActivityPartition(void * id, const QByteArray & s) : UmlBaseActivityPartition(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlActivityPin.h b/genplugouts/CppUtilities/UmlActivityPin.h index 27d1c29c8..573c3cdd9 100644 --- a/genplugouts/CppUtilities/UmlActivityPin.h +++ b/genplugouts/CppUtilities/UmlActivityPin.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityPin.h" -#include + class UmlActivityPin : public UmlBaseActivityPin { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityPin(void * id, const Q3CString & s) : UmlBaseActivityPin(id, s) { + UmlActivityPin(void * id, const QByteArray & s) : UmlBaseActivityPin(id, s) { } virtual ~UmlActivityPin(){} diff --git a/genplugouts/CppUtilities/UmlActivityRegion.h b/genplugouts/CppUtilities/UmlActivityRegion.h index 420b4bde2..1db9fe05f 100644 --- a/genplugouts/CppUtilities/UmlActivityRegion.h +++ b/genplugouts/CppUtilities/UmlActivityRegion.h @@ -4,13 +4,13 @@ #include "UmlBaseActivityRegion.h" #include "UmlActivityItem.h" -#include + class UmlActivityRegion : public UmlBaseActivityRegion, public UmlActivityItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityRegion(void * id, const Q3CString & s) : UmlBaseActivityRegion(id, s) { + UmlActivityRegion(void * id, const QByteArray & s) : UmlBaseActivityRegion(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlArtifact.h b/genplugouts/CppUtilities/UmlArtifact.h index 9f6a30622..030e1717b 100644 --- a/genplugouts/CppUtilities/UmlArtifact.h +++ b/genplugouts/CppUtilities/UmlArtifact.h @@ -3,7 +3,7 @@ #include "UmlBaseArtifact.h" -#include + // This class manages 'artifacts' // @@ -11,7 +11,7 @@ class UmlArtifact : public UmlBaseArtifact { public: - UmlArtifact(void * id, const Q3CString & n) : UmlBaseArtifact(id, n) {}; + UmlArtifact(void * id, const QByteArray & n) : UmlBaseArtifact(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlAttribute.h b/genplugouts/CppUtilities/UmlAttribute.h index 19ee0a4c6..427658b45 100644 --- a/genplugouts/CppUtilities/UmlAttribute.h +++ b/genplugouts/CppUtilities/UmlAttribute.h @@ -3,7 +3,7 @@ #include "UmlBaseAttribute.h" -#include + // This class manages 'attribute', notes that the class 'UmlClassItem' // is a mother class of the class's children. @@ -12,7 +12,7 @@ class UmlAttribute : public UmlBaseAttribute { public: - UmlAttribute(void * id, const Q3CString & n) : UmlBaseAttribute(id, n) {}; + UmlAttribute(void * id, const QByteArray & n) : UmlBaseAttribute(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseAccessVariableValueAction.h b/genplugouts/CppUtilities/UmlBaseAccessVariableValueAction.h index 311fefa08..0e2856d02 100644 --- a/genplugouts/CppUtilities/UmlBaseAccessVariableValueAction.h +++ b/genplugouts/CppUtilities/UmlBaseAccessVariableValueAction.h @@ -3,7 +3,7 @@ #include "UmlActivityAction.h" -#include + class UmlItem; @@ -11,7 +11,7 @@ class UmlBaseAccessVariableValueAction : public UmlActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAccessVariableValueAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseAccessVariableValueAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } diff --git a/genplugouts/CppUtilities/UmlBaseActivity.cpp b/genplugouts/CppUtilities/UmlBaseActivity.cpp index eb1afd7eb..6dc14cc2d 100644 --- a/genplugouts/CppUtilities/UmlBaseActivity.cpp +++ b/genplugouts/CppUtilities/UmlBaseActivity.cpp @@ -6,7 +6,7 @@ #include "UmlOperation.h" #include "UmlActivityDiagram.h" //Added by qt3to4: -#include +#include UmlActivity * UmlBaseActivity::create(UmlClassView * parent, const char * s) { @@ -18,7 +18,7 @@ anItemKind UmlBaseActivity::kind() return anActivity; } -const Q3CString & UmlBaseActivity::preCondition() +const QByteArray & UmlBaseActivity::preCondition() { read_if_needed_(); return _pre_condition; @@ -29,7 +29,7 @@ bool UmlBaseActivity::set_PreCondition(const char * v) return set_it_(_pre_condition, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::postCondition() +const QByteArray & UmlBaseActivity::postCondition() { read_if_needed_(); return _post_condition; @@ -41,7 +41,7 @@ bool UmlBaseActivity::set_PostCondition(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivity::cppPreCondition() +const QByteArray & UmlBaseActivity::cppPreCondition() { read_if_needed_(); return _cpp_pre_condition; @@ -52,7 +52,7 @@ bool UmlBaseActivity::set_CppPreCondition(const char * v) return set_it_(_cpp_pre_condition, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::cppPostCondition() +const QByteArray & UmlBaseActivity::cppPostCondition() { read_if_needed_(); return _cpp_post_condition; @@ -65,7 +65,7 @@ bool UmlBaseActivity::set_CppPostCondition(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivity::javaPreCondition() +const QByteArray & UmlBaseActivity::javaPreCondition() { read_if_needed_(); return _java_pre_condition; @@ -76,7 +76,7 @@ bool UmlBaseActivity::set_JavaPreCondition(const char * v) return set_it_(_java_pre_condition, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::javaPostCondition() +const QByteArray & UmlBaseActivity::javaPostCondition() { read_if_needed_(); return _java_post_condition; diff --git a/genplugouts/CppUtilities/UmlBaseActivity.h b/genplugouts/CppUtilities/UmlBaseActivity.h index 0f987a252..723a0a93f 100644 --- a/genplugouts/CppUtilities/UmlBaseActivity.h +++ b/genplugouts/CppUtilities/UmlBaseActivity.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlActivity; class UmlClassView; @@ -27,13 +27,13 @@ class UmlBaseActivity : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivity(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivity(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the pre condition - const Q3CString & preCondition(); + const QByteArray & preCondition(); // set the pre condition // @@ -41,7 +41,7 @@ class UmlBaseActivity : public UmlItem bool set_PreCondition(const char * v); // return the post condition - const Q3CString & postCondition(); + const QByteArray & postCondition(); // set the post condition // @@ -50,7 +50,7 @@ class UmlBaseActivity : public UmlItem #ifdef WITHCPP // return the pre condition in C++ - const Q3CString & cppPreCondition(); + const QByteArray & cppPreCondition(); // set the pre condition in C++ // @@ -58,7 +58,7 @@ class UmlBaseActivity : public UmlItem bool set_CppPreCondition(const char * v); // return the post condition in C++ - const Q3CString & cppPostCondition(); + const QByteArray & cppPostCondition(); // set the post condition in C++ // @@ -68,7 +68,7 @@ class UmlBaseActivity : public UmlItem #ifdef WITHJAVA // return the pre condition in Java - const Q3CString & javaPreCondition(); + const QByteArray & javaPreCondition(); // set the pre condition in Java // @@ -76,7 +76,7 @@ class UmlBaseActivity : public UmlItem bool set_JavaPreCondition(const char * v); // return the post condition in Java - const Q3CString & javaPostCondition(); + const QByteArray & javaPostCondition(); // set the post condition in Java // @@ -126,20 +126,20 @@ class UmlBaseActivity : public UmlItem private: - Q3CString _pre_condition; + QByteArray _pre_condition; - Q3CString _post_condition; + QByteArray _post_condition; #ifdef WITHCPP - Q3CString _cpp_pre_condition; + QByteArray _cpp_pre_condition; - Q3CString _cpp_post_condition; + QByteArray _cpp_post_condition; #endif #ifdef WITHJAVA - Q3CString _java_pre_condition; + QByteArray _java_pre_condition; - Q3CString _java_post_condition; + QByteArray _java_post_condition; #endif bool _read_only; diff --git a/genplugouts/CppUtilities/UmlBaseActivityAction.cpp b/genplugouts/CppUtilities/UmlBaseActivityAction.cpp index 8aff0f82e..5c58036dd 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityAction.cpp +++ b/genplugouts/CppUtilities/UmlBaseActivityAction.cpp @@ -3,9 +3,9 @@ #include "UmlBaseActivityAction.h" #include "UmlDiagram.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlBaseActivityAction::preCondition() +const QByteArray & UmlBaseActivityAction::preCondition() { read_if_needed_(); return _pre_condition; @@ -16,7 +16,7 @@ bool UmlBaseActivityAction::set_PreCondition(const char * v) return set_it_(_pre_condition, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::postCondition() +const QByteArray & UmlBaseActivityAction::postCondition() { read_if_needed_(); return _post_condition; @@ -28,7 +28,7 @@ bool UmlBaseActivityAction::set_PostCondition(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivityAction::cppPreCondition() +const QByteArray & UmlBaseActivityAction::cppPreCondition() { read_if_needed_(); return _cpp_pre_condition; @@ -39,7 +39,7 @@ bool UmlBaseActivityAction::set_CppPreCondition(const char * v) return set_it_(_cpp_pre_condition, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::cppPostCondition() +const QByteArray & UmlBaseActivityAction::cppPostCondition() { read_if_needed_(); return _cpp_post_condition; @@ -52,7 +52,7 @@ bool UmlBaseActivityAction::set_CppPostCondition(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivityAction::javaPreCondition() +const QByteArray & UmlBaseActivityAction::javaPreCondition() { read_if_needed_(); return _java_pre_condition; @@ -63,7 +63,7 @@ bool UmlBaseActivityAction::set_JavaPreCondition(const char * v) return set_it_(_java_pre_condition, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::javaPostCondition() +const QByteArray & UmlBaseActivityAction::javaPostCondition() { read_if_needed_(); return _java_post_condition; diff --git a/genplugouts/CppUtilities/UmlBaseActivityAction.h b/genplugouts/CppUtilities/UmlBaseActivityAction.h index 4a06ccffe..a0c197cab 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityAction.h +++ b/genplugouts/CppUtilities/UmlBaseActivityAction.h @@ -3,7 +3,7 @@ #include "UmlActivityNode.h" -#include + class UmlDiagram; @@ -11,13 +11,13 @@ class UmlBaseActivityAction : public UmlActivityNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityAction(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityAction(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } public: // return the pre condition - const Q3CString & preCondition(); + const QByteArray & preCondition(); // set the pre condition // @@ -25,7 +25,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_PreCondition(const char * v); // return the post condition - const Q3CString & postCondition(); + const QByteArray & postCondition(); // set the post condition // @@ -34,7 +34,7 @@ class UmlBaseActivityAction : public UmlActivityNode #ifdef WITHCPP // return the pre condition in C++ - const Q3CString & cppPreCondition(); + const QByteArray & cppPreCondition(); // set the pre condition in C++ // @@ -42,7 +42,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_CppPreCondition(const char * v); // return the post condition in C++ - const Q3CString & cppPostCondition(); + const QByteArray & cppPostCondition(); // set the post condition in C++ // @@ -52,7 +52,7 @@ class UmlBaseActivityAction : public UmlActivityNode #ifdef WITHJAVA // return the pre condition in Java - const Q3CString & javaPreCondition(); + const QByteArray & javaPreCondition(); // set the pre condition in Java // @@ -60,7 +60,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_JavaPreCondition(const char * v); // return the post condition in Java - const Q3CString & javaPostCondition(); + const QByteArray & javaPostCondition(); // set the post condition in Java // @@ -86,20 +86,20 @@ class UmlBaseActivityAction : public UmlActivityNode private: - Q3CString _pre_condition; + QByteArray _pre_condition; - Q3CString _post_condition; + QByteArray _post_condition; #ifdef WITHCPP - Q3CString _cpp_pre_condition; + QByteArray _cpp_pre_condition; - Q3CString _cpp_post_condition; + QByteArray _cpp_post_condition; #endif #ifdef WITHJAVA - Q3CString _java_pre_condition; + QByteArray _java_pre_condition; - Q3CString _java_post_condition; + QByteArray _java_post_condition; #endif UmlDiagram * _assoc_diagram; diff --git a/genplugouts/CppUtilities/UmlBaseActivityActionClasses.cpp b/genplugouts/CppUtilities/UmlBaseActivityActionClasses.cpp index d6ad5ffbb..82ab59225 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityActionClasses.cpp +++ b/genplugouts/CppUtilities/UmlBaseActivityActionClasses.cpp @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "UmlOperation.h" //Added by qt3to4: -#include +#include UmlSendObjectAction * UmlBaseSendObjectAction::create(UmlItem * parent, const char * s) { @@ -57,7 +57,7 @@ anItemKind UmlBaseValueSpecificationAction::kind() return aValueSpecificationAction; } -const Q3CString & UmlBaseValueSpecificationAction::value() +const QByteArray & UmlBaseValueSpecificationAction::value() { read_if_needed_(); return _value; @@ -69,7 +69,7 @@ bool UmlBaseValueSpecificationAction::set_Value(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseValueSpecificationAction::cppValue() +const QByteArray & UmlBaseValueSpecificationAction::cppValue() { read_if_needed_(); return _cpp_value; @@ -82,7 +82,7 @@ bool UmlBaseValueSpecificationAction::set_CppValue(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseValueSpecificationAction::javaValue() +const QByteArray & UmlBaseValueSpecificationAction::javaValue() { read_if_needed_(); return _java_value; @@ -138,7 +138,7 @@ anItemKind UmlBaseOpaqueAction::kind() return anOpaqueAction; } -const Q3CString & UmlBaseOpaqueAction::behavior() +const QByteArray & UmlBaseOpaqueAction::behavior() { read_if_needed_(); return _behavior; @@ -150,7 +150,7 @@ bool UmlBaseOpaqueAction::set_Behavior(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseOpaqueAction::cppBehavior() +const QByteArray & UmlBaseOpaqueAction::cppBehavior() { read_if_needed_(); return _cpp_behavior; @@ -163,7 +163,7 @@ bool UmlBaseOpaqueAction::set_CppBehavior(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseOpaqueAction::javaBehavior() +const QByteArray & UmlBaseOpaqueAction::javaBehavior() { read_if_needed_(); return _java_behavior; @@ -241,7 +241,7 @@ bool UmlBaseAcceptEventAction::set_isTimeEvent(bool v) return set_it_(_timeevent, v, setTimeEventCmd); } -const Q3CString & UmlBaseAcceptEventAction::trigger() +const QByteArray & UmlBaseAcceptEventAction::trigger() { read_if_needed_(); return _trigger; @@ -253,7 +253,7 @@ bool UmlBaseAcceptEventAction::set_Trigger(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseAcceptEventAction::cppTrigger() +const QByteArray & UmlBaseAcceptEventAction::cppTrigger() { read_if_needed_(); return _cpp_trigger; @@ -266,7 +266,7 @@ bool UmlBaseAcceptEventAction::set_CppTrigger(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseAcceptEventAction::javaTrigger() +const QByteArray & UmlBaseAcceptEventAction::javaTrigger() { read_if_needed_(); return _java_trigger; @@ -500,7 +500,7 @@ anItemKind UmlBaseAcceptCallAction::kind() return anAcceptCallAction; } -const Q3CString & UmlBaseAcceptCallAction::trigger() +const QByteArray & UmlBaseAcceptCallAction::trigger() { read_if_needed_(); return _trigger; @@ -512,7 +512,7 @@ bool UmlBaseAcceptCallAction::set_Trigger(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseAcceptCallAction::cppTrigger() +const QByteArray & UmlBaseAcceptCallAction::cppTrigger() { read_if_needed_(); return _cpp_trigger; @@ -525,7 +525,7 @@ bool UmlBaseAcceptCallAction::set_CppTrigger(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseAcceptCallAction::javaTrigger() +const QByteArray & UmlBaseAcceptCallAction::javaTrigger() { read_if_needed_(); return _java_trigger; @@ -581,7 +581,7 @@ anItemKind UmlBaseReplyAction::kind() return aReplyAction; } -const Q3CString & UmlBaseReplyAction::replyToCall() +const QByteArray & UmlBaseReplyAction::replyToCall() { read_if_needed_(); return _trigger; @@ -593,7 +593,7 @@ bool UmlBaseReplyAction::set_ReplyToCall(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseReplyAction::cppReplyToCall() +const QByteArray & UmlBaseReplyAction::cppReplyToCall() { read_if_needed_(); return _cpp_trigger; @@ -606,7 +606,7 @@ bool UmlBaseReplyAction::set_CppReplyToCall(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseReplyAction::javaReplyToCall() +const QByteArray & UmlBaseReplyAction::javaReplyToCall() { read_if_needed_(); return _java_trigger; @@ -662,7 +662,7 @@ anItemKind UmlBaseCreateObjectAction::kind() return aCreateObjectAction; } -const Q3CString & UmlBaseCreateObjectAction::classifier() +const QByteArray & UmlBaseCreateObjectAction::classifier() { read_if_needed_(); return _classifier; diff --git a/genplugouts/CppUtilities/UmlBaseActivityActionClasses.h b/genplugouts/CppUtilities/UmlBaseActivityActionClasses.h index 7bac53d23..d9539f6e5 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityActionClasses.h +++ b/genplugouts/CppUtilities/UmlBaseActivityActionClasses.h @@ -4,7 +4,7 @@ #include "UmlActivityAction.h" #include "anItemKind.h" -#include + #include "UmlOnSignalAction.h" #include "UmlAccessVariableValueAction.h" @@ -48,7 +48,7 @@ class UmlBaseSendObjectAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSendObjectAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseSendObjectAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } }; @@ -69,7 +69,7 @@ class UmlBaseUnmarshallAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUnmarshallAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseUnmarshallAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } }; @@ -90,7 +90,7 @@ class UmlBaseSendSignalAction : public UmlOnSignalAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSendSignalAction(void * id, const Q3CString & s) : UmlOnSignalAction(id, s) { + UmlBaseSendSignalAction(void * id, const QByteArray & s) : UmlOnSignalAction(id, s) { } }; @@ -111,7 +111,7 @@ class UmlBaseBroadcastSignalAction : public UmlOnSignalAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseBroadcastSignalAction(void * id, const Q3CString & s) : UmlOnSignalAction(id, s) { + UmlBaseBroadcastSignalAction(void * id, const QByteArray & s) : UmlOnSignalAction(id, s) { } }; @@ -132,13 +132,13 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseValueSpecificationAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseValueSpecificationAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the value - const Q3CString & value(); + const QByteArray & value(); // set the value // @@ -147,7 +147,7 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction #ifdef WITHCPP // return the value in C++ - const Q3CString & cppValue(); + const QByteArray & cppValue(); // set the value in C++ // @@ -157,7 +157,7 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction #ifdef WITHJAVA // return the value in Java - const Q3CString & javaValue(); + const QByteArray & javaValue(); // set the value in Java // @@ -175,14 +175,14 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction private: - Q3CString _value; + QByteArray _value; #ifdef WITHCPP - Q3CString _cpp_value; + QByteArray _cpp_value; #endif #ifdef WITHJAVA - Q3CString _java_value; + QByteArray _java_value; #endif @@ -215,13 +215,13 @@ class UmlBaseOpaqueAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOpaqueAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseOpaqueAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the behavior - const Q3CString & behavior(); + const QByteArray & behavior(); // set the behavior // @@ -230,7 +230,7 @@ class UmlBaseOpaqueAction : public UmlActivityAction #ifdef WITHCPP // return the behavior in C++ - const Q3CString & cppBehavior(); + const QByteArray & cppBehavior(); // set the behavior in C++ // @@ -240,7 +240,7 @@ class UmlBaseOpaqueAction : public UmlActivityAction #ifdef WITHJAVA // return the behavior in Java - const Q3CString & javaBehavior(); + const QByteArray & javaBehavior(); // set the behavior in Java // @@ -258,14 +258,14 @@ class UmlBaseOpaqueAction : public UmlActivityAction private: - Q3CString _behavior; + QByteArray _behavior; #ifdef WITHCPP - Q3CString _cpp_behavior; + QByteArray _cpp_behavior; #endif #ifdef WITHJAVA - Q3CString _java_behavior; + QByteArray _java_behavior; #endif @@ -298,7 +298,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAcceptEventAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseAcceptEventAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -320,7 +320,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction bool set_isTimeEvent(bool v); // return the trigger - const Q3CString & trigger(); + const QByteArray & trigger(); // set the trigger // @@ -329,7 +329,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction #ifdef WITHCPP // return the trigger in C++ - const Q3CString & cppTrigger(); + const QByteArray & cppTrigger(); // set the trigger in C++ // @@ -339,7 +339,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction #ifdef WITHJAVA // return the trigger in Java - const Q3CString & javaTrigger(); + const QByteArray & javaTrigger(); // set the trigger in Java // @@ -361,14 +361,14 @@ class UmlBaseAcceptEventAction : public UmlActivityAction bool _timeevent; - Q3CString _trigger; + QByteArray _trigger; #ifdef WITHCPP - Q3CString _cpp_trigger; + QByteArray _cpp_trigger; #endif #ifdef WITHJAVA - Q3CString _java_trigger; + QByteArray _java_trigger; #endif @@ -401,7 +401,7 @@ class UmlBaseCallOperationAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCallOperationAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseCallOperationAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -450,7 +450,7 @@ class UmlBaseCallBehaviorAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCallBehaviorAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseCallBehaviorAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -499,7 +499,7 @@ class UmlBaseClearVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClearVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseClearVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -520,7 +520,7 @@ class UmlBaseReadVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseReadVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseReadVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -541,7 +541,7 @@ class UmlBaseWriteVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseWriteVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseWriteVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -562,7 +562,7 @@ class UmlBaseAddVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAddVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseAddVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } @@ -601,7 +601,7 @@ class UmlBaseRemoveVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRemoveVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseRemoveVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } @@ -640,13 +640,13 @@ class UmlBaseAcceptCallAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAcceptCallAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseAcceptCallAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the trigger - const Q3CString & trigger(); + const QByteArray & trigger(); // set the trigger // @@ -655,7 +655,7 @@ class UmlBaseAcceptCallAction : public UmlActivityAction #ifdef WITHCPP // return the trigger in C++ - const Q3CString & cppTrigger(); + const QByteArray & cppTrigger(); // set the trigger in C++ // @@ -665,7 +665,7 @@ class UmlBaseAcceptCallAction : public UmlActivityAction #ifdef WITHJAVA // return the trigger in Java - const Q3CString & javaTrigger(); + const QByteArray & javaTrigger(); // set the trigger in Java // @@ -683,14 +683,14 @@ class UmlBaseAcceptCallAction : public UmlActivityAction private: - Q3CString _trigger; + QByteArray _trigger; #ifdef WITHCPP - Q3CString _cpp_trigger; + QByteArray _cpp_trigger; #endif #ifdef WITHJAVA - Q3CString _java_trigger; + QByteArray _java_trigger; #endif @@ -723,13 +723,13 @@ class UmlBaseReplyAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseReplyAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseReplyAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the replyToCall trigger - const Q3CString & replyToCall(); + const QByteArray & replyToCall(); // set the replyToCall trigger // @@ -738,7 +738,7 @@ class UmlBaseReplyAction : public UmlActivityAction #ifdef WITHCPP // return the replyToCall trigger in C++ - const Q3CString & cppReplyToCall(); + const QByteArray & cppReplyToCall(); // set the replyToCall trigger in C++ // @@ -748,7 +748,7 @@ class UmlBaseReplyAction : public UmlActivityAction #ifdef WITHJAVA // return the replyToCall trigger in Java - const Q3CString & javaReplyToCall(); + const QByteArray & javaReplyToCall(); // set the replyToCall trigger in Java // @@ -766,14 +766,14 @@ class UmlBaseReplyAction : public UmlActivityAction private: - Q3CString _trigger; + QByteArray _trigger; #ifdef WITHCPP - Q3CString _cpp_trigger; + QByteArray _cpp_trigger; #endif #ifdef WITHJAVA - Q3CString _java_trigger; + QByteArray _java_trigger; #endif @@ -806,13 +806,13 @@ class UmlBaseCreateObjectAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCreateObjectAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseCreateObjectAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the classifier - const Q3CString & classifier(); + const QByteArray & classifier(); // set the classifier // @@ -829,7 +829,7 @@ class UmlBaseCreateObjectAction : public UmlActivityAction private: - Q3CString _classifier; + QByteArray _classifier; protected: @@ -853,7 +853,7 @@ class UmlBaseDestroyObjectAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDestroyObjectAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseDestroyObjectAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -902,7 +902,7 @@ class UmlBaseTestIdentityAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseTestIdentityAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseTestIdentityAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } }; @@ -923,7 +923,7 @@ class UmlBaseRaiseExceptionAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRaiseExceptionAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseRaiseExceptionAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } }; @@ -944,7 +944,7 @@ class UmlBaseReduceAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseReduceAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseReduceAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } diff --git a/genplugouts/CppUtilities/UmlBaseActivityControlNode.h b/genplugouts/CppUtilities/UmlBaseActivityControlNode.h index 9f1c0931a..3d07467c1 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityControlNode.h +++ b/genplugouts/CppUtilities/UmlBaseActivityControlNode.h @@ -3,13 +3,13 @@ #include "UmlActivityNode.h" -#include + class UmlBaseActivityControlNode : public UmlActivityNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityControlNode(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityControlNode(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseActivityControlNodeClasses.h b/genplugouts/CppUtilities/UmlBaseActivityControlNodeClasses.h index 84dd781f7..1ef579e8c 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityControlNodeClasses.h +++ b/genplugouts/CppUtilities/UmlBaseActivityControlNodeClasses.h @@ -4,7 +4,7 @@ #include "UmlActivityControlNode.h" #include "anItemKind.h" -#include + class UmlInitialActivityNode; class UmlItem; @@ -31,7 +31,7 @@ class UmlBaseInitialActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInitialActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseInitialActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -52,7 +52,7 @@ class UmlBaseFlowFinalActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFlowFinalActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseFlowFinalActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -73,7 +73,7 @@ class UmlBaseActivityFinalActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityFinalActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseActivityFinalActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -94,7 +94,7 @@ class UmlBaseDecisionActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDecisionActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseDecisionActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -115,7 +115,7 @@ class UmlBaseMergeActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseMergeActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseMergeActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -136,7 +136,7 @@ class UmlBaseForkActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseForkActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseForkActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -157,7 +157,7 @@ class UmlBaseJoinActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJoinActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseJoinActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseActivityDiagram.h b/genplugouts/CppUtilities/UmlBaseActivityDiagram.h index 8ed6ca9d6..67d2ff8af 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseActivityDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlActivityDiagram; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseActivityDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseActivityDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseActivityNode.h b/genplugouts/CppUtilities/UmlBaseActivityNode.h index 9018d75ce..54536ed90 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityNode.h +++ b/genplugouts/CppUtilities/UmlBaseActivityNode.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + class UmlBaseActivityNode : public UmlItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityNode(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivityNode(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseActivityObject.cpp b/genplugouts/CppUtilities/UmlBaseActivityObject.cpp index efd18c63d..3a6e5f8a3 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityObject.cpp +++ b/genplugouts/CppUtilities/UmlBaseActivityObject.cpp @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "UmlActivityDiagram.h" //Added by qt3to4: -#include +#include UmlActivityObject * UmlBaseActivityObject::create(UmlItem * parent, const char * s) { @@ -28,7 +28,7 @@ bool UmlBaseActivityObject::set_Type(const UmlTypeSpec & v) return set_it_(_type, v, setTypeCmd); } -const Q3CString & UmlBaseActivityObject::multiplicity() +const QByteArray & UmlBaseActivityObject::multiplicity() { read_if_needed_(); return _multiplicity; @@ -39,7 +39,7 @@ bool UmlBaseActivityObject::set_Multiplicity(const char * v) return set_it_(_multiplicity, v, setMultiplicityCmd); } -const Q3CString & UmlBaseActivityObject::inState() +const QByteArray & UmlBaseActivityObject::inState() { read_if_needed_(); return _in_state; @@ -50,7 +50,7 @@ bool UmlBaseActivityObject::set_InState(const char * v) return set_it_(_in_state, v, setInStateCmd); } -const Q3CString & UmlBaseActivityObject::selection() +const QByteArray & UmlBaseActivityObject::selection() { read_if_needed_(); return _selection; @@ -62,7 +62,7 @@ bool UmlBaseActivityObject::set_Selection(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivityObject::cppSelection() +const QByteArray & UmlBaseActivityObject::cppSelection() { read_if_needed_(); return _cpp_selection; @@ -75,7 +75,7 @@ bool UmlBaseActivityObject::set_CppSelection(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivityObject::javaSelection() +const QByteArray & UmlBaseActivityObject::javaSelection() { read_if_needed_(); return _java_selection; diff --git a/genplugouts/CppUtilities/UmlBaseActivityObject.h b/genplugouts/CppUtilities/UmlBaseActivityObject.h index a3db42010..ffb8ecc78 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityObject.h +++ b/genplugouts/CppUtilities/UmlBaseActivityObject.h @@ -4,7 +4,7 @@ #include "UmlActivityNode.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" #include "anOrdering.h" @@ -28,7 +28,7 @@ class UmlBaseActivityObject : public UmlActivityNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityObject(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityObject(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } @@ -42,7 +42,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_Type(const UmlTypeSpec & v); // return the multiplicity - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // set the multiplicity // @@ -50,7 +50,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_Multiplicity(const char * v); // return the inState attribute - const Q3CString & inState(); + const QByteArray & inState(); // set the inState attribute // @@ -58,7 +58,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_InState(const char * v); // return the selection in OCL - const Q3CString & selection(); + const QByteArray & selection(); // set the selection in OCL // @@ -67,7 +67,7 @@ class UmlBaseActivityObject : public UmlActivityNode #ifdef WITHCPP // return the selection in C++ - const Q3CString & cppSelection(); + const QByteArray & cppSelection(); // set the selection in C++ // @@ -77,7 +77,7 @@ class UmlBaseActivityObject : public UmlActivityNode #ifdef WITHJAVA // return the selection in Java - const Q3CString & javaSelection(); + const QByteArray & javaSelection(); // set the selection in Java // @@ -123,18 +123,18 @@ class UmlBaseActivityObject : public UmlActivityNode UmlTypeSpec _type; - Q3CString _multiplicity; + QByteArray _multiplicity; - Q3CString _in_state; + QByteArray _in_state; - Q3CString _selection; + QByteArray _selection; #ifdef WITHCPP - Q3CString _cpp_selection; + QByteArray _cpp_selection; #endif #ifdef WITHJAVA - Q3CString _java_selection; + QByteArray _java_selection; #endif anOrdering _ordering : 8; diff --git a/genplugouts/CppUtilities/UmlBaseActivityParameter.cpp b/genplugouts/CppUtilities/UmlBaseActivityParameter.cpp index 067b1ba5c..0e5dd560c 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityParameter.cpp +++ b/genplugouts/CppUtilities/UmlBaseActivityParameter.cpp @@ -4,7 +4,7 @@ #include "UmlActivityParameter.h" #include "UmlActivity.h" //Added by qt3to4: -#include +#include UmlActivityParameter * UmlBaseActivityParameter::create(UmlActivity * parent, const char * s) { @@ -16,7 +16,7 @@ anItemKind UmlBaseActivityParameter::kind() return anActivityParameter; } -const Q3CString & UmlBaseActivityParameter::defaultValue() +const QByteArray & UmlBaseActivityParameter::defaultValue() { read_if_needed_(); return _default_value; diff --git a/genplugouts/CppUtilities/UmlBaseActivityParameter.h b/genplugouts/CppUtilities/UmlBaseActivityParameter.h index 1f05aabe8..fcdd9cecc 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityParameter.h +++ b/genplugouts/CppUtilities/UmlBaseActivityParameter.h @@ -4,7 +4,7 @@ #include "UmlPinParameter.h" #include "anItemKind.h" -#include + class UmlActivityParameter; class UmlActivity; @@ -25,13 +25,13 @@ class UmlBaseActivityParameter : public UmlPinParameter protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityParameter(void * id, const Q3CString & s) : UmlPinParameter(id, s) { + UmlBaseActivityParameter(void * id, const QByteArray & s) : UmlPinParameter(id, s) { } public: // return the default value - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // set the default value // @@ -48,7 +48,7 @@ class UmlBaseActivityParameter : public UmlPinParameter private: - Q3CString _default_value; + QByteArray _default_value; protected: diff --git a/genplugouts/CppUtilities/UmlBaseActivityPartition.h b/genplugouts/CppUtilities/UmlBaseActivityPartition.h index 313c14414..97cef2c5b 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityPartition.h +++ b/genplugouts/CppUtilities/UmlBaseActivityPartition.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlActivityPartition; class UmlActivityDiagram; @@ -25,7 +25,7 @@ class UmlBaseActivityPartition : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityPartition(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivityPartition(void * id, const QByteArray & s) : UmlItem(id, s) { } diff --git a/genplugouts/CppUtilities/UmlBaseActivityPin.h b/genplugouts/CppUtilities/UmlBaseActivityPin.h index 52f5d4072..9ef909129 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityPin.h +++ b/genplugouts/CppUtilities/UmlBaseActivityPin.h @@ -4,7 +4,7 @@ #include "UmlPinParameter.h" #include "anItemKind.h" -#include + class UmlActivityPin; class UmlActivityAction; @@ -25,7 +25,7 @@ class UmlBaseActivityPin : public UmlPinParameter protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityPin(void * id, const Q3CString & s) : UmlPinParameter(id, s) { + UmlBaseActivityPin(void * id, const QByteArray & s) : UmlPinParameter(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseActivityRegion.h b/genplugouts/CppUtilities/UmlBaseActivityRegion.h index 95e516e75..cf3b637c1 100644 --- a/genplugouts/CppUtilities/UmlBaseActivityRegion.h +++ b/genplugouts/CppUtilities/UmlBaseActivityRegion.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + class UmlActivityDiagram; @@ -11,7 +11,7 @@ class UmlBaseActivityRegion : public UmlItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityRegion(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivityRegion(void * id, const QByteArray & s) : UmlItem(id, s) { } diff --git a/genplugouts/CppUtilities/UmlBaseArtifact.cpp b/genplugouts/CppUtilities/UmlBaseArtifact.cpp index c0955445d..cfbdcb8f5 100644 --- a/genplugouts/CppUtilities/UmlBaseArtifact.cpp +++ b/genplugouts/CppUtilities/UmlBaseArtifact.cpp @@ -7,7 +7,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlArtifact * UmlBaseArtifact::create(UmlDeploymentView * parent, const char * s) { return (UmlArtifact *) parent->create_(anArtifact, s); @@ -37,7 +37,7 @@ bool UmlBaseArtifact::set_AssociatedDiagram(UmlDeploymentDiagram * d) return FALSE; } -const Q3PtrVector & UmlBaseArtifact::associatedClasses() +const QVector & UmlBaseArtifact::associatedClasses() { read_if_needed_(); @@ -51,8 +51,9 @@ bool UmlBaseArtifact::addAssociatedClass(UmlClass * cl) if (UmlCom::read_bool()) { if (_defined) { - _assoc_classes.resize(_assoc_classes.size() + 1); - _assoc_classes.insert(_assoc_classes.size() - 1, cl); + //_assoc_classes.reserve(_assoc_classes.size() + 1); + //_assoc_classes.insert(_assoc_classes.size() - 1, cl); + _assoc_classes.append(cl); } return TRUE; @@ -68,7 +69,7 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) if (UmlCom::read_bool()) { if (_defined) { - unsigned index = (unsigned) _assoc_classes.findRef(cl); + unsigned index = (unsigned) _assoc_classes.indexOf(cl); if (((int) index) == -1) // theo impossible @@ -77,7 +78,7 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) unsigned last = _assoc_classes.size() - 1; if (index != last) - _assoc_classes.insert(index, _assoc_classes[last]); + _assoc_classes[index] = _assoc_classes[last]; _assoc_classes.resize(last); } @@ -88,9 +89,9 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) return FALSE; } -bool UmlBaseArtifact::set_AssociatedClasses(const Q3PtrVector & l) +bool UmlBaseArtifact::set_AssociatedClasses(const QVector & l) { - UmlCom::send_cmd(_identifier, setAssocClassesCmd, (const Q3PtrVector &) l); + UmlCom::send_cmd(_identifier, setAssocClassesCmd, (const QVector &) l); if (UmlCom::read_bool()) { // tests != to bypass Qt 2.3 bug @@ -103,7 +104,7 @@ bool UmlBaseArtifact::set_AssociatedClasses(const Q3PtrVector & l) return FALSE; } -const Q3PtrVector & UmlBaseArtifact::associatedArtifacts() +const QVector & UmlBaseArtifact::associatedArtifacts() { read_if_needed_(); @@ -117,8 +118,9 @@ bool UmlBaseArtifact::addAssociatedArtifact(UmlArtifact * cp) if (UmlCom::read_bool()) { if (_defined) { - _associated.resize(_associated.size() + 1); - _associated.insert(_associated.size() - 1, cp); + //_associated.resize(_associated.size() + 1); + //_associated.insert(_associated.size() - 1, cp); + _associated.append(cp); } return TRUE; @@ -134,7 +136,7 @@ bool UmlBaseArtifact::removeAssociatedArtifact(UmlArtifact * cp) if (UmlCom::read_bool()) { if (_defined) { - unsigned index = (unsigned) _associated.findRef(cp); + unsigned index = (unsigned) _associated.indexOf(cp); if (((int) index) == -1) // theo impossible @@ -143,7 +145,7 @@ bool UmlBaseArtifact::removeAssociatedArtifact(UmlArtifact * cp) unsigned last = _associated.size() - 1; if (index != last) - _associated.insert(index, _associated[last]); + _associated[index] = _associated[last]; _associated.resize(last); } @@ -167,82 +169,82 @@ bool UmlBaseArtifact::removeAllAssociatedArtifacts() } #ifdef WITHCPP -const Q3CString & UmlBaseArtifact::cppHeader() +const QByteArray & UmlBaseArtifact::cppHeader() { read_if_needed_(); return _cpp_h; } -bool UmlBaseArtifact::set_CppHeader(const Q3CString & s) +bool UmlBaseArtifact::set_CppHeader(const QByteArray & s) { return set_it_(_cpp_h, s, setCppHCmd); } -const Q3CString & UmlBaseArtifact::cppSource() +const QByteArray & UmlBaseArtifact::cppSource() { read_if_needed_(); return _cpp_src; } -bool UmlBaseArtifact::set_CppSource(const Q3CString & s) +bool UmlBaseArtifact::set_CppSource(const QByteArray & s) { return set_it_(_cpp_src, s, setCppSrcCmd); } #endif #ifdef WITHJAVA -const Q3CString & UmlBaseArtifact::javaSource() +const QByteArray & UmlBaseArtifact::javaSource() { read_if_needed_(); return _java_src; } -bool UmlBaseArtifact::set_JavaSource(const Q3CString & s) +bool UmlBaseArtifact::set_JavaSource(const QByteArray & s) { return set_it_(_java_src, s, setJavaSrcCmd); } #endif #ifdef WITHPHP -const Q3CString & UmlBaseArtifact::phpSource() +const QByteArray & UmlBaseArtifact::phpSource() { read_if_needed_(); return _php_src; } -bool UmlBaseArtifact::set_PhpSource(const Q3CString & s) +bool UmlBaseArtifact::set_PhpSource(const QByteArray & s) { return set_it_(_php_src, s, setPhpSrcCmd); } #endif #ifdef WITHPYTHON -const Q3CString & UmlBaseArtifact::pythonSource() +const QByteArray & UmlBaseArtifact::pythonSource() { read_if_needed_(); return _python_src; } -bool UmlBaseArtifact::set_PythonSource(const Q3CString & s) +bool UmlBaseArtifact::set_PythonSource(const QByteArray & s) { return set_it_(_python_src, s, setPythonSrcCmd); } #endif #ifdef WITHIDL -const Q3CString & UmlBaseArtifact::idlSource() +const QByteArray & UmlBaseArtifact::idlSource() { read_if_needed_(); return _idl_src; } -bool UmlBaseArtifact::set_IdlSource(const Q3CString & s) +bool UmlBaseArtifact::set_IdlSource(const QByteArray & s) { return set_it_(_idl_src, s, setIdlSrcCmd); } @@ -283,13 +285,13 @@ void UmlBaseArtifact::read_uml_() _assoc_classes.resize(n); for (index = 0; index != n; index += 1) - _assoc_classes.insert(index, (UmlClass *) UmlBaseItem::read_()); + _assoc_classes[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _associated.resize(n); for (index = 0; index != n; index += 1) - _associated.insert(index, (UmlArtifact *) UmlBaseItem::read_()); + _associated[index] = (UmlArtifact *) UmlBaseItem::read_(); } #ifdef WITHCPP diff --git a/genplugouts/CppUtilities/UmlBaseArtifact.h b/genplugouts/CppUtilities/UmlBaseArtifact.h index 19359a371..bfe0b9a0b 100644 --- a/genplugouts/CppUtilities/UmlBaseArtifact.h +++ b/genplugouts/CppUtilities/UmlBaseArtifact.h @@ -4,8 +4,8 @@ #include "UmlItem.h" #include "anItemKind.h" -#include -#include +#include + #include "UmlClass.h" // to avoid destructor problem class UmlArtifact; @@ -37,7 +37,7 @@ class UmlBaseArtifact : public UmlItem // returns (in Java a copy of) the optional associated classes // significant when the artifact is stereotyped <> - const Q3PtrVector & associatedClasses(); + const QVector & associatedClasses(); // adds 'cl' at the end of the associated classes list, returns false // if 'cl' is already an associate class. @@ -56,11 +56,11 @@ class UmlBaseArtifact : public UmlItem // significant when the artifact is stereotyped <> // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_AssociatedClasses(const Q3PtrVector & l); + bool set_AssociatedClasses(const QVector & l); // returns (in Java a copy of) the associated artifacts list // significant when the artifact is not stereotyped <> - const Q3PtrVector & associatedArtifacts(); + const QVector & associatedArtifacts(); // adds an associated artifacts, returns false if 'cp' is already // an associate artifact. @@ -83,60 +83,60 @@ class UmlBaseArtifact : public UmlItem #ifdef WITHCPP // returns the C++ header file definition - const Q3CString & cppHeader(); + const QByteArray & cppHeader(); // to set the C++ header file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppHeader(const Q3CString & s); + bool set_CppHeader(const QByteArray & s); // returns the C++ source file definition - const Q3CString & cppSource(); + const QByteArray & cppSource(); // to set the C++ source file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppSource(const Q3CString & s); + bool set_CppSource(const QByteArray & s); #endif #ifdef WITHJAVA // returns the Java file definition - const Q3CString & javaSource(); + const QByteArray & javaSource(); // to set the Java file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaSource(const Q3CString & s); + bool set_JavaSource(const QByteArray & s); #endif #ifdef WITHPHP // returns the Php file definition - const Q3CString & phpSource(); + const QByteArray & phpSource(); // to set the Php file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PhpSource(const Q3CString & s); + bool set_PhpSource(const QByteArray & s); #endif #ifdef WITHPYTHON // returns the Python file definition - const Q3CString & pythonSource(); + const QByteArray & pythonSource(); // to set the Python file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PythonSource(const Q3CString & s); + bool set_PythonSource(const QByteArray & s); #endif #ifdef WITHIDL // returns the Idl file definition - const Q3CString & idlSource(); + const QByteArray & idlSource(); // to set the Idl file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlSource(const Q3CString & s); + bool set_IdlSource(const QByteArray & s); #endif // to unload the object to free memory, it will be reloaded @@ -147,30 +147,30 @@ class UmlBaseArtifact : public UmlItem private: UmlDeploymentDiagram * _assoc_diagram; - Q3PtrVector _assoc_classes; + QVector _assoc_classes; - Q3PtrVector _associated; + QVector _associated; #ifdef WITHCPP - Q3CString _cpp_h; + QByteArray _cpp_h; - Q3CString _cpp_src; + QByteArray _cpp_src; #endif #ifdef WITHJAVA - Q3CString _java_src; + QByteArray _java_src; #endif #ifdef WITHPHP - Q3CString _php_src; + QByteArray _php_src; #endif #ifdef WITHPYTHON - Q3CString _python_src; + QByteArray _python_src; #endif #ifdef WITHIDL - Q3CString _idl_src; + QByteArray _idl_src; #endif @@ -210,12 +210,12 @@ class UmlBaseArtifact : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseArtifact(void * id, const Q3CString & n); + UmlBaseArtifact(void * id, const QByteArray & n); friend class UmlBaseClass; }; -inline UmlBaseArtifact::UmlBaseArtifact(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseArtifact::UmlBaseArtifact(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/CppUtilities/UmlBaseAttribute.cpp b/genplugouts/CppUtilities/UmlBaseAttribute.cpp index 5a9b4b549..ae721c8dd 100644 --- a/genplugouts/CppUtilities/UmlBaseAttribute.cpp +++ b/genplugouts/CppUtilities/UmlBaseAttribute.cpp @@ -6,7 +6,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlAttribute * UmlBaseAttribute::create(UmlClass * parent, const char * s) { return (UmlAttribute *) parent->create_(anAttribute, s); @@ -98,7 +98,7 @@ bool UmlBaseAttribute::set_isUnique(bool v) return FALSE; } -const Q3CString & UmlBaseAttribute::defaultValue() +const QByteArray & UmlBaseAttribute::defaultValue() { read_if_needed_(); @@ -122,7 +122,7 @@ bool UmlBaseAttribute::set_Type(const UmlTypeSpec & t) return set_it_(_type, t, setTypeCmd); } -const Q3CString & UmlBaseAttribute::multiplicity() +const QByteArray & UmlBaseAttribute::multiplicity() { read_if_needed_(); @@ -215,7 +215,7 @@ bool UmlBaseAttribute::set_isJavaTransient(bool y) #endif #ifdef WITHIDL -Q3CString UmlBaseAttribute::idlCase() +QByteArray UmlBaseAttribute::idlCase() { read_if_needed_(); diff --git a/genplugouts/CppUtilities/UmlBaseAttribute.h b/genplugouts/CppUtilities/UmlBaseAttribute.h index 766a99f05..d3094bdf4 100644 --- a/genplugouts/CppUtilities/UmlBaseAttribute.h +++ b/genplugouts/CppUtilities/UmlBaseAttribute.h @@ -4,7 +4,7 @@ #include "UmlClassMember.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" class UmlAttribute; @@ -62,7 +62,7 @@ class UmlBaseAttribute : public UmlClassMember bool set_isUnique(bool v); // returns the default attribute value, may be an empty string - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // to set the default attribute value ("" allowed) // @@ -78,7 +78,7 @@ class UmlBaseAttribute : public UmlClassMember bool set_Type(const UmlTypeSpec & t); // returns the multiplicity (may be an empty string) - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // to set the multiplicity // @@ -125,7 +125,7 @@ class UmlBaseAttribute : public UmlClassMember #ifdef WITHIDL // in case the attribute is an IDL union's member returns the // corresponding 'case', an empty string in case it is not specified - Q3CString idlCase(); + QByteArray idlCase(); // to set the 'case' even the attribute is not (already) known as // an IDL union's member @@ -163,9 +163,9 @@ class UmlBaseAttribute : public UmlClassMember bool _java_transient : 1; #endif - Q3CString _multiplicity; + QByteArray _multiplicity; - Q3CString _default_value; + QByteArray _default_value; UmlTypeSpec _type; @@ -177,13 +177,13 @@ class UmlBaseAttribute : public UmlClassMember // exclusive with idl_explicit_case UmlAttribute * _idl_case; - Q3CString _idl_explicit_case; + QByteArray _idl_explicit_case; #endif public: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAttribute(void * id, const Q3CString & n); + UmlBaseAttribute(void * id, const QByteArray & n); protected: @@ -223,7 +223,7 @@ class UmlBaseAttribute : public UmlClassMember }; -inline UmlBaseAttribute::UmlBaseAttribute(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseAttribute::UmlBaseAttribute(void * id, const QByteArray & n) : UmlClassMember(id, n) { _get_oper = 0; _set_oper = 0; diff --git a/genplugouts/CppUtilities/UmlBaseChoicePseudoState.h b/genplugouts/CppUtilities/UmlBaseChoicePseudoState.h index fb682dd91..8d15fc093 100644 --- a/genplugouts/CppUtilities/UmlBaseChoicePseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseChoicePseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlChoicePseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseChoicePseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseChoicePseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseChoicePseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseClass.cpp b/genplugouts/CppUtilities/UmlBaseClass.cpp index 126b3bddc..2a22539e2 100644 --- a/genplugouts/CppUtilities/UmlBaseClass.cpp +++ b/genplugouts/CppUtilities/UmlBaseClass.cpp @@ -11,8 +11,8 @@ #include "Tools/ApiCmd.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include -#include +#include +#include UmlClass * UmlBaseClass::create(UmlItem * parent, const char * s) { return (UmlClass *) parent->create_(aClass, s); @@ -47,11 +47,11 @@ bool UmlBaseClass::set_BaseType(const UmlTypeSpec & t) return set_it_(_base_type, t, setBaseTypeCmd); } -Q3ValueList UmlBaseClass::formals() +QList UmlBaseClass::formals() { UmlCom::send_cmd(_identifier, formalsCmd); - Q3ValueList formals; + QList formals; for (unsigned n = UmlCom::read_unsigned(); n; n -= 1) { UmlFormalParameter f; @@ -83,11 +83,11 @@ bool UmlBaseClass::replaceFormal(unsigned int rank, const UmlFormalParameter & f return UmlCom::read_bool(); } -Q3ValueList UmlBaseClass::actuals() +QList UmlBaseClass::actuals() { UmlCom::send_cmd(_identifier, actualsCmd); - Q3ValueList actuals; + QList actuals; for (unsigned n = UmlCom::read_unsigned(); n; n -= 1) { UmlActualParameter a; @@ -132,17 +132,17 @@ UmlArtifact * UmlBaseClass::associatedArtifact() return (UmlArtifact *) UmlBaseItem::read_(); } -const Q3PtrVector UmlBaseClass::associatedComponents() +const QVector UmlBaseClass::associatedComponents() { UmlCom::send_cmd(_identifier, assocComponentCmd); - Q3PtrVector result; + QVector result; unsigned n = UmlCom::read_unsigned(); result.resize(n); for (unsigned index = 0; index != n; index += 1) - result.insert(index, (UmlComponent *) UmlBaseItem::read_()); + result[index] = (UmlComponent *) UmlBaseItem::read_(); return result; } @@ -370,7 +370,7 @@ bool UmlBaseClass::set_isIdlCustom(bool y) } #endif -UmlClass * UmlBaseClass::get(const Q3CString & n, const UmlPackage * p) +UmlClass * UmlBaseClass::get(const QByteArray & n, const UmlPackage * p) { if (p == 0) { UmlClass * x = _classes[n]; @@ -385,7 +385,7 @@ UmlClass * UmlBaseClass::get(const Q3CString & n, const UmlPackage * p) return (UmlClass *) UmlBaseItem::read_(); } -UmlClass * UmlBaseClass::findStereotype(Q3CString s, bool caseSensitive) +UmlClass * UmlBaseClass::findStereotype(QByteArray s, bool caseSensitive) { UmlCom::send_cmd(packageGlobalCmd, findStereotypeCmd, (caseSensitive) ? "y" : "n", (const char *) s); @@ -403,15 +403,15 @@ void UmlBaseClass::unload(bool rec, bool del) UmlBaseClassItem::unload(rec, del); } -bool UmlBaseClass::set_Name(const Q3CString & s) +bool UmlBaseClass::set_Name(const QByteArray & s) { if (!UmlBaseItem::set_Name(s)) return FALSE; - const Q3PtrVector ch = children(); - Q3CString destr = "~" + name(); + const QVector ch = children(); + QByteArray destr = "~" + name(); - for (unsigned i = 0; i != ch.size(); i += 1) { + for (int i = 0; i != ch.size(); i += 1) { if (ch[i]->kind() == anOperation) { if (ch[i]->name() == name()) ch[i]->set_Name(s); @@ -423,9 +423,9 @@ bool UmlBaseClass::set_Name(const Q3CString & s) return TRUE; } -Q3Dict UmlBaseClass::_classes(1001); +QHash UmlBaseClass::_classes; -UmlBaseClass::UmlBaseClass(void * id, const Q3CString & n) +UmlBaseClass::UmlBaseClass(void * id, const QByteArray & n) : UmlClassMember(id, n) { _assoc_diagram = 0; @@ -433,7 +433,7 @@ UmlBaseClass::UmlBaseClass(void * id, const Q3CString & n) _classes.insert(n, (UmlClass *) this); if ((_classes.count() / 2) >= _classes.size()) - _classes.resize(_classes.size() * 2 - 1); + _classes.reserve(_classes.size() * 2 - 1); } void UmlBaseClass::read_uml_() diff --git a/genplugouts/CppUtilities/UmlBaseClass.h b/genplugouts/CppUtilities/UmlBaseClass.h index b297e2cf6..ca6bcd04e 100644 --- a/genplugouts/CppUtilities/UmlBaseClass.h +++ b/genplugouts/CppUtilities/UmlBaseClass.h @@ -5,10 +5,10 @@ #include "UmlClassMember.h" #include "anItemKind.h" #include "UmlTypeSpec.h" -#include -#include -#include -#include +#include + + + #include "UmlFormalParameter.h" #include "UmlActualParameter.h" @@ -54,7 +54,7 @@ class UmlBaseClass : public UmlClassMember bool set_BaseType(const UmlTypeSpec & t); // returns (a copy of) the formals list - Q3ValueList formals(); + QList formals(); // remove the formal of the given rank (0...), returns 0 on error // @@ -77,7 +77,7 @@ class UmlBaseClass : public UmlClassMember bool replaceFormal(unsigned int rank, const UmlFormalParameter & formal); // returns (a copy of) the actuals list - Q3ValueList actuals(); + QList actuals(); // replace the actual value at the given rank (0...) // @@ -100,7 +100,7 @@ class UmlBaseClass : public UmlClassMember // returns the components realizing or providing the class. // To set them refer to the UmlBaseComponent's operation setAssociatedClasses() - const Q3PtrVector associatedComponents(); + const QVector associatedComponents(); #ifdef WITHCPP // returns TRUE if the class is external, its definition @@ -224,11 +224,11 @@ class UmlBaseClass : public UmlClassMember //exist, else 0/null. In case the package is specified (not 0/null), //the returned class will be defined in a sub-level of the package. - static UmlClass * get(const Q3CString & n, const UmlPackage * p); + static UmlClass * get(const QByteArray & n, const UmlPackage * p); // Return the class supporting the stereotype corresponding to // the first parameter being 'profile_name:stereotype_name', or 0/null - static UmlClass * findStereotype(Q3CString s, bool caseSensitive); + static UmlClass * findStereotype(QByteArray s, bool caseSensitive); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -241,11 +241,11 @@ class UmlBaseClass : public UmlClassMember // to set the name // // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Name(const Q3CString & s); + virtual bool set_Name(const QByteArray & s); private: - static Q3Dict _classes; + static QHash _classes; bool _abstract; @@ -292,7 +292,7 @@ class UmlBaseClass : public UmlClassMember protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClass(void * id, const Q3CString & n); + UmlBaseClass(void * id, const QByteArray & n); //internal, do NOT use it diff --git a/genplugouts/CppUtilities/UmlBaseClassDiagram.h b/genplugouts/CppUtilities/UmlBaseClassDiagram.h index e0990d31f..a3f406b00 100644 --- a/genplugouts/CppUtilities/UmlBaseClassDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseClassDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlClassDiagram; class UmlClassView; @@ -26,7 +26,7 @@ class UmlBaseClassDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseClassDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseClassInstance.cpp b/genplugouts/CppUtilities/UmlBaseClassInstance.cpp index bdfcd7472..2d0e1cb24 100644 --- a/genplugouts/CppUtilities/UmlBaseClassInstance.cpp +++ b/genplugouts/CppUtilities/UmlBaseClassInstance.cpp @@ -6,8 +6,8 @@ #include "UmlAttribute.h" #include "UmlRelation.h" #include "UmlObjectDiagram.h" -//Added by qt3to4: -#include +#include +#include anItemKind UmlBaseClassInstance::kind() { @@ -47,7 +47,7 @@ bool UmlBaseClassInstance::set_Type(UmlClass * v) return FALSE; } -void UmlBaseClassInstance::attributesValue(Q3ValueList & result) +void UmlBaseClassInstance::attributesValue(QList & result) { UmlCom::send_cmd(_identifier, attributesCmd, (char) 0); @@ -62,7 +62,7 @@ void UmlBaseClassInstance::attributesValue(Q3ValueList & result) } } -void UmlBaseClassInstance::relationsValue(Q3ValueList & result) +void UmlBaseClassInstance::relationsValue(QList & result) { UmlCom::send_cmd(_identifier, relationsCmd, (void *) 0); @@ -77,16 +77,16 @@ void UmlBaseClassInstance::relationsValue(Q3ValueList & result) } } -void UmlBaseClassInstance::availableAttributes(Q3PtrVector & result) +void UmlBaseClassInstance::availableAttributes(QVector &result) { UmlCom::send_cmd(_identifier, attributesCmd, (char) 1); - UmlCom::read_item_list((Q3PtrVector &) result); + UmlCom::read_item_list((QVector &) result); } -void UmlBaseClassInstance::availableRelations(UmlClassInstance * other, Q3PtrVector & result) +void UmlBaseClassInstance::availableRelations(UmlClassInstance * other, QVector &result) { UmlCom::send_cmd(_identifier, relationsCmd, other->_identifier); - UmlCom::read_item_list((Q3PtrVector &) result); + UmlCom::read_item_list((QVector &) result); } bool UmlBaseClassInstance::set_AttributeValue(UmlAttribute * attribute, const char * value) @@ -97,7 +97,7 @@ bool UmlBaseClassInstance::set_AttributeValue(UmlAttribute * attribute, const ch bool UmlBaseClassInstance::add_Relation(UmlRelation * relation, UmlClassInstance * other) { - Q3PtrVector v(2); + QVector v(2); v.insert(0, relation); v.insert(1, other); @@ -107,7 +107,7 @@ bool UmlBaseClassInstance::add_Relation(UmlRelation * relation, UmlClassInstance bool UmlBaseClassInstance::remove_Relation(UmlRelation * relation, UmlClassInstance * other) { - Q3PtrVector v(2); + QVector v(2); v.insert(0, relation); v.insert(1, other); diff --git a/genplugouts/CppUtilities/UmlBaseClassInstance.h b/genplugouts/CppUtilities/UmlBaseClassInstance.h index 3dde839de..769970305 100644 --- a/genplugouts/CppUtilities/UmlBaseClassInstance.h +++ b/genplugouts/CppUtilities/UmlBaseClassInstance.h @@ -6,9 +6,9 @@ #include "SlotRelation.h" #include "UmlItem.h" #include "anItemKind.h" -#include -#include -#include +#include + + class UmlClassInstance; class UmlClass; @@ -40,17 +40,17 @@ class UmlBaseClassInstance : public UmlItem bool set_Type(UmlClass * v); // Returns the attributes having a value - void attributesValue(Q3ValueList & result); + void attributesValue(QList & result); // Returns the attributes having a value - void relationsValue(Q3ValueList & result); + void relationsValue(QList & result); // Returns all the attributes of the class instance, // including the inherited - void availableAttributes(Q3PtrVector & result); + void availableAttributes(QVector & result); // Returns all the possible relations from the current instance to 'other', including the inherited - void availableRelations(UmlClassInstance * other, Q3PtrVector & result); + void availableRelations(UmlClassInstance * other, QVector & result); // Remove the slot if the value is an empty string. // Else set the value for the given attribute, replacing it @@ -87,7 +87,7 @@ class UmlBaseClassInstance : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassInstance(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseClassInstance(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseClassInstanceReference.cpp b/genplugouts/CppUtilities/UmlBaseClassInstanceReference.cpp index 1223c08e8..c3c0d64a0 100644 --- a/genplugouts/CppUtilities/UmlBaseClassInstanceReference.cpp +++ b/genplugouts/CppUtilities/UmlBaseClassInstanceReference.cpp @@ -4,14 +4,14 @@ #include "UmlClass.h" #include "UmlClassInstance.h" //Added by qt3to4: -#include +#include UmlClass * UmlBaseClassInstanceReference::type() const { return (_instance) ? _instance->type() : _class; } -const Q3CString & UmlBaseClassInstanceReference::name() const +const QByteArray & UmlBaseClassInstanceReference::name() const { return (_instance) ? _instance->name() : _name; } diff --git a/genplugouts/CppUtilities/UmlBaseClassInstanceReference.h b/genplugouts/CppUtilities/UmlBaseClassInstanceReference.h index f21836362..50bd4f9f4 100644 --- a/genplugouts/CppUtilities/UmlBaseClassInstanceReference.h +++ b/genplugouts/CppUtilities/UmlBaseClassInstanceReference.h @@ -1,9 +1,6 @@ #ifndef _UMLBASECLASSINSTANCEREFERENCE_H #define _UMLBASECLASSINSTANCEREFERENCE_H - - -#include - +#include class UmlClass; class UmlClassInstance; @@ -20,7 +17,7 @@ class UmlBaseClassInstanceReference } // return the name of the instance - const Q3CString & name() const; + const QByteArray & name() const; private: @@ -28,7 +25,7 @@ class UmlBaseClassInstanceReference UmlClassInstance * _instance; - Q3CString _name; + QByteArray _name; // internal, don't call it void read_(); diff --git a/genplugouts/CppUtilities/UmlBaseClassItem.cpp b/genplugouts/CppUtilities/UmlBaseClassItem.cpp index fa856e466..3a02e784e 100644 --- a/genplugouts/CppUtilities/UmlBaseClassItem.cpp +++ b/genplugouts/CppUtilities/UmlBaseClassItem.cpp @@ -3,9 +3,9 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include #ifdef WITHCPP -const Q3CString & UmlBaseClassItem::cppDecl() +const QByteArray & UmlBaseClassItem::cppDecl() { read_if_needed_(); @@ -19,7 +19,7 @@ bool UmlBaseClassItem::set_CppDecl(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseClassItem::javaDecl() +const QByteArray & UmlBaseClassItem::javaDecl() { read_if_needed_(); @@ -33,7 +33,7 @@ bool UmlBaseClassItem::set_JavaDecl(const char * s) #endif #ifdef WITHPHP -const Q3CString & UmlBaseClassItem::phpDecl() +const QByteArray & UmlBaseClassItem::phpDecl() { read_if_needed_(); @@ -47,7 +47,7 @@ bool UmlBaseClassItem::set_PhpDecl(const char * s) #endif #ifdef WITHPYTHON -const Q3CString & UmlBaseClassItem::pythonDecl() +const QByteArray & UmlBaseClassItem::pythonDecl() { read_if_needed_(); @@ -61,7 +61,7 @@ bool UmlBaseClassItem::set_PythonDecl(const char * s) #endif #ifdef WITHIDL -const Q3CString & UmlBaseClassItem::idlDecl() +const QByteArray & UmlBaseClassItem::idlDecl() { read_if_needed_(); diff --git a/genplugouts/CppUtilities/UmlBaseClassItem.h b/genplugouts/CppUtilities/UmlBaseClassItem.h index 19037f5fe..c3749c6e1 100644 --- a/genplugouts/CppUtilities/UmlBaseClassItem.h +++ b/genplugouts/CppUtilities/UmlBaseClassItem.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + // Mother class of the all the class's items including the class themself class UmlBaseClassItem : public UmlItem @@ -12,7 +12,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHCPP // return the C++ declaration - const Q3CString & cppDecl(); + const QByteArray & cppDecl(); // to set the C++ declaration // @@ -23,7 +23,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHJAVA // return the Java defininition - const Q3CString & javaDecl(); + const QByteArray & javaDecl(); // to set the Java definition // @@ -34,7 +34,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHPHP // return the Php defininition - const Q3CString & phpDecl(); + const QByteArray & phpDecl(); // to set the Php definition // @@ -45,7 +45,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHPYTHON // return the Python defininition - const Q3CString & pythonDecl(); + const QByteArray & pythonDecl(); // to set the Python definition // @@ -56,7 +56,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHIDL // return the IDL declaration - const Q3CString & idlDecl(); + const QByteArray & idlDecl(); // set the IDL declaration // @@ -69,28 +69,28 @@ class UmlBaseClassItem : public UmlItem private: #ifdef WITHCPP - Q3CString _cpp_decl; + QByteArray _cpp_decl; #endif #ifdef WITHJAVA - Q3CString _java_decl; + QByteArray _java_decl; #endif #ifdef WITHPHP - Q3CString _php_decl; + QByteArray _php_decl; #endif #ifdef WITHPYTHON - Q3CString _python_decl; + QByteArray _python_decl; #endif #ifdef WITHIDL - Q3CString _idl_decl; + QByteArray _idl_decl; #endif protected: - UmlBaseClassItem(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseClassItem(void * id, const QByteArray & n) : UmlItem(id, n) {}; #ifdef WITHCPP //internal, do NOT use it diff --git a/genplugouts/CppUtilities/UmlBaseClassMember.cpp b/genplugouts/CppUtilities/UmlBaseClassMember.cpp index da9a56bb5..47325ddfb 100644 --- a/genplugouts/CppUtilities/UmlBaseClassMember.cpp +++ b/genplugouts/CppUtilities/UmlBaseClassMember.cpp @@ -3,7 +3,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include bool UmlBaseClassMember::isClassMember() { read_if_needed_(); @@ -70,7 +70,7 @@ bool UmlBaseClassMember::set_CppVisibility(aVisibility v) #endif #ifdef WITHJAVA -Q3CString UmlBaseClassMember::javaAnnotations() +QByteArray UmlBaseClassMember::javaAnnotations() { read_if_needed_(); @@ -83,7 +83,7 @@ bool UmlBaseClassMember::set_JavaAnnotations(const char * v) } #endif -const Q3CString & UmlBaseClassMember::constraint() +const QByteArray & UmlBaseClassMember::constraint() { read_if_needed_(); return _constraint; diff --git a/genplugouts/CppUtilities/UmlBaseClassMember.h b/genplugouts/CppUtilities/UmlBaseClassMember.h index 60778142e..920bec8ef 100644 --- a/genplugouts/CppUtilities/UmlBaseClassMember.h +++ b/genplugouts/CppUtilities/UmlBaseClassMember.h @@ -4,7 +4,7 @@ #include "UmlClassItem.h" #include "aVisibility.h" -#include + #include "UmlBaseClassItem.h" // This class manages 'true' class's items : attributes, relation, @@ -57,7 +57,7 @@ class UmlBaseClassMember : public UmlClassItem #ifdef WITHJAVA // returns the Java annotations - Q3CString javaAnnotations(); + QByteArray javaAnnotations(); // set the Java annotations // @@ -66,7 +66,7 @@ class UmlBaseClassMember : public UmlClassItem #endif // return the constraint - const Q3CString & constraint(); + const QByteArray & constraint(); // set the constraint // @@ -87,7 +87,7 @@ class UmlBaseClassMember : public UmlClassItem protected: - UmlBaseClassMember(void * id, const Q3CString & n) : UmlClassItem(id, n) {}; + UmlBaseClassMember(void * id, const QByteArray & n) : UmlClassItem(id, n) {}; //internal, do NOT use it @@ -106,10 +106,10 @@ class UmlBaseClassMember : public UmlClassItem private: #ifdef WITHJAVA - Q3CString _java_annotation; + QByteArray _java_annotation; #endif - Q3CString _constraint; + QByteArray _constraint; friend class UmlBaseClass; friend class UmlBaseRelation; diff --git a/genplugouts/CppUtilities/UmlBaseClassView.h b/genplugouts/CppUtilities/UmlBaseClassView.h index 43fb0714a..2de2d70e7 100644 --- a/genplugouts/CppUtilities/UmlBaseClassView.h +++ b/genplugouts/CppUtilities/UmlBaseClassView.h @@ -4,7 +4,7 @@ #include "UmlView.h" #include "anItemKind.h" -#include + class UmlClassView; class UmlPackage; @@ -44,7 +44,7 @@ class UmlBaseClassView : public UmlView virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassView(void * id, const Q3CString & n) : UmlView(id, n) {}; + UmlBaseClassView(void * id, const QByteArray & n) : UmlView(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseCollaborationDiagram.h b/genplugouts/CppUtilities/UmlBaseCollaborationDiagram.h index 001de487c..f5f96e840 100644 --- a/genplugouts/CppUtilities/UmlBaseCollaborationDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseCollaborationDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlCollaborationDiagram; class UmlItem; @@ -27,7 +27,7 @@ class UmlBaseCollaborationDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCollaborationDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n), _def(0) {}; + UmlBaseCollaborationDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n), _def(0) {}; public: diff --git a/genplugouts/CppUtilities/UmlBaseCollaborationDiagramDefinition.cpp b/genplugouts/CppUtilities/UmlBaseCollaborationDiagramDefinition.cpp index 63b89f7b5..aa78ceb97 100644 --- a/genplugouts/CppUtilities/UmlBaseCollaborationDiagramDefinition.cpp +++ b/genplugouts/CppUtilities/UmlBaseCollaborationDiagramDefinition.cpp @@ -4,7 +4,7 @@ void UmlBaseCollaborationDiagramDefinition::read_() { - Q3PtrDict instances; + QHash instances; unsigned n; unsigned rank; @@ -15,11 +15,11 @@ void UmlBaseCollaborationDiagramDefinition::read_() UmlClassInstanceReference * i = new UmlClassInstanceReference(); _instances.insert(rank, i); - instances.insert((void *) UmlCom::read_unsigned(), i); + instances.insert(reinterpret_cast(uintptr_t(UmlCom::read_unsigned())), i); i->read_(); } - _instances.setAutoDelete(TRUE); + //_instances.setAutoDelete(TRUE); n = UmlCom::read_unsigned(); _messages.resize(n); @@ -31,7 +31,7 @@ void UmlBaseCollaborationDiagramDefinition::read_() m->read_(instances); } - _messages.setAutoDelete(TRUE); + // _messages.setAutoDelete(TRUE); } UmlBaseCollaborationDiagramDefinition::~UmlBaseCollaborationDiagramDefinition() diff --git a/genplugouts/CppUtilities/UmlBaseCollaborationDiagramDefinition.h b/genplugouts/CppUtilities/UmlBaseCollaborationDiagramDefinition.h index 7053607ce..60749725f 100644 --- a/genplugouts/CppUtilities/UmlBaseCollaborationDiagramDefinition.h +++ b/genplugouts/CppUtilities/UmlBaseCollaborationDiagramDefinition.h @@ -5,8 +5,8 @@ // to avoid compiler warning #include "UmlCollaborationMessage.h" #include "UmlClassInstanceReference.h" +#include -#include class UmlClassInstanceReference; class UmlCollaborationMessage; @@ -16,21 +16,21 @@ class UmlBaseCollaborationDiagramDefinition { public: // return the instances present in the diagram - const Q3PtrVector & instances() const { + const QVector & instances() const { return _instances; } // return the messages present in the diagram, // ordonned following their rank - const Q3PtrVector & messages() const { + const QVector & messages() const { return _messages; } private: - Q3PtrVector _instances; + QVector _instances; - Q3PtrVector _messages; + QVector _messages; // internal, don't call it void read_(); diff --git a/genplugouts/CppUtilities/UmlBaseCollaborationMessage.cpp b/genplugouts/CppUtilities/UmlBaseCollaborationMessage.cpp index 8ea8e0890..ee0388197 100644 --- a/genplugouts/CppUtilities/UmlBaseCollaborationMessage.cpp +++ b/genplugouts/CppUtilities/UmlBaseCollaborationMessage.cpp @@ -3,7 +3,7 @@ #include "UmlBaseCollaborationMessage.h" #include "UmlClassInstanceReference.h" -void UmlBaseCollaborationMessage::read_(const Q3PtrDict & instances) +void UmlBaseCollaborationMessage::read_(const QHash &instances) { UmlBaseMessage::read_(instances); _rank = (int) UmlCom::read_unsigned(); diff --git a/genplugouts/CppUtilities/UmlBaseCollaborationMessage.h b/genplugouts/CppUtilities/UmlBaseCollaborationMessage.h index 276b0801e..5454e8c7d 100644 --- a/genplugouts/CppUtilities/UmlBaseCollaborationMessage.h +++ b/genplugouts/CppUtilities/UmlBaseCollaborationMessage.h @@ -2,8 +2,8 @@ #define _UMLBASECOLLABORATIONMESSAGE_H -#include -#include + + #include "UmlMessage.h" class UmlClassInstanceReference; @@ -18,7 +18,7 @@ class UmlBaseCollaborationMessage : public UmlMessage } // return the hierarchical rank of the message - const Q3CString & hrank() const { + const QByteArray & hrank() const { return _hrank; } @@ -26,10 +26,10 @@ class UmlBaseCollaborationMessage : public UmlMessage private: int _rank; - Q3CString _hrank; + QByteArray _hrank; // internal, don't call it - void read_(const Q3PtrDict & instances); + void read_(const QHash &instances); friend class UmlBaseCollaborationDiagramDefinition; }; diff --git a/genplugouts/CppUtilities/UmlBaseComponent.cpp b/genplugouts/CppUtilities/UmlBaseComponent.cpp index 427c8d71f..abc5de755 100644 --- a/genplugouts/CppUtilities/UmlBaseComponent.cpp +++ b/genplugouts/CppUtilities/UmlBaseComponent.cpp @@ -35,28 +35,28 @@ bool UmlBaseComponent::set_AssociatedDiagram(UmlComponentDiagram * d) return FALSE; } -const Q3PtrVector & UmlBaseComponent::realizingClasses() +const QVector & UmlBaseComponent::realizingClasses() { read_if_needed_(); return _realizing; } -const Q3PtrVector & UmlBaseComponent::providedClasses() +const QVector & UmlBaseComponent::providedClasses() { read_if_needed_(); return _provided; } -const Q3PtrVector & UmlBaseComponent::requiredClasses() +const QVector & UmlBaseComponent::requiredClasses() { read_if_needed_(); return _required; } -bool UmlBaseComponent::set_AssociatedClasses(const Q3PtrVector & realizing, const Q3PtrVector & provided, const Q3PtrVector & required) +bool UmlBaseComponent::set_AssociatedClasses(const QVector & realizing, const QVector & provided, const QVector & required) { UmlCom::send_cmd(_identifier, setAssocClassesCmd, realizing, provided, required); @@ -98,18 +98,18 @@ void UmlBaseComponent::read_uml_() _realizing.resize(n); for (index = 0; index != n; index += 1) - _realizing.insert(index, (UmlClass *) UmlBaseItem::read_()); + _realizing[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _provided.resize(n); for (index = 0; index != n; index += 1) - _provided.insert(index, (UmlClass *) UmlBaseItem::read_()); + _provided[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _required.resize(n); for (index = 0; index != n; index += 1) - _required.insert(index, (UmlClass *) UmlBaseItem::read_()); + _required[index] = (UmlClass *) UmlBaseItem::read_(); } diff --git a/genplugouts/CppUtilities/UmlBaseComponent.h b/genplugouts/CppUtilities/UmlBaseComponent.h index 209914a57..160f2c481 100644 --- a/genplugouts/CppUtilities/UmlBaseComponent.h +++ b/genplugouts/CppUtilities/UmlBaseComponent.h @@ -1,12 +1,9 @@ #ifndef _UMLBASECOMPONENT_H #define _UMLBASECOMPONENT_H - +#include #include "UmlItem.h" #include "anItemKind.h" -#include -#include - #include "UmlClass.h" // to avoid destructor problem class UmlComponent; class UmlComponentView; @@ -36,18 +33,18 @@ class UmlBaseComponent : public UmlItem bool set_AssociatedDiagram(UmlComponentDiagram * d); // returns (in Java a copy of) the optional realizing classes - const Q3PtrVector & realizingClasses(); + const QVector & realizingClasses(); // returns (in Java a copy of) the optional provided classes - const Q3PtrVector & providedClasses(); + const QVector & providedClasses(); // returns (in Java a copy of) the optional required classes - const Q3PtrVector & requiredClasses(); + const QVector & requiredClasses(); // set the realizing, provided and required classes lists // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_AssociatedClasses(const Q3PtrVector & realizing, const Q3PtrVector & provided, const Q3PtrVector & required); + bool set_AssociatedClasses(const QVector & realizing, const QVector & provided, const QVector & required); // to unload the object to free memory, it will be reloaded // automatically if needed. args unused @@ -57,11 +54,11 @@ class UmlBaseComponent : public UmlItem private: UmlComponentDiagram * _assoc_diagram; - Q3PtrVector _realizing; + QVector _realizing; - Q3PtrVector _provided; + QVector _provided; - Q3PtrVector _required; + QVector _required; protected: @@ -70,11 +67,11 @@ class UmlBaseComponent : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponent(void * id, const Q3CString & n); + UmlBaseComponent(void * id, const QByteArray & n); }; -inline UmlBaseComponent::UmlBaseComponent(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseComponent::UmlBaseComponent(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/CppUtilities/UmlBaseComponentDiagram.h b/genplugouts/CppUtilities/UmlBaseComponentDiagram.h index 43466da7c..b235e0717 100644 --- a/genplugouts/CppUtilities/UmlBaseComponentDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseComponentDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlComponentDiagram; class UmlComponentView; @@ -26,7 +26,7 @@ class UmlBaseComponentDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponentDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseComponentDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseComponentView.h b/genplugouts/CppUtilities/UmlBaseComponentView.h index 0b9d2d0bd..e70c3b9d5 100644 --- a/genplugouts/CppUtilities/UmlBaseComponentView.h +++ b/genplugouts/CppUtilities/UmlBaseComponentView.h @@ -4,7 +4,7 @@ #include "UmlView.h" #include "anItemKind.h" -#include + class UmlComponentView; class UmlPackage; @@ -26,7 +26,7 @@ class UmlBaseComponentView : public UmlView protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponentView(void * id, const Q3CString & n) : UmlView(id, n) {}; + UmlBaseComponentView(void * id, const QByteArray & n) : UmlView(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseDeepHistoryPseudoState.h b/genplugouts/CppUtilities/UmlBaseDeepHistoryPseudoState.h index 0ac36e22d..9224eb152 100644 --- a/genplugouts/CppUtilities/UmlBaseDeepHistoryPseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseDeepHistoryPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlDeepHistoryPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseDeepHistoryPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeepHistoryPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseDeepHistoryPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseDeployment.h b/genplugouts/CppUtilities/UmlBaseDeployment.h index b268e0c17..b16902170 100644 --- a/genplugouts/CppUtilities/UmlBaseDeployment.h +++ b/genplugouts/CppUtilities/UmlBaseDeployment.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + // Manage the deployments class UmlBaseDeployment : public UmlItem { protected: - UmlBaseDeployment(void * id, Q3CString n) : UmlItem(id, n) {}; + UmlBaseDeployment(void * id, QByteArray n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseDeploymentDiagram.h b/genplugouts/CppUtilities/UmlBaseDeploymentDiagram.h index 8f2aacbd5..db1cfc67d 100644 --- a/genplugouts/CppUtilities/UmlBaseDeploymentDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseDeploymentDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlDeploymentDiagram; class UmlDeploymentView; @@ -26,7 +26,7 @@ class UmlBaseDeploymentDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeploymentDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseDeploymentDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseDeploymentView.h b/genplugouts/CppUtilities/UmlBaseDeploymentView.h index f5213d38a..12b21aefe 100644 --- a/genplugouts/CppUtilities/UmlBaseDeploymentView.h +++ b/genplugouts/CppUtilities/UmlBaseDeploymentView.h @@ -4,7 +4,7 @@ #include "UmlView.h" #include "anItemKind.h" -#include + class UmlDeploymentView; class UmlPackage; @@ -26,7 +26,7 @@ class UmlBaseDeploymentView : public UmlView protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeploymentView(void * id, const Q3CString & n) : UmlView(id, n) {}; + UmlBaseDeploymentView(void * id, const QByteArray & n) : UmlView(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseDiagram.cpp b/genplugouts/CppUtilities/UmlBaseDiagram.cpp index e1ceb269d..d0fb2d705 100644 --- a/genplugouts/CppUtilities/UmlBaseDiagram.cpp +++ b/genplugouts/CppUtilities/UmlBaseDiagram.cpp @@ -3,8 +3,8 @@ #include "UmlCom.h" //Added by qt3to4: -#include -bool UmlBaseDiagram::saveIn(const Q3CString & s) const +#include +bool UmlBaseDiagram::saveIn(const QByteArray & s) const { UmlCom::send_cmd(_identifier, saveInCmd, (const char *)s); //[rageek] Fix prototype return UmlCom::read_bool(); diff --git a/genplugouts/CppUtilities/UmlBaseDiagram.h b/genplugouts/CppUtilities/UmlBaseDiagram.h index 9cf05ff22..19e34654b 100644 --- a/genplugouts/CppUtilities/UmlBaseDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseDiagram.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + // Mother class of all the classes managing the diagrams class UmlBaseDiagram : public UmlItem @@ -18,12 +18,12 @@ class UmlBaseDiagram : public UmlItem // - else the default diagram aspect, which is probably not as you want // // On error return FALSE in C++, produce a RuntimeException in Java - bool saveIn(const Q3CString & s) const; + bool saveIn(const QByteArray & s) const; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDiagram(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseDiagram(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseEntryPointPseudoState.h b/genplugouts/CppUtilities/UmlBaseEntryPointPseudoState.h index dbfd3ef1a..60dd28bb0 100644 --- a/genplugouts/CppUtilities/UmlBaseEntryPointPseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseEntryPointPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlEntryPointPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseEntryPointPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseEntryPointPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseEntryPointPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseExitPointPseudoState.h b/genplugouts/CppUtilities/UmlBaseExitPointPseudoState.h index ff2ad12bc..29563f22b 100644 --- a/genplugouts/CppUtilities/UmlBaseExitPointPseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseExitPointPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlExitPointPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseExitPointPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExitPointPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseExitPointPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseExpansionNode.h b/genplugouts/CppUtilities/UmlBaseExpansionNode.h index 41bcbece2..6642afe1b 100644 --- a/genplugouts/CppUtilities/UmlBaseExpansionNode.h +++ b/genplugouts/CppUtilities/UmlBaseExpansionNode.h @@ -4,7 +4,7 @@ #include "UmlActivityObject.h" #include "anItemKind.h" -#include + class UmlExpansionNode; class UmlExpansionRegion; @@ -25,7 +25,7 @@ class UmlBaseExpansionNode : public UmlActivityObject protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExpansionNode(void * id, const Q3CString & s) : UmlActivityObject(id, s) { + UmlBaseExpansionNode(void * id, const QByteArray & s) : UmlActivityObject(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseExpansionRegion.h b/genplugouts/CppUtilities/UmlBaseExpansionRegion.h index 54795871e..4240a0570 100644 --- a/genplugouts/CppUtilities/UmlBaseExpansionRegion.h +++ b/genplugouts/CppUtilities/UmlBaseExpansionRegion.h @@ -4,7 +4,7 @@ #include "UmlActivityRegion.h" #include "anItemKind.h" -#include + #include "anExpansionKind.h" class UmlExpansionRegion; @@ -26,7 +26,7 @@ class UmlBaseExpansionRegion : public UmlActivityRegion protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExpansionRegion(void * id, const Q3CString & s) : UmlActivityRegion(id, s) { + UmlBaseExpansionRegion(void * id, const QByteArray & s) : UmlActivityRegion(id, s) { } diff --git a/genplugouts/CppUtilities/UmlBaseExtraClassMember.cpp b/genplugouts/CppUtilities/UmlBaseExtraClassMember.cpp index 2bb66cd9e..2dd2228c3 100644 --- a/genplugouts/CppUtilities/UmlBaseExtraClassMember.cpp +++ b/genplugouts/CppUtilities/UmlBaseExtraClassMember.cpp @@ -5,7 +5,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlExtraClassMember * UmlBaseExtraClassMember::create(UmlClass * parent, const char * name) { return (UmlExtraClassMember *) parent->create_(anExtraClassMember, name); @@ -29,7 +29,7 @@ bool UmlBaseExtraClassMember::set_isCppInline(bool y) return set_it_(_cpp_inline, y, setIsCppInlineCmd); } -const Q3CString & UmlBaseExtraClassMember::cppDef() +const QByteArray & UmlBaseExtraClassMember::cppDef() { read_if_needed_(); diff --git a/genplugouts/CppUtilities/UmlBaseExtraClassMember.h b/genplugouts/CppUtilities/UmlBaseExtraClassMember.h index e2b9d4f30..4f07b5583 100644 --- a/genplugouts/CppUtilities/UmlBaseExtraClassMember.h +++ b/genplugouts/CppUtilities/UmlBaseExtraClassMember.h @@ -4,7 +4,7 @@ #include "UmlClassItem.h" #include "anItemKind.h" -#include + class UmlExtraClassMember; class UmlClass; @@ -37,7 +37,7 @@ class UmlBaseExtraClassMember : public UmlClassItem // returns the operation's definition in C++, notes that the declaration // is returned by the inherited ClassItemBase::CppDecl() operation - const Q3CString & cppDef(); + const QByteArray & cppDef(); // sets the operation's definition in C++, notes that the declaration // is set through the inherited ClassItemBase::set_CppDecl() operation @@ -56,12 +56,12 @@ class UmlBaseExtraClassMember : public UmlClassItem bool _cpp_inline; - Q3CString _cpp_def; + QByteArray _cpp_def; #endif protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExtraClassMember(void * id, const Q3CString & n) : UmlClassItem(id, n) {}; + UmlBaseExtraClassMember(void * id, const QByteArray & n) : UmlClassItem(id, n) {}; #ifdef WITHCPP //internal, do NOT use it diff --git a/genplugouts/CppUtilities/UmlBaseFinalState.h b/genplugouts/CppUtilities/UmlBaseFinalState.h index 16e0816cf..2fa133da6 100644 --- a/genplugouts/CppUtilities/UmlBaseFinalState.h +++ b/genplugouts/CppUtilities/UmlBaseFinalState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlFinalState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseFinalState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFinalState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseFinalState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseFlow.cpp b/genplugouts/CppUtilities/UmlBaseFlow.cpp index 5da07fbe8..b05e3eb62 100644 --- a/genplugouts/CppUtilities/UmlBaseFlow.cpp +++ b/genplugouts/CppUtilities/UmlBaseFlow.cpp @@ -4,7 +4,7 @@ #include "UmlFlow.h" #include "UmlActivityNode.h" //Added by qt3to4: -#include +#include anItemKind UmlBaseFlow::kind() { @@ -29,7 +29,7 @@ UmlActivityNode * UmlBaseFlow::target() return _target; } -const Q3CString & UmlBaseFlow::weight() +const QByteArray & UmlBaseFlow::weight() { read_if_needed_(); return _uml.weight; @@ -40,7 +40,7 @@ bool UmlBaseFlow::set_Weight(const char * v) return set_it_(_uml.weight, v, setUmlActivityCmd); } -const Q3CString & UmlBaseFlow::guard() +const QByteArray & UmlBaseFlow::guard() { read_if_needed_(); return _uml.guard; @@ -51,7 +51,7 @@ bool UmlBaseFlow::set_Guard(const char * v) return set_it_(_uml.guard, v, setUmlGuardCmd); } -const Q3CString & UmlBaseFlow::selection() +const QByteArray & UmlBaseFlow::selection() { read_if_needed_(); return _uml.selection; @@ -62,7 +62,7 @@ bool UmlBaseFlow::set_Selection(const char * v) return set_it_(_uml.selection, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::transformation() +const QByteArray & UmlBaseFlow::transformation() { read_if_needed_(); return _uml.transformation; @@ -74,7 +74,7 @@ bool UmlBaseFlow::set_Transformation(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseFlow::cppWeight() +const QByteArray & UmlBaseFlow::cppWeight() { read_if_needed_(); return _cpp.weight; @@ -85,7 +85,7 @@ bool UmlBaseFlow::set_CppWeight(const char * v) return set_it_(_cpp.weight, v, setCppActivityCmd); } -const Q3CString & UmlBaseFlow::cppGuard() +const QByteArray & UmlBaseFlow::cppGuard() { read_if_needed_(); return _cpp.guard; @@ -96,7 +96,7 @@ bool UmlBaseFlow::set_CppGuard(const char * v) return set_it_(_cpp.guard, v, setCppGuardCmd); } -const Q3CString & UmlBaseFlow::cppSelection() +const QByteArray & UmlBaseFlow::cppSelection() { read_if_needed_(); return _cpp.selection; @@ -107,7 +107,7 @@ bool UmlBaseFlow::set_CppSelection(const char * v) return set_it_(_cpp.selection, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::cppTransformation() +const QByteArray & UmlBaseFlow::cppTransformation() { read_if_needed_(); return _cpp.transformation; @@ -120,7 +120,7 @@ bool UmlBaseFlow::set_CppTransformation(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseFlow::javaWeight() +const QByteArray & UmlBaseFlow::javaWeight() { read_if_needed_(); return _java.weight; @@ -131,7 +131,7 @@ bool UmlBaseFlow::set_JavaWeight(const char * v) return set_it_(_java.weight, v, setJavaActivityCmd); } -const Q3CString & UmlBaseFlow::javaGuard() +const QByteArray & UmlBaseFlow::javaGuard() { read_if_needed_(); return _java.guard; @@ -142,7 +142,7 @@ bool UmlBaseFlow::set_JavaGuard(const char * v) return set_it_(_java.guard, v, setJavaGuardCmd); } -const Q3CString & UmlBaseFlow::javaSelection() +const QByteArray & UmlBaseFlow::javaSelection() { read_if_needed_(); return _java.selection; @@ -153,7 +153,7 @@ bool UmlBaseFlow::set_JavaSelection(const char * v) return set_it_(_java.selection, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::javaTransformation() +const QByteArray & UmlBaseFlow::javaTransformation() { read_if_needed_(); return _java.transformation; diff --git a/genplugouts/CppUtilities/UmlBaseFlow.h b/genplugouts/CppUtilities/UmlBaseFlow.h index b50ce3323..4edb40caf 100644 --- a/genplugouts/CppUtilities/UmlBaseFlow.h +++ b/genplugouts/CppUtilities/UmlBaseFlow.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "FlowBehavior.h" class UmlFlow; @@ -27,7 +27,7 @@ class UmlBaseFlow : public UmlItem virtual UmlActivityNode * target(); // return the weight in OCL - const Q3CString & weight(); + const QByteArray & weight(); // set the weight in OCL // @@ -35,7 +35,7 @@ class UmlBaseFlow : public UmlItem bool set_Weight(const char * v); // return the guard in OCL - const Q3CString & guard(); + const QByteArray & guard(); // set the guard in OCL // @@ -43,7 +43,7 @@ class UmlBaseFlow : public UmlItem bool set_Guard(const char * v); // return the selection in OCL - const Q3CString & selection(); + const QByteArray & selection(); // set the selection in OCL // @@ -51,7 +51,7 @@ class UmlBaseFlow : public UmlItem bool set_Selection(const char * v); // return the transformation in OCL - const Q3CString & transformation(); + const QByteArray & transformation(); // set the transformation in OCL // @@ -60,7 +60,7 @@ class UmlBaseFlow : public UmlItem #ifdef WITHCPP // return the weight in C++ - const Q3CString & cppWeight(); + const QByteArray & cppWeight(); // set the weight in C++ // @@ -68,7 +68,7 @@ class UmlBaseFlow : public UmlItem bool set_CppWeight(const char * v); // return the guard in C++ - const Q3CString & cppGuard(); + const QByteArray & cppGuard(); // set the guard in C++ // @@ -76,7 +76,7 @@ class UmlBaseFlow : public UmlItem bool set_CppGuard(const char * v); // return the selection in C++ - const Q3CString & cppSelection(); + const QByteArray & cppSelection(); // set the selection in C++ // @@ -84,7 +84,7 @@ class UmlBaseFlow : public UmlItem bool set_CppSelection(const char * v); // return the transformation in C++ - const Q3CString & cppTransformation(); + const QByteArray & cppTransformation(); // set the transformation in C++ // @@ -94,7 +94,7 @@ class UmlBaseFlow : public UmlItem #ifdef WITHJAVA // return the weight in Java - const Q3CString & javaWeight(); + const QByteArray & javaWeight(); // set the weight in Java // @@ -102,7 +102,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaWeight(const char * v); // return the guard in Java - const Q3CString & javaGuard(); + const QByteArray & javaGuard(); // set the guard in Java // @@ -110,7 +110,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaGuard(const char * v); // return the selection in Java - const Q3CString & javaSelection(); + const QByteArray & javaSelection(); // set the selection in Java // @@ -118,7 +118,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaSelection(const char * v); // return the transformation in Java - const Q3CString & javaTransformation(); + const QByteArray & javaTransformation(); // set the transformation in Java // @@ -161,7 +161,7 @@ class UmlBaseFlow : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFlow(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseFlow(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseForkPseudoState.h b/genplugouts/CppUtilities/UmlBaseForkPseudoState.h index 009499bfa..9dfa5025c 100644 --- a/genplugouts/CppUtilities/UmlBaseForkPseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseForkPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlForkPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseForkPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseForkPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseForkPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseFormalParameter.h b/genplugouts/CppUtilities/UmlBaseFormalParameter.h index d8284c71d..aafb2fb40 100644 --- a/genplugouts/CppUtilities/UmlBaseFormalParameter.h +++ b/genplugouts/CppUtilities/UmlBaseFormalParameter.h @@ -2,7 +2,7 @@ #define _UMLBASEFORMALPARAMETER_H -#include + #include "UmlTypeSpec.h" // This class manages 'formal parameters' of a template class. For instance 'T' in @@ -14,12 +14,12 @@ class UmlBaseFormalParameter UmlBaseFormalParameter() {}; // returns the name of the formal - const Q3CString & name() const { + const QByteArray & name() const { return _name; }; // returns the type of a formal, probably "class" - const Q3CString & type() const { + const QByteArray & type() const { return _type; }; @@ -34,10 +34,10 @@ class UmlBaseFormalParameter }; protected: - Q3CString _name; + QByteArray _name; // "class" ... - Q3CString _type; + QByteArray _type; UmlTypeSpec _default_value; diff --git a/genplugouts/CppUtilities/UmlBaseFragment.cpp b/genplugouts/CppUtilities/UmlBaseFragment.cpp index 730755358..76a200303 100644 --- a/genplugouts/CppUtilities/UmlBaseFragment.cpp +++ b/genplugouts/CppUtilities/UmlBaseFragment.cpp @@ -25,7 +25,7 @@ void UmlBaseFragment::read_() fc->read_(this, rank); } - _compartments.setAutoDelete(TRUE); + //_compartments.setAutoDelete(TRUE); _container = 0; _refer = (UmlDiagram *) UmlBaseItem::read_(); _arguments = UmlCom::read_string(); @@ -38,7 +38,7 @@ int UmlBaseFragment::vcenter_(int rank) const return (t + _compartments[rank]->b()) / 2; } -void UmlBaseFragment::read_covered_(Q3PtrDict & instances) +void UmlBaseFragment::read_covered_(QHash &instances) { unsigned n = UmlCom::read_unsigned(); unsigned rank; @@ -46,10 +46,10 @@ void UmlBaseFragment::read_covered_(Q3PtrDict & insta _covered.resize(n); for (rank = 0; rank != n; rank += 1) - _covered.insert(rank, instances[(void *) UmlCom::read_unsigned()]); + _covered.insert(rank, instances[reinterpret_cast(uintptr_t(UmlCom::read_unsigned()))]); } -UmlFragmentCompartment * UmlBaseFragment::get_container_(int x, int y, int w, int h, const Q3PtrVector & fragments) +UmlFragmentCompartment * UmlBaseFragment::get_container_(int x, int y, int w, int h, const QVector &fragments) { UmlFragmentCompartment * r = 0; int nf = fragments.count(); @@ -82,7 +82,7 @@ UmlFragmentCompartment * UmlBaseFragment::get_container_(int x, int y, int w, in return r; } -void UmlBaseFragment::compute_container_(Q3PtrVector & fragments) +void UmlBaseFragment::compute_container_(QVector &fragments) { int rank = fragments.count(); diff --git a/genplugouts/CppUtilities/UmlBaseFragment.h b/genplugouts/CppUtilities/UmlBaseFragment.h index 932913148..3d6b53c14 100644 --- a/genplugouts/CppUtilities/UmlBaseFragment.h +++ b/genplugouts/CppUtilities/UmlBaseFragment.h @@ -1,11 +1,8 @@ #ifndef _UMLBASEFRAGMENT_H #define _UMLBASEFRAGMENT_H - - -#include -#include -#include - +#include +#include +#include class UmlFragmentCompartment; class UmlDiagram; class UmlClassInstanceReference; @@ -16,12 +13,12 @@ class UmlBaseFragment { public: // return the name - const Q3CString & name() const { + const QByteArray & name() const { return _name; } // return the compartments, at least one compartment exists - const Q3PtrVector & compartments() const { + const QVector & compartments() const { return _compartments; } @@ -39,12 +36,12 @@ class UmlBaseFragment // return the form corresponding to the arguments // and return value of the interaction use - Q3CString arguments() const { + QByteArray arguments() const { return _arguments; } // return the the list of covered instances (life lines) - const Q3PtrVector & covered() const { + const QVector & covered() const { return _covered; } @@ -52,9 +49,9 @@ class UmlBaseFragment private: UmlFragmentCompartment * _container; - Q3PtrVector _compartments; + QVector _compartments; - Q3CString _name; + QByteArray _name; int _x; @@ -66,9 +63,9 @@ class UmlBaseFragment UmlDiagram * _refer; - Q3CString _arguments; + QByteArray _arguments; - Q3PtrVector _covered; + QVector _covered; // internal, don't call it void read_(); @@ -81,15 +78,15 @@ class UmlBaseFragment //internal, do NOT use it - void read_covered_(Q3PtrDict & instances); + void read_covered_(QHash &instances); // internal - static UmlFragmentCompartment * get_container_(int x, int y, int w, int h, const Q3PtrVector & fragments); + static UmlFragmentCompartment * get_container_(int x, int y, int w, int h, const QVector & fragments); private: // internal - static void compute_container_(Q3PtrVector & fragments); + static void compute_container_(QVector & fragments); public: diff --git a/genplugouts/CppUtilities/UmlBaseFragmentCompartment.cpp b/genplugouts/CppUtilities/UmlBaseFragmentCompartment.cpp index 2ff876f6a..148f56823 100644 --- a/genplugouts/CppUtilities/UmlBaseFragmentCompartment.cpp +++ b/genplugouts/CppUtilities/UmlBaseFragmentCompartment.cpp @@ -3,21 +3,23 @@ #include "UmlBaseFragmentCompartment.h" #include "UmlBaseFragment.h" //Added by qt3to4: -#include +#include void UmlBaseFragmentCompartment::add_contained_(UmlFragment * x) { - _contained.resize(_contained.size() + 1); - _contained.insert(_contained.size() - 1, x); + //_contained.resize(_contained.size() + 1); + //_contained.insert(_contained.size() - 1, x); + _contained.append(x); } -void UmlBaseFragmentCompartment::add_text_(Q3CString x) +void UmlBaseFragmentCompartment::add_text_(QByteArray x) { - _texts.resize(_texts.size() + 1); - _texts.insert(_texts.size() - 1, strdup(x)); + //_texts.resize(_texts.size() + 1); + //_texts.insert(_texts.size() - 1, strdup(x)); + _texts.append(strdup(x)); } -void UmlBaseFragmentCompartment::add_cont_(Q3CString s, int cy) +void UmlBaseFragmentCompartment::add_cont_(QByteArray s, int cy) { if (cy < _fragment->vcenter_(_rank)) _start_continuation = s; diff --git a/genplugouts/CppUtilities/UmlBaseFragmentCompartment.h b/genplugouts/CppUtilities/UmlBaseFragmentCompartment.h index 8943ecf60..129b1dc86 100644 --- a/genplugouts/CppUtilities/UmlBaseFragmentCompartment.h +++ b/genplugouts/CppUtilities/UmlBaseFragmentCompartment.h @@ -5,8 +5,8 @@ // to avoid compiler warning #include "UmlFragment.h" -#include -#include + + class UmlFragment; class UmlBaseFragment; @@ -27,23 +27,23 @@ class UmlBaseFragmentCompartment } // the texts placed in the compartment - const Q3PtrVector & texts() const { + const QVector & texts() const { return _texts; } // return the fragments contained in the compartment, // may be none - const Q3PtrVector & contained() const { + const QVector & contained() const { return _contained; } // return the continuation ('label' case), or an empty string/null - Q3CString startContinuation() const { + QByteArray startContinuation() const { return _start_continuation; } // return the continuation ('goto' case), or an empty string/null - Q3CString endContinuation() const { + QByteArray endContinuation() const { return _end_continuation; } @@ -51,27 +51,27 @@ class UmlBaseFragmentCompartment private: UmlFragment * _fragment; - Q3PtrVector _contained; + QVector _contained; int _rank; - Q3PtrVector _texts; + QVector _texts; int _y; - Q3CString _start_continuation; + QByteArray _start_continuation; - Q3CString _end_continuation; + QByteArray _end_continuation; public: void add_contained_(UmlFragment * x); - void add_text_(Q3CString x); + void add_text_(QByteArray x); //internal, do NOT use it - void add_cont_(Q3CString s, int cy); + void add_cont_(QByteArray s, int cy); int b() const { return _y; diff --git a/genplugouts/CppUtilities/UmlBaseInitialPseudoState.h b/genplugouts/CppUtilities/UmlBaseInitialPseudoState.h index 88dae1cc6..2f31e4340 100644 --- a/genplugouts/CppUtilities/UmlBaseInitialPseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseInitialPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlInitialPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseInitialPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInitialPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseInitialPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseInterruptibleActivityRegion.h b/genplugouts/CppUtilities/UmlBaseInterruptibleActivityRegion.h index 70f988488..de6e56aed 100644 --- a/genplugouts/CppUtilities/UmlBaseInterruptibleActivityRegion.h +++ b/genplugouts/CppUtilities/UmlBaseInterruptibleActivityRegion.h @@ -4,7 +4,7 @@ #include "UmlActivityRegion.h" #include "anItemKind.h" -#include + class UmlInterruptibleActivityRegion; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseInterruptibleActivityRegion : public UmlActivityRegion protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInterruptibleActivityRegion(void * id, const Q3CString & s) : UmlActivityRegion(id, s) { + UmlBaseInterruptibleActivityRegion(void * id, const QByteArray & s) : UmlActivityRegion(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseItem.cpp b/genplugouts/CppUtilities/UmlBaseItem.cpp index 2da856781..969811f33 100644 --- a/genplugouts/CppUtilities/UmlBaseItem.cpp +++ b/genplugouts/CppUtilities/UmlBaseItem.cpp @@ -58,293 +58,294 @@ #include "UmlActivityPartition.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include +#include -bool UmlBaseItem::set_Name(const Q3CString & s) { - UmlCom::send_cmd(_identifier, setNameCmd, (const char *)s); //[rageek] Fix prototype - if (UmlCom::read_bool()) { - _name = s; - return TRUE; - } - else - return FALSE; +bool UmlBaseItem::set_Name(const QByteArray & s) { + UmlCom::send_cmd(_identifier, setNameCmd, (const char *)s); //[rageek] Fix prototype + if (UmlCom::read_bool()) { + _name = s; + return TRUE; + } + else + return FALSE; } -const Q3CString & UmlBaseItem::stereotype() { - read_if_needed_(); - - return _stereotype; +const QByteArray & UmlBaseItem::stereotype() { + read_if_needed_(); + + return _stereotype; } -bool UmlBaseItem::set_Stereotype(const Q3CString & s) { - return set_it_(_stereotype, s, setStereotypeCmd); +bool UmlBaseItem::set_Stereotype(const QByteArray & s) { + return set_it_(_stereotype, s, setStereotypeCmd); } bool UmlBaseItem::applyStereotype() { - UmlCom::send_cmd(_identifier, applyStereotypeCmd); - if (UmlCom::read_bool() == 0) return FALSE; - unload(false, false); - return TRUE; + UmlCom::send_cmd(_identifier, applyStereotypeCmd); + if (UmlCom::read_bool() == 0) return FALSE; + unload(false, false); + return TRUE; } -const Q3CString & UmlBaseItem::description() { - read_if_needed_(); - - return _description; +const QByteArray & UmlBaseItem::description() { + read_if_needed_(); + + return _description; } -bool UmlBaseItem::set_Description(const Q3CString & s) { - return set_it_(_description, s, setDescriptionCmd); +bool UmlBaseItem::set_Description(const QByteArray & s) { + return set_it_(_description, s, setDescriptionCmd); } UmlItem * UmlBaseItem::parent() { - if (_parent == 0) { - UmlCom::send_cmd(_identifier, parentCmd); - - _parent = UmlBaseItem::read_(); - } - - return _parent; + if (_parent == 0) { + UmlCom::send_cmd(_identifier, parentCmd); + + _parent = UmlBaseItem::read_(); + } + + return _parent; } -const Q3PtrVector UmlBaseItem::children() { - if (_children == 0) - read_children_(); - - return *_children; +const QVector UmlBaseItem::children() { + if (_children == 0) + read_children_(); + + return *_children; } bool UmlBaseItem::childrenVisible() { - UmlCom::send_cmd(_identifier, isOpenCmd); - return UmlCom::read_bool(); + UmlCom::send_cmd(_identifier, isOpenCmd); + return UmlCom::read_bool(); } bool UmlBaseItem::set_childrenVisible(bool y) { - UmlCom::send_cmd(_identifier, setOpenCmd, (char) y); - return UmlCom::read_bool(); -} - -bool UmlBaseItem::propertyValue(const Q3CString & k, Q3CString & v) { - read_if_needed_(); - - Q3CString * s = _dict[k]; - - if (s == 0) - return FALSE; - - v = *s; - return TRUE; - -} - -bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) { - read_if_needed_(); - - UmlCom::send_cmd(_identifier, setCoupleValueCmd, (const char *)k, (const char *)v ); //[rageek] Fix prototype - if (UmlCom::read_bool()) { - if (_defined) { - Q3CString * s = _dict[k]; - - if (s == 0) - _dict.insert(k, new Q3CString(v)); - else - *s = v; - } - + UmlCom::send_cmd(_identifier, setOpenCmd, (char) y); + return UmlCom::read_bool(); +} + +bool UmlBaseItem::propertyValue(const QByteArray & k, QByteArray & v) { + read_if_needed_(); + + QByteArray * s = _dict[k]; + + if (s == 0) + return FALSE; + + v = *s; return TRUE; - } - else - return FALSE; + } -const Q3Dict UmlBaseItem::properties() { - read_if_needed_(); +bool UmlBaseItem::set_PropertyValue(const QByteArray & k, const QByteArray & v) { + read_if_needed_(); + + UmlCom::send_cmd(_identifier, setCoupleValueCmd, (const char *)k, (const char *)v ); //[rageek] Fix prototype + if (UmlCom::read_bool()) { + if (_defined) { + QByteArray * s = _dict[k]; - return _dict; + if (s == 0) + _dict.insert(k, new QByteArray(v)); + else + *s = v; + } + + return TRUE; + } + else + return FALSE; +} + +const QHash UmlBaseItem::properties() +{ + read_if_needed_(); + + return _dict; } bool UmlBaseItem::moveAfter(const UmlItem * x) { - UmlCom::send_cmd(_identifier, moveAfterCmd, (x != 0) ? ((UmlBaseItem *) x)->_identifier : 0); - if (UmlCom::read_bool()) { - ((UmlBaseItem *) parent())->reread_children_if_needed_(); - return TRUE; - } - else - return FALSE; + UmlCom::send_cmd(_identifier, moveAfterCmd, (x != 0) ? ((UmlBaseItem *) x)->_identifier : 0); + if (UmlCom::read_bool()) { + ((UmlBaseItem *) parent())->reread_children_if_needed_(); + return TRUE; + } + else + return FALSE; } -Q3CString UmlBaseItem::supportFile() { - UmlCom::send_cmd(_identifier, supportFileCmd); - return UmlCom::read_string(); +QByteArray UmlBaseItem::supportFile() { + UmlCom::send_cmd(_identifier, supportFileCmd); + return UmlCom::read_string(); } bool UmlBaseItem::isWritable() { - UmlCom::send_cmd(_identifier, isWritableCmd); - return UmlCom::read_bool(); + UmlCom::send_cmd(_identifier, isWritableCmd); + return UmlCom::read_bool(); } -int UmlBaseItem::apply(Q3CString cmd) { - UmlCom::send_cmd(_identifier, applyCmd, (const char *)cmd); //[rageek] Fix prototype - return (int) UmlCom::read_unsigned(); +int UmlBaseItem::apply(QByteArray cmd) { + UmlCom::send_cmd(_identifier, applyCmd, (const char *)cmd); //[rageek] Fix prototype + return (int) UmlCom::read_unsigned(); } bool UmlBaseItem::isMarked() { - read_if_needed_(); + read_if_needed_(); - return _marked; + return _marked; } bool UmlBaseItem::set_isMarked(bool y) { - return set_it_(_marked, y, setMarkedCmd); + return set_it_(_marked, y, setMarkedCmd); } -const Q3PtrVector UmlBaseItem::referencedBy() { - UmlCom::send_cmd(_identifier, referencedByCmd); - - Q3PtrVector result; - - UmlCom::read_item_list(result); - return result; +const QVector UmlBaseItem::referencedBy() { + UmlCom::send_cmd(_identifier, referencedByCmd); + + QVector result; + + UmlCom::read_item_list(result); + return result; } int UmlBaseItem::getIdentifier() { - read_if_needed_(); + read_if_needed_(); - return _modeler_id; + return _modeler_id; } void UmlBaseItem::unload(bool rec, bool del) { - _defined = FALSE; - _stereotype = 0; - _dict.clear(); - _description = 0; - - if (_children != 0) { - if (rec) { - for (unsigned chindex = 0; chindex != _children->size(); chindex += 1) { - _children->at(chindex)->unload(TRUE, del); - if (del) - delete _children->at(chindex); - } + _defined = FALSE; + _stereotype = 0; + _dict.clear(); + _description = 0; + + if (_children != 0) { + if (rec) { + for (int chindex = 0; chindex != _children->size(); chindex += 1) { + _children->at(chindex)->unload(TRUE, del); + if (del) + delete _children->at(chindex); + } + } + + delete _children; + _children = 0; } - - delete _children; - _children = 0; - } } bool UmlBaseItem::deleteIt() { - UmlCom::send_cmd(_identifier, deleteCmd); - if (UmlCom::read_bool() == 0) return FALSE; - parent()->unload(TRUE); - return TRUE; + UmlCom::send_cmd(_identifier, deleteCmd); + if (UmlCom::read_bool() == 0) return FALSE; + parent()->unload(TRUE); + return TRUE; } bool UmlBaseItem::isToolRunning(int id) { - UmlCom::send_cmd(miscGlobalCmd, toolRunningCmd, id, ""); - return UmlCom::read_bool(); + UmlCom::send_cmd(miscGlobalCmd, toolRunningCmd, id, ""); + return UmlCom::read_bool(); } -const Q3PtrVector UmlBaseItem::markedItems() +const QVector UmlBaseItem::markedItems() { - UmlCom::send_cmd(miscGlobalCmd, allMarkedCmd); - - Q3PtrVector result; - - UmlCom::read_item_list(result); - return result; + UmlCom::send_cmd(miscGlobalCmd, allMarkedCmd); + + QVector result; + + UmlCom::read_item_list(result); + return result; } -Q3PtrDict UmlBaseItem::_all(997); +QHash UmlBaseItem::_all; void UmlBaseItem::read_if_needed_() { - if (!_defined) { + if (!_defined) { #if defined(WITHCPP) & defined(WITHJAVA) & defined(WITHPHP) & defined(WITHPYTHON) & defined(WITHIDL) - UmlCom::send_cmd(_identifier, getDefCmd); - read_uml_(); - read_cpp_(); - read_java_(); - read_php_(); - read_python_(); - read_idl_(); + UmlCom::send_cmd(_identifier, getDefCmd); + read_uml_(); + read_cpp_(); + read_java_(); + read_php_(); + read_python_(); + read_idl_(); #else # if defined(WITHCPP) & !defined(WITHJAVA) & !defined(WITHPHP) & !defined(WITHPYTHON) & !defined(WITHIDL) - UmlCom::send_cmd(_identifier, getCppDefCmd); - read_uml_(); - read_cpp_(); + UmlCom::send_cmd(_identifier, getCppDefCmd); + read_uml_(); + read_cpp_(); # else # if !defined(WITHCPP) & defined(WITHJAVA) & !defined(WITHPHP) & !defined(WITHPYTHON) & !defined(WITHIDL) - UmlCom::send_cmd(_identifier, getJavaDefCmd); - read_uml_(); - read_java_(); + UmlCom::send_cmd(_identifier, getJavaDefCmd); + read_uml_(); + read_java_(); # else # if !defined(WITHCPP) & !defined(WITHJAVA) & defined(WITHPHP) & !defined(WITHPYTHON) & !defined(WITHIDL) - UmlCom::send_cmd(_identifier, getPhpDefCmd); - read_uml_(); - read_php_(); + UmlCom::send_cmd(_identifier, getPhpDefCmd); + read_uml_(); + read_php_(); # else # if !defined(WITHCPP) & !defined(WITHJAVA) & !defined(WITHPHP) & defined(WITHPYTHON) & !defined(WITHIDL) - UmlCom::send_cmd(_identifier, getPythonDefCmd); - read_uml_(); - read_python_(); + UmlCom::send_cmd(_identifier, getPythonDefCmd); + read_uml_(); + read_python_(); # else # if !defined(WITHCPP) & !defined(WITHJAVA) & !defined(WITHPHP) & !defined(WITHPYTHON) & defined(WITHIDL) - UmlCom::send_cmd(_identifier, getIdlDefCmd); - read_uml_(); - read_idl_(); + UmlCom::send_cmd(_identifier, getIdlDefCmd); + read_uml_(); + read_idl_(); # else # if !defined(WITHCPP) & !defined(WITHJAVA) & !defined(WITHPHP) & !defined(WITHPYTHON) & !defined(WITHIDL) - UmlCom::send_cmd(_identifier, getUmlDefCmd); - read_uml_(); + UmlCom::send_cmd(_identifier, getUmlDefCmd); + read_uml_(); # else - ... WITHCPP and WITHJAVA and WITHPHP and WITHPYTHON and WITHIDL must be both defined or undefined - ... or only one of them must be defined -# endif -# endif -# endif -# endif -# endif -# endif -#endif - - _defined = TRUE; - } + ... WITHCPP and WITHJAVA and WITHPHP and WITHPYTHON and WITHIDL must be both defined or undefined + ... or only one of them must be defined + # endif + # endif + # endif + # endif + # endif + # endif + #endif + + _defined = TRUE; + } } UmlItem * UmlBaseItem::create_(anItemKind k, const char * s) { - UmlCom::send_cmd(_identifier, createCmd, k, s); + UmlCom::send_cmd(_identifier, createCmd, k, s); - UmlItem * result = UmlBaseItem::read_(); - - if (result != 0) { - if (_children != 0) { - unsigned n = _children->count(); - - _children->resize(n + 1); - _children->insert(n, result); + UmlItem * result = UmlBaseItem::read_(); + + if (result != 0) { + if (_children != 0) { + unsigned n = _children->count(); + + _children->resize(n + 1); + _children->insert(n, result); + } + ((UmlBaseItem *) result)->_parent = (UmlItem *) this; } - ((UmlBaseItem *) result)->_parent = (UmlItem *) this; - } - - return result; + + return result; } void UmlBaseItem::read_uml_() { - _stereotype = UmlCom::read_string(); - - unsigned n = UmlCom::read_unsigned(); - - while (n--) { - Q3CString k = UmlCom::read_string(); - - _dict.insert(k, new Q3CString(UmlCom::read_string())); - } - - _description = UmlCom::read_string(); - - _marked = UmlCom::read_bool(); - _modeler_id = (int) UmlCom::read_unsigned(); + _stereotype = UmlCom::read_string(); + + unsigned n = UmlCom::read_unsigned(); + + while (n--) { + QByteArray k = UmlCom::read_string(); + + _dict.insert(k, new QByteArray(UmlCom::read_string())); + } + + _description = UmlCom::read_string(); + + _marked = UmlCom::read_bool(); + _modeler_id = (int) UmlCom::read_unsigned(); } #ifdef WITHCPP @@ -373,267 +374,269 @@ void UmlBaseItem::read_idl_() { #endif void UmlBaseItem::read_children_() { - UmlCom::send_cmd(_identifier, childrenCmd); - _children = new Q3PtrVector; - - UmlCom::read_item_list(*_children); - - unsigned n = _children->size(); - - while (n--) - ((UmlBaseItem *) _children->at(n))->_parent = (UmlItem *) this; + UmlCom::send_cmd(_identifier, childrenCmd); + _children = new QVector; + + UmlCom::read_item_list(*_children); + + unsigned n = _children->size(); + + while (n--) + { + ((UmlBaseItem *) _children->at(n))->_parent = (UmlItem *) this; + } } void UmlBaseItem::reread_children_if_needed_() { - if (_children != 0) { - delete _children; - read_children_(); - } + if (_children != 0) { + delete _children; + read_children_(); + } } bool UmlBaseItem::set_it_(bool & r, bool v, OnInstanceCmd cmd) { - UmlCom::send_cmd(_identifier, cmd, (char) v); - if (UmlCom::read_bool()) { - r = v; - return TRUE; - } - else - return FALSE; + UmlCom::send_cmd(_identifier, cmd, (char) v); + if (UmlCom::read_bool()) { + r = v; + return TRUE; + } + else + return FALSE; } bool UmlBaseItem::set_it_(aVisibility & r, aVisibility v, OnInstanceCmd cmd) { - UmlCom::send_cmd(_identifier, cmd, (char) v); - if (UmlCom::read_bool()) { - r = v; - return TRUE; - } - else - return FALSE; + UmlCom::send_cmd(_identifier, cmd, (char) v); + if (UmlCom::read_bool()) { + r = v; + return TRUE; + } + else + return FALSE; } bool UmlBaseItem::set_it_(aDirection & r, aDirection v, OnInstanceCmd cmd) { - UmlCom::send_cmd(_identifier, cmd, (char) v); - if (UmlCom::read_bool()) { - r = v; - return TRUE; - } - else - return FALSE; + UmlCom::send_cmd(_identifier, cmd, (char) v); + if (UmlCom::read_bool()) { + r = v; + return TRUE; + } + else + return FALSE; } -bool UmlBaseItem::set_it_(Q3CString & r, const char * v, OnInstanceCmd cmd) { - UmlCom::send_cmd(_identifier, cmd, v); - if (UmlCom::read_bool()) { - if (_defined) r = v; - return TRUE; - } - else - return FALSE; +bool UmlBaseItem::set_it_(QByteArray & r, const char * v, OnInstanceCmd cmd) { + UmlCom::send_cmd(_identifier, cmd, v); + if (UmlCom::read_bool()) { + if (_defined) r = v; + return TRUE; + } + else + return FALSE; } bool UmlBaseItem::set_it_(UmlTypeSpec & r, const UmlTypeSpec & t, OnInstanceCmd cmd) { - UmlCom::send_cmd(_identifier, cmd, t); - if (UmlCom::read_bool()) { - if (_defined) r = t; - return TRUE; - } - else - return FALSE; + UmlCom::send_cmd(_identifier, cmd, t); + if (UmlCom::read_bool()) { + if (_defined) r = t; + return TRUE; + } + else + return FALSE; } UmlItem * UmlBaseItem::read_() { - void * id = UmlCom::read_id(); - - if (id == 0) - return 0; - - anItemKind kind = (anItemKind) UmlCom::read_char(); - const char * name = UmlCom::read_string(); - + void * id = UmlCom::read_id(); + + if (id == 0) + return 0; + + anItemKind kind = (anItemKind) UmlCom::read_char(); + const char * name = UmlCom::read_string(); + #ifndef WIN32 - //cout << "UmlBaseItem::read id " << id << " kind " << kind << " name " << name << '\n'; + //qDebug() << "UmlBaseItem::read id " << id << " kind " << kind << " name " << name << '\n'; #endif - - UmlItem * result = _all[id]; - - if (result == 0) { - switch (kind) { - case aRelation: - return new UmlRelation(id, name); - case anAttribute: - return new UmlAttribute(id, name); - case anOperation: - return new UmlOperation(id, name); - case anExtraClassMember: - return new UmlExtraClassMember(id, name); - case aClass: - return new UmlClass(id, name); - case anUseCase: - return new UmlUseCase(id, name); - case aComponent: - return new UmlComponent(id, name); - case anArtifact: - return new UmlArtifact(id, name); - case aNode: - return new UmlNode(id, name); - case aNcRelation: - return new UmlNcRelation(id, name); - case aClassDiagram: - return new UmlClassDiagram(id, name); - case anUseCaseDiagram: - return new UmlUseCaseDiagram(id, name); - case aSequenceDiagram: - return new UmlSequenceDiagram(id, name); - case aCollaborationDiagram: - return new UmlCollaborationDiagram(id, name); - case aComponentDiagram: - return new UmlComponentDiagram(id, name); - case aDeploymentDiagram: - return new UmlDeploymentDiagram(id, name); - case aClassView: - return new UmlClassView(id, name); - case anUseCaseView: - return new UmlUseCaseView(id, name); - case aComponentView: - return new UmlComponentView(id, name); - case aDeploymentView: - return new UmlDeploymentView(id, name); - case aPackage: - return new UmlPackage(id, name); - case aState: - return new UmlState(id, name); - case aTransition: - return new UmlTransition(id); - case aRegion: - return new UmlRegion(id, name); - case aStateDiagram: - return new UmlStateDiagram(id, name); - case aStateAction: - return new UmlStateAction(id); - case anInitialPseudoState: - return new UmlInitialPseudoState(id); - case anEntryPointPseudoState: - return new UmlEntryPointPseudoState(id, name); - case aFinalState: - return new UmlFinalState(id); - case aTerminatePseudoState: - return new UmlTerminatePseudoState(id); - case anExitPointPseudoState: - return new UmlExitPointPseudoState(id, name); - case aDeepHistoryPseudoState: - return new UmlDeepHistoryPseudoState(id); - case aShallowHistoryPseudoState: - return new UmlShallowHistoryPseudoState(id); - case aJunctionPseudoState: - return new UmlJunctionPseudoState(id); - case aChoicePseudoState: - return new UmlChoicePseudoState(id); - case aForkPseudoState: - return new UmlForkPseudoState(id); - case aJoinPseudoState: - return new UmlJoinPseudoState(id); - case anObjectDiagram: - return new UmlObjectDiagram(id, name); - case anActivityDiagram: - return new UmlActivityDiagram(id, name); - case anActivity: - return new UmlActivity(id, name); - case aFlow: - return new UmlFlow(id, name); - case anActivityParameter: - return new UmlActivityParameter(id, name); - case aParameterSet: - return new UmlParameterSet(id, name); - case anExpansionRegion: - return new UmlExpansionRegion(id, name); - case anInterruptibleActivityRegion: - return new UmlInterruptibleActivityRegion(id, name); - case anOpaqueAction: - return new UmlOpaqueAction(id, name); - case anAcceptEventAction: - return new UmlAcceptEventAction(id, name); - case aReadVariableValueAction: - return new UmlReadVariableValueAction(id, name); - case aClearVariableValueAction: - return new UmlClearVariableValueAction(id, name); - case aWriteVariableValueAction: - return new UmlWriteVariableValueAction(id, name); - case anAddVariableValueAction: - return new UmlAddVariableValueAction(id, name); - case aRemoveVariableValueAction: - return new UmlRemoveVariableValueAction(id, name); - case aCallBehaviorAction: - return new UmlCallBehaviorAction(id, name); - case aCallOperationAction: - return new UmlCallOperationAction(id, name); - case aSendObjectAction: - return new UmlSendObjectAction(id, name); - case aSendSignalAction: - return new UmlSendSignalAction(id, name); - case aBroadcastSignalAction: - return new UmlBroadcastSignalAction(id, name); - case anUnmarshallAction: - return new UmlUnmarshallAction(id, name); - case aValueSpecificationAction: - return new UmlValueSpecificationAction(id, name); - case anActivityObject: - return new UmlActivityObject(id, name); - case anExpansionNode: - return new UmlExpansionNode(id, name); - case anActivityPin: - return new UmlActivityPin(id, name); - case anInitialActivityNode: - return new UmlInitialActivityNode(id, name); - case aFlowFinalActivityNode: - return new UmlFlowFinalActivityNode(id, name); - case anActivityFinalActivityNode: - return new UmlActivityFinalActivityNode(id, name); - case aDecisionActivityNode: - return new UmlDecisionActivityNode(id, name); - case aMergeActivityNode: - return new UmlMergeActivityNode(id, name); - case aForkActivityNode: - return new UmlForkActivityNode(id, name); - case aJoinActivityNode: - return new UmlJoinActivityNode(id, name); - case aPartition: - return new UmlActivityPartition(id, name); - case aClassInstance: - return new UmlClassInstance(id, name); - case anAcceptCallAction: - return new UmlAcceptCallAction(id, name); - case aReplyAction: - return new UmlReplyAction(id, name); - case aCreateObjectAction: - return new UmlCreateObjectAction(id, name); - case aDestroyObjectAction: - return new UmlDestroyObjectAction(id, name); - case aTestIdentityAction: - return new UmlTestIdentityAction(id, name); - case aRaiseExceptionAction: - return new UmlRaiseExceptionAction(id, name); - case aReduceAction: - return new UmlReduceAction(id, name); - default: - UmlCom::bye(); - UmlCom::fatal_error(Q3CString("unknown item type ") + Q3CString().setNum(kind)); + + UmlItem * result = _all[id]; + + if (result == 0) { + switch (kind) { + case aRelation: + return new UmlRelation(id, name); + case anAttribute: + return new UmlAttribute(id, name); + case anOperation: + return new UmlOperation(id, name); + case anExtraClassMember: + return new UmlExtraClassMember(id, name); + case aClass: + return new UmlClass(id, name); + case anUseCase: + return new UmlUseCase(id, name); + case aComponent: + return new UmlComponent(id, name); + case anArtifact: + return new UmlArtifact(id, name); + case aNode: + return new UmlNode(id, name); + case aNcRelation: + return new UmlNcRelation(id, name); + case aClassDiagram: + return new UmlClassDiagram(id, name); + case anUseCaseDiagram: + return new UmlUseCaseDiagram(id, name); + case aSequenceDiagram: + return new UmlSequenceDiagram(id, name); + case aCollaborationDiagram: + return new UmlCollaborationDiagram(id, name); + case aComponentDiagram: + return new UmlComponentDiagram(id, name); + case aDeploymentDiagram: + return new UmlDeploymentDiagram(id, name); + case aClassView: + return new UmlClassView(id, name); + case anUseCaseView: + return new UmlUseCaseView(id, name); + case aComponentView: + return new UmlComponentView(id, name); + case aDeploymentView: + return new UmlDeploymentView(id, name); + case aPackage: + return new UmlPackage(id, name); + case aState: + return new UmlState(id, name); + case aTransition: + return new UmlTransition(id); + case aRegion: + return new UmlRegion(id, name); + case aStateDiagram: + return new UmlStateDiagram(id, name); + case aStateAction: + return new UmlStateAction(id); + case anInitialPseudoState: + return new UmlInitialPseudoState(id); + case anEntryPointPseudoState: + return new UmlEntryPointPseudoState(id, name); + case aFinalState: + return new UmlFinalState(id); + case aTerminatePseudoState: + return new UmlTerminatePseudoState(id); + case anExitPointPseudoState: + return new UmlExitPointPseudoState(id, name); + case aDeepHistoryPseudoState: + return new UmlDeepHistoryPseudoState(id); + case aShallowHistoryPseudoState: + return new UmlShallowHistoryPseudoState(id); + case aJunctionPseudoState: + return new UmlJunctionPseudoState(id); + case aChoicePseudoState: + return new UmlChoicePseudoState(id); + case aForkPseudoState: + return new UmlForkPseudoState(id); + case aJoinPseudoState: + return new UmlJoinPseudoState(id); + case anObjectDiagram: + return new UmlObjectDiagram(id, name); + case anActivityDiagram: + return new UmlActivityDiagram(id, name); + case anActivity: + return new UmlActivity(id, name); + case aFlow: + return new UmlFlow(id, name); + case anActivityParameter: + return new UmlActivityParameter(id, name); + case aParameterSet: + return new UmlParameterSet(id, name); + case anExpansionRegion: + return new UmlExpansionRegion(id, name); + case anInterruptibleActivityRegion: + return new UmlInterruptibleActivityRegion(id, name); + case anOpaqueAction: + return new UmlOpaqueAction(id, name); + case anAcceptEventAction: + return new UmlAcceptEventAction(id, name); + case aReadVariableValueAction: + return new UmlReadVariableValueAction(id, name); + case aClearVariableValueAction: + return new UmlClearVariableValueAction(id, name); + case aWriteVariableValueAction: + return new UmlWriteVariableValueAction(id, name); + case anAddVariableValueAction: + return new UmlAddVariableValueAction(id, name); + case aRemoveVariableValueAction: + return new UmlRemoveVariableValueAction(id, name); + case aCallBehaviorAction: + return new UmlCallBehaviorAction(id, name); + case aCallOperationAction: + return new UmlCallOperationAction(id, name); + case aSendObjectAction: + return new UmlSendObjectAction(id, name); + case aSendSignalAction: + return new UmlSendSignalAction(id, name); + case aBroadcastSignalAction: + return new UmlBroadcastSignalAction(id, name); + case anUnmarshallAction: + return new UmlUnmarshallAction(id, name); + case aValueSpecificationAction: + return new UmlValueSpecificationAction(id, name); + case anActivityObject: + return new UmlActivityObject(id, name); + case anExpansionNode: + return new UmlExpansionNode(id, name); + case anActivityPin: + return new UmlActivityPin(id, name); + case anInitialActivityNode: + return new UmlInitialActivityNode(id, name); + case aFlowFinalActivityNode: + return new UmlFlowFinalActivityNode(id, name); + case anActivityFinalActivityNode: + return new UmlActivityFinalActivityNode(id, name); + case aDecisionActivityNode: + return new UmlDecisionActivityNode(id, name); + case aMergeActivityNode: + return new UmlMergeActivityNode(id, name); + case aForkActivityNode: + return new UmlForkActivityNode(id, name); + case aJoinActivityNode: + return new UmlJoinActivityNode(id, name); + case aPartition: + return new UmlActivityPartition(id, name); + case aClassInstance: + return new UmlClassInstance(id, name); + case anAcceptCallAction: + return new UmlAcceptCallAction(id, name); + case aReplyAction: + return new UmlReplyAction(id, name); + case aCreateObjectAction: + return new UmlCreateObjectAction(id, name); + case aDestroyObjectAction: + return new UmlDestroyObjectAction(id, name); + case aTestIdentityAction: + return new UmlTestIdentityAction(id, name); + case aRaiseExceptionAction: + return new UmlRaiseExceptionAction(id, name); + case aReduceAction: + return new UmlReduceAction(id, name); + default: + UmlCom::bye(); + UmlCom::fatal_error(QByteArray("unknown item type ") + QByteArray().setNum(kind)); + } } - } - - return result; + + return result; } - UmlBaseItem::UmlBaseItem(void * id, const Q3CString & n) +UmlBaseItem::UmlBaseItem(void * id, const QByteArray & n) : _defined(FALSE), _identifier(id), _name(n), _parent(0), _children(0) { - _all.insert(id, (UmlItem *) this); - if (_all.count()/_all.size() > 10) - _all.resize(_all.size() * 2 - 1); + _all.insert(id, (UmlItem *) this); + if (_all.count()/_all.size() > 10) + _all.reserve(_all.size() * 2 - 1); } - UmlBaseItem::~UmlBaseItem() { - if (_children != 0) - delete _children; - _all.remove(_identifier); +UmlBaseItem::~UmlBaseItem() { + if (_children != 0) + delete _children; + _all.remove(_identifier); } diff --git a/genplugouts/CppUtilities/UmlBaseItem.h b/genplugouts/CppUtilities/UmlBaseItem.h index 7288ae51a..f4699c5f5 100644 --- a/genplugouts/CppUtilities/UmlBaseItem.h +++ b/genplugouts/CppUtilities/UmlBaseItem.h @@ -1,17 +1,11 @@ #ifndef _UMLBASEITEM_H #define _UMLBASEITEM_H - - #include "anItemKind.h" -#include -#include -#include -#include #include "Tools/ApiCmd.h" - #include "aVisibility.h" #include "aDirection.h" - +#include +#include class UmlItem; class UmlTypeSpec; @@ -37,19 +31,19 @@ class UmlBaseItem { virtual anItemKind kind() = 0; // returns the name - const Q3CString & name() { return _name; }; + const QByteArray & name() { return _name; }; // to set the name // // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Name(const Q3CString & s); + virtual bool set_Name(const QByteArray & s); // returns the stereotype - const Q3CString & stereotype(); + const QByteArray & stereotype(); // to set the stereotype // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Stereotype(const Q3CString & s); + virtual bool set_Stereotype(const QByteArray & s); // If the current stereotype is part of a profile add needed properties. // In all cases remove extra properties whose keys contain two ':'. @@ -58,18 +52,18 @@ class UmlBaseItem { bool applyStereotype(); // returns the description - const Q3CString & description(); + const QByteArray & description(); // to set the description // On error return FALSE in C++, produce a RuntimeException in Java - bool set_Description(const Q3CString & s); + bool set_Description(const QByteArray & s); // returns the parent (0/null if it is applied on the project itself), // to go all over the browser tree UmlItem * parent(); // returns (in Java : a copy of) the children list, to go all over the browser tree - const Q3PtrVector children(); + const QVector children(); // return TRUE if the children exist and are visible (independently // of the scroll bar) in the browser, else FALSE @@ -94,16 +88,16 @@ class UmlBaseItem { // // These properties may be edited through the object dialog last tab // named 'user' - bool propertyValue(const Q3CString & k, Q3CString & v); + bool propertyValue(const QByteArray & k, QByteArray & v); // to set (may be insert a new) the value 'v' associated to the key 'k' // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PropertyValue(const Q3CString & k, const Q3CString & v); + bool set_PropertyValue(const QByteArray & k, const QByteArray & v); // returns all the properties of the object through (in Java a copy of) a dictionnary - const Q3Dict properties(); + const QHash properties(); // If the parameter is null, move the current item to be // the first child of its parent. Else the current item and @@ -138,7 +132,7 @@ class UmlBaseItem { // external type and edited through the last Idl tab of the // 'Generation Settings' dialog is saved in the file 'idl_includes' // - Q3CString supportFile(); + QByteArray supportFile(); // return TRUE in case the item may be modified, i.e. it is not // an API base 'plug-out' class and the corresponding file(s) are not @@ -146,7 +140,7 @@ class UmlBaseItem { bool isWritable(); // Apply asynchronously the tool on the item, returns an identifier to call isToolDone() - int apply(Q3CString cmd); + int apply(QByteArray cmd); //return TRUE in case the item is marked bool isMarked(); @@ -160,7 +154,7 @@ class UmlBaseItem { // item), UmlNcRelations (their target is the current item) or // UmlComponents (the associated component of the current item when it is // a UmlClass, a non source component associated with the current one). - const Q3PtrVector referencedBy(); + const QVector referencedBy(); // return a constant identifier, it is unique within a given // kind of element (two classes can't have the same identifiers, but @@ -186,7 +180,7 @@ class UmlBaseItem { // 'id' is an identifier returned by apply(), indicates if the tool is still running static bool isToolRunning(int id); - static const Q3PtrVector markedItems(); + static const QVector markedItems(); private: @@ -202,21 +196,21 @@ class UmlBaseItem { private: - Q3CString _name; + QByteArray _name; // Note : protected in Java for internal reason, but do NOT // access to this field yourself ! - Q3CString _stereotype; + QByteArray _stereotype; - Q3CString _description; + QByteArray _description; UmlItem * _parent; - Q3PtrVector * _children; + QVector * _children; - Q3Dict _dict; + QHash _dict; - static Q3PtrDict _all; + static QHash _all; protected: @@ -284,7 +278,7 @@ class UmlBaseItem { //internal, do NOT use it - bool set_it_(Q3CString & r, const char * v, OnInstanceCmd cmd); + bool set_it_(QByteArray & r, const char * v, OnInstanceCmd cmd); //internal, do NOT use it @@ -297,7 +291,7 @@ class UmlBaseItem { public: // the constructor, do not call it yourself ! - UmlBaseItem(void * id, const Q3CString & n); + UmlBaseItem(void * id, const QByteArray & n); // the destructor, do not delete objects yourself !!!!!!!!!! virtual ~UmlBaseItem(); diff --git a/genplugouts/CppUtilities/UmlBaseJoinPseudoState.h b/genplugouts/CppUtilities/UmlBaseJoinPseudoState.h index 31976dfff..c95cfff9c 100644 --- a/genplugouts/CppUtilities/UmlBaseJoinPseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseJoinPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlJoinPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseJoinPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJoinPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseJoinPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseJunctionPseudoState.h b/genplugouts/CppUtilities/UmlBaseJunctionPseudoState.h index 9b76d88e7..96cdfe959 100644 --- a/genplugouts/CppUtilities/UmlBaseJunctionPseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseJunctionPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlJunctionPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseJunctionPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJunctionPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseJunctionPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseMessage.cpp b/genplugouts/CppUtilities/UmlBaseMessage.cpp index 77851f8dd..2d220aa8e 100644 --- a/genplugouts/CppUtilities/UmlBaseMessage.cpp +++ b/genplugouts/CppUtilities/UmlBaseMessage.cpp @@ -4,13 +4,13 @@ #include "UmlClassInstanceReference.h" #include "UmlOperation.h" -void UmlBaseMessage::read_(const Q3PtrDict & instances) +void UmlBaseMessage::read_(const QHash & instances) { _operation = (UmlOperation *) UmlBaseItem::read_(); if (_operation == 0) _form = UmlCom::read_string(); - _from = instances[(void *) UmlCom::read_unsigned()]; - _to = instances[(void *) UmlCom::read_unsigned()]; + _from = instances[reinterpret_cast(uintptr_t(UmlCom::read_unsigned()))]; + _to = instances[reinterpret_cast(uintptr_t(UmlCom::read_unsigned()))]; } diff --git a/genplugouts/CppUtilities/UmlBaseMessage.h b/genplugouts/CppUtilities/UmlBaseMessage.h index 81fc500c8..8af6c57cc 100644 --- a/genplugouts/CppUtilities/UmlBaseMessage.h +++ b/genplugouts/CppUtilities/UmlBaseMessage.h @@ -1,10 +1,7 @@ #ifndef _UMLBASEMESSAGE_H #define _UMLBASEMESSAGE_H - - -#include -#include - +#include +#include class UmlClassInstanceReference; class UmlOperation; @@ -30,7 +27,7 @@ class UmlBaseMessage // return message as a string, may be empty/null, // exclusive with operation() - const Q3CString & form() const { + const QByteArray & form() const { return _form; } @@ -42,10 +39,10 @@ class UmlBaseMessage UmlOperation * _operation; - Q3CString _form; + QByteArray _form; // internal, don't call it - void read_(const Q3PtrDict & instances); + void read_(const QHash &instances); friend class UmlBaseSequenceMessage; friend class UmlBaseCollaborationMessage; diff --git a/genplugouts/CppUtilities/UmlBaseNcRelation.h b/genplugouts/CppUtilities/UmlBaseNcRelation.h index 7418e3406..0ad29c67b 100644 --- a/genplugouts/CppUtilities/UmlBaseNcRelation.h +++ b/genplugouts/CppUtilities/UmlBaseNcRelation.h @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "aRelationKind.h" #include "anItemKind.h" -#include + class UmlNcRelation; @@ -43,11 +43,11 @@ class UmlBaseNcRelation : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseNcRelation(void * id, const Q3CString & n); + UmlBaseNcRelation(void * id, const QByteArray & n); }; -inline UmlBaseNcRelation::UmlBaseNcRelation(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseNcRelation::UmlBaseNcRelation(void * id, const QByteArray & n) : UmlItem(id, n) { _target = 0; } diff --git a/genplugouts/CppUtilities/UmlBaseNode.h b/genplugouts/CppUtilities/UmlBaseNode.h index 07a980e66..208e951f2 100644 --- a/genplugouts/CppUtilities/UmlBaseNode.h +++ b/genplugouts/CppUtilities/UmlBaseNode.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlNode; class UmlDeploymentDiagram; @@ -38,7 +38,7 @@ class UmlBaseNode : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseNode(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseNode(void * id, const QByteArray & n) : UmlItem(id, n) {}; //internal, do NOT use it diff --git a/genplugouts/CppUtilities/UmlBaseObjectDiagram.h b/genplugouts/CppUtilities/UmlBaseObjectDiagram.h index dfe6983ef..720256a2d 100644 --- a/genplugouts/CppUtilities/UmlBaseObjectDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseObjectDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlObjectDiagram; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseObjectDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseObjectDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseObjectDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseOnSignalAction.cpp b/genplugouts/CppUtilities/UmlBaseOnSignalAction.cpp index 8c887e113..aec5db337 100644 --- a/genplugouts/CppUtilities/UmlBaseOnSignalAction.cpp +++ b/genplugouts/CppUtilities/UmlBaseOnSignalAction.cpp @@ -2,9 +2,9 @@ #include "UmlCom.h" #include "UmlBaseOnSignalAction.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlBaseOnSignalAction::signal() +const QByteArray & UmlBaseOnSignalAction::signal() { read_if_needed_(); return _signal; @@ -16,7 +16,7 @@ bool UmlBaseOnSignalAction::set_Signal(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseOnSignalAction::cppSignal() +const QByteArray & UmlBaseOnSignalAction::cppSignal() { read_if_needed_(); return _cpp_signal; @@ -29,7 +29,7 @@ bool UmlBaseOnSignalAction::set_CppSignal(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseOnSignalAction::javaSignal() +const QByteArray & UmlBaseOnSignalAction::javaSignal() { read_if_needed_(); return _java_signal; diff --git a/genplugouts/CppUtilities/UmlBaseOnSignalAction.h b/genplugouts/CppUtilities/UmlBaseOnSignalAction.h index 6ad499b79..0d648e38c 100644 --- a/genplugouts/CppUtilities/UmlBaseOnSignalAction.h +++ b/genplugouts/CppUtilities/UmlBaseOnSignalAction.h @@ -3,19 +3,19 @@ #include "UmlActivityAction.h" -#include + class UmlBaseOnSignalAction : public UmlActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOnSignalAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseOnSignalAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the signal - const Q3CString & signal(); + const QByteArray & signal(); // set the signal // @@ -24,7 +24,7 @@ class UmlBaseOnSignalAction : public UmlActivityAction #ifdef WITHCPP // return the signal in C++ - const Q3CString & cppSignal(); + const QByteArray & cppSignal(); // set the signal in C++ // @@ -34,7 +34,7 @@ class UmlBaseOnSignalAction : public UmlActivityAction #ifdef WITHJAVA // return the signal in Java - const Q3CString & javaSignal(); + const QByteArray & javaSignal(); // set the signal in Java // @@ -52,14 +52,14 @@ class UmlBaseOnSignalAction : public UmlActivityAction private: - Q3CString _signal; + QByteArray _signal; #ifdef WITHCPP - Q3CString _cpp_signal; + QByteArray _cpp_signal; #endif #ifdef WITHJAVA - Q3CString _java_signal; + QByteArray _java_signal; #endif diff --git a/genplugouts/CppUtilities/UmlBaseOperation.cpp b/genplugouts/CppUtilities/UmlBaseOperation.cpp index e202b6e8c..45fcdae67 100644 --- a/genplugouts/CppUtilities/UmlBaseOperation.cpp +++ b/genplugouts/CppUtilities/UmlBaseOperation.cpp @@ -8,8 +8,8 @@ #include "UmlBaseClass.h" #include "UmlClassMember.h" //Added by qt3to4: -#include -#include +#include +#include #include "Logging/QsLog.h" UmlOperation * UmlBaseOperation::create(UmlClass * parent, const char * s) { @@ -64,7 +64,7 @@ bool UmlBaseOperation::set_ReturnType(const UmlTypeSpec & t) { return set_it_(_return_type, t, setReturnTypeCmd); } -const Q3ValueList UmlBaseOperation::params() { +const QList UmlBaseOperation::params() { read_if_needed_(); return _params; @@ -75,7 +75,7 @@ bool UmlBaseOperation::addParameter(unsigned rank, const UmlParameter & p) { p.default_value, p.type); if (UmlCom::read_bool()) { if (_defined) - _params.insert(_params.at(rank), p); + _params.insert(rank, p); return TRUE; } else @@ -86,7 +86,7 @@ bool UmlBaseOperation::removeParameter(unsigned rank) { UmlCom::send_cmd(_identifier, removeParameterCmd, rank); if (UmlCom::read_bool()) { if (_defined) - _params.remove(_params.at(rank)); + _params.removeAt(rank); return TRUE; } else @@ -105,7 +105,7 @@ bool UmlBaseOperation::replaceParameter(unsigned rank, const UmlParameter & p) { return FALSE; } -const Q3ValueList UmlBaseOperation::exceptions() { +const QList UmlBaseOperation::exceptions() { read_if_needed_(); return _exceptions; @@ -115,7 +115,7 @@ bool UmlBaseOperation::addException(unsigned rank, const UmlTypeSpec & t) { UmlCom::send_cmd(_identifier, addExceptionCmd, rank, t); if (UmlCom::read_bool()) { if (_defined) - _exceptions.insert(_exceptions.at(rank), t); + _exceptions.insert(rank, t); return TRUE; } else @@ -126,7 +126,7 @@ bool UmlBaseOperation::removeException(unsigned rank) { UmlCom::send_cmd(_identifier, removeExceptionCmd, rank); if (UmlCom::read_bool()) { if (_defined) - _exceptions.remove(_exceptions.at(rank)); + _exceptions.removeAt(rank); return TRUE; } else @@ -144,8 +144,8 @@ bool UmlBaseOperation::replaceException(unsigned rank, const UmlTypeSpec & t) { return FALSE; } -const Q3PtrVector UmlBaseOperation::methods() const { - Q3PtrVector l; +const QVector UmlBaseOperation::methods() const { + QVector l; UmlCom::send_cmd(_identifier, sideCmd); UmlCom::read_item_list(l); @@ -233,7 +233,7 @@ bool UmlBaseOperation::set_isCppInline(bool y) { return FALSE; } -const Q3CString & UmlBaseOperation::cppDef() { +const QByteArray & UmlBaseOperation::cppDef() { read_if_needed_(); return _cpp_def; @@ -243,7 +243,7 @@ bool UmlBaseOperation::set_CppDef(const char * s) { return set_it_(_cpp_def, s, setCppDefCmd); } -Q3CString UmlBaseOperation::cppBody() { +QByteArray UmlBaseOperation::cppBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, cppBodyCmd); return UmlCom::read_string(); @@ -255,7 +255,7 @@ bool UmlBaseOperation::set_CppBody(const char * s) { return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::cppNameSpec() { +const QByteArray & UmlBaseOperation::cppNameSpec() { read_if_needed_(); return _cpp_name_spec; @@ -335,7 +335,7 @@ bool UmlBaseOperation::set_isJavaSynchronized(bool y) { return FALSE; } -const Q3CString & UmlBaseOperation::javaDef() { +const QByteArray & UmlBaseOperation::javaDef() { return javaDecl(); } @@ -343,7 +343,7 @@ bool UmlBaseOperation::set_JavaDef(const char * s) { return set_JavaDecl(s); } -Q3CString UmlBaseOperation::javaBody() { +QByteArray UmlBaseOperation::javaBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, javaBodyCmd); return UmlCom::read_string(); @@ -355,7 +355,7 @@ bool UmlBaseOperation::set_JavaBody(const char * s) { return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::javaNameSpec() { +const QByteArray & UmlBaseOperation::javaNameSpec() { read_if_needed_(); return _java_name_spec; @@ -418,7 +418,7 @@ bool UmlBaseOperation::set_isPhpFinal(bool y) { return FALSE; } -const Q3CString & UmlBaseOperation::phpDef() { +const QByteArray & UmlBaseOperation::phpDef() { return phpDecl(); } @@ -426,7 +426,7 @@ bool UmlBaseOperation::set_PhpDef(const char * s) { return set_PhpDecl(s); } -Q3CString UmlBaseOperation::phpBody() { +QByteArray UmlBaseOperation::phpBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, phpBodyCmd); return UmlCom::read_string(); @@ -438,7 +438,7 @@ bool UmlBaseOperation::set_PhpBody(const char * s) { return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::phpNameSpec() { +const QByteArray & UmlBaseOperation::phpNameSpec() { read_if_needed_(); return _php_name_spec; @@ -484,7 +484,7 @@ bool UmlBaseOperation::set_PhpContextualBodyIndent(bool v) { #endif #ifdef WITHPYTHON -const Q3CString & UmlBaseOperation::pythonDef() { +const QByteArray & UmlBaseOperation::pythonDef() { return pythonDecl(); } @@ -492,7 +492,7 @@ bool UmlBaseOperation::set_PythonDef(const char * s) { return set_PythonDecl(s); } -Q3CString UmlBaseOperation::pythonBody() { +QByteArray UmlBaseOperation::pythonBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, pythonBodyCmd); return UmlCom::read_string(); @@ -504,7 +504,7 @@ bool UmlBaseOperation::set_PythonBody(const char * s) { return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::pythonNameSpec() { +const QByteArray & UmlBaseOperation::pythonNameSpec() { read_if_needed_(); return _python_name_spec; @@ -550,7 +550,7 @@ bool UmlBaseOperation::set_PythonContextualBodyIndent(bool v) { #endif #ifdef WITHPYTHON -const Q3CString & UmlBaseOperation::pythonDecorators() { +const QByteArray & UmlBaseOperation::pythonDecorators() { read_if_needed_(); return _python_decorators; } @@ -578,7 +578,7 @@ bool UmlBaseOperation::set_isIdlOneway(bool y) { return FALSE; } -const Q3CString & UmlBaseOperation::idlNameSpec() { +const QByteArray & UmlBaseOperation::idlNameSpec() { read_if_needed_(); return _idl_name_spec; diff --git a/genplugouts/CppUtilities/UmlBaseOperation.h b/genplugouts/CppUtilities/UmlBaseOperation.h index 5205a3dd7..8725071dd 100644 --- a/genplugouts/CppUtilities/UmlBaseOperation.h +++ b/genplugouts/CppUtilities/UmlBaseOperation.h @@ -5,9 +5,9 @@ #include "UmlClassMember.h" #include "anItemKind.h" #include "UmlTypeSpec.h" -#include -#include -#include +#include + + #include "UmlParameter.h" class UmlOperation; @@ -53,7 +53,7 @@ class UmlBaseOperation : public UmlClassMember { bool set_ReturnType(const UmlTypeSpec & t); // returns (in java a copy of) the parameters list - const Q3ValueList params(); + const QList params(); // adds a parameter at the given rank (0...) // @@ -71,7 +71,7 @@ class UmlBaseOperation : public UmlClassMember { bool replaceParameter(unsigned rank, const UmlParameter & p); // returns the exceptions - const Q3ValueList exceptions(); + const QList exceptions(); // adds the exception at the given rank (0...) // @@ -89,7 +89,7 @@ class UmlBaseOperation : public UmlClassMember { bool replaceException(unsigned rank, const UmlTypeSpec & t); // return the behaviors (state and activities) implementing the operation - const Q3PtrVector methods() const; + const QVector methods() const; // in case the operation is a 'get' operation, returns the associated // attribute or relation @@ -134,7 +134,7 @@ class UmlBaseOperation : public UmlClassMember { // returns the operation's definition in C++, notes that the declaration // is returned by the inherited ClassItemBase::CppDecl() operation - const Q3CString & cppDef(); + const QByteArray & cppDef(); // sets the operation's definition in C++, notes that the declaration // is set through the inherited ClassItemBase::set_CppDecl() operation @@ -143,9 +143,9 @@ class UmlBaseOperation : public UmlClassMember { bool set_CppDef(const char * s); // returns the operation's body in C++, useless if the def does not - // contains ${body}. Note that the body is get each time from BOUML + // contains ${body}. Note that the body is get each time from DOUML // for memory size reason - Q3CString cppBody(); + QByteArray cppBody(); // sets the operation's body in C++, useless if the def does not // contains ${body} @@ -155,7 +155,7 @@ class UmlBaseOperation : public UmlClassMember { // in case the operation is a 'get' or 'set' operation, returns how // the operation's C++ name must be generated - const Q3CString & cppNameSpec(); + const QByteArray & cppNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's C++ name must be generated @@ -203,7 +203,7 @@ class UmlBaseOperation : public UmlClassMember { // returns the operation's definition in Java, notes that it is // already made by the inherited JavaDecl operation - const Q3CString & javaDef(); + const QByteArray & javaDef(); // sets the operation's definition in Java, notes that it is // already made by the inherited set_JavaDecl operation @@ -212,9 +212,9 @@ class UmlBaseOperation : public UmlClassMember { bool set_JavaDef(const char * s); // returns the operation's body in Java++, useless if the def does - // not contains ${body} Note that the body is get each time from BOUML + // not contains ${body} Note that the body is get each time from DOUML // for memory size reason - Q3CString javaBody(); + QByteArray javaBody(); // sets the operation's body in Java, useless if the def does not // contains ${body} @@ -224,7 +224,7 @@ class UmlBaseOperation : public UmlClassMember { // in case the operation is a 'get' or 'set' operation, returns how // the operation's JAVA name must be generated - const Q3CString & javaNameSpec(); + const QByteArray & javaNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's JAVA name must be generated @@ -264,7 +264,7 @@ class UmlBaseOperation : public UmlClassMember { // returns the operation's definition in Php, notes that it is // already made by the inherited PhpDecl operation - const Q3CString & phpDef(); + const QByteArray & phpDef(); // sets the operation's definition in Php, notes that it is // already made by the inherited set_PhpDecl operation @@ -273,9 +273,9 @@ class UmlBaseOperation : public UmlClassMember { bool set_PhpDef(const char * s); // returns the operation's body in Php++, useless if the def does - // not contains ${body} Note that the body is get each time from BOUML + // not contains ${body} Note that the body is get each time from DOUML // for memory size reason - Q3CString phpBody(); + QByteArray phpBody(); // sets the operation's body in Php, useless if the def does not // contains ${body} @@ -285,7 +285,7 @@ class UmlBaseOperation : public UmlClassMember { // in case the operation is a 'get' or 'set' operation, returns how // the operation's PHP name must be generated - const Q3CString & phpNameSpec(); + const QByteArray & phpNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's PHP name must be generated @@ -317,7 +317,7 @@ class UmlBaseOperation : public UmlClassMember { #ifdef WITHPYTHON // returns the operation's definition in Python, notes that it is // already made by the inherited PythonDecl operation - const Q3CString & pythonDef(); + const QByteArray & pythonDef(); // sets the operation's definition in Python, notes that it is // already made by the inherited set_PythonDecl operation @@ -326,9 +326,9 @@ class UmlBaseOperation : public UmlClassMember { bool set_PythonDef(const char * s); // returns the operation's body in Python++, useless if the def does - // not contains ${body} Note that the body is get each time from BOUML + // not contains ${body} Note that the body is get each time from DOUML // for memory size reason - Q3CString pythonBody(); + QByteArray pythonBody(); // sets the operation's body in Python, useless if the def does not // contains ${body} @@ -338,7 +338,7 @@ class UmlBaseOperation : public UmlClassMember { // in case the operation is a 'get' or 'set' operation, returns how // the operation's PYTHON name must be generated - const Q3CString & pythonNameSpec(); + const QByteArray & pythonNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's PYTHON name must be generated @@ -369,7 +369,7 @@ class UmlBaseOperation : public UmlClassMember { #ifdef WITHPYTHON // return the decorators - const Q3CString & pythonDecorators(); + const QByteArray & pythonDecorators(); // set the decorators // @@ -388,7 +388,7 @@ class UmlBaseOperation : public UmlClassMember { // in case the operation is a 'get' or 'set' operation, returns how // the operation's IDL name must be generated - const Q3CString & idlNameSpec(); + const QByteArray & idlNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's IDL name must be generated @@ -483,32 +483,32 @@ class UmlBaseOperation : public UmlClassMember { UmlTypeSpec _return_type; - Q3ValueList _params; + QList _params; - Q3ValueList _exceptions; + QList _exceptions; #ifdef WITHCPP - Q3CString _cpp_def; + QByteArray _cpp_def; - Q3CString _cpp_name_spec; + QByteArray _cpp_name_spec; #endif #ifdef WITHJAVA - Q3CString _java_name_spec; + QByteArray _java_name_spec; #endif #ifdef WITHPHP - Q3CString _php_name_spec; + QByteArray _php_name_spec; #endif #ifdef WITHPYTHON - Q3CString _python_name_spec; + QByteArray _python_name_spec; - Q3CString _python_decorators; + QByteArray _python_decorators; #endif #ifdef WITHIDL - Q3CString _idl_name_spec; + QByteArray _idl_name_spec; #endif // exclusive with set_of @@ -520,7 +520,7 @@ class UmlBaseOperation : public UmlClassMember { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOperation(void * id, const Q3CString & n); + UmlBaseOperation(void * id, const QByteArray & n); //internal, do NOT use it @@ -558,7 +558,7 @@ class UmlBaseOperation : public UmlClassMember { }; -inline UmlBaseOperation::UmlBaseOperation(void * id, const Q3CString & n) : UmlClassMember(id, n) { +inline UmlBaseOperation::UmlBaseOperation(void * id, const QByteArray & n) : UmlClassMember(id, n) { _get_of = 0; _set_of = 0; } diff --git a/genplugouts/CppUtilities/UmlBasePackage.cpp b/genplugouts/CppUtilities/UmlBasePackage.cpp index daf35a61d..38dcaa7b9 100644 --- a/genplugouts/CppUtilities/UmlBasePackage.cpp +++ b/genplugouts/CppUtilities/UmlBasePackage.cpp @@ -6,7 +6,7 @@ #include "UmlCom.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include +#include UmlPackage * UmlBasePackage::create(UmlPackage * parent, const char * name) { return (UmlPackage *) parent->create_(aPackage, name); @@ -36,50 +36,50 @@ bool UmlBasePackage::set_AssociatedDiagram(UmlDiagram * d) return FALSE; } -UmlPackage * UmlBasePackage::importProject(const Q3CString & fn) +UmlPackage * UmlBasePackage::importProject(const QByteArray & fn) { UmlCom::send_cmd(_identifier, importProjectCmd, (const char *)fn); //[rageek] Fix prototype return (UmlPackage *) UmlBaseItem::read_(); } #ifdef WITHCPP -const Q3CString & UmlBasePackage::cppSrcDir() +const QByteArray & UmlBasePackage::cppSrcDir() { read_if_needed_(); return _cpp_src_dir; } -bool UmlBasePackage::set_CppSrcDir(const Q3CString & s) +bool UmlBasePackage::set_CppSrcDir(const QByteArray & s) { return set_it_(_cpp_src_dir, s, setCppSrcDirCmd); } -const Q3CString & UmlBasePackage::cppHDir() +const QByteArray & UmlBasePackage::cppHDir() { read_if_needed_(); return _cpp_h_dir; } -bool UmlBasePackage::set_CppHDir(const Q3CString & s) +bool UmlBasePackage::set_CppHDir(const QByteArray & s) { return set_it_(_cpp_h_dir, s, setCppHDirCmd); } -Q3CString UmlBasePackage::cppNamespace() +QByteArray UmlBasePackage::cppNamespace() { read_if_needed_(); return _cpp_namespace; } -bool UmlBasePackage::set_CppNamespace(const Q3CString & s) +bool UmlBasePackage::set_CppNamespace(const QByteArray & s) { return set_it_(_cpp_namespace, s, setCppNamespaceCmd); } -UmlPackage * UmlBasePackage::findCppNamespace(const Q3CString & n) const +UmlPackage * UmlBasePackage::findCppNamespace(const QByteArray & n) const { UmlCom::send_cmd(packageGlobalCmd, findCppNamespaceCmd, _identifier, n); @@ -88,31 +88,31 @@ UmlPackage * UmlBasePackage::findCppNamespace(const Q3CString & n) const #endif #ifdef WITHJAVA -const Q3CString & UmlBasePackage::javaDir() +const QByteArray & UmlBasePackage::javaDir() { read_if_needed_(); return _java_dir; } -bool UmlBasePackage::set_JavaDir(const Q3CString & s) +bool UmlBasePackage::set_JavaDir(const QByteArray & s) { return set_it_(_java_dir, s, setJavaDirCmd); } -Q3CString UmlBasePackage::javaPackage() +QByteArray UmlBasePackage::javaPackage() { read_if_needed_(); return _java_package; } -bool UmlBasePackage::set_JavaPackage(const Q3CString & s) +bool UmlBasePackage::set_JavaPackage(const QByteArray & s) { return set_it_(_java_package, s, setJavaPackageCmd); } -UmlPackage * UmlBasePackage::findJavaPackage(const Q3CString & n) const +UmlPackage * UmlBasePackage::findJavaPackage(const QByteArray & n) const { UmlCom::send_cmd(packageGlobalCmd, findJavaPackageCmd, _identifier, n); @@ -121,45 +121,45 @@ UmlPackage * UmlBasePackage::findJavaPackage(const Q3CString & n) const #endif #ifdef WITHPHP -const Q3CString & UmlBasePackage::phpDir() +const QByteArray & UmlBasePackage::phpDir() { read_if_needed_(); return _php_dir; } -bool UmlBasePackage::set_PhpDir(const Q3CString & s) +bool UmlBasePackage::set_PhpDir(const QByteArray & s) { return set_it_(_php_dir, s, setPhpDirCmd); } #endif #ifdef WITHPYTHON -const Q3CString & UmlBasePackage::pythonDir() +const QByteArray & UmlBasePackage::pythonDir() { read_if_needed_(); return _python_dir; } -bool UmlBasePackage::set_PythonDir(const Q3CString & s) +bool UmlBasePackage::set_PythonDir(const QByteArray & s) { return set_it_(_python_dir, s, setPythonDirCmd); } -Q3CString UmlBasePackage::pythonPackage() +QByteArray UmlBasePackage::pythonPackage() { read_if_needed_(); return _python_package; } -bool UmlBasePackage::set_PythonPackage(const Q3CString & s) +bool UmlBasePackage::set_PythonPackage(const QByteArray & s) { return set_it_(_python_package, s, setPythonPackageCmd); } -UmlPackage * UmlBasePackage::findPythonPackage(const Q3CString & n) const +UmlPackage * UmlBasePackage::findPythonPackage(const QByteArray & n) const { UmlCom::send_cmd(packageGlobalCmd, findPythonPackageCmd, _identifier, n); @@ -168,31 +168,31 @@ UmlPackage * UmlBasePackage::findPythonPackage(const Q3CString & n) const #endif #ifdef WITHIDL -const Q3CString & UmlBasePackage::idlDir() +const QByteArray & UmlBasePackage::idlDir() { read_if_needed_(); return _idl_dir; } -bool UmlBasePackage::set_IdlDir(const Q3CString & s) +bool UmlBasePackage::set_IdlDir(const QByteArray & s) { return set_it_(_idl_dir, s, setIdlDirCmd); } -Q3CString UmlBasePackage::idlModule() +QByteArray UmlBasePackage::idlModule() { read_if_needed_(); return _idl_module; } -bool UmlBasePackage::set_IdlModule(const Q3CString & s) +bool UmlBasePackage::set_IdlModule(const QByteArray & s) { return set_it_(_idl_module, s, setIdlModuleCmd); } -UmlPackage * UmlBasePackage::findIdlModule(const Q3CString & n) const +UmlPackage * UmlBasePackage::findIdlModule(const QByteArray & n) const { UmlCom::send_cmd(packageGlobalCmd, findIdlModuleCmd, _identifier, n); @@ -219,7 +219,7 @@ void UmlBasePackage::saveProject() UmlCom::send_cmd(packageGlobalCmd, saveProjectCmd); } -void UmlBasePackage::loadProject(Q3CString p) +void UmlBasePackage::loadProject(QByteArray p) { UmlCom::send_cmd(miscGlobalCmd, loadCmd, (const char *) p); } diff --git a/genplugouts/CppUtilities/UmlBasePackage.h b/genplugouts/CppUtilities/UmlBasePackage.h index 6bf3b9d1d..49a8de089 100644 --- a/genplugouts/CppUtilities/UmlBasePackage.h +++ b/genplugouts/CppUtilities/UmlBasePackage.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlPackage; class UmlDiagram; @@ -36,130 +36,130 @@ class UmlBasePackage : public UmlItem // or an empty string (the project will be set through a dialog) // Return the new UmlPackage containing the imported project, or // 0/null on error - UmlPackage * importProject(const Q3CString & fn); + UmlPackage * importProject(const QByteArray & fn); #ifdef WITHCPP // returns the path where the C++ source files are generated by the // c++ generator. - const Q3CString & cppSrcDir(); + const QByteArray & cppSrcDir(); // to set the path where the C++ source files are generated by the // C++ generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppSrcDir(const Q3CString & s); + bool set_CppSrcDir(const QByteArray & s); // returns the path where the C++ header files are generated by the // C++ generator. - const Q3CString & cppHDir(); + const QByteArray & cppHDir(); // to set the path where the C++ header files are generated by the // C++ generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppHDir(const Q3CString & s); + bool set_CppHDir(const QByteArray & s); //returns the namespace name associed to the package - Q3CString cppNamespace(); + QByteArray cppNamespace(); //to set the namespace name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppNamespace(const Q3CString & s); + bool set_CppNamespace(const QByteArray & s); // returns a sub package of the current one having the c++ namespace 'n' // (including the current one), else 0/null - UmlPackage * findCppNamespace(const Q3CString & n) const; + UmlPackage * findCppNamespace(const QByteArray & n) const; #endif #ifdef WITHJAVA // returns the path where the JAVA files are generated by the // JAVA generator. - const Q3CString & javaDir(); + const QByteArray & javaDir(); // to set the path where the JAVA files are generated by the // JAVA generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaDir(const Q3CString & s); + bool set_JavaDir(const QByteArray & s); //returns the java package name associed to the package - Q3CString javaPackage(); + QByteArray javaPackage(); // to set the java package name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaPackage(const Q3CString & s); + bool set_JavaPackage(const QByteArray & s); // returns a sub package of the current one having the Java package 'n' // (including the current one), else 0/null - UmlPackage * findJavaPackage(const Q3CString & n) const; + UmlPackage * findJavaPackage(const QByteArray & n) const; #endif #ifdef WITHPHP // returns the path where the PHP files are generated by the // PHP generator. - const Q3CString & phpDir(); + const QByteArray & phpDir(); // to set the path where the PHP files are generated by the // PHP generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PhpDir(const Q3CString & s); + bool set_PhpDir(const QByteArray & s); #endif #ifdef WITHPYTHON // returns the path where the PYTHON files are generated by the // PYTHON generator. - const Q3CString & pythonDir(); + const QByteArray & pythonDir(); // to set the path where the PYTHON files are generated by the // PYTHON generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PythonDir(const Q3CString & s); + bool set_PythonDir(const QByteArray & s); //returns the python package name associed to the package - Q3CString pythonPackage(); + QByteArray pythonPackage(); // to set the python package name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PythonPackage(const Q3CString & s); + bool set_PythonPackage(const QByteArray & s); // returns a sub package of the current one having the Python package 'n' // (including the current one), else 0/null - UmlPackage * findPythonPackage(const Q3CString & n) const; + UmlPackage * findPythonPackage(const QByteArray & n) const; #endif #ifdef WITHIDL // returns the path where the IDL files are generated by the // IDL generator. - const Q3CString & idlDir(); + const QByteArray & idlDir(); // to set the path where the IDL files are generated by the // IDL generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlDir(const Q3CString & s); + bool set_IdlDir(const QByteArray & s); //returns the module name associed to the package - Q3CString idlModule(); + QByteArray idlModule(); // to set the module name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlModule(const Q3CString & s); + bool set_IdlModule(const QByteArray & s); // returns a sub package of the current one having the IDL module 'n' // (including the current one), else 0/null - UmlPackage * findIdlModule(const Q3CString & n) const; + UmlPackage * findIdlModule(const QByteArray & n) const; #endif // Returns the project @@ -172,12 +172,12 @@ class UmlBasePackage : public UmlItem //save the project if needed static void saveProject(); - //Does nothing in case an edition is on going under BOUML. Else : + //Does nothing in case an edition is on going under DOUML. Else : //close the current project (in case it is not saved the last modifications are lost), //load the specified one, and all the communications with the plug-outs including the //current one are closed. - static void loadProject(Q3CString p); + static void loadProject(QByteArray p); // Force consistency concerning the profiles and their stereotypes @@ -196,35 +196,35 @@ class UmlBasePackage : public UmlItem UmlDiagram * _assoc_diagram; #ifdef WITHCPP - Q3CString _cpp_src_dir; + QByteArray _cpp_src_dir; - Q3CString _cpp_h_dir; + QByteArray _cpp_h_dir; - Q3CString _cpp_namespace; + QByteArray _cpp_namespace; #endif #ifdef WITHJAVA - Q3CString _java_dir; + QByteArray _java_dir; - Q3CString _java_package; + QByteArray _java_package; #endif #ifdef WITHPHP - Q3CString _php_dir; + QByteArray _php_dir; #endif #ifdef WITHPYTHON - Q3CString _python_dir; + QByteArray _python_dir; - Q3CString _python_package; + QByteArray _python_package; #endif #ifdef WITHIDL - Q3CString _idl_dir; + QByteArray _idl_dir; - Q3CString _idl_module; + QByteArray _idl_module; #endif @@ -265,11 +265,11 @@ class UmlBasePackage : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBasePackage(void * id, const Q3CString & n); + UmlBasePackage(void * id, const QByteArray & n); }; -inline UmlBasePackage::UmlBasePackage(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBasePackage::UmlBasePackage(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/CppUtilities/UmlBaseParameter.h b/genplugouts/CppUtilities/UmlBaseParameter.h index 71202a64d..0fdea9d7f 100644 --- a/genplugouts/CppUtilities/UmlBaseParameter.h +++ b/genplugouts/CppUtilities/UmlBaseParameter.h @@ -2,16 +2,16 @@ #define _UMLBASEPARAMETER_H -#include + #include "UmlTypeSpec.h" #include "aDirection.h" // Represent an operation's parameter struct UmlBaseParameter { - Q3CString name; + QByteArray name; - Q3CString default_value; + QByteArray default_value; UmlTypeSpec type; diff --git a/genplugouts/CppUtilities/UmlBaseParameterSet.cpp b/genplugouts/CppUtilities/UmlBaseParameterSet.cpp index a2e4a1756..7eb8a3931 100644 --- a/genplugouts/CppUtilities/UmlBaseParameterSet.cpp +++ b/genplugouts/CppUtilities/UmlBaseParameterSet.cpp @@ -15,15 +15,15 @@ anItemKind UmlBaseParameterSet::kind() return aParameterSet; } -const Q3PtrVector & UmlBaseParameterSet::pins() +const QVector & UmlBaseParameterSet::pins() { read_if_needed_(); return _pins; } -bool UmlBaseParameterSet::set_Pins(const Q3PtrVector & v) +bool UmlBaseParameterSet::set_Pins(const QVector & v) { - UmlCom::send_cmd(_identifier, replaceParameterCmd, (const Q3PtrVector &) v); + UmlCom::send_cmd(_identifier, replaceParameterCmd, (const QVector &) v); if (UmlCom::read_bool()) { // tests != to bypass Qt 2.3 bug @@ -44,6 +44,6 @@ void UmlBaseParameterSet::unload(bool rec, bool del) void UmlBaseParameterSet::read_uml_() { UmlBaseItem::read_uml_(); - UmlCom::read_item_list((Q3PtrVector &) _pins); + UmlCom::read_item_list((QVector &) _pins); } diff --git a/genplugouts/CppUtilities/UmlBaseParameterSet.h b/genplugouts/CppUtilities/UmlBaseParameterSet.h index 71e77cbfe..866cb7d23 100644 --- a/genplugouts/CppUtilities/UmlBaseParameterSet.h +++ b/genplugouts/CppUtilities/UmlBaseParameterSet.h @@ -1,11 +1,8 @@ #ifndef _UMLBASEPARAMETERSET_H #define _UMLBASEPARAMETERSET_H - - +#include #include "UmlItem.h" #include "anItemKind.h" -#include -#include class UmlActivityParameter; class UmlActivityAction; @@ -27,16 +24,16 @@ class UmlBaseParameterSet : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseParameterSet(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseParameterSet(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the pins part of the parameter set - const Q3PtrVector & pins(); + const QVector & pins(); // set the pins - bool set_Pins(const Q3PtrVector & v); + bool set_Pins(const QVector & v); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -48,7 +45,7 @@ class UmlBaseParameterSet : public UmlItem private: - Q3PtrVector _pins; + QVector _pins; protected: diff --git a/genplugouts/CppUtilities/UmlBasePinParameter.h b/genplugouts/CppUtilities/UmlBasePinParameter.h index a68b5c5eb..201f520a7 100644 --- a/genplugouts/CppUtilities/UmlBasePinParameter.h +++ b/genplugouts/CppUtilities/UmlBasePinParameter.h @@ -3,7 +3,7 @@ #include "UmlActivityObject.h" -#include + #include "aDirection.h" #include "aParameterEffectKind.h" @@ -11,7 +11,7 @@ class UmlBasePinParameter : public UmlActivityObject { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBasePinParameter(void * id, const Q3CString & s) : UmlActivityObject(id, s) { + UmlBasePinParameter(void * id, const QByteArray & s) : UmlActivityObject(id, s) { } diff --git a/genplugouts/CppUtilities/UmlBaseRegion.h b/genplugouts/CppUtilities/UmlBaseRegion.h index 58a9f8b78..efd32acb9 100644 --- a/genplugouts/CppUtilities/UmlBaseRegion.h +++ b/genplugouts/CppUtilities/UmlBaseRegion.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlRegion; class UmlState; @@ -25,7 +25,7 @@ class UmlBaseRegion : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRegion(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseRegion(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseRelation.cpp b/genplugouts/CppUtilities/UmlBaseRelation.cpp index 3c141d439..860b61402 100644 --- a/genplugouts/CppUtilities/UmlBaseRelation.cpp +++ b/genplugouts/CppUtilities/UmlBaseRelation.cpp @@ -7,7 +7,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlRelation * UmlBaseRelation::create(aRelationKind kind, UmlClass * start, UmlClass * end) { UmlCom::send_cmd(start->_identifier, createCmd, aRelation, @@ -139,7 +139,7 @@ bool UmlBaseRelation::set_isUnique(bool v) return FALSE; } -const Q3CString & UmlBaseRelation::defaultValue() +const QByteArray & UmlBaseRelation::defaultValue() { read_if_needed_(); @@ -151,7 +151,7 @@ bool UmlBaseRelation::set_DefaultValue(const char * s) return set_it_(_default_value, s, setDefaultValueCmd); } -bool UmlBaseRelation::set_Stereotype(const Q3CString & s) +bool UmlBaseRelation::set_Stereotype(const QByteArray & s) { if (UmlBaseItem::set_Stereotype(s)) { UmlBaseRelation * other = (UmlBaseRelation *) UmlBaseItem::read_(); @@ -193,7 +193,7 @@ bool UmlBaseRelation::set_Association(const UmlTypeSpec & t) return FALSE; } -const Q3CString & UmlBaseRelation::roleName() +const QByteArray & UmlBaseRelation::roleName() { read_if_needed_(); @@ -205,7 +205,7 @@ bool UmlBaseRelation::set_RoleName(const char * s) return set_it_(_role_name, s, setRoleNameCmd); } -const Q3CString & UmlBaseRelation::multiplicity() +const QByteArray & UmlBaseRelation::multiplicity() { read_if_needed_(); @@ -337,7 +337,7 @@ bool UmlBaseRelation::set_isIdlTruncatableInheritance(bool y) return FALSE; } -Q3CString UmlBaseRelation::idlCase() +QByteArray UmlBaseRelation::idlCase() { read_if_needed_(); diff --git a/genplugouts/CppUtilities/UmlBaseRelation.h b/genplugouts/CppUtilities/UmlBaseRelation.h index 536a4eee9..ed2d12172 100644 --- a/genplugouts/CppUtilities/UmlBaseRelation.h +++ b/genplugouts/CppUtilities/UmlBaseRelation.h @@ -5,7 +5,7 @@ #include "UmlClassMember.h" #include "aRelationKind.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" class UmlRelation; @@ -71,7 +71,7 @@ class UmlBaseRelation : public UmlClassMember bool set_isUnique(bool v); // returns the default relation value, may be an empty string - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // to set the default relation value ("" allowed) // @@ -83,7 +83,7 @@ class UmlBaseRelation : public UmlClassMember // On error return FALSE in C++, produce a RuntimeException in Java // redefined in case the relation is bidirectional to set the stereotype // of the relation corresponding to the other direction - virtual bool set_Stereotype(const Q3CString & s); + virtual bool set_Stereotype(const QByteArray & s); // returns the 'end' class (the 'start' class is the parent of the relation) no set ! UmlClass * roleType(); @@ -97,7 +97,7 @@ class UmlBaseRelation : public UmlClassMember bool set_Association(const UmlTypeSpec & t); // returns the name of the role - const Q3CString & roleName(); + const QByteArray & roleName(); // to set the name of the role // @@ -105,7 +105,7 @@ class UmlBaseRelation : public UmlClassMember bool set_RoleName(const char * s); // returns the multiplicity (may be an empty string) - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // to set the multiplicity // @@ -168,7 +168,7 @@ class UmlBaseRelation : public UmlClassMember // in case the relation is an IDL union's member returns the // corresponding 'case', an empty string in case it is not specified - Q3CString idlCase(); + QByteArray idlCase(); // to set the 'case' even the relation is not (already) known as // an IDL union's member @@ -215,13 +215,13 @@ class UmlBaseRelation : public UmlClassMember bool _idl_truncatable : 1; #endif - Q3CString _default_value; + QByteArray _default_value; UmlClass * _role_type; - Q3CString _role_name; + QByteArray _role_name; - Q3CString _multiplicity; + QByteArray _multiplicity; UmlTypeSpec _association; @@ -233,7 +233,7 @@ class UmlBaseRelation : public UmlClassMember UmlAttribute * _idl_case; #ifdef WITHIDL - Q3CString _idl_explicit_case; + QByteArray _idl_explicit_case; #endif @@ -273,11 +273,11 @@ class UmlBaseRelation : public UmlClassMember #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRelation(void * id, const Q3CString & n); + UmlBaseRelation(void * id, const QByteArray & n); }; -inline UmlBaseRelation::UmlBaseRelation(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseRelation::UmlBaseRelation(void * id, const QByteArray & n) : UmlClassMember(id, n) { _role_type = 0; _get_oper = 0; diff --git a/genplugouts/CppUtilities/UmlBaseSequenceDiagram.h b/genplugouts/CppUtilities/UmlBaseSequenceDiagram.h index 345c08b13..5f33ab882 100644 --- a/genplugouts/CppUtilities/UmlBaseSequenceDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseSequenceDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlSequenceDiagram; class UmlItem; @@ -27,7 +27,7 @@ class UmlBaseSequenceDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSequenceDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n), _def(0) {}; + UmlBaseSequenceDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n), _def(0) {}; public: diff --git a/genplugouts/CppUtilities/UmlBaseSequenceDiagramDefinition.cpp b/genplugouts/CppUtilities/UmlBaseSequenceDiagramDefinition.cpp index eb3b1751b..975bbd0c3 100644 --- a/genplugouts/CppUtilities/UmlBaseSequenceDiagramDefinition.cpp +++ b/genplugouts/CppUtilities/UmlBaseSequenceDiagramDefinition.cpp @@ -2,7 +2,7 @@ #include "UmlCom.h" #include "UmlBaseSequenceDiagramDefinition.h" //Added by qt3to4: -#include +#include static void qsort(UmlSequenceMessage ** v, int low, int high) { @@ -40,7 +40,7 @@ static void qsort(UmlSequenceMessage ** v, int low, int high) } void UmlBaseSequenceDiagramDefinition::read_() { - Q3PtrDict instances; + QHash instances; unsigned n; unsigned rank; @@ -54,7 +54,7 @@ void UmlBaseSequenceDiagramDefinition::read_() f->read_(); } - _fragments.setAutoDelete(TRUE); + //_fragments.setAutoDelete(TRUE); UmlBaseFragment::compute_container_(_fragments); n = UmlCom::read_unsigned(); @@ -64,11 +64,11 @@ void UmlBaseSequenceDiagramDefinition::read_() UmlClassInstanceReference * i = new UmlClassInstanceReference(); _instances.insert(rank, i); - instances.insert((void *) UmlCom::read_unsigned(), i); + instances.insert(reinterpret_cast(uintptr_t(UmlCom::read_unsigned())), i); i->read_(); } - _instances.setAutoDelete(TRUE); + //_instances.setAutoDelete(TRUE); n = UmlCom::read_unsigned(); _messages.resize(n); @@ -82,7 +82,7 @@ void UmlBaseSequenceDiagramDefinition::read_() } ::qsort(_messages.data(), 0, n - 1); - _messages.setAutoDelete(TRUE); + //_messages.setAutoDelete(TRUE); } n = _fragments.count(); @@ -92,7 +92,7 @@ void UmlBaseSequenceDiagramDefinition::read_() while (UmlCom::read_bool()) { - Q3CString s = UmlCom::read_string(); + QByteArray s = UmlCom::read_string(); int x = (int) UmlCom::read_unsigned(); int y = (int) UmlCom::read_unsigned(); int w = (int) UmlCom::read_unsigned(); @@ -103,7 +103,7 @@ void UmlBaseSequenceDiagramDefinition::read_() } while (UmlCom::read_bool()) { - Q3CString s = UmlCom::read_string(); + QByteArray s = UmlCom::read_string(); int x = (int) UmlCom::read_unsigned(); int y = (int) UmlCom::read_unsigned(); int w = (int) UmlCom::read_unsigned(); diff --git a/genplugouts/CppUtilities/UmlBaseSequenceDiagramDefinition.h b/genplugouts/CppUtilities/UmlBaseSequenceDiagramDefinition.h index 6be419e66..f80c8b3f6 100644 --- a/genplugouts/CppUtilities/UmlBaseSequenceDiagramDefinition.h +++ b/genplugouts/CppUtilities/UmlBaseSequenceDiagramDefinition.h @@ -8,7 +8,7 @@ #include "UmlClassInstanceReference.h" #include "UmlSequenceMessage.h" -#include + class UmlClassInstanceReference; class UmlSequenceMessage; @@ -19,28 +19,28 @@ class UmlBaseSequenceDiagramDefinition { public: // return the instances present in the diagram - const Q3PtrVector & instances() const { + const QVector & instances() const { return _instances; } // return the messages present in the diagram, // ordonned following the sending time - const Q3PtrVector & messages() const { + const QVector & messages() const { return _messages; } // return the fragments present in the diagram - const Q3PtrVector & fragments() const { + const QVector & fragments() const { return _fragments; } private: - Q3PtrVector _instances; + QVector _instances; - Q3PtrVector _messages; + QVector _messages; - Q3PtrVector _fragments; + QVector _fragments; // internal, don't call it void read_(); diff --git a/genplugouts/CppUtilities/UmlBaseSequenceMessage.cpp b/genplugouts/CppUtilities/UmlBaseSequenceMessage.cpp index 379ba53a7..6fe9ec8c2 100644 --- a/genplugouts/CppUtilities/UmlBaseSequenceMessage.cpp +++ b/genplugouts/CppUtilities/UmlBaseSequenceMessage.cpp @@ -5,7 +5,7 @@ #include "UmlClassInstanceReference.h" #include "UmlFragment.h" -void UmlBaseSequenceMessage::read_(const Q3PtrDict & instances, const Q3PtrVector & fragments) +void UmlBaseSequenceMessage::read_(const QHash &instances, const QVector &fragments) { UmlBaseMessage::read_(instances); _kind = (aMessageKind) UmlCom::read_char(); diff --git a/genplugouts/CppUtilities/UmlBaseSequenceMessage.h b/genplugouts/CppUtilities/UmlBaseSequenceMessage.h index 4eb0b884d..e53b0a32d 100644 --- a/genplugouts/CppUtilities/UmlBaseSequenceMessage.h +++ b/genplugouts/CppUtilities/UmlBaseSequenceMessage.h @@ -3,9 +3,9 @@ #include "aMessageKind.h" -#include -#include -#include + + + #include "UmlMessage.h" class UmlFragmentCompartment; @@ -37,7 +37,7 @@ class UmlBaseSequenceMessage : public UmlMessage } // return the arguments of the operation, may be empty - const Q3CString & arguments() const { + const QByteArray & arguments() const { return _args; } @@ -53,10 +53,10 @@ class UmlBaseSequenceMessage : public UmlMessage int _received_at; - Q3CString _args; + QByteArray _args; // internal, don't call it - void read_(const Q3PtrDict & instances, const Q3PtrVector & fragments); + void read_(const QHash &instances, const QVector &fragments); friend class UmlBaseSequenceDiagramDefinition; }; diff --git a/genplugouts/CppUtilities/UmlBaseShallowHistoryPseudoState.h b/genplugouts/CppUtilities/UmlBaseShallowHistoryPseudoState.h index 92bf0ce18..cb82c3ec1 100644 --- a/genplugouts/CppUtilities/UmlBaseShallowHistoryPseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseShallowHistoryPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlShallowHistoryPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseShallowHistoryPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseShallowHistoryPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseShallowHistoryPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseState.cpp b/genplugouts/CppUtilities/UmlBaseState.cpp index 5b5f76fce..e8bb5109c 100644 --- a/genplugouts/CppUtilities/UmlBaseState.cpp +++ b/genplugouts/CppUtilities/UmlBaseState.cpp @@ -5,7 +5,7 @@ #include "UmlOperation.h" #include "UmlStateDiagram.h" //Added by qt3to4: -#include +#include UmlState * UmlBaseState::create(UmlItem * parent, const char * s) { @@ -17,7 +17,7 @@ anItemKind UmlBaseState::kind() return aState; } -const Q3CString & UmlBaseState::entryBehavior() +const QByteArray & UmlBaseState::entryBehavior() { read_if_needed_(); return _uml.on_entry; @@ -28,7 +28,7 @@ bool UmlBaseState::set_EntryBehavior(const char * s) return set_it_(_uml.on_entry, s, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseState::exitBehavior() +const QByteArray & UmlBaseState::exitBehavior() { read_if_needed_(); return _uml.on_exit; @@ -39,7 +39,7 @@ bool UmlBaseState::set_ExitBehavior(const char * s) return set_it_(_uml.on_exit, s, setUmlExitBehaviorCmd); } -const Q3CString & UmlBaseState::doActivity() +const QByteArray & UmlBaseState::doActivity() { read_if_needed_(); return _uml.do_activity; @@ -51,7 +51,7 @@ bool UmlBaseState::set_DoActivity(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseState::cppEntryBehavior() +const QByteArray & UmlBaseState::cppEntryBehavior() { read_if_needed_(); return _cpp.on_entry; @@ -62,7 +62,7 @@ bool UmlBaseState::set_CppEntryBehavior(const char * s) return set_it_(_cpp.on_entry, s, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseState::cppExitBehavior() +const QByteArray & UmlBaseState::cppExitBehavior() { read_if_needed_(); return _cpp.on_exit; @@ -73,7 +73,7 @@ bool UmlBaseState::set_CppExitBehavior(const char * s) return set_it_(_cpp.on_exit, s, setCppExitBehaviorCmd); } -const Q3CString & UmlBaseState::cppDoActivity() +const QByteArray & UmlBaseState::cppDoActivity() { read_if_needed_(); return _cpp.do_activity; @@ -86,7 +86,7 @@ bool UmlBaseState::set_CppDoActivity(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseState::javaEntryBehavior() +const QByteArray & UmlBaseState::javaEntryBehavior() { read_if_needed_(); return _java.on_entry; @@ -97,7 +97,7 @@ bool UmlBaseState::set_JavaEntryBehavior(const char * s) return set_it_(_java.on_entry, s, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseState::javaExitBehavior() +const QByteArray & UmlBaseState::javaExitBehavior() { read_if_needed_(); return _java.on_exit; @@ -108,7 +108,7 @@ bool UmlBaseState::set_JavaExitBehavior(const char * s) return set_it_(_java.on_exit, s, setJavaExitBehaviorCmd); } -const Q3CString & UmlBaseState::javaDoActivity() +const QByteArray & UmlBaseState::javaDoActivity() { read_if_needed_(); return _java.do_activity; diff --git a/genplugouts/CppUtilities/UmlBaseState.h b/genplugouts/CppUtilities/UmlBaseState.h index 72915ba74..615306ec9 100644 --- a/genplugouts/CppUtilities/UmlBaseState.h +++ b/genplugouts/CppUtilities/UmlBaseState.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "StateBehavior.h" class UmlState; @@ -27,13 +27,13 @@ class UmlBaseState : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseState(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseState(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the entry behavior in OCL - const Q3CString & entryBehavior(); + const QByteArray & entryBehavior(); // set the entry behavior in OCL // @@ -41,7 +41,7 @@ class UmlBaseState : public UmlItem bool set_EntryBehavior(const char * s); // return the exit behavior in OCL - const Q3CString & exitBehavior(); + const QByteArray & exitBehavior(); // set the exit behavior in OCL // @@ -49,7 +49,7 @@ class UmlBaseState : public UmlItem bool set_ExitBehavior(const char * s); // return the activity in OCL - const Q3CString & doActivity(); + const QByteArray & doActivity(); // set the activity in OCL // @@ -58,7 +58,7 @@ class UmlBaseState : public UmlItem #ifdef WITHCPP // return the entry behavior in C++ - const Q3CString & cppEntryBehavior(); + const QByteArray & cppEntryBehavior(); // set the entry behavior in C++ // @@ -66,7 +66,7 @@ class UmlBaseState : public UmlItem bool set_CppEntryBehavior(const char * s); // return the exit behavior in C++ - const Q3CString & cppExitBehavior(); + const QByteArray & cppExitBehavior(); // set the exit behavior in C++ // @@ -74,7 +74,7 @@ class UmlBaseState : public UmlItem bool set_CppExitBehavior(const char * s); // return the activity in C++ - const Q3CString & cppDoActivity(); + const QByteArray & cppDoActivity(); // set the activity in C++ // @@ -84,7 +84,7 @@ class UmlBaseState : public UmlItem #ifdef WITHJAVA // return the entry behavior in Java - const Q3CString & javaEntryBehavior(); + const QByteArray & javaEntryBehavior(); // set the entry behavior in Java // @@ -92,7 +92,7 @@ class UmlBaseState : public UmlItem bool set_JavaEntryBehavior(const char * s); // return the exit behavior in Java - const Q3CString & javaExitBehavior(); + const QByteArray & javaExitBehavior(); // set the exit behavior in Java // @@ -100,7 +100,7 @@ class UmlBaseState : public UmlItem bool set_JavaExitBehavior(const char * s); // return the activity in Java - const Q3CString & javaDoActivity(); + const QByteArray & javaDoActivity(); // set the activity in Java // diff --git a/genplugouts/CppUtilities/UmlBaseStateAction.cpp b/genplugouts/CppUtilities/UmlBaseStateAction.cpp index 32063a1ac..ddae8212d 100644 --- a/genplugouts/CppUtilities/UmlBaseStateAction.cpp +++ b/genplugouts/CppUtilities/UmlBaseStateAction.cpp @@ -3,7 +3,7 @@ #include "UmlBaseStateAction.h" #include "UmlStateAction.h" //Added by qt3to4: -#include +#include UmlStateAction * UmlBaseStateAction::create(UmlItem * parent) { @@ -15,7 +15,7 @@ anItemKind UmlBaseStateAction::kind() return aStateAction; } -const Q3CString & UmlBaseStateAction::expression() +const QByteArray & UmlBaseStateAction::expression() { read_if_needed_(); return _uml; @@ -27,7 +27,7 @@ bool UmlBaseStateAction::set_Expression(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseStateAction::cppExpression() +const QByteArray & UmlBaseStateAction::cppExpression() { read_if_needed_(); return _cpp; @@ -40,7 +40,7 @@ bool UmlBaseStateAction::set_CppExpression(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseStateAction::javaExpression() +const QByteArray & UmlBaseStateAction::javaExpression() { read_if_needed_(); return _java; diff --git a/genplugouts/CppUtilities/UmlBaseStateAction.h b/genplugouts/CppUtilities/UmlBaseStateAction.h index 058903e1f..0ddee639e 100644 --- a/genplugouts/CppUtilities/UmlBaseStateAction.h +++ b/genplugouts/CppUtilities/UmlBaseStateAction.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlStateAction; @@ -24,13 +24,13 @@ class UmlBaseStateAction : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseStateAction(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseStateAction(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the expression in OCL - const Q3CString & expression(); + const QByteArray & expression(); // set the expression in OCL // @@ -39,7 +39,7 @@ class UmlBaseStateAction : public UmlItem #ifdef WITHCPP // return the expression in C++ - const Q3CString & cppExpression(); + const QByteArray & cppExpression(); // set the expression in C++ // @@ -49,7 +49,7 @@ class UmlBaseStateAction : public UmlItem #ifdef WITHJAVA // return the expression in Java - const Q3CString & javaExpression(); + const QByteArray & javaExpression(); // set the expression in Java // @@ -67,14 +67,14 @@ class UmlBaseStateAction : public UmlItem private: - Q3CString _uml; + QByteArray _uml; #ifdef WITHCPP - Q3CString _cpp; + QByteArray _cpp; #endif #ifdef WITHJAVA - Q3CString _java; + QByteArray _java; #endif diff --git a/genplugouts/CppUtilities/UmlBaseStateDiagram.h b/genplugouts/CppUtilities/UmlBaseStateDiagram.h index ea7e37ee0..d3c5bd101 100644 --- a/genplugouts/CppUtilities/UmlBaseStateDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseStateDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlStateDiagram; class UmlState; @@ -25,7 +25,7 @@ class UmlBaseStateDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseStateDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseStateDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseSubject.cpp b/genplugouts/CppUtilities/UmlBaseSubject.cpp index b15d380d3..3c6453182 100644 --- a/genplugouts/CppUtilities/UmlBaseSubject.cpp +++ b/genplugouts/CppUtilities/UmlBaseSubject.cpp @@ -12,7 +12,7 @@ void UmlBaseSubject::read_() _h = (int) UmlCom::read_unsigned(); } -UmlSubject * UmlBaseSubject::get_container_(int x, int y, int w, int h, const Q3PtrVector & subjects) +UmlSubject * UmlBaseSubject::get_container_(int x, int y, int w, int h, const QVector &subjects) { int rank = subjects.count(); diff --git a/genplugouts/CppUtilities/UmlBaseSubject.h b/genplugouts/CppUtilities/UmlBaseSubject.h index da0098ff6..9e1359732 100644 --- a/genplugouts/CppUtilities/UmlBaseSubject.h +++ b/genplugouts/CppUtilities/UmlBaseSubject.h @@ -1,10 +1,7 @@ #ifndef _UMLBASESUBJECT_H #define _UMLBASESUBJECT_H - - -#include -#include - +#include +#include class UmlSubject; // this class manages subjects @@ -12,13 +9,13 @@ class UmlBaseSubject { public: // return the name - const Q3CString & name() const { + const QByteArray & name() const { return _name; } private: - Q3CString _name; + QByteArray _name; int _x; @@ -34,7 +31,7 @@ class UmlBaseSubject public: // internal - static UmlSubject * get_container_(int x, int y, int w, int h, const Q3PtrVector & subjects); + static UmlSubject * get_container_(int x, int y, int w, int h, const QVector &subjects); friend class UmlBaseUseCaseDiagramDefinition; }; diff --git a/genplugouts/CppUtilities/UmlBaseTerminatePseudoState.h b/genplugouts/CppUtilities/UmlBaseTerminatePseudoState.h index e8553f4be..5328f4055 100644 --- a/genplugouts/CppUtilities/UmlBaseTerminatePseudoState.h +++ b/genplugouts/CppUtilities/UmlBaseTerminatePseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlTerminatePseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseTerminatePseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseTerminatePseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseTerminatePseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBaseTransition.cpp b/genplugouts/CppUtilities/UmlBaseTransition.cpp index 8fe2570a0..7dec536d7 100644 --- a/genplugouts/CppUtilities/UmlBaseTransition.cpp +++ b/genplugouts/CppUtilities/UmlBaseTransition.cpp @@ -3,7 +3,7 @@ #include "UmlBaseTransition.h" #include "UmlTransition.h" //Added by qt3to4: -#include +#include anItemKind UmlBaseTransition::kind() { @@ -39,7 +39,7 @@ bool UmlBaseTransition::set_IsExternal(bool v) return set_it_(_is_external, v, setIsCppExternalCmd); } -const Q3CString & UmlBaseTransition::trigger() +const QByteArray & UmlBaseTransition::trigger() { read_if_needed_(); return _uml.trigger; @@ -50,7 +50,7 @@ bool UmlBaseTransition::set_Trigger(const char * s) return set_it_(_uml.trigger, s, setUmlTriggerCmd); } -const Q3CString & UmlBaseTransition::guard() +const QByteArray & UmlBaseTransition::guard() { read_if_needed_(); return _uml.guard; @@ -61,7 +61,7 @@ bool UmlBaseTransition::set_Guard(const char * s) return set_it_(_uml.guard, s, setUmlGuardCmd); } -const Q3CString & UmlBaseTransition::activity() +const QByteArray & UmlBaseTransition::activity() { read_if_needed_(); return _uml.activity; @@ -73,7 +73,7 @@ bool UmlBaseTransition::set_Activity(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseTransition::cppTrigger() +const QByteArray & UmlBaseTransition::cppTrigger() { read_if_needed_(); return _cpp.trigger; @@ -84,7 +84,7 @@ bool UmlBaseTransition::set_CppTrigger(const char * s) return set_it_(_cpp.trigger, s, setCppTriggerCmd); } -const Q3CString & UmlBaseTransition::cppGuard() +const QByteArray & UmlBaseTransition::cppGuard() { read_if_needed_(); return _cpp.guard; @@ -95,7 +95,7 @@ bool UmlBaseTransition::set_CppGuard(const char * s) return set_it_(_cpp.guard, s, setCppGuardCmd); } -const Q3CString & UmlBaseTransition::cppActivity() +const QByteArray & UmlBaseTransition::cppActivity() { read_if_needed_(); return _cpp.activity; @@ -108,7 +108,7 @@ bool UmlBaseTransition::set_CppActivity(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseTransition::javaTrigger() +const QByteArray & UmlBaseTransition::javaTrigger() { read_if_needed_(); return _java.trigger; @@ -119,7 +119,7 @@ bool UmlBaseTransition::set_JavaTrigger(const char * s) return set_it_(_java.trigger, s, setJavaTriggerCmd); } -const Q3CString & UmlBaseTransition::javaGuard() +const QByteArray & UmlBaseTransition::javaGuard() { read_if_needed_(); return _java.guard; @@ -130,7 +130,7 @@ bool UmlBaseTransition::set_JavaGuard(const char * s) return set_it_(_java.guard, s, setJavaGuardCmd); } -const Q3CString & UmlBaseTransition::javaActivity() +const QByteArray & UmlBaseTransition::javaActivity() { read_if_needed_(); return _java.activity; diff --git a/genplugouts/CppUtilities/UmlBaseTransition.h b/genplugouts/CppUtilities/UmlBaseTransition.h index a72261c68..8a308a509 100644 --- a/genplugouts/CppUtilities/UmlBaseTransition.h +++ b/genplugouts/CppUtilities/UmlBaseTransition.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "TransitionBehavior.h" class UmlTransition; @@ -36,7 +36,7 @@ class UmlBaseTransition : public UmlItem bool set_IsExternal(bool v); // return the trigger in OCL - const Q3CString & trigger(); + const QByteArray & trigger(); // set the trigger in OCL // @@ -44,7 +44,7 @@ class UmlBaseTransition : public UmlItem bool set_Trigger(const char * s); // return the guard in OCL - const Q3CString & guard(); + const QByteArray & guard(); // set the guard in OCL // @@ -52,7 +52,7 @@ class UmlBaseTransition : public UmlItem bool set_Guard(const char * s); // return the activity in OCL - const Q3CString & activity(); + const QByteArray & activity(); // set the activity in OCL // @@ -61,7 +61,7 @@ class UmlBaseTransition : public UmlItem #ifdef WITHCPP // return the trigger in C++ - const Q3CString & cppTrigger(); + const QByteArray & cppTrigger(); // set the trigger in C++ // @@ -69,7 +69,7 @@ class UmlBaseTransition : public UmlItem bool set_CppTrigger(const char * s); // return the guard in C++ - const Q3CString & cppGuard(); + const QByteArray & cppGuard(); // set the guard in C++ // @@ -77,7 +77,7 @@ class UmlBaseTransition : public UmlItem bool set_CppGuard(const char * s); // return the activity in C++ - const Q3CString & cppActivity(); + const QByteArray & cppActivity(); // set the activity in C++ // @@ -87,7 +87,7 @@ class UmlBaseTransition : public UmlItem #ifdef WITHJAVA // return the trigger in Java - const Q3CString & javaTrigger(); + const QByteArray & javaTrigger(); // set the trigger in Java // @@ -95,7 +95,7 @@ class UmlBaseTransition : public UmlItem bool set_JavaTrigger(const char * s); // return the guard in Java - const Q3CString & javaGuard(); + const QByteArray & javaGuard(); // set the guard in Java // @@ -103,7 +103,7 @@ class UmlBaseTransition : public UmlItem bool set_JavaGuard(const char * s); // return the activity in Java - const Q3CString & javaActivity(); + const QByteArray & javaActivity(); // set the activity in Java // diff --git a/genplugouts/CppUtilities/UmlBaseTypeSpec.cpp b/genplugouts/CppUtilities/UmlBaseTypeSpec.cpp index 4070a4a45..cddda026a 100644 --- a/genplugouts/CppUtilities/UmlBaseTypeSpec.cpp +++ b/genplugouts/CppUtilities/UmlBaseTypeSpec.cpp @@ -2,9 +2,9 @@ #include "UmlBaseTypeSpec.h" #include "UmlClass.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlBaseTypeSpec::toString() const +const QByteArray & UmlBaseTypeSpec::toString() const { return (type) ? type->name() : explicit_type; } diff --git a/genplugouts/CppUtilities/UmlBaseTypeSpec.h b/genplugouts/CppUtilities/UmlBaseTypeSpec.h index 16fce750a..775ce2e3b 100644 --- a/genplugouts/CppUtilities/UmlBaseTypeSpec.h +++ b/genplugouts/CppUtilities/UmlBaseTypeSpec.h @@ -1,9 +1,6 @@ #ifndef _UMLBASETYPESPEC_H #define _UMLBASETYPESPEC_H - - -#include - +#include class UmlClass; // this class memorize a type specification, which may be @@ -17,10 +14,10 @@ class UmlBaseTypeSpec UmlBaseTypeSpec() : type(0) {}; // returns the type as a string in all cases - const Q3CString & toString() const; + const QByteArray & toString() const; // significant in case type == 0 - Q3CString explicit_type; + QByteArray explicit_type; UmlClass * type; diff --git a/genplugouts/CppUtilities/UmlBaseUseCase.cpp b/genplugouts/CppUtilities/UmlBaseUseCase.cpp index 2acd65351..01b460067 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCase.cpp +++ b/genplugouts/CppUtilities/UmlBaseUseCase.cpp @@ -5,7 +5,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlUseCase * UmlBaseUseCase::create(UmlItem * parent, const char * s) { return (UmlUseCase *) parent->create_(anUseCase, s); @@ -35,7 +35,7 @@ bool UmlBaseUseCase::set_AssociatedDiagram(UmlUseCaseDiagram * d) return FALSE; } -const Q3CString & UmlBaseUseCase::extensionPoints() +const QByteArray & UmlBaseUseCase::extensionPoints() { read_if_needed_(); return _extension_points; diff --git a/genplugouts/CppUtilities/UmlBaseUseCase.h b/genplugouts/CppUtilities/UmlBaseUseCase.h index 9bd21249f..c1898a3c8 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCase.h +++ b/genplugouts/CppUtilities/UmlBaseUseCase.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlUseCase; class UmlUseCaseDiagram; @@ -32,7 +32,7 @@ class UmlBaseUseCase : public UmlItem bool set_AssociatedDiagram(UmlUseCaseDiagram * d); // return the extension points - const Q3CString & extensionPoints(); + const QByteArray & extensionPoints(); // set the extension points // @@ -41,7 +41,7 @@ class UmlBaseUseCase : public UmlItem private: - Q3CString _extension_points; + QByteArray _extension_points; UmlUseCaseDiagram * _assoc_diagram; @@ -52,7 +52,7 @@ class UmlBaseUseCase : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCase(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseUseCase(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseUseCaseAssociation.cpp b/genplugouts/CppUtilities/UmlBaseUseCaseAssociation.cpp index ebee930a9..6a91c0e5c 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCaseAssociation.cpp +++ b/genplugouts/CppUtilities/UmlBaseUseCaseAssociation.cpp @@ -4,9 +4,9 @@ #include "UmlUseCaseReference.h" #include "UmlClass.h" -void UmlBaseUseCaseAssociation::read_(const Q3PtrDict & useCases) +void UmlBaseUseCaseAssociation::read_(const QHash & useCases) { - _use_case = (UmlUseCaseReference *) useCases[(void *) UmlCom::read_unsigned()]; + _use_case = (UmlUseCaseReference *) useCases[reinterpret_cast(uintptr_t(UmlCom::read_unsigned()))]; _actor = (UmlClass *) UmlBaseItem::read_(); _primary = UmlCom::read_bool(); _name = UmlCom::read_string(); diff --git a/genplugouts/CppUtilities/UmlBaseUseCaseAssociation.h b/genplugouts/CppUtilities/UmlBaseUseCaseAssociation.h index 9538e6ba7..e93593edf 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCaseAssociation.h +++ b/genplugouts/CppUtilities/UmlBaseUseCaseAssociation.h @@ -1,10 +1,7 @@ #ifndef _UMLBASEUSECASEASSOCIATION_H #define _UMLBASEUSECASEASSOCIATION_H - - -#include -#include - +#include +#include class UmlUseCaseReference; class UmlClass; @@ -13,12 +10,12 @@ class UmlBaseUseCaseAssociation { public: // return the name - const Q3CString & name() const { + const QByteArray & name() const { return _name; } // return the stereotype - const Q3CString & stereotype() const { + const QByteArray & stereotype() const { return _stereotype; } @@ -43,14 +40,14 @@ class UmlBaseUseCaseAssociation UmlClass * _actor; - Q3CString _name; + QByteArray _name; - Q3CString _stereotype; + QByteArray _stereotype; bool _primary; // internal, don't call it - void read_(const Q3PtrDict & useCases); + void read_(const QHash &useCases); friend class UmlBaseUseCaseDiagramDefinition; }; diff --git a/genplugouts/CppUtilities/UmlBaseUseCaseDiagram.h b/genplugouts/CppUtilities/UmlBaseUseCaseDiagram.h index 4370e63a4..9467f8f23 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCaseDiagram.h +++ b/genplugouts/CppUtilities/UmlBaseUseCaseDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlUseCaseDiagram; class UmlItem; @@ -27,7 +27,7 @@ class UmlBaseUseCaseDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCaseDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n), _def(0) {}; + UmlBaseUseCaseDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n), _def(0) {}; public: diff --git a/genplugouts/CppUtilities/UmlBaseUseCaseDiagramDefinition.cpp b/genplugouts/CppUtilities/UmlBaseUseCaseDiagramDefinition.cpp index b8780daf2..ff9acd825 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCaseDiagramDefinition.cpp +++ b/genplugouts/CppUtilities/UmlBaseUseCaseDiagramDefinition.cpp @@ -4,7 +4,7 @@ void UmlBaseUseCaseDiagramDefinition::read_() { - Q3PtrDict ucrefs; + QHash ucrefs; unsigned n; unsigned rank; @@ -18,7 +18,7 @@ void UmlBaseUseCaseDiagramDefinition::read_() f->read_(); } - _fragments.setAutoDelete(TRUE); + //_fragments.setAutoDelete(TRUE); UmlBaseFragment::compute_container_(_fragments); n = UmlCom::read_unsigned(); @@ -31,7 +31,7 @@ void UmlBaseUseCaseDiagramDefinition::read_() sb->read_(); } - _subjects.setAutoDelete(TRUE); + //_subjects.setAutoDelete(TRUE); n = UmlCom::read_unsigned(); _use_cases.resize(n); @@ -40,11 +40,11 @@ void UmlBaseUseCaseDiagramDefinition::read_() UmlUseCaseReference * uc = new UmlUseCaseReference(); _use_cases.insert(rank, uc); - ucrefs.insert((void *) UmlCom::read_unsigned(), uc); + ucrefs.insert(reinterpret_cast(uintptr_t(UmlCom::read_unsigned())), uc); uc->read_(_fragments, _subjects); } - _use_cases.setAutoDelete(TRUE); + // _use_cases.setAutoDelete(TRUE); n = UmlCom::read_unsigned(); _actors.resize(n); @@ -62,7 +62,7 @@ void UmlBaseUseCaseDiagramDefinition::read_() r->read_(ucrefs); } - _rels.setAutoDelete(TRUE); + //_rels.setAutoDelete(TRUE); } UmlBaseUseCaseDiagramDefinition::~UmlBaseUseCaseDiagramDefinition() diff --git a/genplugouts/CppUtilities/UmlBaseUseCaseDiagramDefinition.h b/genplugouts/CppUtilities/UmlBaseUseCaseDiagramDefinition.h index d2cefc68d..364e2f259 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCaseDiagramDefinition.h +++ b/genplugouts/CppUtilities/UmlBaseUseCaseDiagramDefinition.h @@ -9,9 +9,7 @@ #include "UmlFragmentCompartment.h" #include "UmlUseCaseReference.h" #include "UmlUseCaseAssociation.h" - -#include - +#include class UmlUseCaseReference; class UmlClass; class UmlUseCaseAssociation; @@ -23,41 +21,41 @@ class UmlBaseUseCaseDiagramDefinition { public: // return the use cases present in the diagram - const Q3PtrVector & useCases() const { + const QVector & useCases() const { return _use_cases; } // return the actors present in the diagram - const Q3PtrVector & actors() const { + const QVector & actors() const { return _actors; } // return the associations between actor and use case present in the diagram - const Q3PtrVector & associations() const { + const QVector & associations() const { return _rels; } // return the fragments present in the diagram - const Q3PtrVector & fragments() const { + const QVector & fragments() const { return _fragments; } // return the subjects present in the diagram - const Q3PtrVector & subjects() const { + const QVector & subjects() const { return _subjects; } private: - Q3PtrVector _use_cases; + QVector _use_cases; - Q3PtrVector _actors; + QVector _actors; - Q3PtrVector _rels; + QVector _rels; - Q3PtrVector _fragments; + QVector _fragments; - Q3PtrVector _subjects; + QVector _subjects; // internal, don't call it void read_(); diff --git a/genplugouts/CppUtilities/UmlBaseUseCaseReference.cpp b/genplugouts/CppUtilities/UmlBaseUseCaseReference.cpp index c599f87d4..ac41d32fb 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCaseReference.cpp +++ b/genplugouts/CppUtilities/UmlBaseUseCaseReference.cpp @@ -6,7 +6,7 @@ #include "UmlSubject.h" #include "UmlFragment.h" -void UmlBaseUseCaseReference::read_(const Q3PtrVector & fragments, const Q3PtrVector & subjects) +void UmlBaseUseCaseReference::read_(const QVector &fragments, const QVector &subjects) { _use_case = (UmlUseCase *) UmlBaseItem::read_(); _x = (int) UmlCom::read_unsigned(); diff --git a/genplugouts/CppUtilities/UmlBaseUseCaseReference.h b/genplugouts/CppUtilities/UmlBaseUseCaseReference.h index 5e5590920..8331f896f 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCaseReference.h +++ b/genplugouts/CppUtilities/UmlBaseUseCaseReference.h @@ -1,9 +1,7 @@ #ifndef _UMLBASEUSECASEREFERENCE_H #define _UMLBASEUSECASEREFERENCE_H - -#include - +#include class UmlUseCase; class UmlFragmentCompartment; class UmlSubject; @@ -46,7 +44,7 @@ class UmlBaseUseCaseReference int _h; // internal, don't call it - void read_(const Q3PtrVector & fragments, const Q3PtrVector & subjects); + void read_(const QVector & fragments, const QVector & subjects); friend class UmlBaseUseCaseDiagramDefinition; }; diff --git a/genplugouts/CppUtilities/UmlBaseUseCaseView.h b/genplugouts/CppUtilities/UmlBaseUseCaseView.h index 19d836b64..b5140abd8 100644 --- a/genplugouts/CppUtilities/UmlBaseUseCaseView.h +++ b/genplugouts/CppUtilities/UmlBaseUseCaseView.h @@ -4,7 +4,7 @@ #include "UmlView.h" #include "anItemKind.h" -#include + class UmlUseCaseView; class UmlItem; @@ -26,7 +26,7 @@ class UmlBaseUseCaseView : public UmlView protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCaseView(void * id, const Q3CString & n) : UmlView(id, n) {}; + UmlBaseUseCaseView(void * id, const QByteArray & n) : UmlView(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlBaseView.h b/genplugouts/CppUtilities/UmlBaseView.h index ee8c0dd38..1e346b17b 100644 --- a/genplugouts/CppUtilities/UmlBaseView.h +++ b/genplugouts/CppUtilities/UmlBaseView.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + class UmlBaseView : public UmlItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseView(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseView(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlBuiltin.h b/genplugouts/CppUtilities/UmlBuiltin.h index 4f5c16f41..360517a4b 100644 --- a/genplugouts/CppUtilities/UmlBuiltin.h +++ b/genplugouts/CppUtilities/UmlBuiltin.h @@ -1,32 +1,32 @@ #ifndef _UMLBUILTIN_H #define _UMLBUILTIN_H +#include -#include // Internal class used to memorize the types defined through the first 'generation settings' tab struct UmlBuiltin { - Q3CString uml; + QByteArray uml; #ifdef WITHCPP - Q3CString cpp; + QByteArray cpp; - Q3CString cpp_in; + QByteArray cpp_in; - Q3CString cpp_out; + QByteArray cpp_out; - Q3CString cpp_inout; + QByteArray cpp_inout; #endif - Q3CString cpp_return; + QByteArray cpp_return; #ifdef WITHJAVA - Q3CString java; + QByteArray java; #endif #ifdef WITHIDL - Q3CString idl; + QByteArray idl; #endif }; diff --git a/genplugouts/CppUtilities/UmlClass.cpp b/genplugouts/CppUtilities/UmlClass.cpp index 75ecf54ef..8de03e005 100644 --- a/genplugouts/CppUtilities/UmlClass.cpp +++ b/genplugouts/CppUtilities/UmlClass.cpp @@ -8,8 +8,8 @@ #include "UmlCom.h" //Added by qt3to4: -#include -#include +#include +#include #include "Logging/QsLog.h" class FunctionTracer { @@ -30,27 +30,26 @@ class FunctionTracer void UmlClass::utilities() { TRACE_FUNCTION; - const Q3PtrVector ch = children(); + const QVector ch = children(); bool have_constructor = FALSE; bool have_destructor = FALSE; - Q3CString destr = "~" + name(); + QByteArray destr = "~" + name(); bool have_copy = FALSE; bool have_const_copy = FALSE; bool have_assignment = FALSE; bool have_const_assignment = FALSE; - for (unsigned i = 0; i != ch.size(); i += 1) { + for (int i = 0; i != ch.size(); i += 1) { if (ch[i]->kind() == anOperation) { //[rageek] literal comparison - Q3CString s = ch[i]->name(); //[rageek] + QByteArray s = ch[i]->name(); //[rageek] if (s == name()) { // may be a constructor or a copy constructor - const Q3ValueList params = - ((UmlOperation *) ch[i])->params(); + const QList params = ((UmlOperation *) ch[i])->params(); if (params.count() == 1) { - const UmlParameter & param = *(params.at(0)); + const UmlParameter & param = (params.at(0)); if (param.type.type == this) { if (param.dir == InputDirection) @@ -67,11 +66,11 @@ void UmlClass::utilities() else if (s == destr) have_destructor = TRUE; else if (s == "operator=") { - const Q3ValueList params = + const QList params = ((UmlOperation *) ch[i])->params(); if (params.count() == 1) { - if ((*(params.at(0))).dir == InputDirection) + if (((params.at(0))).dir == InputDirection) have_const_assignment = TRUE; else have_assignment = TRUE; @@ -99,7 +98,7 @@ void UmlClass::addContructor(bool expl) UmlCom::trace("can't add contructor"); else { QLOG_INFO() << "1.1.3"; - Q3CString s; + QByteArray s; int index; // remove the useless "${type} " mainly to remove the space @@ -111,11 +110,11 @@ void UmlClass::addContructor(bool expl) s = CppSettings::operationDecl(); QLOG_INFO() << s; QLOG_INFO() << "1.1.5"; - if ((index = s.find("${type} ")) != -1) + if ((index = s.indexOf("${type} ")) != -1) s.remove(index, 8); QLOG_INFO() << s; QLOG_INFO() << "1.1.6"; - if (expl && ((index = s.find("${name}")) != -1)) + if (expl && ((index = s.indexOf("${name}")) != -1)) s.insert(index, "explicit "); QLOG_INFO() << s; QLOG_INFO() << "1.1.7"; @@ -128,7 +127,7 @@ void UmlClass::addContructor(bool expl) if (s.isEmpty()) s = CppSettings::operationDef(); QLOG_INFO() << "1.1.9"; - if ((index = s.find("${type} ")) != -1) + if ((index = s.indexOf("${type} ")) != -1) s.remove(index, 8); QLOG_INFO() << "1.1.10"; op->set_CppDef(s); @@ -146,7 +145,7 @@ void UmlClass::addDestructor(bool virt) if (virt) op->set_isCppVirtual(TRUE); - Q3CString s; + QByteArray s; int index; // remove the useless "${type} " mainly to remove the space @@ -156,7 +155,7 @@ void UmlClass::addDestructor(bool virt) if (s.isEmpty()) s = CppSettings::operationDecl(); - if ((index = s.find("${type} ")) != -1) { + if ((index = s.indexOf("${type} ")) != -1) { s.remove(index, 8); op->set_CppDecl(s); } @@ -166,7 +165,7 @@ void UmlClass::addDestructor(bool virt) if (s.isEmpty()) s = CppSettings::operationDef(); - if ((index = s.find("${type} ")) != -1) { + if ((index = s.indexOf("${type} ")) != -1) { s.remove(index, 8); op->set_CppDef(s); } @@ -197,8 +196,8 @@ void UmlClass::addCopy(bool cte) // add the parameter profile, and // remove the useless "${type} " mainly to remove the space - Q3CString p = (cte) ? "const ${t0} & ${p0}" : "${t0} & ${p0}"; - Q3CString s; + QByteArray p = (cte) ? "const ${t0} & ${p0}" : "${t0} & ${p0}"; + QByteArray s; int index; s = op->cppDecl(); @@ -206,10 +205,10 @@ void UmlClass::addCopy(bool cte) if (s.isEmpty()) s = CppSettings::operationDecl(); - if ((index = s.find("${(}")) != -1) - s.insert(index + 4, (const char *)p); //[rageek] cast because Q3CString + if ((index = s.indexOf("${(}")) != -1) + s.insert(index + 4, (const char *)p); //[rageek] cast because QByteArray - if ((index = s.find("${type} ")) != -1) + if ((index = s.indexOf("${type} ")) != -1) s.remove(index, 8); op->set_CppDecl(s); @@ -219,10 +218,10 @@ void UmlClass::addCopy(bool cte) if (s.isEmpty()) s = CppSettings::operationDef(); - if ((index = s.find("${(}")) != -1) - s.insert(index + 4, (const char *)p); //[rageek] cast because Q3CString + if ((index = s.indexOf("${(}")) != -1) + s.insert(index + 4, (const char *)p); //[rageek] cast because QByteArray - if ((index = s.find("${type} ")) != -1) + if ((index = s.indexOf("${type} ")) != -1) s.remove(index, 8); op->set_CppDef(s); @@ -255,8 +254,8 @@ void UmlClass::addAssign(bool cte) op->set_ReturnType(t); - Q3CString p = (cte) ? "const ${t0} & ${p0}" : "${t0} & ${p0}"; - Q3CString s; + QByteArray p = (cte) ? "const ${t0} & ${p0}" : "${t0} & ${p0}"; + QByteArray s; int index; s = op->cppDecl(); @@ -264,10 +263,10 @@ void UmlClass::addAssign(bool cte) if (s.isEmpty()) s = CppSettings::operationDecl(); - if ((index = s.find("${(}")) != -1) - s.insert(index + 4, (const char *)p); //[rageek] cast because Q3CString + if ((index = s.indexOf("${(}")) != -1) + s.insert(index + 4, (const char *)p); //[rageek] cast because QByteArray - if ((index = s.find("${type}")) != -1) + if ((index = s.indexOf("${type}")) != -1) s.insert(index + 7, " &"); op->set_CppDecl(s); @@ -277,10 +276,10 @@ void UmlClass::addAssign(bool cte) if (s.isEmpty()) s = CppSettings::operationDef(); - if ((index = s.find("${(}")) != -1) - s.insert(index + 4, (const char *)p); //[rageek] cast because Q3CString + if ((index = s.indexOf("${(}")) != -1) + s.insert(index + 4, (const char *)p); //[rageek] cast because QByteArray - if ((index = s.find("${type}")) != -1) + if ((index = s.indexOf("${type}")) != -1) s.insert(index + 7, " &"); op->set_CppDef(s); diff --git a/genplugouts/CppUtilities/UmlClass.h b/genplugouts/CppUtilities/UmlClass.h index 5636b42ac..e6c132cac 100644 --- a/genplugouts/CppUtilities/UmlClass.h +++ b/genplugouts/CppUtilities/UmlClass.h @@ -3,7 +3,7 @@ #include "UmlBaseClass.h" -#include + // This class manages 'classes', notes that the class 'ClassItem' // is a mother class of the class's children. @@ -12,7 +12,7 @@ class UmlClass : public UmlBaseClass { public: - UmlClass(void * id, const Q3CString & n) : UmlBaseClass(id, n) {}; + UmlClass(void * id, const QByteArray & n) : UmlBaseClass(id, n) {}; //virtual operation doing 'something' // diff --git a/genplugouts/CppUtilities/UmlClassDiagram.h b/genplugouts/CppUtilities/UmlClassDiagram.h index 76134392d..ac4781283 100644 --- a/genplugouts/CppUtilities/UmlClassDiagram.h +++ b/genplugouts/CppUtilities/UmlClassDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseClassDiagram.h" -#include + // This class manages 'class diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlClassDiagram : public UmlBaseClassDiagram { public: - UmlClassDiagram(void * id, const Q3CString & n) : UmlBaseClassDiagram(id, n) {}; + UmlClassDiagram(void * id, const QByteArray & n) : UmlBaseClassDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlClassInstance.h b/genplugouts/CppUtilities/UmlClassInstance.h index c0c0e5a90..cb4473236 100644 --- a/genplugouts/CppUtilities/UmlClassInstance.h +++ b/genplugouts/CppUtilities/UmlClassInstance.h @@ -3,13 +3,13 @@ #include "UmlBaseClassInstance.h" -#include + class UmlClassInstance : public UmlBaseClassInstance { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlClassInstance(void * id, const Q3CString & s) : UmlBaseClassInstance(id, s) { + UmlClassInstance(void * id, const QByteArray & s) : UmlBaseClassInstance(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlClassItem.h b/genplugouts/CppUtilities/UmlClassItem.h index bf64f4dbb..7c4a888f7 100644 --- a/genplugouts/CppUtilities/UmlClassItem.h +++ b/genplugouts/CppUtilities/UmlClassItem.h @@ -3,7 +3,7 @@ #include "UmlBaseClassItem.h" -#include + // This class globaly manages class's children including UmlClassExtraMember // @@ -11,7 +11,7 @@ class UmlClassItem : public UmlBaseClassItem { public: - UmlClassItem(void * id, const Q3CString & n) : UmlBaseClassItem(id, n) {}; + UmlClassItem(void * id, const QByteArray & n) : UmlBaseClassItem(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlClassMember.h b/genplugouts/CppUtilities/UmlClassMember.h index 9119443c6..35fdddb52 100644 --- a/genplugouts/CppUtilities/UmlClassMember.h +++ b/genplugouts/CppUtilities/UmlClassMember.h @@ -2,7 +2,7 @@ #define _UMLCLASSMEMBER_H -#include + #include "UmlBaseClassMember.h" // This class globaly manages class's relations, attributes, operations @@ -12,7 +12,7 @@ class UmlClassMember : public UmlBaseClassMember { public: - UmlClassMember(void * id, const Q3CString & n) : UmlBaseClassMember(id, n) {}; + UmlClassMember(void * id, const QByteArray & n) : UmlBaseClassMember(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlClassView.h b/genplugouts/CppUtilities/UmlClassView.h index a152eff28..3b6eb53ed 100644 --- a/genplugouts/CppUtilities/UmlClassView.h +++ b/genplugouts/CppUtilities/UmlClassView.h @@ -3,7 +3,7 @@ #include "UmlBaseClassView.h" -#include + // This class manages 'class view' // @@ -11,7 +11,7 @@ class UmlClassView : public UmlBaseClassView { public: - UmlClassView(void * id, const Q3CString & n) : UmlBaseClassView(id, n) {}; + UmlClassView(void * id, const QByteArray & n) : UmlBaseClassView(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlCollaborationDiagram.h b/genplugouts/CppUtilities/UmlCollaborationDiagram.h index ab1388561..fc69dea4c 100644 --- a/genplugouts/CppUtilities/UmlCollaborationDiagram.h +++ b/genplugouts/CppUtilities/UmlCollaborationDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseCollaborationDiagram.h" -#include + // This class manages 'collaboration diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlCollaborationDiagram : public UmlBaseCollaborationDiagram { public: - UmlCollaborationDiagram(void * id, const Q3CString & n) : UmlBaseCollaborationDiagram(id, n) {}; + UmlCollaborationDiagram(void * id, const QByteArray & n) : UmlBaseCollaborationDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlCom.cpp b/genplugouts/CppUtilities/UmlCom.cpp index c90512a59..5c9948e61 100644 --- a/genplugouts/CppUtilities/UmlCom.cpp +++ b/genplugouts/CppUtilities/UmlCom.cpp @@ -1,10 +1,9 @@ #include "UmlCom.h" -#include -//Added by qt3to4: -#include - +#include +#include +#include #include "UmlCom.h" #include "UmlItem.h" #include "UmlTypeSpec.h" @@ -14,9 +13,10 @@ #include "Logging/QsLog.h" bool UmlCom::connect(unsigned int port) { - sock = new Q3SocketDevice(Q3SocketDevice::Stream); - sock->setAddressReusable(TRUE); - + sock = new QTcpSocket(/*QTcpSocket::Stream*/0); +#ifdef habip + //sock->setAddressReusable(TRUE); +#endif buffer_in_size = 1024; buffer_in = new char[buffer_in_size]; buffer_in_end = p_buffer_in = 0; @@ -29,7 +29,8 @@ bool UmlCom::connect(unsigned int port) ha.setAddress("127.0.0.1"); - if (sock->connect(ha, port)) { + sock->connectToHost(ha, port); + if (sock->waitForConnected()) { // send API version write_unsigned(46); flush(); @@ -72,6 +73,7 @@ void UmlCom::message(const char * s) void UmlCom::bye() { send_cmd(miscGlobalCmd, byeCmd); + sock->waitForBytesWritten(); } void UmlCom::close() @@ -80,11 +82,11 @@ void UmlCom::close() sock = 0; } -Q3SocketDevice * UmlCom::sock; +QTcpSocket * UmlCom::sock; char * UmlCom::buffer_in; -unsigned int UmlCom::buffer_in_size; +size_t UmlCom::buffer_in_size; char * UmlCom::p_buffer_in; @@ -94,11 +96,11 @@ char * UmlCom::buffer_out; char * UmlCom::p_buffer_out; -unsigned int UmlCom::buffer_out_size; +size_t UmlCom::buffer_out_size; -void UmlCom::check_size_out(unsigned int len) +void UmlCom::check_size_out(size_t len) { - unsigned used = p_buffer_out - buffer_out; + ptrdiff_t used = p_buffer_out - buffer_out; if ((used + len) >= buffer_out_size) { buffer_out_size = used + len + 1024; @@ -150,14 +152,15 @@ void UmlCom::read_size() buffer_in_size = 4; buffer_in = new char[buffer_in_size]; - int remainder = 4; - int nread; + qint64 remainder = 4; + qint64 nread; char * p = buffer_in; for (;;) { - while(sock->bytesAvailable() < 4); - nread = sock->readBlock(p, 4); + + while(sock->bytesAvailable() < 4)sock->waitForReadyRead(); + nread = sock->read(p, 4); // if(nread != 4) // continue; @@ -186,7 +189,7 @@ void UmlCom::read_size() buffer_in_end = buffer_in + 4; } -void UmlCom::read_buffer(unsigned int len) +void UmlCom::read_buffer(size_t len) { #ifdef TRACE QLOG_INFO() << "enter UmlCom::read_buffer(" << len << ")\n"; @@ -200,14 +203,15 @@ void UmlCom::read_buffer(unsigned int len) buffer_in = new char[buffer_in_size]; } - int remainder = (int) len; - int nread; + qint64 remainder = len; + qint64 nread; char * p = buffer_in; QLOG_INFO() << "Allocated address" << (size_t) buffer_in; for (;;) { - while(sock->bytesAvailable() != len); - nread = sock->readBlock(p, len); + + while (sock->bytesAvailable() != remainder)sock->waitForReadyRead(); + nread = sock->read(p, remainder); p += nread; QLOG_INFO() << "nread = " + QString::number(nread); @@ -265,7 +269,7 @@ void UmlCom::write_string(const char * p) if (p == 0) p = ""; - unsigned len = strlen(p) + 1; + size_t len = strlen(p) + 1; check_size_out(len); memcpy(p_buffer_out, p, len); @@ -552,8 +556,8 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, const char * arg2, const char * arg3, const UmlTypeSpec & arg4, const UmlTypeSpec & arg5) { -#ifdef DEBUGBOUML - QLOG_INFO() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << \", \"" << arg2 << "\", \"" << arg3 << "\", " << ", UmlTypeSpec, UmlTypeSpec)\n"; +#ifdef DEBUG_DOUML + QLOG_INFO() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << "\", \"" << arg2 << "\", \"" << arg3 << "\", " << ", UmlTypeSpec, UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -609,10 +613,10 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, cha flush(); } -void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l) +void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l) { #ifdef TRACE - QLOG_INFO() << "UmlCom::send_cmd(id, " << cmd << ", const Q3PtrVector & l)\n"; + QLOG_INFO() << "UmlCom::send_cmd(id, " << cmd << ", const QVector & l)\n"; #endif write_char(onInstanceCmd); @@ -629,10 +633,10 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3) +void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l1, const QVector & l2, const QVector & l3) { #ifdef TRACE - QLOG_INFO() << "UmlCom::send_cmd(id, " << cmd << ", const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3)\n"; + QLOG_INFO() << "UmlCom::send_cmd(id, " << cmd << ", const QVector & l1, const QVector & l2, const QVector & l3)\n"; #endif write_char(onInstanceCmd); @@ -683,7 +687,7 @@ void * UmlCom::read_id() void * a; - // sizeof(void *) must be the same for bouml and + // sizeof(void *) must be the same for douml and // the plug-out, bypass it memcpy((char *) &a, p_buffer_in + 1, sizeof(void *)); p_buffer_in += sizeof(void *) + 1; @@ -695,7 +699,7 @@ const char * UmlCom::read_string() { read_if_needed(); - unsigned len = strlen(p_buffer_in) + 1; + size_t len = strlen(p_buffer_in) + 1; p_buffer_in += len; @@ -710,8 +714,9 @@ bool UmlCom::read_bool() { read_if_needed(); QLOG_INFO() << "read bool" << *p_buffer_in; - if(*p_buffer_in != 0 && *p_buffer_in != 1) + if (*p_buffer_in != 0 && *p_buffer_in != 1) { QLOG_INFO() << "read bool" << QString(p_buffer_in); + } return *p_buffer_in++ != 0; } @@ -735,7 +740,7 @@ unsigned int UmlCom::read_unsigned() return value; } -void UmlCom::read_item_list(Q3PtrVector & v) +void UmlCom::read_item_list(QVector & v) { unsigned n = read_unsigned(); @@ -746,16 +751,16 @@ void UmlCom::read_item_list(Q3PtrVector & v) #endif for (unsigned index = 0; index != n; index += 1) - v.insert(index, UmlBaseItem::read_()); + v[index] = UmlBaseItem::read_(); } -void UmlCom::fatal_error(const Q3CString & - #ifdef DEBUG_BOUML +void UmlCom::fatal_error(const QByteArray & + #ifdef DEBUG_DOUML msg #endif ) { -#ifdef DEBUG_BOUML +#ifdef DEBUG_DOUML QLOG_INFO() << msg << '\n'; #endif @@ -766,7 +771,7 @@ void UmlCom::flush() { if (sock != 0) { - int len = p_buffer_out - buffer_out - 4; + ptrdiff_t len = p_buffer_out - buffer_out - 4; /* the four first bytes of buffer_out are free to contains the length */ buffer_out[0] = len >> 24; buffer_out[1] = len >> 16; @@ -778,7 +783,7 @@ void UmlCom::flush() for (;;) { - int sent = sock->writeBlock(p_buffer_out, len); + qint64 sent = sock->write(p_buffer_out, len); if (sent == -1) { diff --git a/genplugouts/CppUtilities/UmlCom.h b/genplugouts/CppUtilities/UmlCom.h index a57c56a9e..8bc8a835e 100644 --- a/genplugouts/CppUtilities/UmlCom.h +++ b/genplugouts/CppUtilities/UmlCom.h @@ -1,15 +1,10 @@ #ifndef _UMLCOM_H #define _UMLCOM_H - - -#include - - #include "anItemKind.h" #include "aRelationKind.h" -#include -#include + + #include #include "Tools/ApiCmd.h" @@ -17,7 +12,7 @@ class UmlItem; class UmlTypeSpec; class UmlClass; -class Q3SocketDevice; +class QTcpSocket; class UmlItem; class UmlTypeSpec; class UmlClass; @@ -78,11 +73,11 @@ class UmlCom static void close(); private: - static Q3SocketDevice * sock; + static QTcpSocket * sock; static char * buffer_in; - static unsigned int buffer_in_size; + static size_t buffer_in_size; static char * p_buffer_in; @@ -92,20 +87,20 @@ class UmlCom static char * p_buffer_out; - static unsigned int buffer_out_size; + static size_t buffer_out_size; protected: //internal, do NOT use it - static void check_size_out(unsigned int len); + static void check_size_out(size_t len); //internal, do NOT use it static void read_if_needed(); static void read_size(); //internal, do NOT use it - static void read_buffer(unsigned int len); + static void read_buffer(size_t len); //internal, do NOT use it static void write_bool(bool b); @@ -195,8 +190,8 @@ class UmlCom static void send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, char arg2, const char * arg3, const char * arg4, const UmlTypeSpec & arg5); //internal, do NOT use it - static void send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l); - static void send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3); + static void send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l); + static void send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l1, const QVector & l2, const QVector & l3); //internal, do NOT use it @@ -219,10 +214,10 @@ class UmlCom static unsigned int read_unsigned(); // internal, do NOT use it - static void read_item_list(Q3PtrVector & v); + static void read_item_list(QVector & v); //internal, do NOT use it - static void fatal_error(const Q3CString & msg); + static void fatal_error(const QByteArray & msg); //internal, do NOT use it static void flush(); diff --git a/genplugouts/CppUtilities/UmlComponent.h b/genplugouts/CppUtilities/UmlComponent.h index bb4fdbb25..e8961ed60 100644 --- a/genplugouts/CppUtilities/UmlComponent.h +++ b/genplugouts/CppUtilities/UmlComponent.h @@ -3,7 +3,7 @@ #include "UmlBaseComponent.h" -#include + // This class manages 'components' // @@ -11,7 +11,7 @@ class UmlComponent : public UmlBaseComponent { public: - UmlComponent(void * id, const Q3CString & n) : UmlBaseComponent(id, n) {}; + UmlComponent(void * id, const QByteArray & n) : UmlBaseComponent(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlComponentDiagram.h b/genplugouts/CppUtilities/UmlComponentDiagram.h index 15d707dc2..9afaa7eb4 100644 --- a/genplugouts/CppUtilities/UmlComponentDiagram.h +++ b/genplugouts/CppUtilities/UmlComponentDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseComponentDiagram.h" -#include + // This class manages 'ccomponent diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlComponentDiagram : public UmlBaseComponentDiagram { public: - UmlComponentDiagram(void * id, const Q3CString & n) : UmlBaseComponentDiagram(id, n) {}; + UmlComponentDiagram(void * id, const QByteArray & n) : UmlBaseComponentDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlComponentView.h b/genplugouts/CppUtilities/UmlComponentView.h index 000a74744..cc09cecc6 100644 --- a/genplugouts/CppUtilities/UmlComponentView.h +++ b/genplugouts/CppUtilities/UmlComponentView.h @@ -3,7 +3,7 @@ #include "UmlBaseComponentView.h" -#include + // This class manages 'component view' // @@ -11,7 +11,7 @@ class UmlComponentView : public UmlBaseComponentView { public: - UmlComponentView(void * id, const Q3CString & n) : UmlBaseComponentView(id, n) {}; + UmlComponentView(void * id, const QByteArray & n) : UmlBaseComponentView(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlDeploymentDiagram.h b/genplugouts/CppUtilities/UmlDeploymentDiagram.h index 727d0ffd0..1f0add3d0 100644 --- a/genplugouts/CppUtilities/UmlDeploymentDiagram.h +++ b/genplugouts/CppUtilities/UmlDeploymentDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseDeploymentDiagram.h" -#include + // This class manages 'deployment diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlDeploymentDiagram : public UmlBaseDeploymentDiagram { public: - UmlDeploymentDiagram(void * id, const Q3CString & n) : UmlBaseDeploymentDiagram(id, n) {}; + UmlDeploymentDiagram(void * id, const QByteArray & n) : UmlBaseDeploymentDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlDeploymentView.h b/genplugouts/CppUtilities/UmlDeploymentView.h index 52e5e627d..1c47fedbf 100644 --- a/genplugouts/CppUtilities/UmlDeploymentView.h +++ b/genplugouts/CppUtilities/UmlDeploymentView.h @@ -3,7 +3,7 @@ #include "UmlBaseDeploymentView.h" -#include + // This class manages 'deployment view' // @@ -11,7 +11,7 @@ class UmlDeploymentView : public UmlBaseDeploymentView { public: - UmlDeploymentView(void * id, const Q3CString & n) : UmlBaseDeploymentView(id, n) {}; + UmlDeploymentView(void * id, const QByteArray & n) : UmlBaseDeploymentView(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlDiagram.h b/genplugouts/CppUtilities/UmlDiagram.h index ffee38e5c..99e0f81e4 100644 --- a/genplugouts/CppUtilities/UmlDiagram.h +++ b/genplugouts/CppUtilities/UmlDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseDiagram.h" -#include + // This class allows to manage extra class member, mainly defined fot C++ // it allows to insert C++ pre-processor directive (even they may be placed @@ -14,7 +14,7 @@ class UmlDiagram : public UmlBaseDiagram { public: - UmlDiagram(void * id, const Q3CString & n) : UmlBaseDiagram(id, n) {}; + UmlDiagram(void * id, const QByteArray & n) : UmlBaseDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlEntryPointPseudoState.h b/genplugouts/CppUtilities/UmlEntryPointPseudoState.h index 838a4bf5b..3fd7f6eca 100644 --- a/genplugouts/CppUtilities/UmlEntryPointPseudoState.h +++ b/genplugouts/CppUtilities/UmlEntryPointPseudoState.h @@ -3,13 +3,13 @@ #include "UmlBaseEntryPointPseudoState.h" -#include + class UmlEntryPointPseudoState : public UmlBaseEntryPointPseudoState { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlEntryPointPseudoState(void * id, const Q3CString & s) : UmlBaseEntryPointPseudoState(id, s) { + UmlEntryPointPseudoState(void * id, const QByteArray & s) : UmlBaseEntryPointPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlExitPointPseudoState.h b/genplugouts/CppUtilities/UmlExitPointPseudoState.h index 1a57b8230..e63c68782 100644 --- a/genplugouts/CppUtilities/UmlExitPointPseudoState.h +++ b/genplugouts/CppUtilities/UmlExitPointPseudoState.h @@ -3,13 +3,13 @@ #include "UmlBaseExitPointPseudoState.h" -#include + class UmlExitPointPseudoState : public UmlBaseExitPointPseudoState { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExitPointPseudoState(void * id, const Q3CString & s) : UmlBaseExitPointPseudoState(id, s) { + UmlExitPointPseudoState(void * id, const QByteArray & s) : UmlBaseExitPointPseudoState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlExpansionNode.h b/genplugouts/CppUtilities/UmlExpansionNode.h index 65d1cff2a..e2dbd5565 100644 --- a/genplugouts/CppUtilities/UmlExpansionNode.h +++ b/genplugouts/CppUtilities/UmlExpansionNode.h @@ -3,13 +3,13 @@ #include "UmlBaseExpansionNode.h" -#include + class UmlExpansionNode : public UmlBaseExpansionNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExpansionNode(void * id, const Q3CString & s) : UmlBaseExpansionNode(id, s) { + UmlExpansionNode(void * id, const QByteArray & s) : UmlBaseExpansionNode(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlExpansionRegion.h b/genplugouts/CppUtilities/UmlExpansionRegion.h index cfe999374..6d9130ca6 100644 --- a/genplugouts/CppUtilities/UmlExpansionRegion.h +++ b/genplugouts/CppUtilities/UmlExpansionRegion.h @@ -3,13 +3,13 @@ #include "UmlBaseExpansionRegion.h" -#include + class UmlExpansionRegion : public UmlBaseExpansionRegion { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExpansionRegion(void * id, const Q3CString & s) : UmlBaseExpansionRegion(id, s) { + UmlExpansionRegion(void * id, const QByteArray & s) : UmlBaseExpansionRegion(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlExtraClassMember.h b/genplugouts/CppUtilities/UmlExtraClassMember.h index cf0b2bf47..95b851b8d 100644 --- a/genplugouts/CppUtilities/UmlExtraClassMember.h +++ b/genplugouts/CppUtilities/UmlExtraClassMember.h @@ -3,7 +3,7 @@ #include "UmlBaseExtraClassMember.h" -#include + // This class allows to manage extra class member, It allows to insert // C++ pre-processor directive (even they may be placed in the other member @@ -14,7 +14,7 @@ class UmlExtraClassMember : public UmlBaseExtraClassMember { public: - UmlExtraClassMember(void * id, const Q3CString & n) : UmlBaseExtraClassMember(id, n) {}; + UmlExtraClassMember(void * id, const QByteArray & n) : UmlBaseExtraClassMember(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlFlow.h b/genplugouts/CppUtilities/UmlFlow.h index 6e78a8c4b..e31afeb31 100644 --- a/genplugouts/CppUtilities/UmlFlow.h +++ b/genplugouts/CppUtilities/UmlFlow.h @@ -4,12 +4,12 @@ #include "UmlBaseFlow.h" #include "UmlActivityItem.h" -#include + class UmlFlow : public UmlBaseFlow, public UmlActivityItem { public: - UmlFlow(void * id, const Q3CString & n) : UmlBaseFlow(id, n) { + UmlFlow(void * id, const QByteArray & n) : UmlBaseFlow(id, n) { } }; diff --git a/genplugouts/CppUtilities/UmlInterruptibleActivityRegion.h b/genplugouts/CppUtilities/UmlInterruptibleActivityRegion.h index 0f78665c1..a696f6b2d 100644 --- a/genplugouts/CppUtilities/UmlInterruptibleActivityRegion.h +++ b/genplugouts/CppUtilities/UmlInterruptibleActivityRegion.h @@ -3,13 +3,13 @@ #include "UmlBaseInterruptibleActivityRegion.h" -#include + class UmlInterruptibleActivityRegion : public UmlBaseInterruptibleActivityRegion { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlInterruptibleActivityRegion(void * id, const Q3CString & s) : UmlBaseInterruptibleActivityRegion(id, s) { + UmlInterruptibleActivityRegion(void * id, const QByteArray & s) : UmlBaseInterruptibleActivityRegion(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlItem.h b/genplugouts/CppUtilities/UmlItem.h index 5e4bc50c0..38a2f5eeb 100644 --- a/genplugouts/CppUtilities/UmlItem.h +++ b/genplugouts/CppUtilities/UmlItem.h @@ -3,7 +3,7 @@ #include "UmlBaseItem.h" -#include + // This class is a mother class for all the other Uml* classes, this // allows to generalize their management, declare virtual operations etc ... @@ -12,7 +12,7 @@ class UmlItem : public UmlBaseItem { public: - UmlItem(void * id, const Q3CString & n) : UmlBaseItem(id, n) {}; + UmlItem(void * id, const QByteArray & n) : UmlBaseItem(id, n) {}; virtual ~UmlItem(); diff --git a/genplugouts/CppUtilities/UmlNcRelation.h b/genplugouts/CppUtilities/UmlNcRelation.h index 60032619a..3d73ec633 100644 --- a/genplugouts/CppUtilities/UmlNcRelation.h +++ b/genplugouts/CppUtilities/UmlNcRelation.h @@ -3,7 +3,7 @@ #include "UmlBaseNcRelation.h" -#include + //This class manages 'relations' between non class objects // @@ -11,7 +11,7 @@ class UmlNcRelation : public UmlBaseNcRelation { public: - UmlNcRelation(void * id, const Q3CString & n) : UmlBaseNcRelation(id, n) {}; + UmlNcRelation(void * id, const QByteArray & n) : UmlBaseNcRelation(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlNode.h b/genplugouts/CppUtilities/UmlNode.h index 95edbe709..4c72e14fd 100644 --- a/genplugouts/CppUtilities/UmlNode.h +++ b/genplugouts/CppUtilities/UmlNode.h @@ -3,7 +3,7 @@ #include "UmlBaseNode.h" -#include + // This class manages 'nodes' // @@ -11,7 +11,7 @@ class UmlNode : public UmlBaseNode { public: - UmlNode(void * id, const Q3CString & n) : UmlBaseNode(id, n) {}; + UmlNode(void * id, const QByteArray & n) : UmlBaseNode(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlObjectDiagram.h b/genplugouts/CppUtilities/UmlObjectDiagram.h index ba429242a..c194e4613 100644 --- a/genplugouts/CppUtilities/UmlObjectDiagram.h +++ b/genplugouts/CppUtilities/UmlObjectDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseObjectDiagram.h" -#include + // This class manages 'object diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -14,7 +14,7 @@ class UmlObjectDiagram : public UmlBaseObjectDiagram { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlObjectDiagram(void * id, const Q3CString & s) : UmlBaseObjectDiagram(id, s) { + UmlObjectDiagram(void * id, const QByteArray & s) : UmlBaseObjectDiagram(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlOnSignalAction.h b/genplugouts/CppUtilities/UmlOnSignalAction.h index 158c0ddc0..82fd5747f 100644 --- a/genplugouts/CppUtilities/UmlOnSignalAction.h +++ b/genplugouts/CppUtilities/UmlOnSignalAction.h @@ -3,13 +3,13 @@ #include "UmlBaseOnSignalAction.h" -#include + class UmlOnSignalAction : public UmlBaseOnSignalAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlOnSignalAction(void * id, const Q3CString & s) : UmlBaseOnSignalAction(id, s) { + UmlOnSignalAction(void * id, const QByteArray & s) : UmlBaseOnSignalAction(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlOperation.h b/genplugouts/CppUtilities/UmlOperation.h index eec043152..f4c9e6547 100644 --- a/genplugouts/CppUtilities/UmlOperation.h +++ b/genplugouts/CppUtilities/UmlOperation.h @@ -3,7 +3,7 @@ #include "UmlBaseOperation.h" -#include + // This class manages 'operations', notes that the class 'UmlClassItem' // is a mother class of all the class's children. @@ -12,7 +12,7 @@ class UmlOperation : public UmlBaseOperation { public: - UmlOperation(void * id, const Q3CString & n) : UmlBaseOperation(id, n) {}; + UmlOperation(void * id, const QByteArray & n) : UmlBaseOperation(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlPackage.h b/genplugouts/CppUtilities/UmlPackage.h index 84e80d71e..c190ad80c 100644 --- a/genplugouts/CppUtilities/UmlPackage.h +++ b/genplugouts/CppUtilities/UmlPackage.h @@ -3,7 +3,7 @@ #include "UmlBasePackage.h" -#include + // This class manages a 'package', notes that the project itself is a package // @@ -11,7 +11,7 @@ class UmlPackage : public UmlBasePackage { public: - UmlPackage(void * id, const Q3CString & n) : UmlBasePackage(id, n) {}; + UmlPackage(void * id, const QByteArray & n) : UmlBasePackage(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlParameterSet.h b/genplugouts/CppUtilities/UmlParameterSet.h index 55a597fd4..f9927f672 100644 --- a/genplugouts/CppUtilities/UmlParameterSet.h +++ b/genplugouts/CppUtilities/UmlParameterSet.h @@ -3,14 +3,14 @@ #include "UmlBaseParameterSet.h" -#include + #include "UmlActivityItem.h" class UmlParameterSet : public UmlBaseParameterSet, public UmlActivityItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlParameterSet(void * id, const Q3CString & s) : UmlBaseParameterSet(id, s) { + UmlParameterSet(void * id, const QByteArray & s) : UmlBaseParameterSet(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlPinParameter.h b/genplugouts/CppUtilities/UmlPinParameter.h index d48cb7343..3d3283d6b 100644 --- a/genplugouts/CppUtilities/UmlPinParameter.h +++ b/genplugouts/CppUtilities/UmlPinParameter.h @@ -3,13 +3,13 @@ #include "UmlBasePinParameter.h" -#include + class UmlPinParameter : public UmlBasePinParameter { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlPinParameter(void * id, const Q3CString & s) : UmlBasePinParameter(id, s) { + UmlPinParameter(void * id, const QByteArray & s) : UmlBasePinParameter(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlPseudoState.h b/genplugouts/CppUtilities/UmlPseudoState.h index 075761ec7..1c350a942 100644 --- a/genplugouts/CppUtilities/UmlPseudoState.h +++ b/genplugouts/CppUtilities/UmlPseudoState.h @@ -2,7 +2,7 @@ #define _UMLPSEUDOSTATE_H -#include + #include "UmlItem.h" #include "UmlStateItem.h" @@ -10,7 +10,7 @@ class UmlPseudoState : public UmlStateItem, public UmlItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlPseudoState(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlPseudoState(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlRegion.h b/genplugouts/CppUtilities/UmlRegion.h index d3f32cb7b..d0ce11dde 100644 --- a/genplugouts/CppUtilities/UmlRegion.h +++ b/genplugouts/CppUtilities/UmlRegion.h @@ -4,13 +4,13 @@ #include "UmlBaseRegion.h" #include "UmlStateItem.h" -#include + class UmlRegion : public UmlBaseRegion, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlRegion(void * id, const Q3CString & s) : UmlBaseRegion(id, s) { + UmlRegion(void * id, const QByteArray & s) : UmlBaseRegion(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlRelation.h b/genplugouts/CppUtilities/UmlRelation.h index 6b4358b40..a246cfcfd 100644 --- a/genplugouts/CppUtilities/UmlRelation.h +++ b/genplugouts/CppUtilities/UmlRelation.h @@ -3,7 +3,7 @@ #include "UmlBaseRelation.h" -#include + // This class manages 'relations' between classes, notes that the class 'UmlClassItem' // is a mother class of all the class's children. @@ -12,7 +12,7 @@ class UmlRelation : public UmlBaseRelation { public: - UmlRelation(void * id, const Q3CString & n) : UmlBaseRelation(id, n) {}; + UmlRelation(void * id, const QByteArray & n) : UmlBaseRelation(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlSequenceDiagram.h b/genplugouts/CppUtilities/UmlSequenceDiagram.h index d3b3d83fc..a36e34a65 100644 --- a/genplugouts/CppUtilities/UmlSequenceDiagram.h +++ b/genplugouts/CppUtilities/UmlSequenceDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseSequenceDiagram.h" -#include + // This class manages 'sequence diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlSequenceDiagram : public UmlBaseSequenceDiagram { public: - UmlSequenceDiagram(void * id, const Q3CString & n) : UmlBaseSequenceDiagram(id, n) {}; + UmlSequenceDiagram(void * id, const QByteArray & n) : UmlBaseSequenceDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlSettings.cpp b/genplugouts/CppUtilities/UmlSettings.cpp index f3e7e8a83..0e177102f 100644 --- a/genplugouts/CppUtilities/UmlSettings.cpp +++ b/genplugouts/CppUtilities/UmlSettings.cpp @@ -7,15 +7,15 @@ #include "UmlStereotype.h" #include "Logging/QsLog.h" //Added by qt3to4: -#include -Q3CString UmlSettings::artifactDescription() +#include +QByteArray UmlSettings::artifactDescription() { read_if_needed_(); return _artifact_default_description; } -bool UmlSettings::set_ArtifactDescription(Q3CString v) +bool UmlSettings::set_ArtifactDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultArtifactDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -27,14 +27,14 @@ bool UmlSettings::set_ArtifactDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::classDescription() +QByteArray UmlSettings::classDescription() { read_if_needed_(); return _class_default_description; } -bool UmlSettings::set_ClassDescription(Q3CString v) +bool UmlSettings::set_ClassDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultClassDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -46,14 +46,14 @@ bool UmlSettings::set_ClassDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::operationDescription() +QByteArray UmlSettings::operationDescription() { read_if_needed_(); return _operation_default_description; } -bool UmlSettings::set_OperationDescription(Q3CString v) +bool UmlSettings::set_OperationDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultOperationDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -65,14 +65,14 @@ bool UmlSettings::set_OperationDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::attributeDescription() +QByteArray UmlSettings::attributeDescription() { read_if_needed_(); return _attribute_default_description; } -bool UmlSettings::set_AttributeDescription(Q3CString v) +bool UmlSettings::set_AttributeDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultAttributeDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -84,14 +84,14 @@ bool UmlSettings::set_AttributeDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::relationDescription() +QByteArray UmlSettings::relationDescription() { read_if_needed_(); return _relation_default_description; } -bool UmlSettings::set_RelationDescription(Q3CString v) +bool UmlSettings::set_RelationDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultRelationDescriptionCmd, (const char *)v); //[rageek] Fix prototype @@ -147,33 +147,33 @@ aLanguage UmlSettings::_uml_get_name; aLanguage UmlSettings::_uml_set_name; -Q3CString UmlSettings::_artifact_default_description; +QByteArray UmlSettings::_artifact_default_description; -Q3CString UmlSettings::_class_default_description; +QByteArray UmlSettings::_class_default_description; -Q3CString UmlSettings::_operation_default_description; +QByteArray UmlSettings::_operation_default_description; -Q3CString UmlSettings::_attribute_default_description; +QByteArray UmlSettings::_attribute_default_description; -Q3CString UmlSettings::_relation_default_description; +QByteArray UmlSettings::_relation_default_description; -Q3Dict UmlSettings::_map_builtins; +QHash UmlSettings::_map_builtins; UmlBuiltin * UmlSettings::_builtins; -Q3Dict UmlSettings::_map_relation_attribute_stereotypes; +QHash UmlSettings::_map_relation_attribute_stereotypes; UmlStereotype * UmlSettings::_relation_attribute_stereotypes; -Q3Dict UmlSettings::_map_class_stereotypes; +QHash UmlSettings::_map_class_stereotypes; UmlStereotype * UmlSettings::_class_stereotypes; void UmlSettings::read_() { QLOG_INFO() << "2.2.4"; - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); QLOG_INFO() << "2.2.4.1"; @@ -183,7 +183,7 @@ void UmlSettings::read_() QLOG_INFO() << "2.2.5"; if (n / 2 > _map_builtins.size()) - _map_builtins.resize(_map_builtins.size() * 2 - 1); + _map_builtins.reserve(_map_builtins.size() * 2 - 1); for (index = 0; index != n; index += 1) { _builtins[index].uml = UmlCom::read_string(); @@ -195,7 +195,7 @@ void UmlSettings::read_() _relation_attribute_stereotypes = new UmlStereotype[n]; QLOG_INFO() << "2.2.6"; if (n / 2 > _map_relation_attribute_stereotypes.size()) - _map_relation_attribute_stereotypes.resize(_map_relation_attribute_stereotypes.size() * 2 - 1); + _map_relation_attribute_stereotypes.reserve(_map_relation_attribute_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { _relation_attribute_stereotypes[index].uml = UmlCom::read_string(); @@ -208,7 +208,7 @@ void UmlSettings::read_() _class_stereotypes = new UmlStereotype[n]; if (n / 2 > _map_class_stereotypes.size()) - _map_class_stereotypes.resize(_map_class_stereotypes.size() * 2 - 1); + _map_class_stereotypes.reserve(_map_class_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { _class_stereotypes[index].uml = UmlCom::read_string(); @@ -237,18 +237,18 @@ void UmlSettings::read_if_needed_() } } -unsigned UmlSettings::multiplicity_column(const Q3CString & mult) +unsigned UmlSettings::multiplicity_column(const QByteArray & mult) { if (mult.isEmpty() || (mult == "1")) return 0; - if ((mult == "*") || (mult.find("..") != -1)) + if ((mult == "*") || (mult.indexOf("..") != -1)) return 1; return 2; } -Q3CString UmlSettings::uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f) +QByteArray UmlSettings::uml_type(const QByteArray & t, QByteArray UmlBuiltin::* f) { unsigned index = _map_builtins.count(); @@ -259,7 +259,7 @@ Q3CString UmlSettings::uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f) return 0; } -Q3CString UmlSettings::uml_rel_attr_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f) +QByteArray UmlSettings::uml_rel_attr_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f) { unsigned index = _map_relation_attribute_stereotypes.count(); @@ -270,7 +270,7 @@ Q3CString UmlSettings::uml_rel_attr_stereotype(const Q3CString & t, Q3CString Um return 0; } -Q3CString UmlSettings::uml_class_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f) +QByteArray UmlSettings::uml_class_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f) { unsigned index = _map_class_stereotypes.count(); @@ -281,19 +281,19 @@ Q3CString UmlSettings::uml_class_stereotype(const Q3CString & t, Q3CString UmlSt return 0; } -UmlBuiltin * UmlSettings::add_type(const Q3CString & s) +UmlBuiltin * UmlSettings::add_type(const QByteArray & s) { - unsigned n = _map_builtins.count(); - unsigned index; + int n = _map_builtins.count(); + int index; UmlBuiltin * builtins = new UmlBuiltin[n + 1]; if (n / 2 > _map_builtins.size()) - _map_builtins.resize(_map_builtins.size() * 2 - 1); + _map_builtins.reserve(_map_builtins.size() * 2 - 1); for (index = 0; index != n; index += 1) { builtins[index] = _builtins[index]; - _map_builtins.replace(builtins[index].uml, &builtins[index]); + _map_builtins.insert(builtins[index].uml, &builtins[index]); } builtins[index].uml = s; @@ -318,19 +318,19 @@ UmlBuiltin * UmlSettings::add_type(const Q3CString & s) return &_builtins[index]; } -UmlStereotype * UmlSettings::add_rel_attr_stereotype(const Q3CString & s) +UmlStereotype * UmlSettings::add_rel_attr_stereotype(const QByteArray & s) { - unsigned n = _map_relation_attribute_stereotypes.count(); - unsigned index; + int n = _map_relation_attribute_stereotypes.count(); + int index; UmlStereotype * relation_attribute_stereotypes = new UmlStereotype[n + 1]; if (n / 2 > _map_relation_attribute_stereotypes.size()) - _map_relation_attribute_stereotypes.resize(_map_relation_attribute_stereotypes.size() * 2 - 1); + _map_relation_attribute_stereotypes.reserve(_map_relation_attribute_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { relation_attribute_stereotypes[index] = _relation_attribute_stereotypes[index]; - _map_relation_attribute_stereotypes.replace(relation_attribute_stereotypes[index].uml, + _map_relation_attribute_stereotypes.insert(relation_attribute_stereotypes[index].uml, &relation_attribute_stereotypes[index]); } @@ -353,19 +353,19 @@ UmlStereotype * UmlSettings::add_rel_attr_stereotype(const Q3CString & s) return &_relation_attribute_stereotypes[index]; } -UmlStereotype * UmlSettings::add_class_stereotype(const Q3CString & s) +UmlStereotype * UmlSettings::add_class_stereotype(const QByteArray & s) { - unsigned n = _map_class_stereotypes.count(); - unsigned index; + int n = _map_class_stereotypes.count(); + int index; UmlStereotype * class_stereotypes = new UmlStereotype[n + 1]; if (n / 2 > _map_class_stereotypes.size()) - _map_class_stereotypes.resize(_map_class_stereotypes.size() * 2 - 1); + _map_class_stereotypes.reserve(_map_class_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { class_stereotypes[index] = _class_stereotypes[index]; - _map_class_stereotypes.replace(class_stereotypes[index].uml, &class_stereotypes[index]); + _map_class_stereotypes.insert(class_stereotypes[index].uml, &class_stereotypes[index]); } class_stereotypes[index].uml = s; diff --git a/genplugouts/CppUtilities/UmlSettings.h b/genplugouts/CppUtilities/UmlSettings.h index c37c13a10..4375d747d 100644 --- a/genplugouts/CppUtilities/UmlSettings.h +++ b/genplugouts/CppUtilities/UmlSettings.h @@ -1,10 +1,8 @@ #ifndef _UMLSETTINGS_H #define _UMLSETTINGS_H - - -#include +#include #include "aLanguage.h" -#include +#include struct UmlBuiltin; struct UmlStereotype; @@ -20,44 +18,44 @@ class UmlSettings { public: // return the default description - static Q3CString artifactDescription(); + static QByteArray artifactDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ArtifactDescription(Q3CString v); + static bool set_ArtifactDescription(QByteArray v); // return the default description - static Q3CString classDescription(); + static QByteArray classDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDescription(Q3CString v); + static bool set_ClassDescription(QByteArray v); // return the default description - static Q3CString operationDescription(); + static QByteArray operationDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDescription(Q3CString v); + static bool set_OperationDescription(QByteArray v); // return the default description - static Q3CString attributeDescription(); + static QByteArray attributeDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDescription(Q3CString v); + static bool set_AttributeDescription(QByteArray v); // return the default description - static Q3CString relationDescription(); + static QByteArray relationDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDescription(Q3CString v); + static bool set_RelationDescription(QByteArray v); // return the language from which the getter's name rule must be followed at Uml level static aLanguage umlGetName(); @@ -90,25 +88,26 @@ class UmlSettings protected: - static Q3CString _artifact_default_description; + static QByteArray _artifact_default_description; - static Q3CString _class_default_description; + static QByteArray _class_default_description; - static Q3CString _operation_default_description; + static QByteArray _operation_default_description; - static Q3CString _attribute_default_description; + static QByteArray _attribute_default_description; - static Q3CString _relation_default_description; + static QByteArray _relation_default_description; + static QHash _map_relation_attribute_stereotypes; - static Q3Dict _map_builtins; + static QHash _map_builtins; static UmlBuiltin * _builtins; - static Q3Dict _map_relation_attribute_stereotypes; + static QHash _map_relation_stereotypes; static UmlStereotype * _relation_attribute_stereotypes; - static Q3Dict _map_class_stereotypes; + static QHash _map_class_stereotypes; static UmlStereotype * _class_stereotypes; @@ -122,31 +121,31 @@ class UmlSettings //internal, do NOT use it - static unsigned multiplicity_column(const Q3CString & mult); + static unsigned multiplicity_column(const QByteArray & mult); //internal, do NOT use it - static Q3CString uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f); + static QByteArray uml_type(const QByteArray & t, QByteArray UmlBuiltin::* f); //internal, do NOT use it - static Q3CString uml_rel_attr_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f); + static QByteArray uml_rel_attr_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f); //internal, do NOT use it - static Q3CString uml_class_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f); + static QByteArray uml_class_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f); //internal, do NOT use it - static UmlBuiltin * add_type(const Q3CString & s); + static UmlBuiltin * add_type(const QByteArray & s); //internal, do NOT use it - static UmlStereotype * add_rel_attr_stereotype(const Q3CString & s); + static UmlStereotype * add_rel_attr_stereotype(const QByteArray & s); //internal, do NOT use it - static UmlStereotype * add_class_stereotype(const Q3CString & s); + static UmlStereotype * add_class_stereotype(const QByteArray & s); }; diff --git a/genplugouts/CppUtilities/UmlState.h b/genplugouts/CppUtilities/UmlState.h index b8a04be4a..e760bb6b6 100644 --- a/genplugouts/CppUtilities/UmlState.h +++ b/genplugouts/CppUtilities/UmlState.h @@ -4,13 +4,13 @@ #include "UmlBaseState.h" #include "UmlStateItem.h" -#include + class UmlState : public UmlBaseState, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlState(void * id, const Q3CString & s) : UmlBaseState(id, s) { + UmlState(void * id, const QByteArray & s) : UmlBaseState(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlStateDiagram.h b/genplugouts/CppUtilities/UmlStateDiagram.h index f49b5fb44..c639f9193 100644 --- a/genplugouts/CppUtilities/UmlStateDiagram.h +++ b/genplugouts/CppUtilities/UmlStateDiagram.h @@ -4,13 +4,13 @@ #include "UmlBaseStateDiagram.h" #include "UmlStateItem.h" -#include + class UmlStateDiagram : public UmlBaseStateDiagram, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlStateDiagram(void * id, const Q3CString & s) : UmlBaseStateDiagram(id, s) { + UmlStateDiagram(void * id, const QByteArray & s) : UmlBaseStateDiagram(id, s) { } }; diff --git a/genplugouts/CppUtilities/UmlStereotype.h b/genplugouts/CppUtilities/UmlStereotype.h index 8c5bf56c0..5863e0904 100644 --- a/genplugouts/CppUtilities/UmlStereotype.h +++ b/genplugouts/CppUtilities/UmlStereotype.h @@ -1,32 +1,32 @@ #ifndef _UMLSTEREOTYPE_H #define _UMLSTEREOTYPE_H +#include -#include // Internal class used to know how what code is produced for a stereotype in each language struct UmlStereotype { - Q3CString uml; + QByteArray uml; #ifdef WITHCPP - Q3CString cpp; + QByteArray cpp; #endif #ifdef WITHJAVA - Q3CString java; + QByteArray java; #endif #ifdef WITHPHP - Q3CString php; + QByteArray php; #endif #ifdef WITHPHP - Q3CString python; + QByteArray python; #endif #ifdef WITHIDL - Q3CString idl; + QByteArray idl; #endif }; diff --git a/genplugouts/CppUtilities/UmlUseCase.h b/genplugouts/CppUtilities/UmlUseCase.h index 392773262..c21cc521d 100644 --- a/genplugouts/CppUtilities/UmlUseCase.h +++ b/genplugouts/CppUtilities/UmlUseCase.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCase.h" -#include + // This class manages 'use case' // @@ -11,7 +11,7 @@ class UmlUseCase : public UmlBaseUseCase { public: - UmlUseCase(void * id, const Q3CString & n) : UmlBaseUseCase(id, n) {}; + UmlUseCase(void * id, const QByteArray & n) : UmlBaseUseCase(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlUseCaseDiagram.h b/genplugouts/CppUtilities/UmlUseCaseDiagram.h index 132b56d36..bf490aa90 100644 --- a/genplugouts/CppUtilities/UmlUseCaseDiagram.h +++ b/genplugouts/CppUtilities/UmlUseCaseDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCaseDiagram.h" -#include + // This class manages 'use case diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlUseCaseDiagram : public UmlBaseUseCaseDiagram { public: - UmlUseCaseDiagram(void * id, const Q3CString & n) : UmlBaseUseCaseDiagram(id, n) {}; + UmlUseCaseDiagram(void * id, const QByteArray & n) : UmlBaseUseCaseDiagram(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlUseCaseView.h b/genplugouts/CppUtilities/UmlUseCaseView.h index a715b2f5f..ef475b173 100644 --- a/genplugouts/CppUtilities/UmlUseCaseView.h +++ b/genplugouts/CppUtilities/UmlUseCaseView.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCaseView.h" -#include + // This class manages 'use case view' // @@ -11,7 +11,7 @@ class UmlUseCaseView : public UmlBaseUseCaseView { public: - UmlUseCaseView(void * id, const Q3CString & n) : UmlBaseUseCaseView(id, n) {}; + UmlUseCaseView(void * id, const QByteArray & n) : UmlBaseUseCaseView(id, n) {}; }; diff --git a/genplugouts/CppUtilities/UmlView.h b/genplugouts/CppUtilities/UmlView.h index 418e689ab..2435ce96b 100644 --- a/genplugouts/CppUtilities/UmlView.h +++ b/genplugouts/CppUtilities/UmlView.h @@ -3,13 +3,13 @@ #include "UmlBaseView.h" -#include + class UmlView : public UmlBaseView { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlView(void * id, const Q3CString & s) : UmlBaseView(id, s) { + UmlView(void * id, const QByteArray & s) : UmlBaseView(id, s) { } }; diff --git a/genplugouts/CppUtilities/gridbox.cpp b/genplugouts/CppUtilities/gridbox.cpp new file mode 100644 index 000000000..78233be1d --- /dev/null +++ b/genplugouts/CppUtilities/gridbox.cpp @@ -0,0 +1,37 @@ +#include "gridbox.h" +#include +GridBox::GridBox(int n, QWidget * parent, QString name) : + QGroupBox(name, parent) +{ + m_layout = new QGridLayout(this); + setLayout(m_layout); + m_numCols = n; + currentIndex = 0; + setSpacing(0); + setMargin(0); + if(!name.isEmpty()) + this->setObjectName(name); +} + +void GridBox::setMargin(int mar) +{ + m_layout->setMargin(mar); +} + +void GridBox::setSpacing(int spacing) +{ + m_layout->setSpacing(spacing); +} + +void GridBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget, currentIndex/m_numCols, currentIndex%m_numCols); + currentIndex ++; +} + +QString GridBox::name(QString name) +{ + if(objectName().isEmpty()) + setObjectName(name); + return objectName(); +} diff --git a/genplugouts/CppUtilities/gridbox.h b/genplugouts/CppUtilities/gridbox.h new file mode 100644 index 000000000..64793941d --- /dev/null +++ b/genplugouts/CppUtilities/gridbox.h @@ -0,0 +1,26 @@ +#ifndef GRIDBOX_H +#define GRIDBOX_H + +#include +#include +class QGridLayout; +class GridBox : public QGroupBox +{ + Q_OBJECT +public: + explicit GridBox(int n, QWidget *parent = 0,QString name = QString()); + void setMargin(int mar); + void setSpacing(int spacing); + void addWidget(QWidget *widget); + QString name(QString name = QString()); + +signals: + +public slots: +private: + QGridLayout *m_layout; + int m_numCols; + int currentIndex; +}; + +#endif // GRIDBOX_H diff --git a/genplugouts/CppUtilities/hhbox.cpp b/genplugouts/CppUtilities/hhbox.cpp new file mode 100644 index 000000000..95a09b5ea --- /dev/null +++ b/genplugouts/CppUtilities/hhbox.cpp @@ -0,0 +1,30 @@ +#include "hhbox.h" + +HHBox::HHBox(QWidget *parent, QString name) : + QWidget(parent) +{ + m_layout = new QHBoxLayout(this); + this->setLayout(m_layout); + m_layout->setSpacing(0); + m_layout->setMargin(0); + setObjectName(name); +} + +void HHBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget); +} + +bool HHBox::setStretchFactor(QWidget *w, int stretch) +{ + //if not in layout + if(m_layout->indexOf(w) == -1) + m_layout->addWidget(w); + m_layout->setStretchFactor(w, stretch); + return 0; +} + +void HHBox::setMargin(int margin) +{ + m_layout->setMargin(margin); +} diff --git a/genplugouts/CppUtilities/hhbox.h b/genplugouts/CppUtilities/hhbox.h new file mode 100644 index 000000000..06a8620d6 --- /dev/null +++ b/genplugouts/CppUtilities/hhbox.h @@ -0,0 +1,22 @@ +#ifndef HHBOX_H +#define HHBOX_H + +#include +#include +class HHBox : public QWidget +{ + Q_OBJECT +public: + explicit HHBox(QWidget *parent = 0, QString name= QString()); + void addWidget(QWidget* widget); + bool setStretchFactor(QWidget *w, int stretch); + void setMargin(int margin); + +signals: + +public slots: +private: + QHBoxLayout *m_layout; +}; + +#endif // HHBOX_H diff --git a/genplugouts/CppUtilities/vvbox.cpp b/genplugouts/CppUtilities/vvbox.cpp new file mode 100644 index 000000000..288eb93ac --- /dev/null +++ b/genplugouts/CppUtilities/vvbox.cpp @@ -0,0 +1,26 @@ +#include "vvbox.h" + +VVBox::VVBox(QWidget *parent) : + QWidget(parent) +{ + m_layout = new QVBoxLayout(this); + this->setLayout(m_layout); + m_layout->setSpacing(0); + m_layout->setMargin(0); +} + +void VVBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget); +} +bool VVBox::setStretchFactor(QWidget *w, int stretch) +{ + if(m_layout->indexOf(w) == -1) + m_layout->addWidget(w); + m_layout->setStretchFactor(w, stretch); + return 0; +} +void VVBox::setMargin(int margin) +{ + m_layout->setMargin(margin); +} diff --git a/genplugouts/CppUtilities/vvbox.h b/genplugouts/CppUtilities/vvbox.h new file mode 100644 index 000000000..7f27f2ea8 --- /dev/null +++ b/genplugouts/CppUtilities/vvbox.h @@ -0,0 +1,22 @@ +#ifndef VVBOX_H +#define VVBOX_H + +#include +#include +class VVBox : public QWidget +{ + Q_OBJECT +public: + explicit VVBox(QWidget *parent = 0); + void addWidget(QWidget* widget); + + bool setStretchFactor(QWidget *w, int stretch); + void setMargin(int margin); +signals: + +public slots: +private: + QVBoxLayout *m_layout; +}; + +#endif // VVBOX_H diff --git a/genplugouts/FileControl/CppSettings.cpp b/genplugouts/FileControl/CppSettings.cpp index 9be970344..6fed78bdb 100644 --- a/genplugouts/FileControl/CppSettings.cpp +++ b/genplugouts/FileControl/CppSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool CppSettings::useDefaults() { UmlCom::send_cmd(cppSettingsCmd, getCppUseDefaultsCmd); @@ -22,21 +22,21 @@ bool CppSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString CppSettings::type(Q3CString s) +QByteArray CppSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_Type(Q3CString s, Q3CString v) +bool CppSettings::set_Type(QByteArray s, QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppTypeCmd, s, v); if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -49,28 +49,28 @@ bool CppSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::umlType(Q3CString s) +QByteArray CppSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::cpp); } -Q3CString CppSettings::relationStereotype(Q3CString s) +QByteArray CppSettings::relationStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_RelationStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_RelationStereotype(QByteArray s, QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppRelationStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_stereotype(s); @@ -83,28 +83,28 @@ bool CppSettings::set_RelationStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::relationUmlStereotype(Q3CString s) +QByteArray CppSettings::relationUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::classStereotype(Q3CString s) +QByteArray CppSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_ClassStereotype(QByteArray s, QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -117,31 +117,31 @@ bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::classUmlStereotype(Q3CString s) +QByteArray CppSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::include(Q3CString s) +QByteArray CppSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool CppSettings::set_Include(Q3CString s, Q3CString v) +bool CppSettings::set_Include(QByteArray s, QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppIncludeCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -152,14 +152,14 @@ bool CppSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::rootDir() +QByteArray CppSettings::rootDir() { read_if_needed_(); return _root; } -bool CppSettings::set_RootDir(Q3CString v) +bool CppSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppRootDirCmd, v); @@ -171,14 +171,14 @@ bool CppSettings::set_RootDir(Q3CString v) return FALSE; } -Q3CString CppSettings::headerContent() +QByteArray CppSettings::headerContent() { read_if_needed_(); return _h_content; } -bool CppSettings::set_HeaderContent(Q3CString v) +bool CppSettings::set_HeaderContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderContentCmd, v); @@ -190,14 +190,14 @@ bool CppSettings::set_HeaderContent(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceContent() +QByteArray CppSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool CppSettings::set_SourceContent(Q3CString v) +bool CppSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceContentCmd, v); @@ -209,14 +209,14 @@ bool CppSettings::set_SourceContent(Q3CString v) return FALSE; } -Q3CString CppSettings::headerExtension() +QByteArray CppSettings::headerExtension() { read_if_needed_(); return _h_ext; } -bool CppSettings::set_HeaderExtension(Q3CString v) +bool CppSettings::set_HeaderExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderExtensionCmd, v); @@ -228,14 +228,14 @@ bool CppSettings::set_HeaderExtension(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceExtension() +QByteArray CppSettings::sourceExtension() { read_if_needed_(); return _src_ext; } -bool CppSettings::set_SourceExtension(Q3CString v) +bool CppSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceExtensionCmd, v); @@ -266,14 +266,14 @@ bool CppSettings::set_IncludeWithPath(bool v) return FALSE; } -const Q3CString & CppSettings::enumIn() +const QByteArray & CppSettings::enumIn() { read_if_needed_(); return _enum_in; } -bool CppSettings::set_EnumIn(Q3CString v) +bool CppSettings::set_EnumIn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInCmd, v); @@ -285,14 +285,14 @@ bool CppSettings::set_EnumIn(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumOut() +const QByteArray & CppSettings::enumOut() { read_if_needed_(); return _enum_out; } -bool CppSettings::set_EnumOut(Q3CString v) +bool CppSettings::set_EnumOut(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumOutCmd, v); @@ -304,14 +304,14 @@ bool CppSettings::set_EnumOut(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumInout() +const QByteArray & CppSettings::enumInout() { read_if_needed_(); return _enum_inout; } -bool CppSettings::set_EnumInout(Q3CString v) +bool CppSettings::set_EnumInout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInOutCmd, v); @@ -323,14 +323,14 @@ bool CppSettings::set_EnumInout(Q3CString v) return FALSE; } -Q3CString CppSettings::enumReturn() +QByteArray CppSettings::enumReturn() { read_if_needed_(); return _enum_return; } -bool CppSettings::set_EnumReturn(Q3CString v) +bool CppSettings::set_EnumReturn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumReturnCmd, v); @@ -342,14 +342,14 @@ bool CppSettings::set_EnumReturn(Q3CString v) return FALSE; } -const Q3CString & CppSettings::in() +const QByteArray & CppSettings::in() { read_if_needed_(); return _in; } -bool CppSettings::set_In(Q3CString v) +bool CppSettings::set_In(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInCmd, v); @@ -361,14 +361,14 @@ bool CppSettings::set_In(Q3CString v) return FALSE; } -const Q3CString & CppSettings::out() +const QByteArray & CppSettings::out() { read_if_needed_(); return _out; } -bool CppSettings::set_Out(Q3CString v) +bool CppSettings::set_Out(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOutCmd, v); @@ -380,14 +380,14 @@ bool CppSettings::set_Out(Q3CString v) return FALSE; } -const Q3CString & CppSettings::inout() +const QByteArray & CppSettings::inout() { read_if_needed_(); return _inout; } -bool CppSettings::set_Inout(Q3CString v) +bool CppSettings::set_Inout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInOutCmd, v); @@ -399,14 +399,14 @@ bool CppSettings::set_Inout(Q3CString v) return FALSE; } -Q3CString CppSettings::Return() +QByteArray CppSettings::Return() { read_if_needed_(); return _return; } -bool CppSettings::set_Return(Q3CString v) +bool CppSettings::set_Return(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppReturnCmd, v); @@ -418,14 +418,14 @@ bool CppSettings::set_Return(Q3CString v) return FALSE; } -const Q3CString & CppSettings::classDecl() +const QByteArray & CppSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool CppSettings::set_ClassDecl(Q3CString v) +bool CppSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppClassDeclCmd, v); @@ -437,14 +437,14 @@ bool CppSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::externalClassDecl() +const QByteArray & CppSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool CppSettings::set_ExternalClassDecl(Q3CString v) +bool CppSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppExternalClassDeclCmd, v); @@ -456,14 +456,14 @@ bool CppSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::structDecl() +const QByteArray & CppSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool CppSettings::set_StructDecl(Q3CString v) +bool CppSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppStructDeclCmd, v); @@ -475,14 +475,14 @@ bool CppSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::unionDecl() +const QByteArray & CppSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool CppSettings::set_UnionDecl(Q3CString v) +bool CppSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppUnionDeclCmd, v); @@ -494,14 +494,14 @@ bool CppSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumDecl() +const QByteArray & CppSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool CppSettings::set_EnumDecl(Q3CString v) +bool CppSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumDeclCmd, v); @@ -513,14 +513,14 @@ bool CppSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::typedefDecl() +const QByteArray & CppSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool CppSettings::set_TypedefDecl(Q3CString v) +bool CppSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppTypedefDeclCmd, v); @@ -532,14 +532,14 @@ bool CppSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::attributeDecl() +const QByteArray & CppSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool CppSettings::set_AttributeDecl(Q3CString v) +bool CppSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppAttributeDeclCmd, v); @@ -551,14 +551,14 @@ bool CppSettings::set_AttributeDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumItemDecl() +const QByteArray & CppSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool CppSettings::set_EnumItemDecl(Q3CString v) +bool CppSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumItemDeclCmd, v); @@ -570,7 +570,7 @@ bool CppSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::relationDecl(bool by_value, const char * multiplicity) +const QByteArray & CppSettings::relationDecl(bool by_value, const char * multiplicity) { read_if_needed_(); @@ -589,14 +589,14 @@ bool CppSettings::set_RelationDecl(bool by_value, const char * multiplicity, con return FALSE; } -const Q3CString & CppSettings::operationDecl() +const QByteArray & CppSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool CppSettings::set_OperationDecl(Q3CString v) +bool CppSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDeclCmd, v); @@ -608,14 +608,14 @@ bool CppSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::operationDef() +const QByteArray & CppSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool CppSettings::set_OperationDef(Q3CString v) +bool CppSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDefCmd, v); @@ -665,14 +665,14 @@ bool CppSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::getName() +const QByteArray & CppSettings::getName() { read_if_needed_(); return _get_name; } -bool CppSettings::set_GetName(Q3CString v) +bool CppSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppGetNameCmd, v); @@ -760,14 +760,14 @@ bool CppSettings::set_SetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::setName() +const QByteArray & CppSettings::setName() { read_if_needed_(); return _set_name; } -bool CppSettings::set_SetName(Q3CString v) +bool CppSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSetNameCmd, v); @@ -819,51 +819,51 @@ bool CppSettings::set_IsSetParamConst(bool v) bool CppSettings::_defined; -Q3CString CppSettings::_root; +QByteArray CppSettings::_root; -Q3CString CppSettings::_in; +QByteArray CppSettings::_in; -Q3CString CppSettings::_out; +QByteArray CppSettings::_out; -Q3CString CppSettings::_inout; +QByteArray CppSettings::_inout; -Q3CString CppSettings::_return; +QByteArray CppSettings::_return; -Q3CString CppSettings::_enum_in; +QByteArray CppSettings::_enum_in; -Q3CString CppSettings::_enum_out; +QByteArray CppSettings::_enum_out; -Q3CString CppSettings::_enum_inout; +QByteArray CppSettings::_enum_inout; -Q3CString CppSettings::_enum_return; +QByteArray CppSettings::_enum_return; -Q3CString CppSettings::_class_decl; +QByteArray CppSettings::_class_decl; -Q3CString CppSettings::_external_class_decl; +QByteArray CppSettings::_external_class_decl; -Q3CString CppSettings::_struct_decl; +QByteArray CppSettings::_struct_decl; -Q3CString CppSettings::_union_decl; +QByteArray CppSettings::_union_decl; -Q3CString CppSettings::_enum_decl; +QByteArray CppSettings::_enum_decl; -Q3CString CppSettings::_typedef_decl; +QByteArray CppSettings::_typedef_decl; -Q3CString CppSettings::_attr_decl; +QByteArray CppSettings::_attr_decl; -Q3CString CppSettings::_enum_item_decl; +QByteArray CppSettings::_enum_item_decl; -Q3CString CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; +QByteArray CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; -Q3CString CppSettings::_oper_decl; +QByteArray CppSettings::_oper_decl; -Q3CString CppSettings::_oper_def; +QByteArray CppSettings::_oper_def; bool CppSettings::_force_oper_throw; aVisibility CppSettings::_get_visibility; -Q3CString CppSettings::_get_name; +QByteArray CppSettings::_get_name; bool CppSettings::_is_get_inline; @@ -873,23 +873,23 @@ bool CppSettings::_is_get_value_const; aVisibility CppSettings::_set_visibility; -Q3CString CppSettings::_set_name; +QByteArray CppSettings::_set_name; bool CppSettings::_is_set_inline; bool CppSettings::_is_set_param_const; -Q3CString CppSettings::_h_content; +QByteArray CppSettings::_h_content; -Q3CString CppSettings::_src_content; +QByteArray CppSettings::_src_content; -Q3CString CppSettings::_h_ext; +QByteArray CppSettings::_h_ext; -Q3CString CppSettings::_src_ext; +QByteArray CppSettings::_src_ext; bool CppSettings::_incl_with_path; -Q3Dict CppSettings::_map_includes; +QHash CppSettings::_map_includes; void CppSettings::read_() { @@ -922,13 +922,13 @@ void CppSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _h_content = UmlCom::read_string(); diff --git a/genplugouts/FileControl/CppSettings.h b/genplugouts/FileControl/CppSettings.h index 24507102f..282078ef3 100644 --- a/genplugouts/FileControl/CppSettings.h +++ b/genplugouts/FileControl/CppSettings.h @@ -4,10 +4,10 @@ #ifdef WITHCPP -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning C++, configured through // the 'Generation settings' dialog. @@ -31,100 +31,100 @@ class CppSettings : public UmlSettings // returns the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the C++ type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationStereotype(Q3CString s); + static QByteArray relationStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationStereotype(Q3CString s, Q3CString v); + static bool set_RelationStereotype(QByteArray s, QByteArray v); // reverse of the RelationStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString relationUmlStereotype(Q3CString s); + static QByteArray relationUmlStereotype(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static Q3CString rootDir(); + static QByteArray rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default header file content - static Q3CString headerContent(); + static QByteArray headerContent(); // set the default header file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderContent(Q3CString v); + static bool set_HeaderContent(QByteArray v); // returns the default source file content - static Q3CString sourceContent(); + static QByteArray sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the header files produced by the // C++ code generator - static Q3CString headerExtension(); + static QByteArray headerExtension(); // set the extension of the header files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderExtension(Q3CString v); + static bool set_HeaderExtension(QByteArray v); // returns the extension of the source files produced by the // C++ code generator - static Q3CString sourceExtension(); + static QByteArray sourceExtension(); // set the extension of the source files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // indicates to the code generator if the #include may specify // the path of just the file's name @@ -138,70 +138,70 @@ class CppSettings : public UmlSettings // returns the default operation 'in' parameter specification // in case its type is an enum - static const Q3CString & enumIn(); + static const QByteArray & enumIn(); // set the default operation 'in' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumIn(Q3CString v); + static bool set_EnumIn(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is an enum - static const Q3CString & enumOut(); + static const QByteArray & enumOut(); // set the default operation 'out' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumOut(Q3CString v); + static bool set_EnumOut(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is an enum - static const Q3CString & enumInout(); + static const QByteArray & enumInout(); // set the default operation 'inout' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumInout(Q3CString v); + static bool set_EnumInout(QByteArray v); // return the default operation value type form - static Q3CString enumReturn(); + static QByteArray enumReturn(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumReturn(Q3CString v); + static bool set_EnumReturn(QByteArray v); // returns the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & in(); + static const QByteArray & in(); // set the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_In(Q3CString v); + static bool set_In(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & out(); + static const QByteArray & out(); // set the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Out(Q3CString v); + static bool set_Out(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & inout(); + static const QByteArray & inout(); // set the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the @@ -209,83 +209,83 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Inout(Q3CString v); + static bool set_Inout(QByteArray v); // return the default operation value type form - static Q3CString Return(); + static QByteArray Return(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Return(Q3CString v); + static bool set_Return(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. - static const Q3CString & relationDecl(bool by_value, const char * multiplicity); + static const QByteArray & relationDecl(bool by_value, const char * multiplicity); // set the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. @@ -294,20 +294,20 @@ class CppSettings : public UmlSettings static bool set_RelationDecl(bool by_value, const char * multiplicity, const char * v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // return TRUE if the operations profile must contain 'throw()' // when the operations does not have exception @@ -331,13 +331,13 @@ class CppSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns if a 'get' operation generated through the attribute // and relation 'add get operation' menu is inline by default @@ -383,14 +383,14 @@ class CppSettings : public UmlSettings // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is inline by default @@ -421,51 +421,51 @@ class CppSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _in; + static QByteArray _in; - static Q3CString _out; + static QByteArray _out; - static Q3CString _inout; + static QByteArray _inout; - static Q3CString _return; + static QByteArray _return; - static Q3CString _enum_in; + static QByteArray _enum_in; - static Q3CString _enum_out; + static QByteArray _enum_out; - static Q3CString _enum_inout; + static QByteArray _enum_inout; - static Q3CString _enum_return; + static QByteArray _enum_return; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[2/*relation kind*/][3/*multiplicity*/]; + static QByteArray _rel_decl[2/*relation kind*/][3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _oper_def; + static QByteArray _oper_def; static bool _force_oper_throw; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_inline; @@ -475,23 +475,23 @@ class CppSettings : public UmlSettings static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_inline; static bool _is_set_param_const; - static Q3CString _h_content; + static QByteArray _h_content; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _h_ext; + static QByteArray _h_ext; - static Q3CString _src_ext; + static QByteArray _src_ext; static bool _incl_with_path; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/FileControl/Dialog.cpp b/genplugouts/FileControl/Dialog.cpp index ebf7168ee..b33229829 100644 --- a/genplugouts/FileControl/Dialog.cpp +++ b/genplugouts/FileControl/Dialog.cpp @@ -8,70 +8,75 @@ #include #include #include -#include +#include #include #include #include #include -//Added by qt3to4: -#include -#include -Dialog::Dialog(bool ci, Q3CString & cmd, BooL & rec, BooL & reload) - : QDialog(0, 0, TRUE), _cmd(cmd), _rec(rec), _reload(reload) +#include +#include +#include +#include + +Dialog::Dialog(bool ci, QByteArray & cmd, BooL & rec, BooL & reload) + : QDialog(0), _cmd(cmd), _rec(rec), _reload(reload) { - Q3VBoxLayout * vbox = new Q3VBoxLayout(this); - Q3HBox * htab; + setModal(true); + QVBoxLayout * vbox = new QVBoxLayout(this); + HHBox * htab; vbox->setMargin(5); // add recursive check box - htab = new Q3HBox(this); + htab = new HHBox(this); htab->setMargin(5); vbox->addWidget(htab); - rec_cb = new QCheckBox((ci) ? "Check-in sub packages" : "Check-out sub-packages", - htab); + htab->addWidget(rec_cb = new QCheckBox((ci) ? "Check-in sub packages" : "Check-out sub-packages", + htab)); // add comment - htab = new Q3HBox(this); + htab = new HHBox(this); htab->setMargin(5); vbox->addWidget(htab); - new QLabel("In the command %file will be replaced by the file's name," + htab->addWidget(new QLabel("In the command %file will be replaced by the file's name," " %dir by the directory where is the file\n" - "%dironly is replaced by the directory without the drive", htab); + "%dironly is replaced by the directory without the drive", htab)); // add command edit - htab = new Q3HBox(this); + htab = new HHBox(this); htab->setMargin(5); vbox->addWidget(htab); - new QLabel("Command : ", htab); - cmd_ed = new QLineEdit(htab); + htab->addWidget(new QLabel("Command : ", htab)); + htab->addWidget(cmd_ed = new QLineEdit(htab)); cmd_ed->setText(_cmd); // save & load - htab = new Q3HBox(this); + htab = new HHBox(this); htab->setMargin(5); vbox->addWidget(htab); - reload_cb = new QCheckBox("Save then reload the project to see the new write permission of the files", - htab); + htab->addWidget(reload_cb = new QCheckBox("Save then reload the project to see the new write permission of the files", + htab)); reload_cb->setChecked(TRUE); // ok & cancel - htab = new Q3HBox(this); + htab = new HHBox(this); htab->setMargin(5); vbox->addWidget(htab); - new QLabel(htab); - QPushButton * ok = new QPushButton("&Ok", htab); - new QLabel(htab); - QPushButton * cancel = new QPushButton("&Cancel", htab); - new QLabel(htab); + htab->addWidget(new QLabel(htab)); + QPushButton * ok; + htab->addWidget(ok = new QPushButton("&Ok", htab)); + htab->addWidget(new QLabel(htab)); + QPushButton * cancel; + htab->addWidget(cancel = new QPushButton("&Cancel", htab)); + htab->addWidget(new QLabel(htab)); QSize bs(cancel->sizeHint()); ok->setFixedSize(bs); @@ -83,62 +88,36 @@ Dialog::Dialog(bool ci, Q3CString & cmd, BooL & rec, BooL & reload) void Dialog::polish() { - QDialog::polish(); - - // try to read .doumlrc - // note : QFile fp(QDir::home().absFilePath(".doumlrc")) doesn't work - // if the path contains non latin1 characters, for instance cyrillic ! - QString s = QDir::home().absFilePath(".doumlrc"); - FILE * fp = fopen((const char *) s, "r"); - -#ifdef WIN32 - - if (fp == 0) { - QString hd = getenv("USERPROFILE"); - - if (! hd.isEmpty()) { - QDir d(hd); - QString s2 = d.absFilePath(".doumlrc"); - - fp = fopen((const char *) s2, "r"); - } - } - -#endif - - if (fp != 0) { - char line[512]; - - while (fgets(line, sizeof(line) - 1, fp) != 0) { - if (!strncmp(line, "DESKTOP ", 8)) { - int l, t, r, b; - - if (sscanf(line + 8, "%d %d %d %d", &l, &t, &r, &b) == 4) { - if (!((r == 0) && (t == 0) && (r == 0) && (b == 0)) && - !((r < 0) || (t < 0) || (r < 0) || (b < 0)) && - !((r <= l) || (b <= t))) { - int cx = (r + l) / 2; - int cy = (t + b) / 2; - - move(x() + cx - (x() + width() / 2), - y() + cy - (y() + height() / 2)); - } - } - - break; - } - } - - fclose(fp); + QDialog::ensurePolished(); + + QSettings settings(QSettings::IniFormat, QSettings::UserScope, "DoUML", "settings"); + settings.setIniCodec("UTF-8"); + int l, t, r, b; + l = settings.value("Desktop/left", -1).toInt(); + r = settings.value("Desktop/right", -1).toInt(); + t = settings.value("Desktop/top", -1).toInt(); + b = settings.value("Desktop/bottom", -1).toInt(); + + if(l != -1 && r != -1 && t != -1 && b != -1) + { + if (!((r == 0) && (t == 0) && (r == 0) && (b == 0)) && + !((r < 0) || (t < 0) || (r < 0) || (b < 0)) && + !((r <= l) || (b <= t))) + { + int cx = (r + l) / 2; + int cy = (t + b) / 2; + + move(x() + cx - (x() + width() / 2), y() + cy - (y() + height() / 2)); + } } } void Dialog::accept() { - if (cmd_ed->text().find("%file") == -1) + if (cmd_ed->text().indexOf("%file") == -1) QMessageBox::critical(this, "Error", "the command must contain %file"); else { - _cmd = cmd_ed->text(); + _cmd = cmd_ed->text().toLatin1(); _rec = rec_cb->isChecked(); _reload = reload_cb->isChecked(); QDialog::accept(); diff --git a/genplugouts/FileControl/Dialog.h b/genplugouts/FileControl/Dialog.h index e67e7e2a9..11d3dab96 100644 --- a/genplugouts/FileControl/Dialog.h +++ b/genplugouts/FileControl/Dialog.h @@ -2,7 +2,7 @@ #define _DIALOG_H -#include + #include class QLineEdit; @@ -14,11 +14,11 @@ class Dialog : public QDialog Q_OBJECT public: - Dialog(bool ci, Q3CString & cmd, BooL & rec, BooL & reload); + Dialog(bool ci, QByteArray & cmd, BooL & rec, BooL & reload); protected: - Q3CString & _cmd; + QByteArray & _cmd; BooL & _rec; diff --git a/genplugouts/FileControl/FileControl.pro b/genplugouts/FileControl/FileControl.pro index 9be6a813b..104a28753 100644 --- a/genplugouts/FileControl/FileControl.pro +++ b/genplugouts/FileControl/FileControl.pro @@ -1,7 +1,10 @@ TEMPLATE = app TARGET = file_control -CONFIG += warn_on qt -DEFINES = BooL=bool +CONFIG -= app_bundle +CONFIG += qt warn_on c++11 +QMAKE_POST_LINK = " " +DEFINES += QT_DEPRECATED_WARNINGS +DEFINES += BooL=bool HEADERS = ./aVisibility.h \ ./UmlBaseExtraClassMember.h \ ./UmlBaseComponentDiagram.h \ @@ -113,7 +116,8 @@ HEADERS = ./aVisibility.h \ ./UmlBaseDeployment.h \ ./UmlStereotype.h \ ./UmlDeploymentDiagram.h \ - ./UmlUseCase.h + ./UmlUseCase.h \ + hhbox.h SOURCES = ./aVisibility.cpp \ ./UmlBaseExtraClassMember.cpp \ ./UmlBaseComponentDiagram.cpp \ @@ -226,25 +230,22 @@ SOURCES = ./aVisibility.cpp \ ./UmlBaseDeployment.cpp \ ./UmlStereotype.cpp \ ./UmlDeploymentDiagram.cpp \ - ./UmlUseCase.cpp + ./UmlUseCase.cpp \ + hhbox.cpp -#The following line was inserted by qt3to4 -QT += network qt3support +QT += network widgets +DEFINES += TRUE=true FALSE=false INCLUDEPATH += ../../src -CONFIG += qtestlib -Release{ - - - MOC_DIR = bin/douml/fcontrol/MOC_release - OBJECTS_DIR = bin/douml/fcontrol/Obj_release +QT += testlib +DESTDIR = ../../bin +CONFIG(release, debug|release) { + DEFINES += NDEBUG + MOC_DIR = $${DESTDIR}/moc_release/file_control + OBJECTS_DIR = $${DESTDIR}/obj_release/file_control } - -Debug{ - MOC_DIR = bin/douml/fcontrol/MOC_Debug - OBJECTS_DIR = bin/douml/fcontrol/Obj_Debug - +CONFIG(debug, debug|release) { + DEFINES += TRACE DEBUG DEBUG_DOUML + MOC_DIR = $${DESTDIR}/moc_debug/file_control + OBJECTS_DIR = $${DESTDIR}/obj_debug/file_control } - UI_DIR = src/ui - DESTDIR = ../../bin - -QMAKE_CXXFLAGS += -std=gnu++11 +UI_DIR = src/ui diff --git a/genplugouts/FileControl/IdlSettings.cpp b/genplugouts/FileControl/IdlSettings.cpp index 65f2ae619..d5b25b151 100644 --- a/genplugouts/FileControl/IdlSettings.cpp +++ b/genplugouts/FileControl/IdlSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool IdlSettings::useDefaults() { UmlCom::send_cmd(idlSettingsCmd, getIdlUseDefaultsCmd); @@ -22,21 +22,21 @@ bool IdlSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString IdlSettings::type(Q3CString s) +QByteArray IdlSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_Type(Q3CString s, Q3CString v) +bool IdlSettings::set_Type(QByteArray s, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlTypeCmd, s, v); if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -49,28 +49,28 @@ bool IdlSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::umlType(Q3CString s) +QByteArray IdlSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::idl); } -Q3CString IdlSettings::relationStereotype(const Q3CString & s) +QByteArray IdlSettings::relationStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_RelationStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_RelationStereotype(QByteArray s, QByteArray v) { - UmlCom::send_cmd(idlSettingsCmd, setIdlRelationStereotypeCmd, s, v); + UmlCom::send_cmd(idlSettingsCmd, setIdlRelationAttributeStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_stereotype(s); @@ -83,28 +83,28 @@ bool IdlSettings::set_RelationStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::relationUmlStereotype(Q3CString s) +QByteArray IdlSettings::relationUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::classStereotype(Q3CString s) +QByteArray IdlSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_ClassStereotype(QByteArray s, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -117,31 +117,31 @@ bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::classUmlStereotype(Q3CString s) +QByteArray IdlSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::include(Q3CString s) +QByteArray IdlSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool IdlSettings::set_Include(Q3CString s, Q3CString v) +bool IdlSettings::set_Include(QByteArray s, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlIncludeCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -152,14 +152,14 @@ bool IdlSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::rootDir() +const QByteArray & IdlSettings::rootDir() { read_if_needed_(); return _root; } -bool IdlSettings::set_RootDir(Q3CString v) +bool IdlSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlRootDirCmd, v); @@ -171,14 +171,14 @@ bool IdlSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceContent() +const QByteArray & IdlSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool IdlSettings::set_SourceContent(Q3CString v) +bool IdlSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceContentCmd, v); @@ -190,14 +190,14 @@ bool IdlSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceExtension() +const QByteArray & IdlSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool IdlSettings::set_SourceExtension(Q3CString v) +bool IdlSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceExtensionCmd, v); @@ -209,14 +209,14 @@ bool IdlSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::interfaceDecl() +const QByteArray & IdlSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool IdlSettings::set_InterfaceDecl(Q3CString v) +bool IdlSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlInterfaceDeclCmd, v); @@ -228,14 +228,14 @@ bool IdlSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeDecl() +const QByteArray & IdlSettings::valuetypeDecl() { read_if_needed_(); return _valuetype_decl; } -bool IdlSettings::set_ValuetypeDecl(Q3CString v) +bool IdlSettings::set_ValuetypeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeDeclCmd, v); @@ -247,14 +247,14 @@ bool IdlSettings::set_ValuetypeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::externalClassDecl() +const QByteArray & IdlSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool IdlSettings::set_ExternalClassDecl(Q3CString v) +bool IdlSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExternalClassDeclCmd, v); @@ -266,14 +266,14 @@ bool IdlSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::structDecl() +const QByteArray & IdlSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool IdlSettings::set_StructDecl(Q3CString v) +bool IdlSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlStructDeclCmd, v); @@ -285,14 +285,14 @@ bool IdlSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::typedefDecl() +const QByteArray & IdlSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool IdlSettings::set_TypedefDecl(Q3CString v) +bool IdlSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlTypedefDeclCmd, v); @@ -304,14 +304,14 @@ bool IdlSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::exceptionDecl() +const QByteArray & IdlSettings::exceptionDecl() { read_if_needed_(); return _exception_decl; } -bool IdlSettings::set_ExceptionDecl(Q3CString v) +bool IdlSettings::set_ExceptionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExceptionDeclCmd, v); @@ -323,14 +323,14 @@ bool IdlSettings::set_ExceptionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::unionDecl() +const QByteArray & IdlSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool IdlSettings::set_UnionDecl(Q3CString v) +bool IdlSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionDeclCmd, v); @@ -342,14 +342,14 @@ bool IdlSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumDecl() +const QByteArray & IdlSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool IdlSettings::set_EnumDecl(Q3CString v) +bool IdlSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumDeclCmd, v); @@ -361,14 +361,14 @@ bool IdlSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::attributeDecl() +const QByteArray & IdlSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool IdlSettings::set_AttributeDecl(Q3CString v) +bool IdlSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlAttributeDeclCmd, v); @@ -380,14 +380,14 @@ bool IdlSettings::set_AttributeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeAttributeDecl() +const QByteArray & IdlSettings::valuetypeAttributeDecl() { read_if_needed_(); return _valuetype_attr_decl; } -bool IdlSettings::set_ValuetypeAttributeDecl(Q3CString v) +bool IdlSettings::set_ValuetypeAttributeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeAttributeDeclCmd, v); @@ -399,14 +399,14 @@ bool IdlSettings::set_ValuetypeAttributeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::unionItemDecl() +const QByteArray & IdlSettings::unionItemDecl() { read_if_needed_(); return _union_item_decl; } -bool IdlSettings::set_UnionItemDecl(Q3CString v) +bool IdlSettings::set_UnionItemDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionItemDeclCmd, v); @@ -418,14 +418,14 @@ bool IdlSettings::set_UnionItemDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumItemDecl() +const QByteArray & IdlSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool IdlSettings::set_EnumItemDecl(Q3CString v) +bool IdlSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumItemDeclCmd, v); @@ -437,14 +437,14 @@ bool IdlSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::constDecl() +const QByteArray & IdlSettings::constDecl() { read_if_needed_(); return _const_decl; } -bool IdlSettings::set_ConstDecl(Q3CString v) +bool IdlSettings::set_ConstDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlConstDeclCmd, v); @@ -456,14 +456,14 @@ bool IdlSettings::set_ConstDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::relationDecl(const char * multiplicity) +const QByteArray & IdlSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlRelationDeclCmd, multiplicity, v); @@ -475,14 +475,14 @@ bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::valuetypeRelationDecl(const char * multiplicity) { read_if_needed_(); return _valuetype_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeRelationDeclCmd, multiplicity, v); @@ -494,14 +494,14 @@ bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString return FALSE; } -const Q3CString & IdlSettings::unionRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::unionRelationDecl(const char * multiplicity) { read_if_needed_(); return _union_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionRelationDeclCmd, multiplicity, v); @@ -513,14 +513,14 @@ bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::operationDecl() +const QByteArray & IdlSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool IdlSettings::set_OperationDecl(Q3CString v) +bool IdlSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlOperationDeclCmd, v); @@ -532,14 +532,14 @@ bool IdlSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::getName() +const QByteArray & IdlSettings::getName() { read_if_needed_(); return _get_name; } -bool IdlSettings::set_GetName(Q3CString v) +bool IdlSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlGetNameCmd, v); @@ -551,14 +551,14 @@ bool IdlSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::setName() +const QByteArray & IdlSettings::setName() { read_if_needed_(); return _set_name; } -bool IdlSettings::set_SetName(Q3CString v) +bool IdlSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSetNameCmd, v); @@ -591,53 +591,53 @@ bool IdlSettings::set_IsSetOneway(bool v) bool IdlSettings::_defined; -Q3CString IdlSettings::_root; +QByteArray IdlSettings::_root; -Q3CString IdlSettings::_interface_decl; +QByteArray IdlSettings::_interface_decl; -Q3CString IdlSettings::_valuetype_decl; +QByteArray IdlSettings::_valuetype_decl; -Q3CString IdlSettings::_struct_decl; +QByteArray IdlSettings::_struct_decl; -Q3CString IdlSettings::_typedef_decl; +QByteArray IdlSettings::_typedef_decl; -Q3CString IdlSettings::_exception_decl; +QByteArray IdlSettings::_exception_decl; -Q3CString IdlSettings::_union_decl; +QByteArray IdlSettings::_union_decl; -Q3CString IdlSettings::_enum_decl; +QByteArray IdlSettings::_enum_decl; -Q3CString IdlSettings::_external_class_decl; +QByteArray IdlSettings::_external_class_decl; -Q3CString IdlSettings::_attr_decl; +QByteArray IdlSettings::_attr_decl; -Q3CString IdlSettings::_valuetype_attr_decl; +QByteArray IdlSettings::_valuetype_attr_decl; -Q3CString IdlSettings::_union_item_decl; +QByteArray IdlSettings::_union_item_decl; -Q3CString IdlSettings::_enum_item_decl; +QByteArray IdlSettings::_enum_item_decl; -Q3CString IdlSettings::_const_decl; +QByteArray IdlSettings::_const_decl; -Q3CString IdlSettings::_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_union_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_union_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_oper_decl; +QByteArray IdlSettings::_oper_decl; -Q3CString IdlSettings::_get_name; +QByteArray IdlSettings::_get_name; -Q3CString IdlSettings::_set_name; +QByteArray IdlSettings::_set_name; bool IdlSettings::_is_set_oneway; -Q3CString IdlSettings::_src_content; +QByteArray IdlSettings::_src_content; -Q3CString IdlSettings::_ext; +QByteArray IdlSettings::_ext; -Q3Dict IdlSettings::_map_includes; +QHash IdlSettings::_map_includes; void IdlSettings::read_() { @@ -666,13 +666,13 @@ void IdlSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/FileControl/IdlSettings.h b/genplugouts/FileControl/IdlSettings.h index aa23439f0..8ccc92056 100644 --- a/genplugouts/FileControl/IdlSettings.h +++ b/genplugouts/FileControl/IdlSettings.h @@ -4,9 +4,9 @@ #ifdef WITHIDL -#include + #include "UmlSettings.h" -#include + // This class manages settings concerning IDL, configured through // the 'Generation settings' dialog. @@ -31,244 +31,244 @@ class IdlSettings : public UmlSettings // returns the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the IDL type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationStereotype(const Q3CString & s); + static QByteArray relationStereotype(const QByteArray & s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationStereotype(Q3CString s, Q3CString v); + static bool set_RelationStereotype(QByteArray s, QByteArray v); // reverse of the RelationStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString relationUmlStereotype(Q3CString s); + static QByteArray relationUmlStereotype(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the files produced by the Idl code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the files produced by the Idl code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of a valuetype - static const Q3CString & valuetypeDecl(); + static const QByteArray & valuetypeDecl(); // set the default definition of a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeDecl(Q3CString v); + static bool set_ValuetypeDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an exception - static const Q3CString & exceptionDecl(); + static const QByteArray & exceptionDecl(); // set the default definition of an exception // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExceptionDecl(Q3CString v); + static bool set_ExceptionDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an attribute // placed in a valuetype - static const Q3CString & valuetypeAttributeDecl(); + static const QByteArray & valuetypeAttributeDecl(); // set the default definition of an attribute // placed in a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeAttributeDecl(Q3CString v); + static bool set_ValuetypeAttributeDecl(QByteArray v); // returns the default definition of an union item - static const Q3CString & unionItemDecl(); + static const QByteArray & unionItemDecl(); // set the default definition of an union item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionItemDecl(Q3CString v); + static bool set_UnionItemDecl(QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a constant attribute - static const Q3CString & constDecl(); + static const QByteArray & constDecl(); // set the default definition of a constant attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ConstDecl(Q3CString v); + static bool set_ConstDecl(QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in a valuetype // depending on the multiplicity given in argument. - static const Q3CString & valuetypeRelationDecl(const char * multiplicity); + static const QByteArray & valuetypeRelationDecl(const char * multiplicity); // set the default definition of a relation in a valuetype // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v); + static bool set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in an union // depending on the multiplicity given in argument. - static const Q3CString & unionRelationDecl(const char * multiplicity); + static const QByteArray & unionRelationDecl(const char * multiplicity); // set the default definition of a relation in an union // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionRelationDecl(const char * multiplicity, Q3CString v); + static bool set_UnionRelationDecl(const char * multiplicity, QByteArray v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is oneway by default @@ -287,53 +287,53 @@ class IdlSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _valuetype_decl; + static QByteArray _valuetype_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _exception_decl; + static QByteArray _exception_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _valuetype_attr_decl; + static QByteArray _valuetype_attr_decl; - static Q3CString _union_item_decl; + static QByteArray _union_item_decl; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _const_decl; + static QByteArray _const_decl; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _valuetype_rel_decl[3/*multiplicity*/]; + static QByteArray _valuetype_rel_decl[3/*multiplicity*/]; - static Q3CString _union_rel_decl[3/*multiplicity*/]; + static QByteArray _union_rel_decl[3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _get_name; + static QByteArray _get_name; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_oneway; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/FileControl/IdlSettingsCmd.h b/genplugouts/FileControl/IdlSettingsCmd.h index 5eb74f465..07cbf12b6 100644 --- a/genplugouts/FileControl/IdlSettingsCmd.h +++ b/genplugouts/FileControl/IdlSettingsCmd.h @@ -8,7 +8,7 @@ enum IdlSettingsCmd { getIdlUseDefaultsCmd, setIdlUseDefaultsCmd, setIdlTypeCmd, - setIdlRelationStereotypeCmd, + setIdlRelationAttributeStereotypeCmd, setIdlClassStereotypeCmd, setIdlIncludeCmd, setIdlRootDirCmd, diff --git a/genplugouts/FileControl/JavaSettings.cpp b/genplugouts/FileControl/JavaSettings.cpp index 104029d1e..715db5516 100644 --- a/genplugouts/FileControl/JavaSettings.cpp +++ b/genplugouts/FileControl/JavaSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool JavaSettings::useDefaults() { UmlCom::send_cmd(javaSettingsCmd, getJavaUseDefaultsCmd); @@ -22,21 +22,21 @@ bool JavaSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString JavaSettings::type(const Q3CString & s) +QByteArray JavaSettings::type(const QByteArray & s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_Type(Q3CString s, Q3CString v) +bool JavaSettings::set_Type(QByteArray s, QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaTypeCmd, s, v); if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -49,28 +49,28 @@ bool JavaSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::umlType(const Q3CString & s) +QByteArray JavaSettings::umlType(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::java); } -Q3CString JavaSettings::relationStereotype(const Q3CString & s) +QByteArray JavaSettings::relationStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_RelationStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_RelationStereotype(QByteArray s, QByteArray v) { - UmlCom::send_cmd(javaSettingsCmd, setJavaRelationStereotypeCmd, s, v); + UmlCom::send_cmd(javaSettingsCmd, setJavaRelationAttributeStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_stereotype(s); @@ -83,28 +83,28 @@ bool JavaSettings::set_RelationStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::relationUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::relationUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_rel_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::classStereotype(const Q3CString & s) +QByteArray JavaSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_ClassStereotype(QByteArray s, QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaClassStereotypeCmd, s, v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -117,31 +117,31 @@ bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::classUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::get_import(const Q3CString & s) +QByteArray JavaSettings::get_import(const QByteArray & s) { read_if_needed_(); - Q3CString * r = _map_imports[s]; + QByteArray * r = _map_imports[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool JavaSettings::set_Import(Q3CString s, Q3CString v) +bool JavaSettings::set_Import(QByteArray s, QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaImportCmd, s, v); if (UmlCom::read_bool()) { - Q3CString * r = _map_imports.take(s); + QByteArray * r = _map_imports.take(s); if (!v.isEmpty()) - _map_imports.insert(s, new Q3CString(v)); + _map_imports.insert(s, new QByteArray(v)); if (r) delete r; @@ -152,14 +152,14 @@ bool JavaSettings::set_Import(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::rootDir() +const QByteArray & JavaSettings::rootDir() { read_if_needed_(); return _root; } -bool JavaSettings::set_RootDir(Q3CString v) +bool JavaSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaRootdirCmd, v); @@ -171,14 +171,14 @@ bool JavaSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceContent() +const QByteArray & JavaSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool JavaSettings::set_SourceContent(Q3CString v) +bool JavaSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceContentCmd, v); @@ -190,14 +190,14 @@ bool JavaSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceExtension() +const QByteArray & JavaSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool JavaSettings::set_SourceExtension(Q3CString v) +bool JavaSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceExtensionCmd, v); @@ -209,14 +209,14 @@ bool JavaSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::classDecl() +const QByteArray & JavaSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool JavaSettings::set_ClassDecl(Q3CString v) +bool JavaSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaClassDeclCmd, v); @@ -228,14 +228,14 @@ bool JavaSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::externalClassDecl() +const QByteArray & JavaSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool JavaSettings::set_ExternalClassDecl(Q3CString v) +bool JavaSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaExternalClassDeclCmd, v); @@ -247,14 +247,14 @@ bool JavaSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumDecl() +const QByteArray & JavaSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool JavaSettings::set_EnumDecl(Q3CString v) +bool JavaSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumDeclCmd, v); @@ -266,14 +266,14 @@ bool JavaSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::interfaceDecl() +const QByteArray & JavaSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool JavaSettings::set_InterfaceDecl(Q3CString v) +bool JavaSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaInterfaceDeclCmd, v); @@ -285,14 +285,14 @@ bool JavaSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::attributeDecl() +const QByteArray & JavaSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool JavaSettings::set_AttributeDecl(Q3CString v) +bool JavaSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaAttributeDeclCmd, v); @@ -304,14 +304,14 @@ bool JavaSettings::set_AttributeDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumItemDecl() +const QByteArray & JavaSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool JavaSettings::set_EnumItemDecl(Q3CString v) +bool JavaSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumItemDeclCmd, v); @@ -323,16 +323,16 @@ bool JavaSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumItemCase() +const QByteArray & JavaSettings::enumItemCase() { read_if_needed_(); return _enum_item_case; } -bool JavaSettings::set_EnumItemCase(Q3CString v) +bool JavaSettings::set_EnumItemCase(QByteArray v) { - UmlCom::send_cmd(javaSettingsCmd, setJavaEnumItemCaseCmd, v); + UmlCom::send_cmd(javaSettingsCmd, setJavaEnumItemDeclCmd, v); if (UmlCom::read_bool()) { _enum_item_case = v; @@ -342,14 +342,14 @@ bool JavaSettings::set_EnumItemCase(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::relationDecl(const char * multiplicity) +const QByteArray & JavaSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool JavaSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaRelationDeclCmd, multiplicity, v); @@ -361,14 +361,14 @@ bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::operationDef() +const QByteArray & JavaSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool JavaSettings::set_OperationDef(Q3CString v) +bool JavaSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaOperationDefCmd, v); @@ -399,14 +399,14 @@ bool JavaSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & JavaSettings::getName() +const QByteArray & JavaSettings::getName() { read_if_needed_(); return _get_name; } -bool JavaSettings::set_GetName(Q3CString v) +bool JavaSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaGetNameCmd, v); @@ -418,14 +418,14 @@ bool JavaSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::setName() +const QByteArray & JavaSettings::setName() { read_if_needed_(); return _set_name; } -bool JavaSettings::set_SetName(Q3CString v) +bool JavaSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSetNameCmd, v); @@ -515,45 +515,45 @@ bool JavaSettings::set_IsSetParamFinal(bool v) bool JavaSettings::_defined; -Q3CString JavaSettings::_root; +QByteArray JavaSettings::_root; -Q3CString JavaSettings::_class_decl; +QByteArray JavaSettings::_class_decl; -Q3CString JavaSettings::_external_class_decl; +QByteArray JavaSettings::_external_class_decl; -Q3CString JavaSettings::_enum_decl; +QByteArray JavaSettings::_enum_decl; -Q3CString JavaSettings::_interface_decl; +QByteArray JavaSettings::_interface_decl; -Q3CString JavaSettings::_attr_decl; +QByteArray JavaSettings::_attr_decl; -Q3CString JavaSettings::_enum_item_decl; +QByteArray JavaSettings::_enum_item_decl; -Q3CString JavaSettings::_enum_item_case; +QByteArray JavaSettings::_enum_item_case; -Q3CString JavaSettings::_rel_decl[3/*multiplicity*/]; +QByteArray JavaSettings::_rel_decl[3/*multiplicity*/]; -Q3CString JavaSettings::_oper_def; +QByteArray JavaSettings::_oper_def; aVisibility JavaSettings::_get_visibility; -Q3CString JavaSettings::_get_name; +QByteArray JavaSettings::_get_name; bool JavaSettings::_is_get_final; aVisibility JavaSettings::_set_visibility; -Q3CString JavaSettings::_set_name; +QByteArray JavaSettings::_set_name; bool JavaSettings::_is_set_final; bool JavaSettings::_is_set_param_final; -Q3CString JavaSettings::_src_content; +QByteArray JavaSettings::_src_content; -Q3CString JavaSettings::_ext; +QByteArray JavaSettings::_ext; -Q3Dict JavaSettings::_map_imports; +QHash JavaSettings::_map_imports; void JavaSettings::read_() { @@ -581,13 +581,13 @@ void JavaSettings::read_() n = UmlCom::read_unsigned(); if (n > _map_imports.size()) - _map_imports.resize(n); + _map_imports.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_imports.insert(t, new Q3CString(i)); + _map_imports.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/FileControl/JavaSettings.h b/genplugouts/FileControl/JavaSettings.h index 166820623..220a7de82 100644 --- a/genplugouts/FileControl/JavaSettings.h +++ b/genplugouts/FileControl/JavaSettings.h @@ -4,10 +4,10 @@ #ifdef WITHJAVA -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning JAVA, configured through // the 'Generation settings' dialog. @@ -31,160 +31,160 @@ class JavaSettings : public UmlSettings // returns the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(const Q3CString & s); + static QByteArray type(const QByteArray & s); // set the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the JAVA type given in argument - static Q3CString umlType(const Q3CString & s); + static QByteArray umlType(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationStereotype(const Q3CString & s); + static QByteArray relationStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationStereotype(Q3CString s, Q3CString v); + static bool set_RelationStereotype(QByteArray s, QByteArray v); // reverse of the RelationStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString relationUmlStereotype(const Q3CString & s); + static QByteArray relationUmlStereotype(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); //returns the import or other form specified in the last //'Generation settings' tab for the Java type given in argument. - static Q3CString get_import(const Q3CString & s); + static QByteArray get_import(const QByteArray & s); // set the import or other form specified in the last // 'Generation settings' tab for the Java type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Import(Q3CString s, Q3CString v); + static bool set_Import(QByteArray s, QByteArray v); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the JAVA code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the JAVA code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration implemented // through an abstract class having constant attributes - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enumeration implemented // through an abstract class having constant attributes // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); //Returns the 'case' form produced in the fromInt operation //for each enumeration item - static const Q3CString & enumItemCase(); + static const QByteArray & enumItemCase(); // set the 'case' form produced in the fromInt operation // for each enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemCase(Q3CString v); + static bool set_EnumItemCase(QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default visibility of a 'get' operation generated // through the attribute and relation 'add get operation' @@ -198,23 +198,23 @@ class JavaSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // return if a 'get' operation generated through the attribute // and relation 'add get operation' menu is final by default @@ -263,45 +263,45 @@ class JavaSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _enum_item_case; + static QByteArray _enum_item_case; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _oper_def; + static QByteArray _oper_def; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_final; static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_final; static bool _is_set_param_final; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_imports; + static QHash _map_imports; protected: diff --git a/genplugouts/FileControl/JavaSettingsCmd.h b/genplugouts/FileControl/JavaSettingsCmd.h index 7d66bf1f0..2ec6baf59 100644 --- a/genplugouts/FileControl/JavaSettingsCmd.h +++ b/genplugouts/FileControl/JavaSettingsCmd.h @@ -8,7 +8,7 @@ enum JavaSettingsCmd { getJavaUseDefaultsCmd, setJavaUseDefaultsCmd, setJavaTypeCmd, - setJavaRelationStereotypeCmd, + setJavaRelationAttributeStereotypeCmd, setJavaClassStereotypeCmd, setJavaImportCmd, setJavaRootdirCmd, @@ -20,7 +20,7 @@ enum JavaSettingsCmd { setJavaInterfaceDeclCmd, setJavaAttributeDeclCmd, setJavaEnumItemDeclCmd, - setJavaEnumItemCaseCmd, + setJavaEnumItemDeclCmd, setJavaRelationDeclCmd, setJavaOperationDefCmd, setJavaGetvisibilityCmd, diff --git a/genplugouts/FileControl/PackageGlobalCmd.h b/genplugouts/FileControl/PackageGlobalCmd.h index 76a30534b..0eed58b55 100644 --- a/genplugouts/FileControl/PackageGlobalCmd.h +++ b/genplugouts/FileControl/PackageGlobalCmd.h @@ -4,9 +4,9 @@ // Internal enum enum PackageGlobalCmd { - findNamespaceCmd, - findPackageCmd, - findModuleCmd, + findCppNamespaceCmd, + findJavaPackageCmd, + findIdlModuleCmd, getProjectCmd, isProjectModifiedCmd, saveProjectCmd diff --git a/genplugouts/FileControl/StateBehavior.h b/genplugouts/FileControl/StateBehavior.h index 91a42cb82..66ac09c00 100644 --- a/genplugouts/FileControl/StateBehavior.h +++ b/genplugouts/FileControl/StateBehavior.h @@ -2,16 +2,16 @@ #define _STATEBEHAVIOR_H -#include + class StateBehavior { public: - Q3CString on_entry; + QByteArray on_entry; - Q3CString on_exit; + QByteArray on_exit; - Q3CString do_activity; + QByteArray do_activity; void read(); diff --git a/genplugouts/FileControl/TransitionBehavior.h b/genplugouts/FileControl/TransitionBehavior.h index 856ede3c0..8714c541d 100644 --- a/genplugouts/FileControl/TransitionBehavior.h +++ b/genplugouts/FileControl/TransitionBehavior.h @@ -2,16 +2,16 @@ #define _TRANSITIONBEHAVIOR_H -#include + class TransitionBehavior { public: - Q3CString trigger; + QByteArray trigger; - Q3CString guard; + QByteArray guard; - Q3CString activity; + QByteArray activity; void read(); diff --git a/genplugouts/FileControl/UmlArtifact.h b/genplugouts/FileControl/UmlArtifact.h index 9f6a30622..030e1717b 100644 --- a/genplugouts/FileControl/UmlArtifact.h +++ b/genplugouts/FileControl/UmlArtifact.h @@ -3,7 +3,7 @@ #include "UmlBaseArtifact.h" -#include + // This class manages 'artifacts' // @@ -11,7 +11,7 @@ class UmlArtifact : public UmlBaseArtifact { public: - UmlArtifact(void * id, const Q3CString & n) : UmlBaseArtifact(id, n) {}; + UmlArtifact(void * id, const QByteArray & n) : UmlBaseArtifact(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlAttribute.h b/genplugouts/FileControl/UmlAttribute.h index 19ee0a4c6..427658b45 100644 --- a/genplugouts/FileControl/UmlAttribute.h +++ b/genplugouts/FileControl/UmlAttribute.h @@ -3,7 +3,7 @@ #include "UmlBaseAttribute.h" -#include + // This class manages 'attribute', notes that the class 'UmlClassItem' // is a mother class of the class's children. @@ -12,7 +12,7 @@ class UmlAttribute : public UmlBaseAttribute { public: - UmlAttribute(void * id, const Q3CString & n) : UmlBaseAttribute(id, n) {}; + UmlAttribute(void * id, const QByteArray & n) : UmlBaseAttribute(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseArtifact.cpp b/genplugouts/FileControl/UmlBaseArtifact.cpp index 5f11e7a44..fce76aaa0 100644 --- a/genplugouts/FileControl/UmlBaseArtifact.cpp +++ b/genplugouts/FileControl/UmlBaseArtifact.cpp @@ -7,7 +7,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlArtifact * UmlBaseArtifact::create(UmlDeploymentView * parent, const char * s) { return (UmlArtifact *) parent->create_(anArtifact, s); @@ -37,7 +37,7 @@ bool UmlBaseArtifact::set_AssociatedDiagram(UmlDeploymentDiagram * d) return FALSE; } -const Q3PtrVector & UmlBaseArtifact::associatedClasses() +const QVector & UmlBaseArtifact::associatedClasses() { read_if_needed_(); @@ -51,8 +51,9 @@ bool UmlBaseArtifact::addAssociatedClass(UmlClass * cl) if (UmlCom::read_bool()) { if (_defined) { - _assoc_classes.resize(_assoc_classes.size() + 1); - _assoc_classes.insert(_assoc_classes.size() - 1, cl); + //_assoc_classes.reserve(_assoc_classes.size() + 1); + //_assoc_classes.insert(_assoc_classes.size() - 1, cl); + _assoc_classes.append(cl); } return TRUE; @@ -68,7 +69,7 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) if (UmlCom::read_bool()) { if (_defined) { - unsigned index = (unsigned) _assoc_classes.findRef(cl); + unsigned index = (unsigned) _assoc_classes.indexOf(cl); if (((int) index) == -1) // theo impossible @@ -77,7 +78,7 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) unsigned last = _assoc_classes.size() - 1; if (index != last) - _assoc_classes.insert(index, _assoc_classes[last]); + _assoc_classes[index] = _assoc_classes[last]; _assoc_classes.resize(last); } @@ -88,7 +89,7 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) return FALSE; } -bool UmlBaseArtifact::set_AssociatedClasses(const Q3PtrVector & l) +bool UmlBaseArtifact::set_AssociatedClasses(const QVector & l) { UmlCom::send_cmd(_identifier, setAssocClassesCmd, l); @@ -102,7 +103,7 @@ bool UmlBaseArtifact::set_AssociatedClasses(const Q3PtrVector & l) return FALSE; } -const Q3PtrVector & UmlBaseArtifact::associatedArtifacts() +const QVector & UmlBaseArtifact::associatedArtifacts() { read_if_needed_(); @@ -116,8 +117,9 @@ bool UmlBaseArtifact::addAssociatedArtifact(UmlArtifact * cp) if (UmlCom::read_bool()) { if (_defined) { - _associated.resize(_associated.size() + 1); - _associated.insert(_associated.size() - 1, cp); + //_associated.resize(_associated.size() + 1); + //_associated.insert(_associated.size() - 1, cp); + _associated.append(cp); } return TRUE; @@ -133,7 +135,7 @@ bool UmlBaseArtifact::removeAssociatedArtifact(UmlArtifact * cp) if (UmlCom::read_bool()) { if (_defined) { - unsigned index = (unsigned) _associated.findRef(cp); + unsigned index = (unsigned) _associated.indexOf(cp); if (((int) index) == -1) // theo impossible @@ -142,7 +144,7 @@ bool UmlBaseArtifact::removeAssociatedArtifact(UmlArtifact * cp) unsigned last = _associated.size() - 1; if (index != last) - _associated.insert(index, _associated[last]); + _associated[index] = _associated[last]; _associated.resize(last); } @@ -166,54 +168,54 @@ bool UmlBaseArtifact::removeAllAssociatedArtifacts() } #ifdef WITHCPP -const Q3CString & UmlBaseArtifact::cppHeader() +const QByteArray & UmlBaseArtifact::cppHeader() { read_if_needed_(); return _cpp_h; } -bool UmlBaseArtifact::set_CppHeader(const Q3CString & s) +bool UmlBaseArtifact::set_CppHeader(const QByteArray & s) { return set_it_(_cpp_h, s, setCppHCmd); } -const Q3CString & UmlBaseArtifact::cppSource() +const QByteArray & UmlBaseArtifact::cppSource() { read_if_needed_(); return _cpp_src; } -bool UmlBaseArtifact::set_CppSource(const Q3CString & s) +bool UmlBaseArtifact::set_CppSource(const QByteArray & s) { return set_it_(_cpp_src, s, setCppSrcCmd); } #endif #ifdef WITHJAVA -const Q3CString & UmlBaseArtifact::javaSource() +const QByteArray & UmlBaseArtifact::javaSource() { read_if_needed_(); return _java_src; } -bool UmlBaseArtifact::set_JavaSource(const Q3CString & s) +bool UmlBaseArtifact::set_JavaSource(const QByteArray & s) { return set_it_(_java_src, s, setJavaSrcCmd); } #endif #ifdef WITHIDL -const Q3CString & UmlBaseArtifact::idlSource() +const QByteArray & UmlBaseArtifact::idlSource() { read_if_needed_(); return _idl_src; } -bool UmlBaseArtifact::set_IdlSource(const Q3CString & s) +bool UmlBaseArtifact::set_IdlSource(const QByteArray & s) { return set_it_(_idl_src, s, setIdlSrcCmd); } @@ -248,13 +250,13 @@ void UmlBaseArtifact::read_uml_() _assoc_classes.resize(n); for (index = 0; index != n; index += 1) - _assoc_classes.insert(index, (UmlClass *) UmlBaseItem::read_()); + _assoc_classes[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _associated.resize(n); for (index = 0; index != n; index += 1) - _associated.insert(index, (UmlArtifact *) UmlBaseItem::read_()); + _associated[index] = (UmlArtifact *) UmlBaseItem::read_(); } #ifdef WITHCPP diff --git a/genplugouts/FileControl/UmlBaseArtifact.h b/genplugouts/FileControl/UmlBaseArtifact.h index d2c5a7fba..fcbf691a0 100644 --- a/genplugouts/FileControl/UmlBaseArtifact.h +++ b/genplugouts/FileControl/UmlBaseArtifact.h @@ -4,8 +4,8 @@ #include "UmlItem.h" #include "anItemKind.h" -#include -#include +#include + #include "UmlClass.h" // to avoid destructor problem class UmlArtifact; @@ -37,7 +37,7 @@ class UmlBaseArtifact : public UmlItem // returns (in Java a copy of) the optional associated classes // significant when the artifact is stereotyped <> - const Q3PtrVector & associatedClasses(); + const QVector & associatedClasses(); // adds 'cl' at the end of the associated classes list, returns false // if 'cl' is already an associate class. @@ -56,11 +56,11 @@ class UmlBaseArtifact : public UmlItem // significant when the artifact is stereotyped <> // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_AssociatedClasses(const Q3PtrVector & l); + bool set_AssociatedClasses(const QVector & l); // returns (in Java a copy of) the associated artifacts list // significant when the artifact is not stereotyped <> - const Q3PtrVector & associatedArtifacts(); + const QVector & associatedArtifacts(); // adds an associated artifacts, returns false if 'cp' is already // an associate artifact. @@ -83,40 +83,40 @@ class UmlBaseArtifact : public UmlItem #ifdef WITHCPP // returns the C++ header file definition - const Q3CString & cppHeader(); + const QByteArray & cppHeader(); // to set the C++ header file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppHeader(const Q3CString & s); + bool set_CppHeader(const QByteArray & s); // returns the C++ source file definition - const Q3CString & cppSource(); + const QByteArray & cppSource(); // to set the C++ source file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppSource(const Q3CString & s); + bool set_CppSource(const QByteArray & s); #endif #ifdef WITHJAVA // returns the Java file definition - const Q3CString & javaSource(); + const QByteArray & javaSource(); // to set the Java file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaSource(const Q3CString & s); + bool set_JavaSource(const QByteArray & s); #endif #ifdef WITHIDL // returns the Idl file definition - const Q3CString & idlSource(); + const QByteArray & idlSource(); // to set the Idl file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlSource(const Q3CString & s); + bool set_IdlSource(const QByteArray & s); #endif // to unload the object to free memory, it will be reloaded @@ -128,22 +128,22 @@ class UmlBaseArtifact : public UmlItem private: UmlDeploymentDiagram * _assoc_diagram; - Q3PtrVector _assoc_classes; + QVector _assoc_classes; - Q3PtrVector _associated; + QVector _associated; #ifdef WITHCPP - Q3CString _cpp_h; + QByteArray _cpp_h; - Q3CString _cpp_src; + QByteArray _cpp_src; #endif #ifdef WITHJAVA - Q3CString _java_src; + QByteArray _java_src; #endif #ifdef WITHIDL - Q3CString _idl_src; + QByteArray _idl_src; #endif @@ -171,11 +171,11 @@ class UmlBaseArtifact : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseArtifact(void * id, const Q3CString & n); + UmlBaseArtifact(void * id, const QByteArray & n); }; -inline UmlBaseArtifact::UmlBaseArtifact(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseArtifact::UmlBaseArtifact(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/FileControl/UmlBaseAttribute.cpp b/genplugouts/FileControl/UmlBaseAttribute.cpp index 1273e14af..401e44d9b 100644 --- a/genplugouts/FileControl/UmlBaseAttribute.cpp +++ b/genplugouts/FileControl/UmlBaseAttribute.cpp @@ -6,7 +6,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlAttribute * UmlBaseAttribute::create(UmlClass * parent, const char * s) { return (UmlAttribute *) parent->create_(anAttribute, s); @@ -29,7 +29,7 @@ bool UmlBaseAttribute::set_isReadOnly(bool y) return set_it_(_read_only, y, setIsReadOnlyCmd); } -const Q3CString & UmlBaseAttribute::defaultValue() +const QByteArray & UmlBaseAttribute::defaultValue() { read_if_needed_(); @@ -121,7 +121,7 @@ bool UmlBaseAttribute::set_isJavaTransient(bool y) #endif #ifdef WITHIDL -Q3CString UmlBaseAttribute::idlCase() +QByteArray UmlBaseAttribute::idlCase() { read_if_needed_(); diff --git a/genplugouts/FileControl/UmlBaseAttribute.h b/genplugouts/FileControl/UmlBaseAttribute.h index 3ce2c69c1..0fc286acc 100644 --- a/genplugouts/FileControl/UmlBaseAttribute.h +++ b/genplugouts/FileControl/UmlBaseAttribute.h @@ -4,7 +4,7 @@ #include "UmlClassMember.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" class UmlAttribute; @@ -35,7 +35,7 @@ class UmlBaseAttribute : public UmlClassMember bool set_isReadOnly(bool y); // returns the default attribute value, may be an empty string - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // to set the default attribute value ("" allowed) // @@ -89,7 +89,7 @@ class UmlBaseAttribute : public UmlClassMember #ifdef WITHIDL // in case the attribute is an IDL union's member returns the // corresponding 'case', an empty string in case it is not specified - Q3CString idlCase(); + QByteArray idlCase(); // to set the 'case' even the attribute is not (already) known as // an IDL union's member @@ -119,7 +119,7 @@ class UmlBaseAttribute : public UmlClassMember bool _java_transient; #endif - Q3CString _default_value; + QByteArray _default_value; UmlTypeSpec _type; @@ -131,13 +131,13 @@ class UmlBaseAttribute : public UmlClassMember // exclusive with idl_explicit_case UmlAttribute * _idl_case; - Q3CString _idl_explicit_case; + QByteArray _idl_explicit_case; #endif public: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAttribute(void * id, const Q3CString & n); + UmlBaseAttribute(void * id, const QByteArray & n); protected: @@ -165,7 +165,7 @@ class UmlBaseAttribute : public UmlClassMember }; -inline UmlBaseAttribute::UmlBaseAttribute(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseAttribute::UmlBaseAttribute(void * id, const QByteArray & n) : UmlClassMember(id, n) { _get_oper = 0; _set_oper = 0; diff --git a/genplugouts/FileControl/UmlBaseChoicePseudoState.h b/genplugouts/FileControl/UmlBaseChoicePseudoState.h index fb682dd91..8d15fc093 100644 --- a/genplugouts/FileControl/UmlBaseChoicePseudoState.h +++ b/genplugouts/FileControl/UmlBaseChoicePseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlChoicePseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseChoicePseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseChoicePseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseChoicePseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseClass.cpp b/genplugouts/FileControl/UmlBaseClass.cpp index b9d9228ab..4ab3fd2ac 100644 --- a/genplugouts/FileControl/UmlBaseClass.cpp +++ b/genplugouts/FileControl/UmlBaseClass.cpp @@ -10,8 +10,8 @@ #include "UmlCom.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include -#include +#include +#include UmlClass * UmlBaseClass::create(UmlItem * parent, const char * s) { return (UmlClass *) parent->create_(aClass, s); @@ -46,11 +46,11 @@ bool UmlBaseClass::set_BaseType(const UmlTypeSpec & t) return set_it_(_base_type, t, setBaseTypeCmd); } -Q3ValueList UmlBaseClass::formals() +QList UmlBaseClass::formals() { UmlCom::send_cmd(_identifier, formalsCmd); - Q3ValueList formals; + QList formals; for (unsigned n = UmlCom::read_unsigned(); n; n -= 1) { UmlFormalParameter f; @@ -82,11 +82,11 @@ bool UmlBaseClass::replaceFormal(unsigned int rank, const UmlFormalParameter & f return UmlCom::read_bool(); } -Q3ValueList UmlBaseClass::actuals() +QList UmlBaseClass::actuals() { UmlCom::send_cmd(_identifier, actualsCmd); - Q3ValueList actuals; + QList actuals; for (unsigned n = UmlCom::read_unsigned(); n; n -= 1) { UmlActualParameter a; @@ -131,17 +131,17 @@ UmlArtifact * UmlBaseClass::associatedArtifact() return (UmlArtifact *) UmlBaseItem::read_(); } -const Q3PtrVector UmlBaseClass::associatedComponents() +const QVector UmlBaseClass::associatedComponents() { UmlCom::send_cmd(_identifier, assocComponentCmd); - Q3PtrVector result; + QVector result; unsigned n = UmlCom::read_unsigned(); result.resize(n); for (unsigned index = 0; index != n; index += 1) - result.insert(index, (UmlComponent *) UmlBaseItem::read_()); + result[index] = (UmlComponent *) UmlBaseItem::read_(); return result; } @@ -299,7 +299,7 @@ bool UmlBaseClass::set_isIdlCustom(bool y) } #endif -UmlClass * UmlBaseClass::get(const Q3CString & n, const UmlPackage * p) +UmlClass * UmlBaseClass::get(const QByteArray & n, const UmlPackage * p) { if (p == 0) { UmlClass * x = _classes[n]; @@ -325,15 +325,15 @@ void UmlBaseClass::unload(bool rec, bool del) UmlBaseClassItem::unload(rec, del); } -bool UmlBaseClass::set_Name(const Q3CString & s) +bool UmlBaseClass::set_Name(const QByteArray & s) { if (!UmlBaseItem::set_Name(s)) return FALSE; - const Q3PtrVector ch = children(); - Q3CString destr = "~" + name(); + const QVector ch = children(); + QByteArray destr = "~" + name(); - for (unsigned i = 0; i != ch.size(); i += 1) { + for (int i = 0; i != ch.size(); i += 1) { if (ch[i]->kind() == anOperation) { if (ch[i]->name() == name()) ch[i]->set_Name(s); @@ -345,9 +345,9 @@ bool UmlBaseClass::set_Name(const Q3CString & s) return TRUE; } -Q3Dict UmlBaseClass::_classes(1001); +QHash UmlBaseClass::_classes; -UmlBaseClass::UmlBaseClass(void * id, const Q3CString & n) +UmlBaseClass::UmlBaseClass(void * id, const QByteArray & n) : UmlClassMember(id, n) { _assoc_diagram = 0; @@ -355,7 +355,7 @@ UmlBaseClass::UmlBaseClass(void * id, const Q3CString & n) _classes.insert(n, (UmlClass *) this); if ((_classes.count() / 2) >= _classes.size()) - _classes.resize(_classes.size() * 2 - 1); + _classes.reserve(_classes.size() * 2 - 1); } void UmlBaseClass::read_uml_() diff --git a/genplugouts/FileControl/UmlBaseClass.h b/genplugouts/FileControl/UmlBaseClass.h index 062977b1c..e72a13f78 100644 --- a/genplugouts/FileControl/UmlBaseClass.h +++ b/genplugouts/FileControl/UmlBaseClass.h @@ -5,10 +5,10 @@ #include "UmlClassMember.h" #include "anItemKind.h" #include "UmlTypeSpec.h" -#include -#include -#include -#include +#include + + + #include "UmlFormalParameter.h" #include "UmlActualParameter.h" @@ -54,7 +54,7 @@ class UmlBaseClass : public UmlClassMember bool set_BaseType(const UmlTypeSpec & t); // returns (a copy of) the formals list - Q3ValueList formals(); + QList formals(); // remove the formal of the given rank (0...), returns 0 on error // @@ -77,7 +77,7 @@ class UmlBaseClass : public UmlClassMember bool replaceFormal(unsigned int rank, const UmlFormalParameter & formal); // returns (a copy of) the actuals list - Q3ValueList actuals(); + QList actuals(); // replace the actual value at the given rank (0...) // @@ -100,7 +100,7 @@ class UmlBaseClass : public UmlClassMember // returns the components realizing or providing the class. // To set them refer to the UmlBaseComponent's operation setAssociatedClasses() - const Q3PtrVector associatedComponents(); + const QVector associatedComponents(); #ifdef WITHCPP // returns TRUE if the class is external, its definition @@ -184,7 +184,7 @@ class UmlBaseClass : public UmlClassMember //exist, else 0/null. In case the package is specified (not 0/null), //the returned class will be defined in a sub-level of the package. - static UmlClass * get(const Q3CString & n, const UmlPackage * p); + static UmlClass * get(const QByteArray & n, const UmlPackage * p); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -197,13 +197,14 @@ class UmlBaseClass : public UmlClassMember // to set the name // // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Name(const Q3CString & s); + virtual bool set_Name(const QByteArray & s); friend class UmlBaseRelation; friend class UmlBaseArtifact; private: - static Q3Dict _classes; + static QHash _classes; + bool _abstract; @@ -240,7 +241,7 @@ class UmlBaseClass : public UmlClassMember protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClass(void * id, const Q3CString & n); + UmlBaseClass(void * id, const QByteArray & n); //internal, do NOT use it diff --git a/genplugouts/FileControl/UmlBaseClassDiagram.h b/genplugouts/FileControl/UmlBaseClassDiagram.h index e0990d31f..a3f406b00 100644 --- a/genplugouts/FileControl/UmlBaseClassDiagram.h +++ b/genplugouts/FileControl/UmlBaseClassDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlClassDiagram; class UmlClassView; @@ -26,7 +26,7 @@ class UmlBaseClassDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseClassDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseClassItem.cpp b/genplugouts/FileControl/UmlBaseClassItem.cpp index 345c1a18d..8babd321f 100644 --- a/genplugouts/FileControl/UmlBaseClassItem.cpp +++ b/genplugouts/FileControl/UmlBaseClassItem.cpp @@ -3,9 +3,9 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include #ifdef WITHCPP -const Q3CString & UmlBaseClassItem::cppDecl() +const QByteArray & UmlBaseClassItem::cppDecl() { read_if_needed_(); @@ -19,7 +19,7 @@ bool UmlBaseClassItem::set_CppDecl(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseClassItem::javaDecl() +const QByteArray & UmlBaseClassItem::javaDecl() { read_if_needed_(); @@ -33,7 +33,7 @@ bool UmlBaseClassItem::set_JavaDecl(const char * s) #endif #ifdef WITHIDL -const Q3CString & UmlBaseClassItem::idlDecl() +const QByteArray & UmlBaseClassItem::idlDecl() { read_if_needed_(); diff --git a/genplugouts/FileControl/UmlBaseClassItem.h b/genplugouts/FileControl/UmlBaseClassItem.h index 2569d9776..c5348dadc 100644 --- a/genplugouts/FileControl/UmlBaseClassItem.h +++ b/genplugouts/FileControl/UmlBaseClassItem.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + // Mother class of the all the class's items including the class themself class UmlBaseClassItem : public UmlItem @@ -12,7 +12,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHCPP // return the C++ declaration - const Q3CString & cppDecl(); + const QByteArray & cppDecl(); // to set the C++ declaration // @@ -23,7 +23,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHJAVA // return the Java defininition - const Q3CString & javaDecl(); + const QByteArray & javaDecl(); // to set the Java definition // @@ -34,7 +34,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHIDL // return the IDL declaration - const Q3CString & idlDecl(); + const QByteArray & idlDecl(); // set the IDL declaration // @@ -50,20 +50,20 @@ class UmlBaseClassItem : public UmlItem private: #ifdef WITHCPP - Q3CString _cpp_decl; + QByteArray _cpp_decl; #endif #ifdef WITHJAVA - Q3CString _java_decl; + QByteArray _java_decl; #endif #ifdef WITHIDL - Q3CString _idl_decl; + QByteArray _idl_decl; #endif protected: - UmlBaseClassItem(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseClassItem(void * id, const QByteArray & n) : UmlItem(id, n) {}; #ifdef WITHCPP //internal, do NOT use it diff --git a/genplugouts/FileControl/UmlBaseClassMember.h b/genplugouts/FileControl/UmlBaseClassMember.h index a412a7048..fd8e96992 100644 --- a/genplugouts/FileControl/UmlBaseClassMember.h +++ b/genplugouts/FileControl/UmlBaseClassMember.h @@ -4,7 +4,7 @@ #include "UmlClassItem.h" #include "aVisibility.h" -#include + #include "UmlBaseClassItem.h" // This class manages 'true' class's items : attributes, relation, @@ -69,7 +69,7 @@ class UmlBaseClassMember : public UmlClassItem protected: - UmlBaseClassMember(void * id, const Q3CString & n) : UmlClassItem(id, n) {}; + UmlBaseClassMember(void * id, const QByteArray & n) : UmlClassItem(id, n) {}; //internal, do NOT use it diff --git a/genplugouts/FileControl/UmlBaseClassView.h b/genplugouts/FileControl/UmlBaseClassView.h index 5687a666f..cec17090f 100644 --- a/genplugouts/FileControl/UmlBaseClassView.h +++ b/genplugouts/FileControl/UmlBaseClassView.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlClassView; class UmlPackage; @@ -44,7 +44,7 @@ class UmlBaseClassView : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassView(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseClassView(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseCollaborationDiagram.h b/genplugouts/FileControl/UmlBaseCollaborationDiagram.h index 0a49b41e6..39c8eb5db 100644 --- a/genplugouts/FileControl/UmlBaseCollaborationDiagram.h +++ b/genplugouts/FileControl/UmlBaseCollaborationDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlCollaborationDiagram; class UmlItem; @@ -26,7 +26,7 @@ class UmlBaseCollaborationDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCollaborationDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseCollaborationDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseComponent.cpp b/genplugouts/FileControl/UmlBaseComponent.cpp index 0fe6d1aed..fa399b975 100644 --- a/genplugouts/FileControl/UmlBaseComponent.cpp +++ b/genplugouts/FileControl/UmlBaseComponent.cpp @@ -35,28 +35,28 @@ bool UmlBaseComponent::set_AssociatedDiagram(UmlComponentDiagram * d) return FALSE; } -const Q3PtrVector & UmlBaseComponent::realizedClasses() +const QVector & UmlBaseComponent::realizedClasses() { read_if_needed_(); return _realized; } -const Q3PtrVector & UmlBaseComponent::providedClasses() +const QVector & UmlBaseComponent::providedClasses() { read_if_needed_(); return _provided; } -const Q3PtrVector & UmlBaseComponent::requiredClasses() +const QVector & UmlBaseComponent::requiredClasses() { read_if_needed_(); return _required; } -bool UmlBaseComponent::set_AssociatedClasses(const Q3PtrVector & realized, const Q3PtrVector & provided, const Q3PtrVector & required) +bool UmlBaseComponent::set_AssociatedClasses(const QVector & realized, const QVector & provided, const QVector & required) { UmlCom::send_cmd(_identifier, setAssocClassesCmd, realized, provided, required); @@ -96,18 +96,18 @@ void UmlBaseComponent::read_uml_() _realized.resize(n); for (index = 0; index != n; index += 1) - _realized.insert(index, (UmlClass *) UmlBaseItem::read_()); + _realized[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _provided.resize(n); for (index = 0; index != n; index += 1) - _provided.insert(index, (UmlClass *) UmlBaseItem::read_()); + _provided[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _required.resize(n); for (index = 0; index != n; index += 1) - _required.insert(index, (UmlClass *) UmlBaseItem::read_()); + _required[index] = (UmlClass *) UmlBaseItem::read_(); } diff --git a/genplugouts/FileControl/UmlBaseComponent.h b/genplugouts/FileControl/UmlBaseComponent.h index 8b0bbc531..2b7c2e2ef 100644 --- a/genplugouts/FileControl/UmlBaseComponent.h +++ b/genplugouts/FileControl/UmlBaseComponent.h @@ -1,11 +1,11 @@ #ifndef _UMLBASECOMPONENT_H #define _UMLBASECOMPONENT_H - +#include #include "UmlItem.h" #include "anItemKind.h" -#include -#include + + #include "UmlClass.h" // to avoid destructor problem class UmlComponent; @@ -36,18 +36,18 @@ class UmlBaseComponent : public UmlItem bool set_AssociatedDiagram(UmlComponentDiagram * d); // returns (in Java a copy of) the optional realized classes - const Q3PtrVector & realizedClasses(); + const QVector & realizedClasses(); // returns (in Java a copy of) the optional provided classes - const Q3PtrVector & providedClasses(); + const QVector & providedClasses(); // returns (in Java a copy of) the optional required classes - const Q3PtrVector & requiredClasses(); + const QVector & requiredClasses(); // set the realized, provided and required classes lists // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_AssociatedClasses(const Q3PtrVector & realized, const Q3PtrVector & provided, const Q3PtrVector & required); + bool set_AssociatedClasses(const QVector & realized, const QVector & provided, const QVector & required); // to unload the object to free memory, it will be reloaded // automatically if needed. args unused @@ -57,11 +57,11 @@ class UmlBaseComponent : public UmlItem private: UmlComponentDiagram * _assoc_diagram; - Q3PtrVector _realized; + QVector _realized; - Q3PtrVector _provided; + QVector _provided; - Q3PtrVector _required; + QVector _required; protected: @@ -70,11 +70,11 @@ class UmlBaseComponent : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponent(void * id, const Q3CString & n); + UmlBaseComponent(void * id, const QByteArray & n); }; -inline UmlBaseComponent::UmlBaseComponent(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseComponent::UmlBaseComponent(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/FileControl/UmlBaseComponentDiagram.h b/genplugouts/FileControl/UmlBaseComponentDiagram.h index 43466da7c..b235e0717 100644 --- a/genplugouts/FileControl/UmlBaseComponentDiagram.h +++ b/genplugouts/FileControl/UmlBaseComponentDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlComponentDiagram; class UmlComponentView; @@ -26,7 +26,7 @@ class UmlBaseComponentDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponentDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseComponentDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseComponentView.h b/genplugouts/FileControl/UmlBaseComponentView.h index 0cb5c0769..a8ff514fb 100644 --- a/genplugouts/FileControl/UmlBaseComponentView.h +++ b/genplugouts/FileControl/UmlBaseComponentView.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlComponentView; class UmlPackage; @@ -26,7 +26,7 @@ class UmlBaseComponentView : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponentView(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseComponentView(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseDeepHistoryPseudoState.h b/genplugouts/FileControl/UmlBaseDeepHistoryPseudoState.h index 0ac36e22d..9224eb152 100644 --- a/genplugouts/FileControl/UmlBaseDeepHistoryPseudoState.h +++ b/genplugouts/FileControl/UmlBaseDeepHistoryPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlDeepHistoryPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseDeepHistoryPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeepHistoryPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseDeepHistoryPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseDeployment.h b/genplugouts/FileControl/UmlBaseDeployment.h index b268e0c17..b16902170 100644 --- a/genplugouts/FileControl/UmlBaseDeployment.h +++ b/genplugouts/FileControl/UmlBaseDeployment.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + // Manage the deployments class UmlBaseDeployment : public UmlItem { protected: - UmlBaseDeployment(void * id, Q3CString n) : UmlItem(id, n) {}; + UmlBaseDeployment(void * id, QByteArray n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseDeploymentDiagram.h b/genplugouts/FileControl/UmlBaseDeploymentDiagram.h index 8f2aacbd5..db1cfc67d 100644 --- a/genplugouts/FileControl/UmlBaseDeploymentDiagram.h +++ b/genplugouts/FileControl/UmlBaseDeploymentDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlDeploymentDiagram; class UmlDeploymentView; @@ -26,7 +26,7 @@ class UmlBaseDeploymentDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeploymentDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseDeploymentDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseDeploymentView.h b/genplugouts/FileControl/UmlBaseDeploymentView.h index 08c540330..df550cb1b 100644 --- a/genplugouts/FileControl/UmlBaseDeploymentView.h +++ b/genplugouts/FileControl/UmlBaseDeploymentView.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlDeploymentView; class UmlPackage; @@ -26,7 +26,7 @@ class UmlBaseDeploymentView : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeploymentView(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseDeploymentView(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseDiagram.cpp b/genplugouts/FileControl/UmlBaseDiagram.cpp index 478be9710..cc8ca974e 100644 --- a/genplugouts/FileControl/UmlBaseDiagram.cpp +++ b/genplugouts/FileControl/UmlBaseDiagram.cpp @@ -3,8 +3,8 @@ #include "UmlCom.h" //Added by qt3to4: -#include -bool UmlBaseDiagram::saveIn(const Q3CString & s) const +#include +bool UmlBaseDiagram::saveIn(const QByteArray & s) const { UmlCom::send_cmd(_identifier, saveInCmd, (const char *)s); //[jasa] Handle ambiguous call. return UmlCom::read_bool(); diff --git a/genplugouts/FileControl/UmlBaseDiagram.h b/genplugouts/FileControl/UmlBaseDiagram.h index 9cf05ff22..19e34654b 100644 --- a/genplugouts/FileControl/UmlBaseDiagram.h +++ b/genplugouts/FileControl/UmlBaseDiagram.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + // Mother class of all the classes managing the diagrams class UmlBaseDiagram : public UmlItem @@ -18,12 +18,12 @@ class UmlBaseDiagram : public UmlItem // - else the default diagram aspect, which is probably not as you want // // On error return FALSE in C++, produce a RuntimeException in Java - bool saveIn(const Q3CString & s) const; + bool saveIn(const QByteArray & s) const; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDiagram(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseDiagram(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseEntryPointPseudoState.h b/genplugouts/FileControl/UmlBaseEntryPointPseudoState.h index dbfd3ef1a..60dd28bb0 100644 --- a/genplugouts/FileControl/UmlBaseEntryPointPseudoState.h +++ b/genplugouts/FileControl/UmlBaseEntryPointPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlEntryPointPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseEntryPointPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseEntryPointPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseEntryPointPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseExitPointPseudoState.h b/genplugouts/FileControl/UmlBaseExitPointPseudoState.h index ff2ad12bc..29563f22b 100644 --- a/genplugouts/FileControl/UmlBaseExitPointPseudoState.h +++ b/genplugouts/FileControl/UmlBaseExitPointPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlExitPointPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseExitPointPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExitPointPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseExitPointPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseExtraClassMember.cpp b/genplugouts/FileControl/UmlBaseExtraClassMember.cpp index 2bb66cd9e..2dd2228c3 100644 --- a/genplugouts/FileControl/UmlBaseExtraClassMember.cpp +++ b/genplugouts/FileControl/UmlBaseExtraClassMember.cpp @@ -5,7 +5,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlExtraClassMember * UmlBaseExtraClassMember::create(UmlClass * parent, const char * name) { return (UmlExtraClassMember *) parent->create_(anExtraClassMember, name); @@ -29,7 +29,7 @@ bool UmlBaseExtraClassMember::set_isCppInline(bool y) return set_it_(_cpp_inline, y, setIsCppInlineCmd); } -const Q3CString & UmlBaseExtraClassMember::cppDef() +const QByteArray & UmlBaseExtraClassMember::cppDef() { read_if_needed_(); diff --git a/genplugouts/FileControl/UmlBaseExtraClassMember.h b/genplugouts/FileControl/UmlBaseExtraClassMember.h index e2b9d4f30..4f07b5583 100644 --- a/genplugouts/FileControl/UmlBaseExtraClassMember.h +++ b/genplugouts/FileControl/UmlBaseExtraClassMember.h @@ -4,7 +4,7 @@ #include "UmlClassItem.h" #include "anItemKind.h" -#include + class UmlExtraClassMember; class UmlClass; @@ -37,7 +37,7 @@ class UmlBaseExtraClassMember : public UmlClassItem // returns the operation's definition in C++, notes that the declaration // is returned by the inherited ClassItemBase::CppDecl() operation - const Q3CString & cppDef(); + const QByteArray & cppDef(); // sets the operation's definition in C++, notes that the declaration // is set through the inherited ClassItemBase::set_CppDecl() operation @@ -56,12 +56,12 @@ class UmlBaseExtraClassMember : public UmlClassItem bool _cpp_inline; - Q3CString _cpp_def; + QByteArray _cpp_def; #endif protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExtraClassMember(void * id, const Q3CString & n) : UmlClassItem(id, n) {}; + UmlBaseExtraClassMember(void * id, const QByteArray & n) : UmlClassItem(id, n) {}; #ifdef WITHCPP //internal, do NOT use it diff --git a/genplugouts/FileControl/UmlBaseFinalState.h b/genplugouts/FileControl/UmlBaseFinalState.h index 16e0816cf..2fa133da6 100644 --- a/genplugouts/FileControl/UmlBaseFinalState.h +++ b/genplugouts/FileControl/UmlBaseFinalState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlFinalState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseFinalState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFinalState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseFinalState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseForkPseudoState.h b/genplugouts/FileControl/UmlBaseForkPseudoState.h index 009499bfa..9dfa5025c 100644 --- a/genplugouts/FileControl/UmlBaseForkPseudoState.h +++ b/genplugouts/FileControl/UmlBaseForkPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlForkPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseForkPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseForkPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseForkPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseFormalParameter.h b/genplugouts/FileControl/UmlBaseFormalParameter.h index 4d2f3428f..c58ead471 100644 --- a/genplugouts/FileControl/UmlBaseFormalParameter.h +++ b/genplugouts/FileControl/UmlBaseFormalParameter.h @@ -2,7 +2,7 @@ #define _UMLBASEFORMALPARAMETER_H -#include + #include "UmlTypeSpec.h" // This class manages 'formal parameters' of a template class. For instance 'T' in @@ -14,12 +14,12 @@ class UmlBaseFormalParameter UmlBaseFormalParameter() {}; // returns the name of the formal - const Q3CString & name() const { + const QByteArray & name() const { return _name; }; // returns the type of a formal, probably "class" - const Q3CString & type() const { + const QByteArray & type() const { return _type; }; @@ -31,10 +31,10 @@ class UmlBaseFormalParameter friend class UmlBaseClass; protected: - Q3CString _name; + QByteArray _name; // "class" ... - Q3CString _type; + QByteArray _type; UmlTypeSpec _default_value; diff --git a/genplugouts/FileControl/UmlBaseInitialPseudoState.h b/genplugouts/FileControl/UmlBaseInitialPseudoState.h index 88dae1cc6..2f31e4340 100644 --- a/genplugouts/FileControl/UmlBaseInitialPseudoState.h +++ b/genplugouts/FileControl/UmlBaseInitialPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlInitialPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseInitialPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInitialPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseInitialPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseItem.cpp b/genplugouts/FileControl/UmlBaseItem.cpp index b7bf9afcf..886e0b4d5 100644 --- a/genplugouts/FileControl/UmlBaseItem.cpp +++ b/genplugouts/FileControl/UmlBaseItem.cpp @@ -43,33 +43,33 @@ #include "UmlJoinPseudoState.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include +#include -bool UmlBaseItem::set_Name(const Q3CString & s) +bool UmlBaseItem::set_Name(const QByteArray & s) { return set_it_(_name, s, setNameCmd); } -const Q3CString & UmlBaseItem::stereotype() +const QByteArray & UmlBaseItem::stereotype() { read_if_needed_(); return _stereotype; } -bool UmlBaseItem::set_Stereotype(const Q3CString & s) +bool UmlBaseItem::set_Stereotype(const QByteArray & s) { return set_it_(_stereotype, s, setStereotypeCmd); } -const Q3CString & UmlBaseItem::description() +const QByteArray & UmlBaseItem::description() { read_if_needed_(); return _description; } -bool UmlBaseItem::set_Description(const Q3CString & s) +bool UmlBaseItem::set_Description(const QByteArray & s) { return set_it_(_description, s, setDescriptionCmd); } @@ -85,7 +85,7 @@ UmlItem * UmlBaseItem::parent() return _parent; } -const Q3PtrVector UmlBaseItem::children() +const QVector UmlBaseItem::children() { if (_children == 0) read_children_(); @@ -105,11 +105,11 @@ bool UmlBaseItem::set_childrenVisible(bool y) return UmlCom::read_bool(); } -bool UmlBaseItem::propertyValue(const Q3CString & k, Q3CString & v) +bool UmlBaseItem::propertyValue(const QByteArray & k, QByteArray & v) { read_if_needed_(); - Q3CString * s = _dict[k]; + QByteArray * s = _dict[k]; if (s == 0) return FALSE; @@ -119,7 +119,7 @@ bool UmlBaseItem::propertyValue(const Q3CString & k, Q3CString & v) } -bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) +bool UmlBaseItem::set_PropertyValue(const QByteArray & k, const QByteArray & v) { read_if_needed_(); @@ -127,10 +127,10 @@ bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) if (UmlCom::read_bool()) { if (_defined) { - Q3CString * s = _dict[k]; + QByteArray * s = _dict[k]; if (s == 0) - _dict.insert(k, new Q3CString(v)); + _dict.insert(k, new QByteArray(v)); else *s = v; } @@ -141,7 +141,7 @@ bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) return FALSE; } -const Q3Dict UmlBaseItem::properties() +const QHash UmlBaseItem::properties() { read_if_needed_(); @@ -160,7 +160,7 @@ bool UmlBaseItem::moveAfter(const UmlItem * x) return FALSE; } -Q3CString UmlBaseItem::supportFile() +QByteArray UmlBaseItem::supportFile() { UmlCom::send_cmd(_identifier, supportFileCmd); return UmlCom::read_string(); @@ -172,7 +172,7 @@ bool UmlBaseItem::isWritable() return UmlCom::read_bool(); } -int UmlBaseItem::apply(Q3CString cmd) +int UmlBaseItem::apply(QByteArray cmd) { UmlCom::send_cmd(_identifier, applyCmd, (const char *)cmd); //[jasa] handle ambiguous call. return (int) UmlCom::read_unsigned(); @@ -190,11 +190,11 @@ bool UmlBaseItem::set_isMarked(bool y) return set_it_(_marked, y, setMarkedCmd); } -const Q3PtrVector UmlBaseItem::referencedBy() +const QVector UmlBaseItem::referencedBy() { UmlCom::send_cmd(_identifier, referencedByCmd); - Q3PtrVector result; + QVector result; UmlCom::read_item_list(result); return result; @@ -209,7 +209,7 @@ void UmlBaseItem::unload(bool rec, bool del) if (_children != 0) { if (rec) { - for (unsigned chindex = 0; chindex != _children->size(); chindex += 1) { + for (int chindex = 0; chindex != _children->size(); chindex += 1) { _children->at(chindex)->unload(TRUE, del); if (del) @@ -228,17 +228,17 @@ bool UmlBaseItem::isToolRunning(int id) return UmlCom::read_bool(); } -const Q3PtrVector UmlBaseItem::markedItems() +const QVector UmlBaseItem::markedItems() { UmlCom::send_cmd(miscGlobalCmd, allMarkedCmd); - Q3PtrVector result; + QVector result; UmlCom::read_item_list(result); return result; } -Q3PtrDict UmlBaseItem::_all(997); +QHash UmlBaseItem::_all; void UmlBaseItem::read_if_needed_() { @@ -315,9 +315,9 @@ void UmlBaseItem::read_uml_() unsigned n = UmlCom::read_unsigned(); while (n--) { - Q3CString k = UmlCom::read_string(); + QByteArray k = UmlCom::read_string(); - _dict.insert(k, new Q3CString(UmlCom::read_string())); + _dict.insert(k, new QByteArray(UmlCom::read_string())); } _description = UmlCom::read_string(); @@ -346,7 +346,7 @@ void UmlBaseItem::read_idl_() void UmlBaseItem::read_children_() { UmlCom::send_cmd(_identifier, childrenCmd); - _children = new Q3PtrVector; + _children = new QVector; UmlCom::read_item_list(*_children); @@ -400,7 +400,7 @@ bool UmlBaseItem::set_it_(aDirection & r, aDirection v, OnInstanceCmd cmd) return FALSE; } -bool UmlBaseItem::set_it_(Q3CString & r, const char * v, OnInstanceCmd cmd) +bool UmlBaseItem::set_it_(QByteArray & r, const char * v, OnInstanceCmd cmd) { UmlCom::send_cmd(_identifier, cmd, v); @@ -437,7 +437,7 @@ UmlItem * UmlBaseItem::read_() const char * name = UmlCom::read_string(); #ifndef WIN32 - //cout << "UmlBaseItem::read id " << id << " kind " << kind << " name " << name << '\n'; + //qDebug() << "UmlBaseItem::read id " << id << " kind " << kind << " name " << name << '\n'; #endif UmlItem * result = _all[id]; @@ -557,20 +557,20 @@ UmlItem * UmlBaseItem::read_() default: UmlCom::bye(); - UmlCom::fatal_error(Q3CString("unknown item type ") + Q3CString().setNum(kind)); + UmlCom::fatal_error(QByteArray("unknown item type ") + QByteArray().setNum(kind)); } } return result; } -UmlBaseItem::UmlBaseItem(void * id, const Q3CString & n) +UmlBaseItem::UmlBaseItem(void * id, const QByteArray & n) : _defined(FALSE), _identifier(id), _name(n), _parent(0), _children(0) { _all.insert(id, (UmlItem *) this); if (_all.count() / _all.size() > 10) - _all.resize(_all.size() * 2 - 1); + _all.reserve(_all.size() * 2 - 1); } UmlBaseItem::~UmlBaseItem() diff --git a/genplugouts/FileControl/UmlBaseItem.h b/genplugouts/FileControl/UmlBaseItem.h index ed4c00698..c067cb058 100644 --- a/genplugouts/FileControl/UmlBaseItem.h +++ b/genplugouts/FileControl/UmlBaseItem.h @@ -1,16 +1,17 @@ #ifndef _UMLBASEITEM_H #define _UMLBASEITEM_H - +#include #include "anItemKind.h" -#include -#include -#include -#include + + + + //#include "OnInstanceCmd.h" #include "aVisibility.h" #include "aDirection.h" +#include class UmlItem; class UmlTypeSpec; @@ -38,35 +39,35 @@ class UmlBaseItem virtual anItemKind kind() = 0; // returns the name - const Q3CString & name() { + const QByteArray & name() { return _name; }; // to set the name // // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Name(const Q3CString & s); + virtual bool set_Name(const QByteArray & s); // returns the stereotype - const Q3CString & stereotype(); + const QByteArray & stereotype(); // to set the stereotype // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Stereotype(const Q3CString & s); + virtual bool set_Stereotype(const QByteArray & s); // returns the description - const Q3CString & description(); + const QByteArray & description(); // to set the description // On error return FALSE in C++, produce a RuntimeException in Java - bool set_Description(const Q3CString & s); + bool set_Description(const QByteArray & s); // returns the parent (0/null if it is applied on the project itself), // to go all over the browser tree UmlItem * parent(); // returns (in Java : a copy of) the children list, to go all over the browser tree - const Q3PtrVector children(); + const QVector children(); // return TRUE if the children exist and are visible (independently // of the scroll bar) in the browser, else FALSE @@ -91,16 +92,16 @@ class UmlBaseItem // // These properties may be edited through the object dialog last tab // named 'user' - bool propertyValue(const Q3CString & k, Q3CString & v); + bool propertyValue(const QByteArray & k, QByteArray & v); // to set (may be insert a new) the value 'v' associated to the key 'k' // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PropertyValue(const Q3CString & k, const Q3CString & v); + bool set_PropertyValue(const QByteArray & k, const QByteArray & v); // returns all the properties of the object through (in Java a copy of) a dictionnary - const Q3Dict properties(); + const QHash properties(); // If the parameter is null, move the current item to be // the first child of its parent. Else the current item and @@ -135,7 +136,7 @@ class UmlBaseItem // external type and edited through the last Idl tab of the // 'Generation Settings' dialog is saved in the file 'idl_includes' // - Q3CString supportFile(); + QByteArray supportFile(); // return TRUE in case the item may be modified, i.e. it is not // an API base 'plug-out' class and the corresponding file(s) are not @@ -143,7 +144,7 @@ class UmlBaseItem bool isWritable(); // Apply asynchronously the tool on the item, returns an identifier to call isToolDone() - int apply(Q3CString cmd); + int apply(QByteArray cmd); //return TRUE in case the item is marked bool isMarked(); @@ -156,7 +157,7 @@ class UmlBaseItem // The result may contains UmlAttribute, UmlRelations, UmlNcRelations, // UmlOperation (their bodies are not taken into account) , UmlClass // and UmlComponents. - const Q3PtrVector referencedBy(); + const QVector referencedBy(); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -169,7 +170,7 @@ class UmlBaseItem // 'id' is an identifier returned by apply(), indicates if the tool is still running static bool isToolRunning(int id); - static const Q3PtrVector markedItems(); + static const QVector markedItems(); friend class UmlBaseClassItem; friend class UmlBaseAttribute; @@ -207,21 +208,23 @@ class UmlBaseItem void * _identifier; - Q3CString _name; + QByteArray _name; // Note : protected in Java for internal reason, but do NOT // access to this field yourself ! - Q3CString _stereotype; + QByteArray _stereotype; - Q3CString _description; + QByteArray _description; UmlItem * _parent; - Q3PtrVector * _children; + QVector * _children; + + QHash _dict; + - Q3Dict _dict; + static QHash _all; - static Q3PtrDict _all; protected: @@ -277,7 +280,7 @@ class UmlBaseItem //internal, do NOT use it - bool set_it_(Q3CString & r, const char * v, OnInstanceCmd cmd); + bool set_it_(QByteArray & r, const char * v, OnInstanceCmd cmd); //internal, do NOT use it @@ -290,7 +293,7 @@ class UmlBaseItem public: // the constructor, do not call it yourself ! - UmlBaseItem(void * id, const Q3CString & n); + UmlBaseItem(void * id, const QByteArray & n); // the destructor, do not delete objects yourself !!!!!!!!!! virtual ~UmlBaseItem(); diff --git a/genplugouts/FileControl/UmlBaseJoinPseudoState.h b/genplugouts/FileControl/UmlBaseJoinPseudoState.h index 31976dfff..c95cfff9c 100644 --- a/genplugouts/FileControl/UmlBaseJoinPseudoState.h +++ b/genplugouts/FileControl/UmlBaseJoinPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlJoinPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseJoinPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJoinPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseJoinPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseJunctionPseudoState.h b/genplugouts/FileControl/UmlBaseJunctionPseudoState.h index 9b76d88e7..96cdfe959 100644 --- a/genplugouts/FileControl/UmlBaseJunctionPseudoState.h +++ b/genplugouts/FileControl/UmlBaseJunctionPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlJunctionPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseJunctionPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJunctionPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseJunctionPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseNcRelation.h b/genplugouts/FileControl/UmlBaseNcRelation.h index 7418e3406..0ad29c67b 100644 --- a/genplugouts/FileControl/UmlBaseNcRelation.h +++ b/genplugouts/FileControl/UmlBaseNcRelation.h @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "aRelationKind.h" #include "anItemKind.h" -#include + class UmlNcRelation; @@ -43,11 +43,11 @@ class UmlBaseNcRelation : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseNcRelation(void * id, const Q3CString & n); + UmlBaseNcRelation(void * id, const QByteArray & n); }; -inline UmlBaseNcRelation::UmlBaseNcRelation(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseNcRelation::UmlBaseNcRelation(void * id, const QByteArray & n) : UmlItem(id, n) { _target = 0; } diff --git a/genplugouts/FileControl/UmlBaseNode.h b/genplugouts/FileControl/UmlBaseNode.h index 07a980e66..208e951f2 100644 --- a/genplugouts/FileControl/UmlBaseNode.h +++ b/genplugouts/FileControl/UmlBaseNode.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlNode; class UmlDeploymentDiagram; @@ -38,7 +38,7 @@ class UmlBaseNode : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseNode(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseNode(void * id, const QByteArray & n) : UmlItem(id, n) {}; //internal, do NOT use it diff --git a/genplugouts/FileControl/UmlBaseOperation.cpp b/genplugouts/FileControl/UmlBaseOperation.cpp index 26096f11c..c811bf05a 100644 --- a/genplugouts/FileControl/UmlBaseOperation.cpp +++ b/genplugouts/FileControl/UmlBaseOperation.cpp @@ -7,8 +7,8 @@ #include "UmlBaseClass.h" #include "UmlClassMember.h" //Added by qt3to4: -#include -#include +#include +#include UmlOperation * UmlBaseOperation::create(UmlClass * parent, const char * s) { return (UmlOperation *) parent->create_(anOperation, s); @@ -54,7 +54,7 @@ bool UmlBaseOperation::set_ReturnType(const UmlTypeSpec & t) return set_it_(_return_type, t, setReturnTypeCmd); } -const Q3ValueList UmlBaseOperation::params() +const QList UmlBaseOperation::params() { read_if_needed_(); @@ -68,7 +68,7 @@ bool UmlBaseOperation::addParameter(unsigned rank, const UmlParameter & p) if (UmlCom::read_bool()) { if (_defined) - _params.insert(_params.at(rank), p); + _params.insert(rank, p); return TRUE; } @@ -82,7 +82,7 @@ bool UmlBaseOperation::removeParameter(unsigned rank) if (UmlCom::read_bool()) { if (_defined) - _params.remove(_params.at(rank)); + _params.removeAt(rank); return TRUE; } @@ -105,7 +105,7 @@ bool UmlBaseOperation::replaceParameter(unsigned rank, const UmlParameter & p) return FALSE; } -const Q3ValueList UmlBaseOperation::exceptions() +const QList UmlBaseOperation::exceptions() { read_if_needed_(); @@ -118,7 +118,7 @@ bool UmlBaseOperation::addException(unsigned rank, const UmlTypeSpec & t) if (UmlCom::read_bool()) { if (_defined) - _exceptions.insert(_exceptions.at(rank), t); + _exceptions.insert(rank, t); return TRUE; } @@ -132,7 +132,7 @@ bool UmlBaseOperation::removeException(unsigned rank) if (UmlCom::read_bool()) { if (_defined) - _exceptions.remove(_exceptions.at(rank)); + _exceptions.removeAt(rank); return TRUE; } @@ -245,7 +245,7 @@ bool UmlBaseOperation::set_isCppInline(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::cppDef() +const QByteArray & UmlBaseOperation::cppDef() { read_if_needed_(); @@ -257,7 +257,7 @@ bool UmlBaseOperation::set_CppDef(const char * s) return set_it_(_cpp_def, s, setCppDefCmd); } -Q3CString UmlBaseOperation::cppBody() +QByteArray UmlBaseOperation::cppBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, cppBodyCmd); @@ -271,7 +271,7 @@ bool UmlBaseOperation::set_CppBody(const char * s) return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::cppNameSpec() +const QByteArray & UmlBaseOperation::cppNameSpec() { read_if_needed_(); @@ -323,7 +323,7 @@ bool UmlBaseOperation::set_isJavaSynchronized(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::javaDef() +const QByteArray & UmlBaseOperation::javaDef() { return javaDecl(); } @@ -333,7 +333,7 @@ bool UmlBaseOperation::set_JavaDef(const char * s) return set_JavaDecl(s); } -Q3CString UmlBaseOperation::javaBody() +QByteArray UmlBaseOperation::javaBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, javaBodyCmd); @@ -347,7 +347,7 @@ bool UmlBaseOperation::set_JavaBody(const char * s) return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::javaNameSpec() +const QByteArray & UmlBaseOperation::javaNameSpec() { read_if_needed_(); @@ -380,7 +380,7 @@ bool UmlBaseOperation::set_isIdlOneway(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::idlNameSpec() +const QByteArray & UmlBaseOperation::idlNameSpec() { read_if_needed_(); diff --git a/genplugouts/FileControl/UmlBaseOperation.h b/genplugouts/FileControl/UmlBaseOperation.h index a17e88a74..d4ce85ea5 100644 --- a/genplugouts/FileControl/UmlBaseOperation.h +++ b/genplugouts/FileControl/UmlBaseOperation.h @@ -5,8 +5,8 @@ #include "UmlClassMember.h" #include "anItemKind.h" #include "UmlTypeSpec.h" -#include -#include +#include + #include "UmlParameter.h" class UmlOperation; @@ -44,7 +44,7 @@ class UmlBaseOperation : public UmlClassMember bool set_ReturnType(const UmlTypeSpec & t); // returns (in java a copy of) the parameters list - const Q3ValueList params(); + const QList params(); // adds a parameter at the given rank (0...) // @@ -62,7 +62,7 @@ class UmlBaseOperation : public UmlClassMember bool replaceParameter(unsigned rank, const UmlParameter & p); // returns the exceptions - const Q3ValueList exceptions(); + const QList exceptions(); // adds the exception at the given rank (0...) // @@ -122,7 +122,7 @@ class UmlBaseOperation : public UmlClassMember // returns the operation's definition in C++, notes that the declaration // is returned by the inherited ClassItemBase::CppDecl() operation - const Q3CString & cppDef(); + const QByteArray & cppDef(); // sets the operation's definition in C++, notes that the declaration // is set through the inherited ClassItemBase::set_CppDecl() operation @@ -131,9 +131,9 @@ class UmlBaseOperation : public UmlClassMember bool set_CppDef(const char * s); // returns the operation's body in C++, useless if the def does not - // contains ${body}. Note that the body is get each time from BOUML + // contains ${body}. Note that the body is get each time from DOUML // for memory size reason - Q3CString cppBody(); + QByteArray cppBody(); // sets the operation's body in C++, useless if the def does not // contains ${body} @@ -143,7 +143,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's C++ name must be generated - const Q3CString & cppNameSpec(); + const QByteArray & cppNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's C++ name must be generated @@ -171,7 +171,7 @@ class UmlBaseOperation : public UmlClassMember // returns the operation's definition in Java, notes that it is // already made by the inherited JavaDecl operation - const Q3CString & javaDef(); + const QByteArray & javaDef(); // sets the operation's definition in Java, notes that it is // already made by the inherited set_JavaDecl operation @@ -180,9 +180,9 @@ class UmlBaseOperation : public UmlClassMember bool set_JavaDef(const char * s); // returns the operation's body in Java++, useless if the def does - // not contains ${body} Note that the body is get each time from BOUML + // not contains ${body} Note that the body is get each time from DOUML // for memory size reason - Q3CString javaBody(); + QByteArray javaBody(); // sets the operation's body in Java, useless if the def does not // contains ${body} @@ -192,7 +192,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's JAVA name must be generated - const Q3CString & javaNameSpec(); + const QByteArray & javaNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's JAVA name must be generated @@ -212,7 +212,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's IDL name must be generated - const Q3CString & idlNameSpec(); + const QByteArray & idlNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's IDL name must be generated @@ -254,22 +254,22 @@ class UmlBaseOperation : public UmlClassMember UmlTypeSpec _return_type; - Q3ValueList _params; + QList _params; - Q3ValueList _exceptions; + QList _exceptions; #ifdef WITHCPP - Q3CString _cpp_def; + QByteArray _cpp_def; - Q3CString _cpp_name_spec; + QByteArray _cpp_name_spec; #endif #ifdef WITHJAVA - Q3CString _java_name_spec; + QByteArray _java_name_spec; #endif #ifdef WITHIDL - Q3CString _idl_name_spec; + QByteArray _idl_name_spec; #endif // exclusive with set_of @@ -281,7 +281,7 @@ class UmlBaseOperation : public UmlClassMember protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOperation(void * id, const Q3CString & n); + UmlBaseOperation(void * id, const QByteArray & n); //internal, do NOT use it @@ -307,7 +307,7 @@ class UmlBaseOperation : public UmlClassMember }; -inline UmlBaseOperation::UmlBaseOperation(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseOperation::UmlBaseOperation(void * id, const QByteArray & n) : UmlClassMember(id, n) { _get_of = 0; _set_of = 0; diff --git a/genplugouts/FileControl/UmlBasePackage.cpp b/genplugouts/FileControl/UmlBasePackage.cpp index 0242ec238..f1eca57ae 100644 --- a/genplugouts/FileControl/UmlBasePackage.cpp +++ b/genplugouts/FileControl/UmlBasePackage.cpp @@ -7,7 +7,7 @@ #include "Tools/ApiCmd.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include +#include UmlPackage * UmlBasePackage::create(UmlPackage * parent, const char * name) { return (UmlPackage *) parent->create_(aPackage, name); @@ -38,111 +38,111 @@ bool UmlBasePackage::set_AssociatedDiagram(UmlClassDiagram * d) } #ifdef WITHCPP -const Q3CString & UmlBasePackage::cppSrcDir() +const QByteArray & UmlBasePackage::cppSrcDir() { read_if_needed_(); return _cpp_src_dir; } -bool UmlBasePackage::set_CppSrcDir(const Q3CString & s) +bool UmlBasePackage::set_CppSrcDir(const QByteArray & s) { return set_it_(_cpp_src_dir, s, setCppSrcDirCmd); } -const Q3CString & UmlBasePackage::cppHDir() +const QByteArray & UmlBasePackage::cppHDir() { read_if_needed_(); return _cpp_h_dir; } -bool UmlBasePackage::set_CppHDir(const Q3CString & s) +bool UmlBasePackage::set_CppHDir(const QByteArray & s) { return set_it_(_cpp_h_dir, s, setCppHDirCmd); } -Q3CString UmlBasePackage::cppNamespace() +QByteArray UmlBasePackage::cppNamespace() { read_if_needed_(); return _cpp_namespace; } -bool UmlBasePackage::set_CppNamespace(const Q3CString & s) +bool UmlBasePackage::set_CppNamespace(const QByteArray & s) { return set_it_(_cpp_namespace, s, setCppNamespaceCmd); } -UmlPackage * UmlBasePackage::findNamespace(const Q3CString & n) const +UmlPackage * UmlBasePackage::findNamespace(const QByteArray & n) const { - UmlCom::send_cmd(packageGlobalCmd, findNamespaceCmd, _identifier, n); + UmlCom::send_cmd(packageGlobalCmd, findCppNamespaceCmd, _identifier, n); return (UmlPackage *) UmlBaseItem::read_(); } #endif #ifdef WITHJAVA -const Q3CString & UmlBasePackage::javaDir() +const QByteArray & UmlBasePackage::javaDir() { read_if_needed_(); return _java_dir; } -bool UmlBasePackage::set_JavaDir(const Q3CString & s) +bool UmlBasePackage::set_JavaDir(const QByteArray & s) { return set_it_(_java_dir, s, setJavaDirCmd); } -Q3CString UmlBasePackage::javaPackage() +QByteArray UmlBasePackage::javaPackage() { read_if_needed_(); return _java_package; } -bool UmlBasePackage::set_JavaPackage(const Q3CString & s) +bool UmlBasePackage::set_JavaPackage(const QByteArray & s) { return set_it_(_java_package, s, setJavaPackageCmd); } -UmlPackage * UmlBasePackage::findPackage(const Q3CString & n) const +UmlPackage * UmlBasePackage::findPackage(const QByteArray & n) const { - UmlCom::send_cmd(packageGlobalCmd, findPackageCmd, _identifier, n); + UmlCom::send_cmd(packageGlobalCmd, findJavaPackageCmd, _identifier, n); return (UmlPackage *) UmlBaseItem::read_(); } #endif #ifdef WITHIDL -const Q3CString & UmlBasePackage::idlDir() +const QByteArray & UmlBasePackage::idlDir() { read_if_needed_(); return _idl_dir; } -bool UmlBasePackage::set_IdlDir(const Q3CString & s) +bool UmlBasePackage::set_IdlDir(const QByteArray & s) { return set_it_(_idl_dir, s, setIdlDirCmd); } -Q3CString UmlBasePackage::idlModule() +QByteArray UmlBasePackage::idlModule() { read_if_needed_(); return _idl_module; } -bool UmlBasePackage::set_IdlModule(const Q3CString & s) +bool UmlBasePackage::set_IdlModule(const QByteArray & s) { return set_it_(_idl_module, s, setIdlModuleCmd); } -UmlPackage * UmlBasePackage::findModule(const Q3CString & n) const +UmlPackage * UmlBasePackage::findModule(const QByteArray & n) const { - UmlCom::send_cmd(packageGlobalCmd, findModuleCmd, _identifier, n); + UmlCom::send_cmd(packageGlobalCmd, findIdlModuleCmd, _identifier, n); return (UmlPackage *) UmlBaseItem::read_(); } @@ -167,7 +167,7 @@ void UmlBasePackage::saveProject() UmlCom::send_cmd(packageGlobalCmd, saveProjectCmd); } -void UmlBasePackage::loadProject(Q3CString p) +void UmlBasePackage::loadProject(QByteArray p) { UmlCom::send_cmd(miscGlobalCmd, loadCmd, (const char *) p); } diff --git a/genplugouts/FileControl/UmlBasePackage.h b/genplugouts/FileControl/UmlBasePackage.h index a297b9cc6..9107e973a 100644 --- a/genplugouts/FileControl/UmlBasePackage.h +++ b/genplugouts/FileControl/UmlBasePackage.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlPackage; class UmlClassDiagram; @@ -34,87 +34,87 @@ class UmlBasePackage : public UmlItem #ifdef WITHCPP // returns the path where the C++ source files are generated by the // c++ generator. - const Q3CString & cppSrcDir(); + const QByteArray & cppSrcDir(); // to set the path where the C++ source files are generated by the // C++ generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppSrcDir(const Q3CString & s); + bool set_CppSrcDir(const QByteArray & s); // returns the path where the C++ header files are generated by the // C++ generator. - const Q3CString & cppHDir(); + const QByteArray & cppHDir(); // to set the path where the C++ header files are generated by the // C++ generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppHDir(const Q3CString & s); + bool set_CppHDir(const QByteArray & s); //returns the namespace name associed to the package - Q3CString cppNamespace(); + QByteArray cppNamespace(); //to set the namespace name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppNamespace(const Q3CString & s); + bool set_CppNamespace(const QByteArray & s); // returns a sub package of the current one having the c++ namespace 'n' // (including the current one), else 0/null - UmlPackage * findNamespace(const Q3CString & n) const; + UmlPackage * findNamespace(const QByteArray & n) const; #endif #ifdef WITHJAVA // returns the path where the JAVA files are generated by the // JAVA generator. - const Q3CString & javaDir(); + const QByteArray & javaDir(); // to set the path where the JAVA files are generated by the // JAVA generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaDir(const Q3CString & s); + bool set_JavaDir(const QByteArray & s); //returns the java package name associed to the package - Q3CString javaPackage(); + QByteArray javaPackage(); // to set the java package name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaPackage(const Q3CString & s); + bool set_JavaPackage(const QByteArray & s); // returns a sub package of the current one having the Java package 'n' // (including the current one), else 0/null - UmlPackage * findPackage(const Q3CString & n) const; + UmlPackage * findPackage(const QByteArray & n) const; #endif #ifdef WITHIDL // returns the path where the IDL files are generated by the // IDL generator. - const Q3CString & idlDir(); + const QByteArray & idlDir(); // to set the path where the IDL files are generated by the // IDL generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlDir(const Q3CString & s); + bool set_IdlDir(const QByteArray & s); //returns the module name associed to the package - Q3CString idlModule(); + QByteArray idlModule(); // to set the module name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlModule(const Q3CString & s); + bool set_IdlModule(const QByteArray & s); // returns a sub package of the current one having the IDL module 'n' // (including the current one), else 0/null - UmlPackage * findModule(const Q3CString & n) const; + UmlPackage * findModule(const QByteArray & n) const; #endif // Returns the project @@ -127,12 +127,12 @@ class UmlBasePackage : public UmlItem //save the project if needed static void saveProject(); - //Does nothing in case an edition is on going under BOUML. Else : + //Does nothing in case an edition is on going under DOUML. Else : //close the current project (in case it is not saved the last modifications are lost), //load the specified one, and all the communications with the plug-outs including the //current one are closed. - static void loadProject(Q3CString p); + static void loadProject(QByteArray p); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -147,25 +147,25 @@ class UmlBasePackage : public UmlItem UmlClassDiagram * _assoc_diagram; #ifdef WITHCPP - Q3CString _cpp_src_dir; + QByteArray _cpp_src_dir; - Q3CString _cpp_h_dir; + QByteArray _cpp_h_dir; - Q3CString _cpp_namespace; + QByteArray _cpp_namespace; #endif #ifdef WITHJAVA - Q3CString _java_dir; + QByteArray _java_dir; - Q3CString _java_package; + QByteArray _java_package; #endif #ifdef WITHIDL - Q3CString _idl_dir; + QByteArray _idl_dir; - Q3CString _idl_module; + QByteArray _idl_module; #endif @@ -194,11 +194,11 @@ class UmlBasePackage : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBasePackage(void * id, const Q3CString & n); + UmlBasePackage(void * id, const QByteArray & n); }; -inline UmlBasePackage::UmlBasePackage(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBasePackage::UmlBasePackage(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/FileControl/UmlBaseRegion.h b/genplugouts/FileControl/UmlBaseRegion.h index 58a9f8b78..efd32acb9 100644 --- a/genplugouts/FileControl/UmlBaseRegion.h +++ b/genplugouts/FileControl/UmlBaseRegion.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlRegion; class UmlState; @@ -25,7 +25,7 @@ class UmlBaseRegion : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRegion(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseRegion(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseRelation.cpp b/genplugouts/FileControl/UmlBaseRelation.cpp index 466ba2582..e17198d39 100644 --- a/genplugouts/FileControl/UmlBaseRelation.cpp +++ b/genplugouts/FileControl/UmlBaseRelation.cpp @@ -7,7 +7,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlRelation * UmlBaseRelation::create(aRelationKind kind, UmlClass * start, UmlClass * end) { UmlCom::send_cmd(start->_identifier, createCmd, aRelation, @@ -63,7 +63,7 @@ bool UmlBaseRelation::set_isReadOnly(bool y) return set_it_(_read_only, y, setIsReadOnlyCmd); } -const Q3CString & UmlBaseRelation::defaultValue() +const QByteArray & UmlBaseRelation::defaultValue() { read_if_needed_(); @@ -75,7 +75,7 @@ bool UmlBaseRelation::set_DefaultValue(const char * s) return set_it_(_default_value, s, setDefaultValueCmd); } -bool UmlBaseRelation::set_Stereotype(const Q3CString & s) +bool UmlBaseRelation::set_Stereotype(const QByteArray & s) { if (UmlBaseItem::set_Stereotype(s)) { UmlBaseRelation * other = (UmlBaseRelation *) UmlBaseItem::read_(); @@ -96,7 +96,7 @@ UmlClass * UmlBaseRelation::roleType() return _role_type; } -const Q3CString & UmlBaseRelation::roleName() +const QByteArray & UmlBaseRelation::roleName() { read_if_needed_(); @@ -108,7 +108,7 @@ bool UmlBaseRelation::set_RoleName(const char * s) return set_it_(_role_name, s, setRoleNameCmd); } -const Q3CString & UmlBaseRelation::multiplicity() +const QByteArray & UmlBaseRelation::multiplicity() { read_if_needed_(); @@ -240,7 +240,7 @@ bool UmlBaseRelation::set_isIdlTruncatableInheritance(bool y) return FALSE; } -Q3CString UmlBaseRelation::idlCase() +QByteArray UmlBaseRelation::idlCase() { read_if_needed_(); diff --git a/genplugouts/FileControl/UmlBaseRelation.h b/genplugouts/FileControl/UmlBaseRelation.h index 718dec6e5..316a72476 100644 --- a/genplugouts/FileControl/UmlBaseRelation.h +++ b/genplugouts/FileControl/UmlBaseRelation.h @@ -5,7 +5,7 @@ #include "UmlClassMember.h" #include "aRelationKind.h" #include "anItemKind.h" -#include + class UmlRelation; class UmlClass; @@ -38,7 +38,7 @@ class UmlBaseRelation : public UmlClassMember bool set_isReadOnly(bool y); // returns the default relation value, may be an empty string - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // to set the default relation value ("" allowed) // @@ -50,13 +50,13 @@ class UmlBaseRelation : public UmlClassMember // On error return FALSE in C++, produce a RuntimeException in Java // redefined in case the relation is bidirectional to set the stereotype // of the relation corresponding to the other direction - virtual bool set_Stereotype(const Q3CString & s); + virtual bool set_Stereotype(const QByteArray & s); // returns the 'end' class (the 'start' class is the parent of the relation) no set ! UmlClass * roleType(); // returns the name of the role - const Q3CString & roleName(); + const QByteArray & roleName(); // to set the name of the role // @@ -64,7 +64,7 @@ class UmlBaseRelation : public UmlClassMember bool set_RoleName(const char * s); // returns the multiplicity (may be an empty string) - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // to set the multiplicity // @@ -127,7 +127,7 @@ class UmlBaseRelation : public UmlClassMember // in case the relation is an IDL union's member returns the // corresponding 'case', an empty string in case it is not specified - Q3CString idlCase(); + QByteArray idlCase(); // to set the 'case' even the relation is not (already) known as // an IDL union's member @@ -166,13 +166,13 @@ class UmlBaseRelation : public UmlClassMember aRelationKind _rel_kind : 8; - Q3CString _default_value; + QByteArray _default_value; UmlClass * _role_type; - Q3CString _role_name; + QByteArray _role_name; - Q3CString _multiplicity; + QByteArray _multiplicity; UmlOperation * _get_oper; @@ -182,7 +182,7 @@ class UmlBaseRelation : public UmlClassMember UmlAttribute * _idl_case; #ifdef WITHIDL - Q3CString _idl_explicit_case; + QByteArray _idl_explicit_case; #endif @@ -210,11 +210,11 @@ class UmlBaseRelation : public UmlClassMember #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRelation(void * id, const Q3CString & n); + UmlBaseRelation(void * id, const QByteArray & n); }; -inline UmlBaseRelation::UmlBaseRelation(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseRelation::UmlBaseRelation(void * id, const QByteArray & n) : UmlClassMember(id, n) { _role_type = 0; _get_oper = 0; diff --git a/genplugouts/FileControl/UmlBaseSequenceDiagram.h b/genplugouts/FileControl/UmlBaseSequenceDiagram.h index 2025fab49..b2e83e1af 100644 --- a/genplugouts/FileControl/UmlBaseSequenceDiagram.h +++ b/genplugouts/FileControl/UmlBaseSequenceDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlSequenceDiagram; class UmlItem; @@ -26,7 +26,7 @@ class UmlBaseSequenceDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSequenceDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseSequenceDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseShallowHistoryPseudoState.h b/genplugouts/FileControl/UmlBaseShallowHistoryPseudoState.h index 92bf0ce18..cb82c3ec1 100644 --- a/genplugouts/FileControl/UmlBaseShallowHistoryPseudoState.h +++ b/genplugouts/FileControl/UmlBaseShallowHistoryPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlShallowHistoryPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseShallowHistoryPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseShallowHistoryPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseShallowHistoryPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseState.cpp b/genplugouts/FileControl/UmlBaseState.cpp index 50ccddcf5..6d396996c 100644 --- a/genplugouts/FileControl/UmlBaseState.cpp +++ b/genplugouts/FileControl/UmlBaseState.cpp @@ -3,7 +3,7 @@ #include "UmlState.h" #include "UmlStateDiagram.h" //Added by qt3to4: -#include +#include UmlState * UmlBaseState::create(UmlItem * parent, const char * s) { @@ -15,7 +15,7 @@ anItemKind UmlBaseState::kind() return aState; } -const Q3CString & UmlBaseState::entryBehavior() +const QByteArray & UmlBaseState::entryBehavior() { read_if_needed_(); return _uml.on_entry; @@ -26,7 +26,7 @@ bool UmlBaseState::set_EntryBehavior(const char * s) return set_it_(_uml.on_entry, s, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseState::exitBehavior() +const QByteArray & UmlBaseState::exitBehavior() { read_if_needed_(); return _uml.on_exit; @@ -37,7 +37,7 @@ bool UmlBaseState::set_ExitBehavior(const char * s) return set_it_(_uml.on_exit, s, setUmlExitBehaviorCmd); } -const Q3CString & UmlBaseState::doActivity() +const QByteArray & UmlBaseState::doActivity() { read_if_needed_(); return _uml.do_activity; @@ -49,7 +49,7 @@ bool UmlBaseState::set_DoActivity(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseState::cppEntryBehavior() +const QByteArray & UmlBaseState::cppEntryBehavior() { read_if_needed_(); return _cpp.on_entry; @@ -60,7 +60,7 @@ bool UmlBaseState::set_CppEntryBehavior(const char * s) return set_it_(_cpp.on_entry, s, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseState::cppExitBehavior() +const QByteArray & UmlBaseState::cppExitBehavior() { read_if_needed_(); return _cpp.on_exit; @@ -71,7 +71,7 @@ bool UmlBaseState::set_CppExitBehavior(const char * s) return set_it_(_cpp.on_exit, s, setCppExitBehaviorCmd); } -const Q3CString & UmlBaseState::cppDoActivity() +const QByteArray & UmlBaseState::cppDoActivity() { read_if_needed_(); return _cpp.do_activity; @@ -84,7 +84,7 @@ bool UmlBaseState::set_CppDoActivity(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseState::javaEntryBehavior() +const QByteArray & UmlBaseState::javaEntryBehavior() { read_if_needed_(); return _java.on_entry; @@ -95,7 +95,7 @@ bool UmlBaseState::set_JavaEntryBehavior(const char * s) return set_it_(_java.on_entry, s, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseState::javaExitBehavior() +const QByteArray & UmlBaseState::javaExitBehavior() { read_if_needed_(); return _java.on_exit; @@ -106,7 +106,7 @@ bool UmlBaseState::set_JavaExitBehavior(const char * s) return set_it_(_java.on_exit, s, setJavaExitBehaviorCmd); } -const Q3CString & UmlBaseState::javaDoActivity() +const QByteArray & UmlBaseState::javaDoActivity() { read_if_needed_(); return _java.do_activity; diff --git a/genplugouts/FileControl/UmlBaseState.h b/genplugouts/FileControl/UmlBaseState.h index efc98a1af..bb578e0ab 100644 --- a/genplugouts/FileControl/UmlBaseState.h +++ b/genplugouts/FileControl/UmlBaseState.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "StateBehavior.h" class UmlState; @@ -26,13 +26,13 @@ class UmlBaseState : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseState(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseState(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the entry behavior in OCL - const Q3CString & entryBehavior(); + const QByteArray & entryBehavior(); // set the entry behavior in OCL // @@ -40,7 +40,7 @@ class UmlBaseState : public UmlItem bool set_EntryBehavior(const char * s); // return the exit behavior in OCL - const Q3CString & exitBehavior(); + const QByteArray & exitBehavior(); // set the exit behavior in OCL // @@ -48,7 +48,7 @@ class UmlBaseState : public UmlItem bool set_ExitBehavior(const char * s); // return the activity in OCL - const Q3CString & doActivity(); + const QByteArray & doActivity(); // set the activity in OCL // @@ -57,7 +57,7 @@ class UmlBaseState : public UmlItem #ifdef WITHCPP // return the entry behavior in C++ - const Q3CString & cppEntryBehavior(); + const QByteArray & cppEntryBehavior(); // set the entry behavior in C++ // @@ -65,7 +65,7 @@ class UmlBaseState : public UmlItem bool set_CppEntryBehavior(const char * s); // return the exit behavior in C++ - const Q3CString & cppExitBehavior(); + const QByteArray & cppExitBehavior(); // set the exit behavior in C++ // @@ -73,7 +73,7 @@ class UmlBaseState : public UmlItem bool set_CppExitBehavior(const char * s); // return the activity in C++ - const Q3CString & cppDoActivity(); + const QByteArray & cppDoActivity(); // set the activity in C++ // @@ -83,7 +83,7 @@ class UmlBaseState : public UmlItem #ifdef WITHJAVA // return the entry behavior in Java - const Q3CString & javaEntryBehavior(); + const QByteArray & javaEntryBehavior(); // set the entry behavior in Java // @@ -91,7 +91,7 @@ class UmlBaseState : public UmlItem bool set_JavaEntryBehavior(const char * s); // return the exit behavior in Java - const Q3CString & javaExitBehavior(); + const QByteArray & javaExitBehavior(); // set the exit behavior in Java // @@ -99,7 +99,7 @@ class UmlBaseState : public UmlItem bool set_JavaExitBehavior(const char * s); // return the activity in Java - const Q3CString & javaDoActivity(); + const QByteArray & javaDoActivity(); // set the activity in Java // diff --git a/genplugouts/FileControl/UmlBaseStateAction.cpp b/genplugouts/FileControl/UmlBaseStateAction.cpp index 1f080b00e..1879387b9 100644 --- a/genplugouts/FileControl/UmlBaseStateAction.cpp +++ b/genplugouts/FileControl/UmlBaseStateAction.cpp @@ -4,7 +4,7 @@ #include "UmlStateAction.h" #include "UmlState.h" //Added by qt3to4: -#include +#include UmlStateAction * UmlBaseStateAction::create(UmlState * parent) { @@ -16,7 +16,7 @@ anItemKind UmlBaseStateAction::kind() return aStateAction; } -const Q3CString & UmlBaseStateAction::expression() +const QByteArray & UmlBaseStateAction::expression() { read_if_needed_(); return _uml; @@ -28,7 +28,7 @@ bool UmlBaseStateAction::set_Expression(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseStateAction::cppExpression() +const QByteArray & UmlBaseStateAction::cppExpression() { read_if_needed_(); return _cpp; @@ -41,7 +41,7 @@ bool UmlBaseStateAction::set_CppExpression(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseStateAction::javaExpression() +const QByteArray & UmlBaseStateAction::javaExpression() { read_if_needed_(); return _java; diff --git a/genplugouts/FileControl/UmlBaseStateAction.h b/genplugouts/FileControl/UmlBaseStateAction.h index 0432258b3..9c74adf3f 100644 --- a/genplugouts/FileControl/UmlBaseStateAction.h +++ b/genplugouts/FileControl/UmlBaseStateAction.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlStateAction; class UmlState; @@ -25,13 +25,13 @@ class UmlBaseStateAction : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseStateAction(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseStateAction(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the expression in OCL - const Q3CString & expression(); + const QByteArray & expression(); // set the expression in OCL // @@ -40,7 +40,7 @@ class UmlBaseStateAction : public UmlItem #ifdef WITHCPP // return the expression in C++ - const Q3CString & cppExpression(); + const QByteArray & cppExpression(); // set the expression in C++ // @@ -50,7 +50,7 @@ class UmlBaseStateAction : public UmlItem #ifdef WITHJAVA // return the expression in Java - const Q3CString & javaExpression(); + const QByteArray & javaExpression(); // set the expression in Java // @@ -68,14 +68,14 @@ class UmlBaseStateAction : public UmlItem private: - Q3CString _uml; + QByteArray _uml; #ifdef WITHCPP - Q3CString _cpp; + QByteArray _cpp; #endif #ifdef WITHJAVA - Q3CString _java; + QByteArray _java; #endif diff --git a/genplugouts/FileControl/UmlBaseStateDiagram.h b/genplugouts/FileControl/UmlBaseStateDiagram.h index ea7e37ee0..d3c5bd101 100644 --- a/genplugouts/FileControl/UmlBaseStateDiagram.h +++ b/genplugouts/FileControl/UmlBaseStateDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlStateDiagram; class UmlState; @@ -25,7 +25,7 @@ class UmlBaseStateDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseStateDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseStateDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseTerminatePseudoState.h b/genplugouts/FileControl/UmlBaseTerminatePseudoState.h index e8553f4be..5328f4055 100644 --- a/genplugouts/FileControl/UmlBaseTerminatePseudoState.h +++ b/genplugouts/FileControl/UmlBaseTerminatePseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlTerminatePseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseTerminatePseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseTerminatePseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseTerminatePseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlBaseTransition.cpp b/genplugouts/FileControl/UmlBaseTransition.cpp index 3516921f8..f9dd2341f 100644 --- a/genplugouts/FileControl/UmlBaseTransition.cpp +++ b/genplugouts/FileControl/UmlBaseTransition.cpp @@ -3,7 +3,7 @@ #include "UmlBaseTransition.h" #include "UmlTransition.h" //Added by qt3to4: -#include +#include anItemKind UmlBaseTransition::kind() { @@ -28,7 +28,7 @@ UmlItem * UmlBaseTransition::target() return _target; } -const Q3CString & UmlBaseTransition::trigger() +const QByteArray & UmlBaseTransition::trigger() { read_if_needed_(); return _uml.trigger; @@ -39,7 +39,7 @@ bool UmlBaseTransition::set_Trigger(const char * s) return set_it_(_uml.trigger, s, setUmlTriggerCmd); } -const Q3CString & UmlBaseTransition::guard() +const QByteArray & UmlBaseTransition::guard() { read_if_needed_(); return _uml.guard; @@ -50,7 +50,7 @@ bool UmlBaseTransition::set_Guard(const char * s) return set_it_(_uml.guard, s, setUmlGuardCmd); } -const Q3CString & UmlBaseTransition::activity() +const QByteArray & UmlBaseTransition::activity() { read_if_needed_(); return _uml.activity; @@ -62,7 +62,7 @@ bool UmlBaseTransition::set_Activity(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseTransition::cppTrigger() +const QByteArray & UmlBaseTransition::cppTrigger() { read_if_needed_(); return _cpp.trigger; @@ -73,7 +73,7 @@ bool UmlBaseTransition::set_CppTrigger(const char * s) return set_it_(_cpp.trigger, s, setCppTriggerCmd); } -const Q3CString & UmlBaseTransition::cppGuard() +const QByteArray & UmlBaseTransition::cppGuard() { read_if_needed_(); return _cpp.guard; @@ -84,7 +84,7 @@ bool UmlBaseTransition::set_CppGuard(const char * s) return set_it_(_cpp.guard, s, setCppGuardCmd); } -const Q3CString & UmlBaseTransition::cppActivity() +const QByteArray & UmlBaseTransition::cppActivity() { read_if_needed_(); return _cpp.activity; @@ -97,7 +97,7 @@ bool UmlBaseTransition::set_CppActivity(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseTransition::javaTrigger() +const QByteArray & UmlBaseTransition::javaTrigger() { read_if_needed_(); return _java.trigger; @@ -108,7 +108,7 @@ bool UmlBaseTransition::set_JavaTrigger(const char * s) return set_it_(_java.trigger, s, setJavaTriggerCmd); } -const Q3CString & UmlBaseTransition::javaGuard() +const QByteArray & UmlBaseTransition::javaGuard() { read_if_needed_(); return _java.guard; @@ -119,7 +119,7 @@ bool UmlBaseTransition::set_JavaGuard(const char * s) return set_it_(_java.guard, s, setJavaGuardCmd); } -const Q3CString & UmlBaseTransition::javaActivity() +const QByteArray & UmlBaseTransition::javaActivity() { read_if_needed_(); return _java.activity; diff --git a/genplugouts/FileControl/UmlBaseTransition.h b/genplugouts/FileControl/UmlBaseTransition.h index bb98f97d1..f72122ca5 100644 --- a/genplugouts/FileControl/UmlBaseTransition.h +++ b/genplugouts/FileControl/UmlBaseTransition.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "TransitionBehavior.h" class UmlTransition; @@ -26,7 +26,7 @@ class UmlBaseTransition : public UmlItem virtual UmlItem * target(); // return the trigger in OCL - const Q3CString & trigger(); + const QByteArray & trigger(); // set the trigger in OCL // @@ -34,7 +34,7 @@ class UmlBaseTransition : public UmlItem bool set_Trigger(const char * s); // return the guard in OCL - const Q3CString & guard(); + const QByteArray & guard(); // set the guard in OCL // @@ -42,7 +42,7 @@ class UmlBaseTransition : public UmlItem bool set_Guard(const char * s); // return the activity in OCL - const Q3CString & activity(); + const QByteArray & activity(); // set the activity in OCL // @@ -51,7 +51,7 @@ class UmlBaseTransition : public UmlItem #ifdef WITHCPP // return the trigger in C++ - const Q3CString & cppTrigger(); + const QByteArray & cppTrigger(); // set the trigger in C++ // @@ -59,7 +59,7 @@ class UmlBaseTransition : public UmlItem bool set_CppTrigger(const char * s); // return the guard in C++ - const Q3CString & cppGuard(); + const QByteArray & cppGuard(); // set the guard in C++ // @@ -67,7 +67,7 @@ class UmlBaseTransition : public UmlItem bool set_CppGuard(const char * s); // return the activity in C++ - const Q3CString & cppActivity(); + const QByteArray & cppActivity(); // set the activity in C++ // @@ -77,7 +77,7 @@ class UmlBaseTransition : public UmlItem #ifdef WITHJAVA // return the trigger in Java - const Q3CString & javaTrigger(); + const QByteArray & javaTrigger(); // set the trigger in Java // @@ -85,7 +85,7 @@ class UmlBaseTransition : public UmlItem bool set_JavaTrigger(const char * s); // return the guard in Java - const Q3CString & javaGuard(); + const QByteArray & javaGuard(); // set the guard in Java // @@ -93,7 +93,7 @@ class UmlBaseTransition : public UmlItem bool set_JavaGuard(const char * s); // return the activity in Java - const Q3CString & javaActivity(); + const QByteArray & javaActivity(); // set the activity in Java // @@ -136,7 +136,7 @@ class UmlBaseTransition : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseTransition(void * id, const Q3CString & n) : UmlItem(id, n) { + UmlBaseTransition(void * id, const QByteArray & n) : UmlItem(id, n) { } }; diff --git a/genplugouts/FileControl/UmlBaseUseCase.cpp b/genplugouts/FileControl/UmlBaseUseCase.cpp index 5a3a32ccd..c091723cb 100644 --- a/genplugouts/FileControl/UmlBaseUseCase.cpp +++ b/genplugouts/FileControl/UmlBaseUseCase.cpp @@ -37,5 +37,6 @@ void UmlBaseUseCase::read_uml_() { _assoc_diagram = (UmlUseCaseDiagram *) UmlBaseItem::read_(); UmlBaseItem::read_uml_(); + _extension_points = UmlCom::read_string(); } diff --git a/genplugouts/FileControl/UmlBaseUseCase.h b/genplugouts/FileControl/UmlBaseUseCase.h index 1bdef8f61..cc8fdbe8c 100644 --- a/genplugouts/FileControl/UmlBaseUseCase.h +++ b/genplugouts/FileControl/UmlBaseUseCase.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlUseCase; class UmlUseCaseDiagram; @@ -33,6 +33,7 @@ class UmlBaseUseCase : public UmlItem private: + QByteArray _extension_points; UmlUseCaseDiagram * _assoc_diagram; @@ -42,7 +43,7 @@ class UmlBaseUseCase : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCase(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseUseCase(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseUseCaseDiagram.h b/genplugouts/FileControl/UmlBaseUseCaseDiagram.h index fd2481e49..f2a8dfb95 100644 --- a/genplugouts/FileControl/UmlBaseUseCaseDiagram.h +++ b/genplugouts/FileControl/UmlBaseUseCaseDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlUseCaseDiagram; class UmlItem; @@ -26,7 +26,7 @@ class UmlBaseUseCaseDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCaseDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseUseCaseDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBaseUseCaseView.h b/genplugouts/FileControl/UmlBaseUseCaseView.h index e289a3543..17498b275 100644 --- a/genplugouts/FileControl/UmlBaseUseCaseView.h +++ b/genplugouts/FileControl/UmlBaseUseCaseView.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlUseCaseView; @@ -25,7 +25,7 @@ class UmlBaseUseCaseView : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCaseView(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseUseCaseView(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlBuiltin.h b/genplugouts/FileControl/UmlBuiltin.h index 4f5c16f41..79815c251 100644 --- a/genplugouts/FileControl/UmlBuiltin.h +++ b/genplugouts/FileControl/UmlBuiltin.h @@ -2,31 +2,31 @@ #define _UMLBUILTIN_H -#include +#include // Internal class used to memorize the types defined through the first 'generation settings' tab struct UmlBuiltin { - Q3CString uml; + QByteArray uml; #ifdef WITHCPP - Q3CString cpp; + QByteArray cpp; - Q3CString cpp_in; + QByteArray cpp_in; - Q3CString cpp_out; + QByteArray cpp_out; - Q3CString cpp_inout; + QByteArray cpp_inout; #endif - Q3CString cpp_return; + QByteArray cpp_return; #ifdef WITHJAVA - Q3CString java; + QByteArray java; #endif #ifdef WITHIDL - Q3CString idl; + QByteArray idl; #endif }; diff --git a/genplugouts/FileControl/UmlClass.h b/genplugouts/FileControl/UmlClass.h index e2b1f8cc3..13ffc5ac6 100644 --- a/genplugouts/FileControl/UmlClass.h +++ b/genplugouts/FileControl/UmlClass.h @@ -3,7 +3,7 @@ #include "UmlBaseClass.h" -#include + // This class manages 'classes', notes that the class 'ClassItem' // is a mother class of the class's children. @@ -12,7 +12,7 @@ class UmlClass : public UmlBaseClass { public: - UmlClass(void * id, const Q3CString & n) : UmlBaseClass(id, n) {}; + UmlClass(void * id, const QByteArray & n) : UmlBaseClass(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlClassDiagram.h b/genplugouts/FileControl/UmlClassDiagram.h index 76134392d..ac4781283 100644 --- a/genplugouts/FileControl/UmlClassDiagram.h +++ b/genplugouts/FileControl/UmlClassDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseClassDiagram.h" -#include + // This class manages 'class diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlClassDiagram : public UmlBaseClassDiagram { public: - UmlClassDiagram(void * id, const Q3CString & n) : UmlBaseClassDiagram(id, n) {}; + UmlClassDiagram(void * id, const QByteArray & n) : UmlBaseClassDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlClassItem.h b/genplugouts/FileControl/UmlClassItem.h index bf64f4dbb..7c4a888f7 100644 --- a/genplugouts/FileControl/UmlClassItem.h +++ b/genplugouts/FileControl/UmlClassItem.h @@ -3,7 +3,7 @@ #include "UmlBaseClassItem.h" -#include + // This class globaly manages class's children including UmlClassExtraMember // @@ -11,7 +11,7 @@ class UmlClassItem : public UmlBaseClassItem { public: - UmlClassItem(void * id, const Q3CString & n) : UmlBaseClassItem(id, n) {}; + UmlClassItem(void * id, const QByteArray & n) : UmlBaseClassItem(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlClassMember.h b/genplugouts/FileControl/UmlClassMember.h index 9119443c6..35fdddb52 100644 --- a/genplugouts/FileControl/UmlClassMember.h +++ b/genplugouts/FileControl/UmlClassMember.h @@ -2,7 +2,7 @@ #define _UMLCLASSMEMBER_H -#include + #include "UmlBaseClassMember.h" // This class globaly manages class's relations, attributes, operations @@ -12,7 +12,7 @@ class UmlClassMember : public UmlBaseClassMember { public: - UmlClassMember(void * id, const Q3CString & n) : UmlBaseClassMember(id, n) {}; + UmlClassMember(void * id, const QByteArray & n) : UmlBaseClassMember(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlClassView.h b/genplugouts/FileControl/UmlClassView.h index a152eff28..3b6eb53ed 100644 --- a/genplugouts/FileControl/UmlClassView.h +++ b/genplugouts/FileControl/UmlClassView.h @@ -3,7 +3,7 @@ #include "UmlBaseClassView.h" -#include + // This class manages 'class view' // @@ -11,7 +11,7 @@ class UmlClassView : public UmlBaseClassView { public: - UmlClassView(void * id, const Q3CString & n) : UmlBaseClassView(id, n) {}; + UmlClassView(void * id, const QByteArray & n) : UmlBaseClassView(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlCollaborationDiagram.h b/genplugouts/FileControl/UmlCollaborationDiagram.h index ab1388561..fc69dea4c 100644 --- a/genplugouts/FileControl/UmlCollaborationDiagram.h +++ b/genplugouts/FileControl/UmlCollaborationDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseCollaborationDiagram.h" -#include + // This class manages 'collaboration diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlCollaborationDiagram : public UmlBaseCollaborationDiagram { public: - UmlCollaborationDiagram(void * id, const Q3CString & n) : UmlBaseCollaborationDiagram(id, n) {}; + UmlCollaborationDiagram(void * id, const QByteArray & n) : UmlBaseCollaborationDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlCom.cpp b/genplugouts/FileControl/UmlCom.cpp index 514578bed..a43406bdc 100644 --- a/genplugouts/FileControl/UmlCom.cpp +++ b/genplugouts/FileControl/UmlCom.cpp @@ -1,20 +1,19 @@ #include "UmlCom.h" - -#include +#include //Added by qt3to4: -#include - +#include #include "UmlCom.h" #include "UmlItem.h" #include "UmlTypeSpec.h" #include "UmlClass.h" #include "UmlSettings.h" #include "Tools/ApiCmd.h" +#include bool UmlCom::connect(unsigned int port) { - sock = new Q3SocketDevice(Q3SocketDevice::Stream); - sock->setAddressReusable(TRUE); + sock = new QTcpSocket(/*QTcpSocket::Stream*/0); + //sock->setAddressReusable(TRUE); buffer_in_size = 1024; buffer_in = new char[buffer_in_size]; @@ -28,7 +27,9 @@ bool UmlCom::connect(unsigned int port) ha.setAddress("127.0.0.1"); - if (sock->connect(ha, port)) { + sock->connectToHost(ha, port); + if (sock->waitForConnected()) { + // send API version write_unsigned(17); flush(); @@ -65,11 +66,11 @@ void UmlCom::close() sock = 0; } -Q3SocketDevice * UmlCom::sock; +QTcpSocket * UmlCom::sock; char * UmlCom::buffer_in; -unsigned int UmlCom::buffer_in_size; +size_t UmlCom::buffer_in_size; char * UmlCom::p_buffer_in; @@ -79,11 +80,11 @@ char * UmlCom::buffer_out; char * UmlCom::p_buffer_out; -unsigned int UmlCom::buffer_out_size; +size_t UmlCom::buffer_out_size; -void UmlCom::check_size_out(unsigned int len) +void UmlCom::check_size_out(size_t len) { - unsigned used = p_buffer_out - buffer_out; + ptrdiff_t used = p_buffer_out - buffer_out; if ((used + len) >= buffer_out_size) { buffer_out_size = used + len + 1024; @@ -100,25 +101,25 @@ void UmlCom::check_size_out(unsigned int len) void UmlCom::read_if_needed() { #ifdef TRACE - //cout << "UmlCom::read_if_needed " << buffer_in_end - p_buffer_in << '\n'; + //qDebug() << "UmlCom::read_if_needed " << buffer_in_end - p_buffer_in << '\n'; #endif if (p_buffer_in == buffer_in_end) { read_buffer(4); #ifdef TRACE - cout << "UmlCom::read " << ((((unsigned char *) buffer_in)[0] << 24) + (((unsigned char *) buffer_in)[1] << 16) + (((unsigned char *) buffer_in)[2] << 8) + ((unsigned char *) buffer_in)[3]) << " bytes\n"; + qDebug() << "UmlCom::read " << ((((unsigned char *) buffer_in)[0] << 24) + (((unsigned char *) buffer_in)[1] << 16) + (((unsigned char *) buffer_in)[2] << 8) + ((unsigned char *) buffer_in)[3]) << " bytes\n"; #endif read_buffer((((unsigned char *) buffer_in)[0] << 24) + - (((unsigned char *) buffer_in)[1] << 16) + - (((unsigned char *) buffer_in)[2] << 8) + - ((unsigned char *) buffer_in)[3]); + (((unsigned char *) buffer_in)[1] << 16) + + (((unsigned char *) buffer_in)[2] << 8) + + ((unsigned char *) buffer_in)[3]); } } -void UmlCom::read_buffer(unsigned int len) +void UmlCom::read_buffer(size_t len) { #ifdef TRACE - //cout << "enter UmlCom::read_buffer(" << len << ")\n"; + //qDebug() << "enter UmlCom::read_buffer(" << len << ")\n"; #endif if (buffer_in_size < len) { @@ -127,16 +128,16 @@ void UmlCom::read_buffer(unsigned int len) buffer_in = new char[buffer_in_size]; } - int remainder = (int) len; - int nread; + qint64 remainder = len; + qint64 nread; char * p = buffer_in; for (;;) { - if ((nread = sock->readBlock(p, remainder)) == -1) { + if ((nread = sock->read(p, remainder)) == -1) { if (sock->error() != 0) { #ifdef TRACE - cout << "UmlCom::read_buffer ERROR, already " << p - buffer_in - << " remainder " << remainder << '\n'; + qDebug() << "UmlCom::read_buffer ERROR, already " << p - buffer_in + << " remainder " << remainder << '\n'; #endif fatal_error("UmlCom read error"); } @@ -145,18 +146,18 @@ void UmlCom::read_buffer(unsigned int len) } #ifdef TRACE - //cout << "UmlCom a lu " << nread << '\n'; + //qDebug() << "UmlCom a lu " << nread << '\n'; #endif if ((remainder -= nread) == 0) break; p += nread; - sock->waitForMore(100); + sock->waitForReadyRead(100); } #ifdef TRACE - //cout << "exit UmlCom::read_buffer()\n"; + //qDebug() << "exit UmlCom::read_buffer()\n"; #endif p_buffer_in = buffer_in; @@ -202,7 +203,7 @@ void UmlCom::write_string(const char * p) if (p == 0) p = ""; - unsigned len = strlen(p) + 1; + size_t len = strlen(p) + 1; check_size_out(len); memcpy(p_buffer_out, p, len); @@ -212,7 +213,7 @@ void UmlCom::write_string(const char * p) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ")\n"; #endif write_char(f); @@ -223,7 +224,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, char arg) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << (int) arg << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << (int) arg << ")\n"; #endif write_char(f); @@ -235,7 +236,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, char arg) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ")\n"; #endif write_char(f); @@ -247,7 +248,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ")\n"; #endif write_char(f); @@ -259,7 +260,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id, const char * n) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ", " << ((n) ? n : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ", " << ((n) ? n : "") << ")\n"; #endif write_char(f); @@ -272,7 +273,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id, const char * n) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s, const char * v) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; #endif write_char(f); @@ -285,7 +286,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s, const char void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, bool b, const char * s, const char * v) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << b << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << b << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; #endif write_char(f); @@ -299,7 +300,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, bool b, const char * s, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ")\n"; #endif write_char(onInstanceCmd); @@ -311,7 +312,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg) ? arg : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg) ? arg : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -324,7 +325,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, char arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((int) arg) << '\n'; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((int) arg) << '\n'; #endif write_char(onInstanceCmd); @@ -337,7 +338,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, char arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg << '\n'; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg << '\n'; #endif write_char(onInstanceCmd); @@ -350,7 +351,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const UmlTypeSpec & arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -372,7 +373,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const UmlTypeSpec & ar void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg1) ? arg1 : "") << ", " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg1) ? arg1 : "") << ", " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -386,7 +387,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -400,7 +401,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, const void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, aRelationKind arg2, const void * id2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << arg2 << ", " << id2 << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << arg2 << ", " << id2 << ")\n"; #endif write_char(onInstanceCmd); @@ -415,7 +416,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, aRela void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", id1)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", id1)\n"; #endif write_char(onInstanceCmd); @@ -428,7 +429,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", id1, " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", id1, " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -442,7 +443,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1, cons void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, const UmlTypeSpec & arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -465,7 +466,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, const char * arg2, const char * arg3, const UmlTypeSpec & arg4) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << ((arg2) ? arg2 : "") << ", " << ((arg3) ? arg3 : "") << ", " << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << ((arg2) ? arg2 : "") << ", " << ((arg3) ? arg3 : "") << ", " << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -490,7 +491,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, char arg2, const char * arg3, const char * arg4, const UmlTypeSpec & arg5) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << (int) arg2 << ", " << ((arg3) ? arg3 : "") << ", " << ((arg4) ? arg4 : "") << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << (int) arg2 << ", " << ((arg3) ? arg3 : "") << ", " << ((arg4) ? arg4 : "") << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -513,10 +514,10 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, cha flush(); } -void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l) +void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", const Q3PtrVector & l)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", const QVector & l)\n"; #endif write_char(onInstanceCmd); @@ -533,10 +534,10 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3) +void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l1, const QVector & l2, const QVector & l3) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", const QVector & l1, const QVector & l2, const QVector & l3)\n"; #endif write_char(onInstanceCmd); @@ -570,7 +571,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & v) +void UmlCom::read_item_list(QVector & v) { unsigned n = read_unsigned(); v.resize(n); #ifdef TRACE - //cout << "UmlCom::read_item_list " << n << " items\n"; + //qDebug() << "UmlCom::read_item_list " << n << " items\n"; #endif for (unsigned index = 0; index != n; index += 1) - v.insert(index, UmlBaseItem::read_()); + //v.insert(index, UmlBaseItem::read_()); + v[index] = UmlBaseItem::read_(); } -void UmlCom::fatal_error(const Q3CString & -#ifdef DEBUG_BOUML +void UmlCom::fatal_error(const QByteArray & + #ifdef DEBUG_DOUML msg -#endif - ) + #endif + ) { -#ifdef DEBUG_BOUML - cout << msg << '\n'; +#ifdef DEBUG_DOUML + qDebug() << msg << '\n'; #endif throw 0; @@ -665,7 +667,7 @@ void UmlCom::fatal_error(const Q3CString & void UmlCom::flush() { if (sock != 0) { - int len = p_buffer_out - buffer_out - 4; + ptrdiff_t len = p_buffer_out - buffer_out - 4; /* the four first bytes of buffer_out are free to contains the length */ buffer_out[0] = len >> 24; buffer_out[1] = len >> 16; @@ -676,7 +678,7 @@ void UmlCom::flush() p_buffer_out = buffer_out; for (;;) { - int sent = sock->writeBlock(p_buffer_out, len); + qint64 sent = sock->write(p_buffer_out, len); if (sent == -1) { close(); // to not try to send "bye" ! diff --git a/genplugouts/FileControl/UmlCom.h b/genplugouts/FileControl/UmlCom.h index fd29272d0..07dbb2687 100644 --- a/genplugouts/FileControl/UmlCom.h +++ b/genplugouts/FileControl/UmlCom.h @@ -2,21 +2,21 @@ #define _UMLCOM_H -#include +#include //#include "CmdFamily.h" //#include "OnInstanceCmd.h" #include "anItemKind.h" #include "aRelationKind.h" -#include -#include + + #include class UmlItem; class UmlTypeSpec; class UmlClass; -class Q3SocketDevice; +class QTcpSocket; class UmlItem; class UmlTypeSpec; class UmlClass; @@ -63,11 +63,11 @@ class UmlCom static void close(); private: - static Q3SocketDevice * sock; + static QTcpSocket * sock; static char * buffer_in; - static unsigned int buffer_in_size; + static size_t buffer_in_size; static char * p_buffer_in; @@ -77,19 +77,19 @@ class UmlCom static char * p_buffer_out; - static unsigned int buffer_out_size; + static size_t buffer_out_size; protected: //internal, do NOT use it - static void check_size_out(unsigned int len); + static void check_size_out(size_t len); //internal, do NOT use it static void read_if_needed(); //internal, do NOT use it - static void read_buffer(unsigned int len); + static void read_buffer(size_t len); //internal, do NOT use it static void write_bool(bool b); @@ -171,8 +171,8 @@ class UmlCom static void send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, char arg2, const char * arg3, const char * arg4, const UmlTypeSpec & arg5); //internal, do NOT use it - static void send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l); - static void send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3); + static void send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l); + static void send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l1, const QVector & l2, const QVector & l3); //internal, do NOT use it @@ -195,10 +195,10 @@ class UmlCom static unsigned int read_unsigned(); // internal, do NOT use it - static void read_item_list(Q3PtrVector & v); + static void read_item_list(QVector & v); //internal, do NOT use it - static void fatal_error(const Q3CString & msg); + static void fatal_error(const QByteArray & msg); //internal, do NOT use it static void flush(); diff --git a/genplugouts/FileControl/UmlComponent.h b/genplugouts/FileControl/UmlComponent.h index bb4fdbb25..e8961ed60 100644 --- a/genplugouts/FileControl/UmlComponent.h +++ b/genplugouts/FileControl/UmlComponent.h @@ -3,7 +3,7 @@ #include "UmlBaseComponent.h" -#include + // This class manages 'components' // @@ -11,7 +11,7 @@ class UmlComponent : public UmlBaseComponent { public: - UmlComponent(void * id, const Q3CString & n) : UmlBaseComponent(id, n) {}; + UmlComponent(void * id, const QByteArray & n) : UmlBaseComponent(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlComponentDiagram.h b/genplugouts/FileControl/UmlComponentDiagram.h index 15d707dc2..9afaa7eb4 100644 --- a/genplugouts/FileControl/UmlComponentDiagram.h +++ b/genplugouts/FileControl/UmlComponentDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseComponentDiagram.h" -#include + // This class manages 'ccomponent diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlComponentDiagram : public UmlBaseComponentDiagram { public: - UmlComponentDiagram(void * id, const Q3CString & n) : UmlBaseComponentDiagram(id, n) {}; + UmlComponentDiagram(void * id, const QByteArray & n) : UmlBaseComponentDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlComponentView.h b/genplugouts/FileControl/UmlComponentView.h index 000a74744..cc09cecc6 100644 --- a/genplugouts/FileControl/UmlComponentView.h +++ b/genplugouts/FileControl/UmlComponentView.h @@ -3,7 +3,7 @@ #include "UmlBaseComponentView.h" -#include + // This class manages 'component view' // @@ -11,7 +11,7 @@ class UmlComponentView : public UmlBaseComponentView { public: - UmlComponentView(void * id, const Q3CString & n) : UmlBaseComponentView(id, n) {}; + UmlComponentView(void * id, const QByteArray & n) : UmlBaseComponentView(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlDeploymentDiagram.h b/genplugouts/FileControl/UmlDeploymentDiagram.h index 727d0ffd0..1f0add3d0 100644 --- a/genplugouts/FileControl/UmlDeploymentDiagram.h +++ b/genplugouts/FileControl/UmlDeploymentDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseDeploymentDiagram.h" -#include + // This class manages 'deployment diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlDeploymentDiagram : public UmlBaseDeploymentDiagram { public: - UmlDeploymentDiagram(void * id, const Q3CString & n) : UmlBaseDeploymentDiagram(id, n) {}; + UmlDeploymentDiagram(void * id, const QByteArray & n) : UmlBaseDeploymentDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlDeploymentView.h b/genplugouts/FileControl/UmlDeploymentView.h index 52e5e627d..1c47fedbf 100644 --- a/genplugouts/FileControl/UmlDeploymentView.h +++ b/genplugouts/FileControl/UmlDeploymentView.h @@ -3,7 +3,7 @@ #include "UmlBaseDeploymentView.h" -#include + // This class manages 'deployment view' // @@ -11,7 +11,7 @@ class UmlDeploymentView : public UmlBaseDeploymentView { public: - UmlDeploymentView(void * id, const Q3CString & n) : UmlBaseDeploymentView(id, n) {}; + UmlDeploymentView(void * id, const QByteArray & n) : UmlBaseDeploymentView(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlDiagram.h b/genplugouts/FileControl/UmlDiagram.h index ffee38e5c..99e0f81e4 100644 --- a/genplugouts/FileControl/UmlDiagram.h +++ b/genplugouts/FileControl/UmlDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseDiagram.h" -#include + // This class allows to manage extra class member, mainly defined fot C++ // it allows to insert C++ pre-processor directive (even they may be placed @@ -14,7 +14,7 @@ class UmlDiagram : public UmlBaseDiagram { public: - UmlDiagram(void * id, const Q3CString & n) : UmlBaseDiagram(id, n) {}; + UmlDiagram(void * id, const QByteArray & n) : UmlBaseDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlEntryPointPseudoState.h b/genplugouts/FileControl/UmlEntryPointPseudoState.h index 838a4bf5b..3fd7f6eca 100644 --- a/genplugouts/FileControl/UmlEntryPointPseudoState.h +++ b/genplugouts/FileControl/UmlEntryPointPseudoState.h @@ -3,13 +3,13 @@ #include "UmlBaseEntryPointPseudoState.h" -#include + class UmlEntryPointPseudoState : public UmlBaseEntryPointPseudoState { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlEntryPointPseudoState(void * id, const Q3CString & s) : UmlBaseEntryPointPseudoState(id, s) { + UmlEntryPointPseudoState(void * id, const QByteArray & s) : UmlBaseEntryPointPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlExitPointPseudoState.h b/genplugouts/FileControl/UmlExitPointPseudoState.h index 1a57b8230..e63c68782 100644 --- a/genplugouts/FileControl/UmlExitPointPseudoState.h +++ b/genplugouts/FileControl/UmlExitPointPseudoState.h @@ -3,13 +3,13 @@ #include "UmlBaseExitPointPseudoState.h" -#include + class UmlExitPointPseudoState : public UmlBaseExitPointPseudoState { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExitPointPseudoState(void * id, const Q3CString & s) : UmlBaseExitPointPseudoState(id, s) { + UmlExitPointPseudoState(void * id, const QByteArray & s) : UmlBaseExitPointPseudoState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlExtraClassMember.h b/genplugouts/FileControl/UmlExtraClassMember.h index cf0b2bf47..95b851b8d 100644 --- a/genplugouts/FileControl/UmlExtraClassMember.h +++ b/genplugouts/FileControl/UmlExtraClassMember.h @@ -3,7 +3,7 @@ #include "UmlBaseExtraClassMember.h" -#include + // This class allows to manage extra class member, It allows to insert // C++ pre-processor directive (even they may be placed in the other member @@ -14,7 +14,7 @@ class UmlExtraClassMember : public UmlBaseExtraClassMember { public: - UmlExtraClassMember(void * id, const Q3CString & n) : UmlBaseExtraClassMember(id, n) {}; + UmlExtraClassMember(void * id, const QByteArray & n) : UmlBaseExtraClassMember(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlItem.cpp b/genplugouts/FileControl/UmlItem.cpp index c3b26940b..1890f06b8 100644 --- a/genplugouts/FileControl/UmlItem.cpp +++ b/genplugouts/FileControl/UmlItem.cpp @@ -12,15 +12,15 @@ void UmlItem::fileControl(bool) UmlCom::trace("Error : must be applied on a Package"); } -void UmlItem::getFiles(Q3Dict & files, unsigned rec) +void UmlItem::getFiles(QHash &files, unsigned rec) { QFileInfo fi(supportFile()); if (fi.exists()) - files.replace(fi.fileName(), (void *) 1); + files.insert(fi.fileName(), (void *) 1); - const Q3PtrVector ch = children(); - unsigned index; + const QVector ch = children(); + int index; for (index = 0; index != ch.size(); index += 1) ch[index]->getFiles(files, rec); diff --git a/genplugouts/FileControl/UmlItem.h b/genplugouts/FileControl/UmlItem.h index 780b69dcc..e2280f241 100644 --- a/genplugouts/FileControl/UmlItem.h +++ b/genplugouts/FileControl/UmlItem.h @@ -3,9 +3,9 @@ #include "UmlBaseItem.h" -#include -#include + + // This class is a mother class for all the other Uml* classes, this // allows to generalize their management, declare virtual operations etc ... // @@ -13,7 +13,7 @@ class UmlItem : public UmlBaseItem { public: - UmlItem(void * id, const Q3CString & n) : UmlBaseItem(id, n) {}; + UmlItem(void * id, const QByteArray & n) : UmlBaseItem(id, n) {}; virtual ~UmlItem(); @@ -22,7 +22,7 @@ class UmlItem : public UmlBaseItem virtual void fileControl(bool ci); //Put files list in 'files', without considering 'rec' here contrarilly to the package case - virtual void getFiles(Q3Dict & files, unsigned rec); + virtual void getFiles(QHash & files, unsigned rec); }; diff --git a/genplugouts/FileControl/UmlNcRelation.h b/genplugouts/FileControl/UmlNcRelation.h index 60032619a..3d73ec633 100644 --- a/genplugouts/FileControl/UmlNcRelation.h +++ b/genplugouts/FileControl/UmlNcRelation.h @@ -3,7 +3,7 @@ #include "UmlBaseNcRelation.h" -#include + //This class manages 'relations' between non class objects // @@ -11,7 +11,7 @@ class UmlNcRelation : public UmlBaseNcRelation { public: - UmlNcRelation(void * id, const Q3CString & n) : UmlBaseNcRelation(id, n) {}; + UmlNcRelation(void * id, const QByteArray & n) : UmlBaseNcRelation(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlNode.h b/genplugouts/FileControl/UmlNode.h index 95edbe709..4c72e14fd 100644 --- a/genplugouts/FileControl/UmlNode.h +++ b/genplugouts/FileControl/UmlNode.h @@ -3,7 +3,7 @@ #include "UmlBaseNode.h" -#include + // This class manages 'nodes' // @@ -11,7 +11,7 @@ class UmlNode : public UmlBaseNode { public: - UmlNode(void * id, const Q3CString & n) : UmlBaseNode(id, n) {}; + UmlNode(void * id, const QByteArray & n) : UmlBaseNode(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlOperation.h b/genplugouts/FileControl/UmlOperation.h index eec043152..f4c9e6547 100644 --- a/genplugouts/FileControl/UmlOperation.h +++ b/genplugouts/FileControl/UmlOperation.h @@ -3,7 +3,7 @@ #include "UmlBaseOperation.h" -#include + // This class manages 'operations', notes that the class 'UmlClassItem' // is a mother class of all the class's children. @@ -12,7 +12,7 @@ class UmlOperation : public UmlBaseOperation { public: - UmlOperation(void * id, const Q3CString & n) : UmlBaseOperation(id, n) {}; + UmlOperation(void * id, const QByteArray & n) : UmlBaseOperation(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlPackage.cpp b/genplugouts/FileControl/UmlPackage.cpp index 9021d3d84..feefc5517 100644 --- a/genplugouts/FileControl/UmlPackage.cpp +++ b/genplugouts/FileControl/UmlPackage.cpp @@ -4,7 +4,7 @@ #include #include //Added by qt3to4: -#include +#include #include "Dialog.h" #include "UmlCom.h" @@ -12,10 +12,10 @@ void UmlPackage::fileControl(bool ci) { UmlPackage * prj = getProject(); - Q3CString prjfile = prj->supportFile(); + QByteArray prjfile = prj->supportFile(); BooL rec; BooL reload; - Q3CString cmd; + QByteArray cmd; if (! prj->propertyValue((ci) ? "check-in-cmd" : "check-out-cmd", cmd)) cmd = "specify the command containing %file and %dir or %dironly"; @@ -30,7 +30,7 @@ void UmlPackage::fileControl(bool ci) saveProject(); // get files list - Q3Dict files; + QHash files; getFiles(files, (rec) ? ~0u : 1); @@ -38,31 +38,32 @@ void UmlPackage::fileControl(bool ci) getAuxFiles(files); // apply the command on each file - Q3DictIterator it(files); + QHashIterator it(files); QFileInfo prjpath(prjfile); - QString dir = prjpath.dirPath(TRUE); + QString dir = prjpath.path(); QString dironly = dir; int index; if ((dironly.length() > 3) && - (((const char *) dironly)[1] == ':') && - (((const char *) dironly)[2] == '/')) + (dironly[1] == ':') && + (dironly[2] == '/')) dironly = dironly.mid(2); - while ((index = cmd.find("%dironly")) != -1) - cmd.replace(index, 8, dironly); + while ((index = cmd.indexOf("%dironly")) != -1) + cmd.replace(index, 8, dironly.toLatin1()); - while ((index = cmd.find("%dir")) != -1) - cmd.replace(index, 4, dir); + while ((index = cmd.indexOf("%dir")) != -1) + cmd.replace(index, 4, dir.toLatin1()); - while (it.current()) { + while (it.hasNext()) { + it.next(); QString s = cmd; - while ((index = s.find("%file")) != -1) - s.replace(index, 5, it.currentKey()); + while ((index = s.indexOf("%file")) != -1) + s.replace(index, 5, it.key().toLatin1()); - system((const char *) s); - ++it; + system((const char *) s.toLatin1().constData()); + //++it; } UmlCom::trace("Done."); @@ -72,13 +73,13 @@ void UmlPackage::fileControl(bool ci) } } -void UmlPackage::getFiles(Q3Dict & files, unsigned rec) +void UmlPackage::getFiles(QHash &files, unsigned rec) { if (rec != 0) UmlItem::getFiles(files, rec - 1); } -void UmlPackage::getAuxFiles(Q3Dict & files) +void UmlPackage::getAuxFiles(QHash & files) { static const char * aux[] = { "cpp_includes", "generation_settings", "idl_includes", @@ -87,13 +88,13 @@ void UmlPackage::getAuxFiles(Q3Dict & files) const char ** p = aux; QFileInfo prjpath(supportFile()); - QString dir = prjpath.dirPath(TRUE) + "/"; + QString dir = prjpath.path() + "/"; while (*p != 0) { QFileInfo fi(dir + *p); if (fi.exists()) - files.replace(*p, (void *) 1); + files.insert(*p, (void *) 1); p += 1; } diff --git a/genplugouts/FileControl/UmlPackage.h b/genplugouts/FileControl/UmlPackage.h index 8c9e12fb9..901e6076a 100644 --- a/genplugouts/FileControl/UmlPackage.h +++ b/genplugouts/FileControl/UmlPackage.h @@ -3,8 +3,8 @@ #include "UmlBasePackage.h" -#include -#include + + // This class manages a 'package', notes that the project itself is a package // @@ -12,7 +12,7 @@ class UmlPackage : public UmlBasePackage { public: - UmlPackage(void * id, const Q3CString & n) : UmlBasePackage(id, n) {}; + UmlPackage(void * id, const QByteArray & n) : UmlBasePackage(id, n) {}; //Entry point //Ask for the way to do check-in/out, execute the check-in/out command on the files @@ -20,11 +20,11 @@ class UmlPackage : public UmlBasePackage virtual void fileControl(bool ci); //Put files list in 'files' if 'rec' is not null. - virtual void getFiles(Q3Dict & files, unsigned rec); + virtual void getFiles(QHash & files, unsigned rec); //Add auxiliary files in 'files' //must be applied on the project - virtual void getAuxFiles(Q3Dict & files); + virtual void getAuxFiles(QHash & files); }; diff --git a/genplugouts/FileControl/UmlParameter.h b/genplugouts/FileControl/UmlParameter.h index ef6f522b0..3c967ad60 100644 --- a/genplugouts/FileControl/UmlParameter.h +++ b/genplugouts/FileControl/UmlParameter.h @@ -4,7 +4,7 @@ #include "aDirection.h" #include "UmlTypeSpec.h" -#include +#include // Represent an operation's parameter @@ -13,9 +13,9 @@ struct UmlParameter { UmlTypeSpec type; - Q3CString name; + QByteArray name; - Q3CString default_value; + QByteArray default_value; }; diff --git a/genplugouts/FileControl/UmlPseudoState.h b/genplugouts/FileControl/UmlPseudoState.h index 075761ec7..1c350a942 100644 --- a/genplugouts/FileControl/UmlPseudoState.h +++ b/genplugouts/FileControl/UmlPseudoState.h @@ -2,7 +2,7 @@ #define _UMLPSEUDOSTATE_H -#include + #include "UmlItem.h" #include "UmlStateItem.h" @@ -10,7 +10,7 @@ class UmlPseudoState : public UmlStateItem, public UmlItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlPseudoState(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlPseudoState(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/FileControl/UmlRegion.h b/genplugouts/FileControl/UmlRegion.h index d3f32cb7b..d0ce11dde 100644 --- a/genplugouts/FileControl/UmlRegion.h +++ b/genplugouts/FileControl/UmlRegion.h @@ -4,13 +4,13 @@ #include "UmlBaseRegion.h" #include "UmlStateItem.h" -#include + class UmlRegion : public UmlBaseRegion, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlRegion(void * id, const Q3CString & s) : UmlBaseRegion(id, s) { + UmlRegion(void * id, const QByteArray & s) : UmlBaseRegion(id, s) { } }; diff --git a/genplugouts/FileControl/UmlRelation.h b/genplugouts/FileControl/UmlRelation.h index 6b4358b40..a246cfcfd 100644 --- a/genplugouts/FileControl/UmlRelation.h +++ b/genplugouts/FileControl/UmlRelation.h @@ -3,7 +3,7 @@ #include "UmlBaseRelation.h" -#include + // This class manages 'relations' between classes, notes that the class 'UmlClassItem' // is a mother class of all the class's children. @@ -12,7 +12,7 @@ class UmlRelation : public UmlBaseRelation { public: - UmlRelation(void * id, const Q3CString & n) : UmlBaseRelation(id, n) {}; + UmlRelation(void * id, const QByteArray & n) : UmlBaseRelation(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlSequenceDiagram.h b/genplugouts/FileControl/UmlSequenceDiagram.h index d3b3d83fc..a36e34a65 100644 --- a/genplugouts/FileControl/UmlSequenceDiagram.h +++ b/genplugouts/FileControl/UmlSequenceDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseSequenceDiagram.h" -#include + // This class manages 'sequence diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlSequenceDiagram : public UmlBaseSequenceDiagram { public: - UmlSequenceDiagram(void * id, const Q3CString & n) : UmlBaseSequenceDiagram(id, n) {}; + UmlSequenceDiagram(void * id, const QByteArray & n) : UmlBaseSequenceDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlSettings.cpp b/genplugouts/FileControl/UmlSettings.cpp index 57be360e5..e35b306ad 100644 --- a/genplugouts/FileControl/UmlSettings.cpp +++ b/genplugouts/FileControl/UmlSettings.cpp @@ -6,15 +6,15 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include -Q3CString UmlSettings::artifactDescription() +#include +QByteArray UmlSettings::artifactDescription() { read_if_needed_(); return _artifact_default_description; } -bool UmlSettings::set_ArtifactDescription(Q3CString v) +bool UmlSettings::set_ArtifactDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultArtifactDescriptionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -26,14 +26,14 @@ bool UmlSettings::set_ArtifactDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::classDescription() +QByteArray UmlSettings::classDescription() { read_if_needed_(); return _class_default_description; } -bool UmlSettings::set_ClassDescription(Q3CString v) +bool UmlSettings::set_ClassDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultClassDescriptionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -45,14 +45,14 @@ bool UmlSettings::set_ClassDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::operationDescription() +QByteArray UmlSettings::operationDescription() { read_if_needed_(); return _operation_default_description; } -bool UmlSettings::set_OperationDescription(Q3CString v) +bool UmlSettings::set_OperationDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultOperationDescriptionCmd, (const char *)v);//[jasa] handle ambiguous call @@ -64,14 +64,14 @@ bool UmlSettings::set_OperationDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::attributeDescription() +QByteArray UmlSettings::attributeDescription() { read_if_needed_(); return _attribute_default_description; } -bool UmlSettings::set_AttributeDescription(Q3CString v) +bool UmlSettings::set_AttributeDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultAttributeDescriptionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -83,14 +83,14 @@ bool UmlSettings::set_AttributeDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::relationDescription() +QByteArray UmlSettings::relationDescription() { read_if_needed_(); return _relation_default_description; } -bool UmlSettings::set_RelationDescription(Q3CString v) +bool UmlSettings::set_RelationDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultRelationDescriptionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -104,39 +104,39 @@ bool UmlSettings::set_RelationDescription(Q3CString v) bool UmlSettings::_defined; -Q3CString UmlSettings::_artifact_default_description; +QByteArray UmlSettings::_artifact_default_description; -Q3CString UmlSettings::_class_default_description; +QByteArray UmlSettings::_class_default_description; -Q3CString UmlSettings::_operation_default_description; +QByteArray UmlSettings::_operation_default_description; -Q3CString UmlSettings::_attribute_default_description; +QByteArray UmlSettings::_attribute_default_description; -Q3CString UmlSettings::_relation_default_description; +QByteArray UmlSettings::_relation_default_description; -Q3Dict UmlSettings::_map_builtins; +QHash UmlSettings::_map_builtins; UmlBuiltin * UmlSettings::_builtins; -Q3Dict UmlSettings::_map_relation_stereotypes; +QHash UmlSettings::_map_relation_stereotypes; UmlStereotype * UmlSettings::_relation_stereotypes; -Q3Dict UmlSettings::_map_class_stereotypes; +QHash UmlSettings::_map_class_stereotypes; UmlStereotype * UmlSettings::_class_stereotypes; void UmlSettings::read_() { - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); _builtins = new UmlBuiltin[n]; if (n / 2 > _map_builtins.size()) - _map_builtins.resize(_map_builtins.size() * 2 - 1); + _map_builtins.reserve(_map_builtins.size() * 2 - 1); for (index = 0; index != n; index += 1) { _builtins[index].uml = UmlCom::read_string(); @@ -148,7 +148,7 @@ void UmlSettings::read_() _relation_stereotypes = new UmlStereotype[n]; if (n / 2 > _map_relation_stereotypes.size()) - _map_relation_stereotypes.resize(_map_relation_stereotypes.size() * 2 - 1); + _map_relation_stereotypes.reserve(_map_relation_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { _relation_stereotypes[index].uml = UmlCom::read_string(); @@ -161,7 +161,7 @@ void UmlSettings::read_() _class_stereotypes = new UmlStereotype[n]; if (n / 2 > _map_class_stereotypes.size()) - _map_class_stereotypes.resize(_map_class_stereotypes.size() * 2 - 1); + _map_class_stereotypes.reserve(_map_class_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { _class_stereotypes[index].uml = UmlCom::read_string(); @@ -185,18 +185,18 @@ void UmlSettings::read_if_needed_() } } -unsigned UmlSettings::multiplicity_column(const Q3CString & mult) +unsigned UmlSettings::multiplicity_column(const QByteArray & mult) { if (mult.isEmpty() || (mult == "1")) return 0; - if ((mult == "*") || (mult.find("..") != -1)) + if ((mult == "*") || (mult.indexOf("..") != -1)) return 1; return 2; } -Q3CString UmlSettings::uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f) +QByteArray UmlSettings::uml_type(const QByteArray & t, QByteArray UmlBuiltin::* f) { unsigned index = _map_builtins.count(); @@ -207,7 +207,7 @@ Q3CString UmlSettings::uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f) return 0; } -Q3CString UmlSettings::uml_rel_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f) +QByteArray UmlSettings::uml_rel_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f) { unsigned index = _map_relation_stereotypes.count(); @@ -218,7 +218,7 @@ Q3CString UmlSettings::uml_rel_stereotype(const Q3CString & t, Q3CString UmlSter return 0; } -Q3CString UmlSettings::uml_class_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f) +QByteArray UmlSettings::uml_class_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f) { unsigned index = _map_class_stereotypes.count(); @@ -229,15 +229,15 @@ Q3CString UmlSettings::uml_class_stereotype(const Q3CString & t, Q3CString UmlSt return 0; } -UmlBuiltin * UmlSettings::add_type(const Q3CString & s) +UmlBuiltin * UmlSettings::add_type(const QByteArray & s) { - unsigned n = _map_builtins.count(); - unsigned index; + int n = _map_builtins.count(); + int index; UmlBuiltin * builtins = new UmlBuiltin[n + 1]; if (n / 2 > _map_builtins.size()) - _map_builtins.resize(_map_builtins.size() * 2 - 1); + _map_builtins.reserve(_map_builtins.size() * 2 - 1); for (index = 0; index != n; index += 1) builtins[index] = _builtins[index]; @@ -265,15 +265,15 @@ UmlBuiltin * UmlSettings::add_type(const Q3CString & s) } -UmlStereotype * UmlSettings::add_rel_stereotype(const Q3CString & s) +UmlStereotype * UmlSettings::add_rel_stereotype(const QByteArray & s) { - unsigned n = _map_relation_stereotypes.count(); - unsigned index; + int n = _map_relation_stereotypes.count(); + int index; UmlStereotype * relation_stereotypes = new UmlStereotype[n + 1]; if (n / 2 > _map_relation_stereotypes.size()) - _map_relation_stereotypes.resize(_map_relation_stereotypes.size() * 2 - 1); + _map_relation_stereotypes.reserve(_map_relation_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) relation_stereotypes[index] = _relation_stereotypes[index]; @@ -298,15 +298,15 @@ UmlStereotype * UmlSettings::add_rel_stereotype(const Q3CString & s) } -UmlStereotype * UmlSettings::add_class_stereotype(const Q3CString & s) +UmlStereotype * UmlSettings::add_class_stereotype(const QByteArray & s) { - unsigned n = _map_class_stereotypes.count(); - unsigned index; + int n = _map_class_stereotypes.count(); + int index; UmlStereotype * class_stereotypes = new UmlStereotype[n + 1]; if (n / 2 > _map_class_stereotypes.size()) - _map_class_stereotypes.resize(_map_class_stereotypes.size() * 2 - 1); + _map_class_stereotypes.reserve(_map_class_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) class_stereotypes[index] = _class_stereotypes[index]; diff --git a/genplugouts/FileControl/UmlSettings.h b/genplugouts/FileControl/UmlSettings.h index 57d228d02..838e6dc2f 100644 --- a/genplugouts/FileControl/UmlSettings.h +++ b/genplugouts/FileControl/UmlSettings.h @@ -1,9 +1,10 @@ #ifndef _UMLSETTINGS_H #define _UMLSETTINGS_H +#include +#include + -#include -#include struct UmlBuiltin; struct UmlStereotype; @@ -19,44 +20,44 @@ class UmlSettings { public: // return the default description - static Q3CString artifactDescription(); + static QByteArray artifactDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ArtifactDescription(Q3CString v); + static bool set_ArtifactDescription(QByteArray v); // return the default description - static Q3CString classDescription(); + static QByteArray classDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDescription(Q3CString v); + static bool set_ClassDescription(QByteArray v); // return the default description - static Q3CString operationDescription(); + static QByteArray operationDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDescription(Q3CString v); + static bool set_OperationDescription(QByteArray v); // return the default description - static Q3CString attributeDescription(); + static QByteArray attributeDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDescription(Q3CString v); + static bool set_AttributeDescription(QByteArray v); // return the default description - static Q3CString relationDescription(); + static QByteArray relationDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDescription(Q3CString v); + static bool set_RelationDescription(QByteArray v); protected: @@ -65,25 +66,25 @@ class UmlSettings static bool _defined; - static Q3CString _artifact_default_description; + static QByteArray _artifact_default_description; - static Q3CString _class_default_description; + static QByteArray _class_default_description; - static Q3CString _operation_default_description; + static QByteArray _operation_default_description; - static Q3CString _attribute_default_description; + static QByteArray _attribute_default_description; - static Q3CString _relation_default_description; + static QByteArray _relation_default_description; - static Q3Dict _map_builtins; + static QHash _map_builtins; static UmlBuiltin * _builtins; - static Q3Dict _map_relation_stereotypes; + static QHash _map_relation_stereotypes; static UmlStereotype * _relation_stereotypes; - static Q3Dict _map_class_stereotypes; + static QHash _map_class_stereotypes; static UmlStereotype * _class_stereotypes; @@ -97,31 +98,31 @@ class UmlSettings //internal, do NOT use it - static unsigned multiplicity_column(const Q3CString & mult); + static unsigned multiplicity_column(const QByteArray & mult); //internal, do NOT use it - static Q3CString uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f); + static QByteArray uml_type(const QByteArray & t, QByteArray UmlBuiltin::* f); //internal, do NOT use it - static Q3CString uml_rel_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f); + static QByteArray uml_rel_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f); //internal, do NOT use it - static Q3CString uml_class_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f); + static QByteArray uml_class_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f); //internal, do NOT use it - static UmlBuiltin * add_type(const Q3CString & s); + static UmlBuiltin * add_type(const QByteArray & s); //internal, do NOT use it - static UmlStereotype * add_rel_stereotype(const Q3CString & s); + static UmlStereotype * add_rel_stereotype(const QByteArray & s); //internal, do NOT use it - static UmlStereotype * add_class_stereotype(const Q3CString & s); + static UmlStereotype * add_class_stereotype(const QByteArray & s); }; diff --git a/genplugouts/FileControl/UmlState.h b/genplugouts/FileControl/UmlState.h index b8a04be4a..e760bb6b6 100644 --- a/genplugouts/FileControl/UmlState.h +++ b/genplugouts/FileControl/UmlState.h @@ -4,13 +4,13 @@ #include "UmlBaseState.h" #include "UmlStateItem.h" -#include + class UmlState : public UmlBaseState, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlState(void * id, const Q3CString & s) : UmlBaseState(id, s) { + UmlState(void * id, const QByteArray & s) : UmlBaseState(id, s) { } }; diff --git a/genplugouts/FileControl/UmlStateDiagram.h b/genplugouts/FileControl/UmlStateDiagram.h index f49b5fb44..c639f9193 100644 --- a/genplugouts/FileControl/UmlStateDiagram.h +++ b/genplugouts/FileControl/UmlStateDiagram.h @@ -4,13 +4,13 @@ #include "UmlBaseStateDiagram.h" #include "UmlStateItem.h" -#include + class UmlStateDiagram : public UmlBaseStateDiagram, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlStateDiagram(void * id, const Q3CString & s) : UmlBaseStateDiagram(id, s) { + UmlStateDiagram(void * id, const QByteArray & s) : UmlBaseStateDiagram(id, s) { } }; diff --git a/genplugouts/FileControl/UmlStereotype.h b/genplugouts/FileControl/UmlStereotype.h index 290517202..5c84a3962 100644 --- a/genplugouts/FileControl/UmlStereotype.h +++ b/genplugouts/FileControl/UmlStereotype.h @@ -2,23 +2,23 @@ #define _UMLSTEREOTYPE_H -#include +#include // Internal class used to know how what code is produced for a stereotype in each language struct UmlStereotype { - Q3CString uml; + QByteArray uml; #ifdef WITHCPP - Q3CString cpp; + QByteArray cpp; #endif #ifdef WITHJAVA - Q3CString java; + QByteArray java; #endif #ifdef WITHIDL - Q3CString idl; + QByteArray idl; #endif }; diff --git a/genplugouts/FileControl/UmlTransition.h b/genplugouts/FileControl/UmlTransition.h index 3edd626c7..59ccc3e65 100644 --- a/genplugouts/FileControl/UmlTransition.h +++ b/genplugouts/FileControl/UmlTransition.h @@ -4,12 +4,12 @@ #include "UmlBaseTransition.h" #include "UmlStateItem.h" -#include + class UmlTransition : public UmlBaseTransition, public UmlStateItem { public: - UmlTransition(void * id, const Q3CString & n) : UmlBaseTransition(id, n) { + UmlTransition(void * id, const QByteArray & n) : UmlBaseTransition(id, n) { } }; diff --git a/genplugouts/FileControl/UmlTypeSpec.cpp b/genplugouts/FileControl/UmlTypeSpec.cpp index 4bcfebb95..ec194d414 100644 --- a/genplugouts/FileControl/UmlTypeSpec.cpp +++ b/genplugouts/FileControl/UmlTypeSpec.cpp @@ -2,9 +2,9 @@ #include "UmlTypeSpec.h" #include "UmlClass.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlTypeSpec::toString() const +const QByteArray & UmlTypeSpec::toString() const { return (type) ? type->name() : explicit_type; } diff --git a/genplugouts/FileControl/UmlTypeSpec.h b/genplugouts/FileControl/UmlTypeSpec.h index 1c939ea94..e6ec4b176 100644 --- a/genplugouts/FileControl/UmlTypeSpec.h +++ b/genplugouts/FileControl/UmlTypeSpec.h @@ -1,8 +1,8 @@ #ifndef _UMLTYPESPEC_H #define _UMLTYPESPEC_H +#include -#include class UmlClass; @@ -15,7 +15,7 @@ class UmlTypeSpec { public: // significant in case type == 0 - Q3CString explicit_type; + QByteArray explicit_type; // if != 0 the class representing the type UmlClass * type; @@ -23,7 +23,7 @@ class UmlTypeSpec UmlTypeSpec() : type(0) {}; // returns the type as a string in all cases - const Q3CString & toString() const; + const QByteArray & toString() const; }; diff --git a/genplugouts/FileControl/UmlUseCase.h b/genplugouts/FileControl/UmlUseCase.h index 392773262..c21cc521d 100644 --- a/genplugouts/FileControl/UmlUseCase.h +++ b/genplugouts/FileControl/UmlUseCase.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCase.h" -#include + // This class manages 'use case' // @@ -11,7 +11,7 @@ class UmlUseCase : public UmlBaseUseCase { public: - UmlUseCase(void * id, const Q3CString & n) : UmlBaseUseCase(id, n) {}; + UmlUseCase(void * id, const QByteArray & n) : UmlBaseUseCase(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlUseCaseDiagram.h b/genplugouts/FileControl/UmlUseCaseDiagram.h index 132b56d36..bf490aa90 100644 --- a/genplugouts/FileControl/UmlUseCaseDiagram.h +++ b/genplugouts/FileControl/UmlUseCaseDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCaseDiagram.h" -#include + // This class manages 'use case diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlUseCaseDiagram : public UmlBaseUseCaseDiagram { public: - UmlUseCaseDiagram(void * id, const Q3CString & n) : UmlBaseUseCaseDiagram(id, n) {}; + UmlUseCaseDiagram(void * id, const QByteArray & n) : UmlBaseUseCaseDiagram(id, n) {}; }; diff --git a/genplugouts/FileControl/UmlUseCaseView.h b/genplugouts/FileControl/UmlUseCaseView.h index a715b2f5f..ef475b173 100644 --- a/genplugouts/FileControl/UmlUseCaseView.h +++ b/genplugouts/FileControl/UmlUseCaseView.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCaseView.h" -#include + // This class manages 'use case view' // @@ -11,7 +11,7 @@ class UmlUseCaseView : public UmlBaseUseCaseView { public: - UmlUseCaseView(void * id, const Q3CString & n) : UmlBaseUseCaseView(id, n) {}; + UmlUseCaseView(void * id, const QByteArray & n) : UmlBaseUseCaseView(id, n) {}; }; diff --git a/genplugouts/FileControl/gridbox.cpp b/genplugouts/FileControl/gridbox.cpp new file mode 100644 index 000000000..78233be1d --- /dev/null +++ b/genplugouts/FileControl/gridbox.cpp @@ -0,0 +1,37 @@ +#include "gridbox.h" +#include +GridBox::GridBox(int n, QWidget * parent, QString name) : + QGroupBox(name, parent) +{ + m_layout = new QGridLayout(this); + setLayout(m_layout); + m_numCols = n; + currentIndex = 0; + setSpacing(0); + setMargin(0); + if(!name.isEmpty()) + this->setObjectName(name); +} + +void GridBox::setMargin(int mar) +{ + m_layout->setMargin(mar); +} + +void GridBox::setSpacing(int spacing) +{ + m_layout->setSpacing(spacing); +} + +void GridBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget, currentIndex/m_numCols, currentIndex%m_numCols); + currentIndex ++; +} + +QString GridBox::name(QString name) +{ + if(objectName().isEmpty()) + setObjectName(name); + return objectName(); +} diff --git a/genplugouts/FileControl/gridbox.h b/genplugouts/FileControl/gridbox.h new file mode 100644 index 000000000..64793941d --- /dev/null +++ b/genplugouts/FileControl/gridbox.h @@ -0,0 +1,26 @@ +#ifndef GRIDBOX_H +#define GRIDBOX_H + +#include +#include +class QGridLayout; +class GridBox : public QGroupBox +{ + Q_OBJECT +public: + explicit GridBox(int n, QWidget *parent = 0,QString name = QString()); + void setMargin(int mar); + void setSpacing(int spacing); + void addWidget(QWidget *widget); + QString name(QString name = QString()); + +signals: + +public slots: +private: + QGridLayout *m_layout; + int m_numCols; + int currentIndex; +}; + +#endif // GRIDBOX_H diff --git a/genplugouts/FileControl/hhbox.cpp b/genplugouts/FileControl/hhbox.cpp new file mode 100644 index 000000000..95a09b5ea --- /dev/null +++ b/genplugouts/FileControl/hhbox.cpp @@ -0,0 +1,30 @@ +#include "hhbox.h" + +HHBox::HHBox(QWidget *parent, QString name) : + QWidget(parent) +{ + m_layout = new QHBoxLayout(this); + this->setLayout(m_layout); + m_layout->setSpacing(0); + m_layout->setMargin(0); + setObjectName(name); +} + +void HHBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget); +} + +bool HHBox::setStretchFactor(QWidget *w, int stretch) +{ + //if not in layout + if(m_layout->indexOf(w) == -1) + m_layout->addWidget(w); + m_layout->setStretchFactor(w, stretch); + return 0; +} + +void HHBox::setMargin(int margin) +{ + m_layout->setMargin(margin); +} diff --git a/genplugouts/FileControl/hhbox.h b/genplugouts/FileControl/hhbox.h new file mode 100644 index 000000000..06a8620d6 --- /dev/null +++ b/genplugouts/FileControl/hhbox.h @@ -0,0 +1,22 @@ +#ifndef HHBOX_H +#define HHBOX_H + +#include +#include +class HHBox : public QWidget +{ + Q_OBJECT +public: + explicit HHBox(QWidget *parent = 0, QString name= QString()); + void addWidget(QWidget* widget); + bool setStretchFactor(QWidget *w, int stretch); + void setMargin(int margin); + +signals: + +public slots: +private: + QHBoxLayout *m_layout; +}; + +#endif // HHBOX_H diff --git a/genplugouts/FileControl/vvbox.cpp b/genplugouts/FileControl/vvbox.cpp new file mode 100644 index 000000000..288eb93ac --- /dev/null +++ b/genplugouts/FileControl/vvbox.cpp @@ -0,0 +1,26 @@ +#include "vvbox.h" + +VVBox::VVBox(QWidget *parent) : + QWidget(parent) +{ + m_layout = new QVBoxLayout(this); + this->setLayout(m_layout); + m_layout->setSpacing(0); + m_layout->setMargin(0); +} + +void VVBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget); +} +bool VVBox::setStretchFactor(QWidget *w, int stretch) +{ + if(m_layout->indexOf(w) == -1) + m_layout->addWidget(w); + m_layout->setStretchFactor(w, stretch); + return 0; +} +void VVBox::setMargin(int margin) +{ + m_layout->setMargin(margin); +} diff --git a/genplugouts/FileControl/vvbox.h b/genplugouts/FileControl/vvbox.h new file mode 100644 index 000000000..7f27f2ea8 --- /dev/null +++ b/genplugouts/FileControl/vvbox.h @@ -0,0 +1,22 @@ +#ifndef VVBOX_H +#define VVBOX_H + +#include +#include +class VVBox : public QWidget +{ + Q_OBJECT +public: + explicit VVBox(QWidget *parent = 0); + void addWidget(QWidget* widget); + + bool setStretchFactor(QWidget *w, int stretch); + void setMargin(int margin); +signals: + +public slots: +private: + QVBoxLayout *m_layout; +}; + +#endif // VVBOX_H diff --git a/genplugouts/GlobalChange/Context.cpp b/genplugouts/GlobalChange/Context.cpp index ff9c0e1d9..52b07de46 100644 --- a/genplugouts/GlobalChange/Context.cpp +++ b/genplugouts/GlobalChange/Context.cpp @@ -1,14 +1,14 @@ #include "Context.h" //Added by qt3to4: -#include +#include -Context::Context(const Q3CString & o, const Q3CString & f) +Context::Context(const QByteArray & o, const QByteArray & f) : _old(o), _future(f), _n_match(0), _n_err(0) { } -const char * Context::set_filters(const Q3CString & f1, const Q3CString & f2, const Q3CString & f3, bool w1, bool w2, bool w3, bool and12, bool and23) +const char * Context::set_filters(const QByteArray & f1, const QByteArray & f2, const QByteArray & f3, bool w1, bool w2, bool w3, bool and12, bool and23) { _filter1 = f1; _filter2 = f2; @@ -43,7 +43,7 @@ const char * Context::set_filters(const Q3CString & f1, const Q3CString & f2, co return 0; } -bool Context::match_stereotype(const Q3CString & s) +bool Context::match_stereotype(const QByteArray & s) { if (_is) return (s == _stereotype); @@ -53,14 +53,14 @@ bool Context::match_stereotype(const Q3CString & s) return TRUE; } -bool Context::match(Q3CString s) +bool Context::match(QByteArray s) { int index = 0; - while ((index = s.find("\r", index)) != -1) + while ((index = s.indexOf("\r", index)) != -1) s.remove(index, 1); - if (s.find(_old) == -1) + if (s.indexOf(_old) == -1) return FALSE; switch (_equation) { @@ -81,10 +81,10 @@ bool Context::match(Q3CString s) return match(s, _filter1, _with1) && match(s, _filter2, _with2) && match(s, _filter3, _with3); case And12_Or23: - return match(s, _filter1, _with1) && match(s, _filter2, _with2) || match(s, _filter3, _with3); + return (match(s, _filter1, _with1) && match(s, _filter2, _with2)) || match(s, _filter3, _with3); case Or12_And23: - return match(s, _filter1, _with1) || match(s, _filter2, _with2) && match(s, _filter3, _with3); + return match(s, _filter1, _with1) || (match(s, _filter2, _with2) && match(s, _filter3, _with3)); default: //Or12_Or23: @@ -97,19 +97,19 @@ void Context::err() _n_err += 1; } -Q3CString Context::replace(Q3CString s) +QByteArray Context::replace(QByteArray s) { int index = 0; - while ((index = s.find("\r", index)) != -1) + while ((index = s.indexOf("\r", index)) != -1) s.remove(index, 1); - return s.replace(s.find(_old), _old.length(), _future); + return s.replace(s.indexOf(_old), _old.length(), _future); } -bool Context::match(Q3CString s, const Q3CString & filter, bool with) +bool Context::match(QByteArray s, const QByteArray & filter, bool with) { - if ((with) ? (s.find(filter) != -1) : (s.find(filter) == -1)) { + if ((with) ? (s.indexOf(filter) != -1) : (s.indexOf(filter) == -1)) { _n_match += 1; return TRUE; } diff --git a/genplugouts/GlobalChange/Context.h b/genplugouts/GlobalChange/Context.h index 8373f9beb..2ee21b909 100644 --- a/genplugouts/GlobalChange/Context.h +++ b/genplugouts/GlobalChange/Context.h @@ -1,8 +1,8 @@ #ifndef _CONTEXT_H #define _CONTEXT_H +#include -#include enum Equation { NoFilter, @@ -18,23 +18,23 @@ enum Equation { class Context { public: - Context(const Q3CString & o, const Q3CString & f); + Context(const QByteArray & o, const QByteArray & f); - const char * set_filters(const Q3CString & f1, const Q3CString & f2, const Q3CString & f3, bool w1, bool w2, bool w3, bool and12, bool and23); + const char * set_filters(const QByteArray & f1, const QByteArray & f2, const QByteArray & f3, bool w1, bool w2, bool w3, bool and12, bool and23); - void set_stereotype(const Q3CString & s, bool eq, bool neq); + void set_stereotype(const QByteArray & s, bool eq, bool neq); void set_targets(bool art, bool cl, bool op, bool att, bool rel); void set_language(bool c, bool j, bool p, bool y, bool i); - bool match_stereotype(const Q3CString & s); + bool match_stereotype(const QByteArray & s); - bool match(Q3CString s); + bool match(QByteArray s); void err(); - Q3CString replace(Q3CString s); + QByteArray replace(QByteArray s); bool onArtifact() const; @@ -62,11 +62,11 @@ class Context protected: - Q3CString _filter1; + QByteArray _filter1; - Q3CString _filter2; + QByteArray _filter2; - Q3CString _filter3; + QByteArray _filter3; bool _with1; @@ -74,7 +74,7 @@ class Context bool _with3; - Q3CString _stereotype; + QByteArray _stereotype; bool _is; @@ -100,9 +100,9 @@ class Context bool _idl; - Q3CString _old; + QByteArray _old; - Q3CString _future; + QByteArray _future; Equation _equation; @@ -110,11 +110,11 @@ class Context int _n_err; - bool match(Q3CString s, const Q3CString & filter, bool with); + bool match(QByteArray s, const QByteArray & filter, bool with); }; -inline void Context::set_stereotype(const Q3CString & s, bool eq, bool neq) +inline void Context::set_stereotype(const QByteArray & s, bool eq, bool neq) { _stereotype = s; _is = eq; diff --git a/genplugouts/GlobalChange/CppSettings.cpp b/genplugouts/GlobalChange/CppSettings.cpp index 60c47fda6..6cbade338 100644 --- a/genplugouts/GlobalChange/CppSettings.cpp +++ b/genplugouts/GlobalChange/CppSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool CppSettings::useDefaults() { UmlCom::send_cmd(cppSettingsCmd, getCppUseDefaultsCmd); @@ -22,22 +22,22 @@ bool CppSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString CppSettings::type(Q3CString s) +QByteArray CppSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_Type(Q3CString s, Q3CString v) +bool CppSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppTypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -50,29 +50,29 @@ bool CppSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::umlType(Q3CString s) +QByteArray CppSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::cpp); } -Q3CString CppSettings::relationAttributeStereotype(Q3CString s) +QByteArray CppSettings::relationAttributeStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -85,29 +85,29 @@ bool CppSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::relationAttributeUmlStereotype(Q3CString s) +QByteArray CppSettings::relationAttributeUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::classStereotype(Q3CString s) +QByteArray CppSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppClassStereotypeCmd, (const char *)s, (const char *)v); if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -120,32 +120,32 @@ bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::classUmlStereotype(Q3CString s) +QByteArray CppSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::include(Q3CString s) +QByteArray CppSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool CppSettings::set_Include(Q3CString s, Q3CString v) +bool CppSettings::set_Include(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppIncludeCmd, (const char *)s, (const char *)v); if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -156,14 +156,14 @@ bool CppSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::rootDir() +QByteArray CppSettings::rootDir() { read_if_needed_(); return _root; } -bool CppSettings::set_RootDir(Q3CString v) +bool CppSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppRootDirCmd, (const char *)v); //[jasa] handle ambiguous call @@ -175,14 +175,14 @@ bool CppSettings::set_RootDir(Q3CString v) return FALSE; } -Q3CString CppSettings::headerContent() +QByteArray CppSettings::headerContent() { read_if_needed_(); return _h_content; } -bool CppSettings::set_HeaderContent(Q3CString v) +bool CppSettings::set_HeaderContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderContentCmd, (const char *)v); //[jasa] handle ambiguous call @@ -194,14 +194,14 @@ bool CppSettings::set_HeaderContent(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceContent() +QByteArray CppSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool CppSettings::set_SourceContent(Q3CString v) +bool CppSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceContentCmd, (const char *)v); //[jasa] handle ambiguous call @@ -213,14 +213,14 @@ bool CppSettings::set_SourceContent(Q3CString v) return FALSE; } -Q3CString CppSettings::headerExtension() +QByteArray CppSettings::headerExtension() { read_if_needed_(); return _h_ext; } -bool CppSettings::set_HeaderExtension(Q3CString v) +bool CppSettings::set_HeaderExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderExtensionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -232,14 +232,14 @@ bool CppSettings::set_HeaderExtension(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceExtension() +QByteArray CppSettings::sourceExtension() { read_if_needed_(); return _src_ext; } -bool CppSettings::set_SourceExtension(Q3CString v) +bool CppSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceExtensionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -352,14 +352,14 @@ bool CppSettings::set_IsGenerateJavadocStyleComment(bool v) return FALSE; } -const Q3CString & CppSettings::enumIn() +const QByteArray & CppSettings::enumIn() { read_if_needed_(); return _enum_in; } -bool CppSettings::set_EnumIn(Q3CString v) +bool CppSettings::set_EnumIn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInCmd, (const char *)v); //[jasa] handle ambiguous call @@ -371,14 +371,14 @@ bool CppSettings::set_EnumIn(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumOut() +const QByteArray & CppSettings::enumOut() { read_if_needed_(); return _enum_out; } -bool CppSettings::set_EnumOut(Q3CString v) +bool CppSettings::set_EnumOut(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumOutCmd, (const char *)v); //[jasa] handle ambiguous call @@ -390,14 +390,14 @@ bool CppSettings::set_EnumOut(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumInout() +const QByteArray & CppSettings::enumInout() { read_if_needed_(); return _enum_inout; } -bool CppSettings::set_EnumInout(Q3CString v) +bool CppSettings::set_EnumInout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInOutCmd, (const char *)v); //[jasa] handle ambiguous call @@ -409,14 +409,14 @@ bool CppSettings::set_EnumInout(Q3CString v) return FALSE; } -Q3CString CppSettings::enumReturn() +QByteArray CppSettings::enumReturn() { read_if_needed_(); return _enum_return; } -bool CppSettings::set_EnumReturn(Q3CString v) +bool CppSettings::set_EnumReturn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumReturnCmd, (const char *)v); //[jasa] handle ambiguous call @@ -428,22 +428,22 @@ bool CppSettings::set_EnumReturn(Q3CString v) return FALSE; } -Q3CString CppSettings::builtinIn(Q3CString s) +QByteArray CppSettings::builtinIn(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_in : Q3CString(); + return (b) ? b->cpp_in : QByteArray(); } -bool CppSettings::set_BuiltinIn(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinIn(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppInCmd, (const char *)type, (const char *)form); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -456,22 +456,22 @@ bool CppSettings::set_BuiltinIn(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinOut(Q3CString s) +QByteArray CppSettings::builtinOut(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_out : Q3CString(); + return (b) ? b->cpp_out : QByteArray(); } -bool CppSettings::set_BuiltinOut(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinOut(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppOutCmd, (const char *)type, (const char *)form); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -484,22 +484,22 @@ bool CppSettings::set_BuiltinOut(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinInOut(Q3CString s) +QByteArray CppSettings::builtinInOut(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_inout : Q3CString(); + return (b) ? b->cpp_inout : QByteArray(); } -bool CppSettings::set_BuiltinInOut(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinInOut(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppInOutCmd, (const char *)type, (const char *)form); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -512,22 +512,22 @@ bool CppSettings::set_BuiltinInOut(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinReturn(Q3CString s) +QByteArray CppSettings::builtinReturn(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_return : Q3CString(); + return (b) ? b->cpp_return : QByteArray(); } -bool CppSettings::set_BuiltinReturn(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinReturn(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppReturnCmd, (const char *)type, (const char *)form); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -540,14 +540,14 @@ bool CppSettings::set_BuiltinReturn(Q3CString type, Q3CString form) return FALSE; } -const Q3CString & CppSettings::in() +const QByteArray & CppSettings::in() { read_if_needed_(); return _in; } -bool CppSettings::set_In(Q3CString v) +bool CppSettings::set_In(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInCmd, (const char *)v, ""); //[jasa] handle ambiguous call @@ -559,14 +559,14 @@ bool CppSettings::set_In(Q3CString v) return FALSE; } -const Q3CString & CppSettings::out() +const QByteArray & CppSettings::out() { read_if_needed_(); return _out; } -bool CppSettings::set_Out(Q3CString v) +bool CppSettings::set_Out(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOutCmd, (const char *)v, ""); //[jasa] handle ambiguous call @@ -578,14 +578,14 @@ bool CppSettings::set_Out(Q3CString v) return FALSE; } -const Q3CString & CppSettings::inout() +const QByteArray & CppSettings::inout() { read_if_needed_(); return _inout; } -bool CppSettings::set_Inout(Q3CString v) +bool CppSettings::set_Inout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInOutCmd, (const char *)v, ""); @@ -597,14 +597,14 @@ bool CppSettings::set_Inout(Q3CString v) return FALSE; } -Q3CString CppSettings::Return() +QByteArray CppSettings::Return() { read_if_needed_(); return _return; } -bool CppSettings::set_Return(Q3CString v) +bool CppSettings::set_Return(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppReturnCmd, (const char *)v, ""); //[jasa] handle ambiguous call @@ -616,14 +616,14 @@ bool CppSettings::set_Return(Q3CString v) return FALSE; } -const Q3CString & CppSettings::classDecl() +const QByteArray & CppSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool CppSettings::set_ClassDecl(Q3CString v) +bool CppSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -635,14 +635,14 @@ bool CppSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::externalClassDecl() +const QByteArray & CppSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool CppSettings::set_ExternalClassDecl(Q3CString v) +bool CppSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppExternalClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -654,14 +654,14 @@ bool CppSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::structDecl() +const QByteArray & CppSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool CppSettings::set_StructDecl(Q3CString v) +bool CppSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppStructDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -673,14 +673,14 @@ bool CppSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::unionDecl() +const QByteArray & CppSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool CppSettings::set_UnionDecl(Q3CString v) +bool CppSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppUnionDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -692,14 +692,14 @@ bool CppSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumDecl() +const QByteArray & CppSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool CppSettings::set_EnumDecl(Q3CString v) +bool CppSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -711,14 +711,14 @@ bool CppSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::typedefDecl() +const QByteArray & CppSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool CppSettings::set_TypedefDecl(Q3CString v) +bool CppSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppTypedefDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -730,14 +730,14 @@ bool CppSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::attributeDecl(const char * multiplicity) +const QByteArray & CppSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool CppSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool CppSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppAttributeDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -750,14 +750,14 @@ bool CppSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumItemDecl() +const QByteArray & CppSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool CppSettings::set_EnumItemDecl(Q3CString v) +bool CppSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumItemDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -769,7 +769,7 @@ bool CppSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::relationDecl(bool by_value, const char * multiplicity) +const QByteArray & CppSettings::relationDecl(bool by_value, const char * multiplicity) { read_if_needed_(); @@ -789,14 +789,14 @@ bool CppSettings::set_RelationDecl(bool by_value, const char * multiplicity, con return FALSE; } -const Q3CString & CppSettings::operationDecl() +const QByteArray & CppSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool CppSettings::set_OperationDecl(Q3CString v) +bool CppSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -808,14 +808,14 @@ bool CppSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::operationDef() +const QByteArray & CppSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool CppSettings::set_OperationDef(Q3CString v) +bool CppSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDefCmd, (const char *)v); //[jasa] handle ambiguous call @@ -865,14 +865,14 @@ bool CppSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::getName() +const QByteArray & CppSettings::getName() { read_if_needed_(); return _get_name; } -bool CppSettings::set_GetName(Q3CString v) +bool CppSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppGetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -960,14 +960,14 @@ bool CppSettings::set_SetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::setName() +const QByteArray & CppSettings::setName() { read_if_needed_(); return _set_name; } -bool CppSettings::set_SetName(Q3CString v) +bool CppSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -1038,51 +1038,51 @@ bool CppSettings::set_IsSetParamRef(bool v) bool CppSettings::_defined; -Q3CString CppSettings::_root; +QByteArray CppSettings::_root; -Q3CString CppSettings::_in; +QByteArray CppSettings::_in; -Q3CString CppSettings::_out; +QByteArray CppSettings::_out; -Q3CString CppSettings::_inout; +QByteArray CppSettings::_inout; -Q3CString CppSettings::_return; +QByteArray CppSettings::_return; -Q3CString CppSettings::_enum_in; +QByteArray CppSettings::_enum_in; -Q3CString CppSettings::_enum_out; +QByteArray CppSettings::_enum_out; -Q3CString CppSettings::_enum_inout; +QByteArray CppSettings::_enum_inout; -Q3CString CppSettings::_enum_return; +QByteArray CppSettings::_enum_return; -Q3CString CppSettings::_class_decl; +QByteArray CppSettings::_class_decl; -Q3CString CppSettings::_external_class_decl; +QByteArray CppSettings::_external_class_decl; -Q3CString CppSettings::_struct_decl; +QByteArray CppSettings::_struct_decl; -Q3CString CppSettings::_union_decl; +QByteArray CppSettings::_union_decl; -Q3CString CppSettings::_enum_decl; +QByteArray CppSettings::_enum_decl; -Q3CString CppSettings::_typedef_decl; +QByteArray CppSettings::_typedef_decl; -Q3CString CppSettings::_attr_decl[3/*multiplicity*/]; +QByteArray CppSettings::_attr_decl[3/*multiplicity*/]; -Q3CString CppSettings::_enum_item_decl; +QByteArray CppSettings::_enum_item_decl; -Q3CString CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; +QByteArray CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; -Q3CString CppSettings::_oper_decl; +QByteArray CppSettings::_oper_decl; -Q3CString CppSettings::_oper_def; +QByteArray CppSettings::_oper_def; bool CppSettings::_force_oper_throw; aVisibility CppSettings::_get_visibility; -Q3CString CppSettings::_get_name; +QByteArray CppSettings::_get_name; bool CppSettings::_is_get_inline; @@ -1092,7 +1092,7 @@ bool CppSettings::_is_get_value_const; aVisibility CppSettings::_set_visibility; -Q3CString CppSettings::_set_name; +QByteArray CppSettings::_set_name; bool CppSettings::_is_set_inline; @@ -1100,13 +1100,13 @@ bool CppSettings::_is_set_param_const; bool CppSettings::_is_set_param_ref; -Q3CString CppSettings::_h_content; +QByteArray CppSettings::_h_content; -Q3CString CppSettings::_src_content; +QByteArray CppSettings::_src_content; -Q3CString CppSettings::_h_ext; +QByteArray CppSettings::_h_ext; -Q3CString CppSettings::_src_ext; +QByteArray CppSettings::_src_ext; bool CppSettings::_incl_with_path; @@ -1118,14 +1118,14 @@ bool CppSettings::_is_force_namespace_gen; bool CppSettings::_is_generate_javadoc_comment; -Q3Dict CppSettings::_map_includes; +QHash CppSettings::_map_includes; void CppSettings::read_() { _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -1151,13 +1151,13 @@ void CppSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _h_content = UmlCom::read_string(); diff --git a/genplugouts/GlobalChange/CppSettings.h b/genplugouts/GlobalChange/CppSettings.h index c455cc67f..6ad480d7c 100644 --- a/genplugouts/GlobalChange/CppSettings.h +++ b/genplugouts/GlobalChange/CppSettings.h @@ -4,10 +4,10 @@ #ifdef WITHCPP -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning C++, configured through // the 'Generation settings' dialog. @@ -31,100 +31,100 @@ class CppSettings : public UmlSettings // returns the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the C++ type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(Q3CString s); + static QByteArray relationAttributeStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString relationAttributeUmlStereotype(Q3CString s); + static QByteArray relationAttributeUmlStereotype(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static Q3CString rootDir(); + static QByteArray rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default header file content - static Q3CString headerContent(); + static QByteArray headerContent(); // set the default header file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderContent(Q3CString v); + static bool set_HeaderContent(QByteArray v); // returns the default source file content - static Q3CString sourceContent(); + static QByteArray sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the header files produced by the // C++ code generator - static Q3CString headerExtension(); + static QByteArray headerExtension(); // set the extension of the header files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderExtension(Q3CString v); + static bool set_HeaderExtension(QByteArray v); // returns the extension of the source files produced by the // C++ code generator - static Q3CString sourceExtension(); + static QByteArray sourceExtension(); // set the extension of the source files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // indicates to the code generator if the #include may specify // the path of just the file's name @@ -175,47 +175,47 @@ class CppSettings : public UmlSettings // returns the default operation 'in' parameter specification // in case its type is an enum - static const Q3CString & enumIn(); + static const QByteArray & enumIn(); // set the default operation 'in' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumIn(Q3CString v); + static bool set_EnumIn(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is an enum - static const Q3CString & enumOut(); + static const QByteArray & enumOut(); // set the default operation 'out' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumOut(Q3CString v); + static bool set_EnumOut(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is an enum - static const Q3CString & enumInout(); + static const QByteArray & enumInout(); // set the default operation 'inout' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumInout(Q3CString v); + static bool set_EnumInout(QByteArray v); // return the default operation value type form - static Q3CString enumReturn(); + static QByteArray enumReturn(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumReturn(Q3CString v); + static bool set_EnumReturn(QByteArray v); // returns the default operation 'in' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinIn(Q3CString s); + static QByteArray builtinIn(QByteArray s); // set the default operation 'in' parameter specification // in case its type is specified in the first 'Generation @@ -223,13 +223,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinIn(Q3CString type, Q3CString form); + static bool set_BuiltinIn(QByteArray type, QByteArray form); // returns the default operation 'out' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinOut(Q3CString s); + static QByteArray builtinOut(QByteArray s); // set the default operation 'out' parameter specification // in case its type is specified in the first 'Generation @@ -237,13 +237,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinOut(Q3CString type, Q3CString form); + static bool set_BuiltinOut(QByteArray type, QByteArray form); // returns the default operation 'inout' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinInOut(Q3CString s); + static QByteArray builtinInOut(QByteArray s); // set the default operation 'inout' parameter specification // in case its type is specified in the first 'Generation @@ -251,13 +251,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinInOut(Q3CString type, Q3CString form); + static bool set_BuiltinInOut(QByteArray type, QByteArray form); // returns the default operation 'return' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinReturn(Q3CString s); + static QByteArray builtinReturn(QByteArray s); // set the default operation 'return' parameter specification // in case its type is specified in the first 'Generation @@ -265,36 +265,36 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinReturn(Q3CString type, Q3CString form); + static bool set_BuiltinReturn(QByteArray type, QByteArray form); // returns the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & in(); + static const QByteArray & in(); // set the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_In(Q3CString v); + static bool set_In(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & out(); + static const QByteArray & out(); // set the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Out(Q3CString v); + static bool set_Out(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & inout(); + static const QByteArray & inout(); // set the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the @@ -302,83 +302,83 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Inout(Q3CString v); + static bool set_Inout(QByteArray v); // return the default operation value type form - static Q3CString Return(); + static QByteArray Return(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Return(Q3CString v); + static bool set_Return(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. - static const Q3CString & relationDecl(bool by_value, const char * multiplicity); + static const QByteArray & relationDecl(bool by_value, const char * multiplicity); // set the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. @@ -387,20 +387,20 @@ class CppSettings : public UmlSettings static bool set_RelationDecl(bool by_value, const char * multiplicity, const char * v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // return TRUE if the operations profile must contain 'throw()' // when the operations does not have exception @@ -424,13 +424,13 @@ class CppSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns if a 'get' operation generated through the attribute // and relation 'add get operation' menu is inline by default @@ -476,14 +476,14 @@ class CppSettings : public UmlSettings // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is inline by default @@ -524,51 +524,51 @@ class CppSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _in; + static QByteArray _in; - static Q3CString _out; + static QByteArray _out; - static Q3CString _inout; + static QByteArray _inout; - static Q3CString _return; + static QByteArray _return; - static Q3CString _enum_in; + static QByteArray _enum_in; - static Q3CString _enum_out; + static QByteArray _enum_out; - static Q3CString _enum_inout; + static QByteArray _enum_inout; - static Q3CString _enum_return; + static QByteArray _enum_return; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[2/*relation kind*/][3/*multiplicity*/]; + static QByteArray _rel_decl[2/*relation kind*/][3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _oper_def; + static QByteArray _oper_def; static bool _force_oper_throw; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_inline; @@ -578,7 +578,7 @@ class CppSettings : public UmlSettings static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_inline; @@ -586,13 +586,13 @@ class CppSettings : public UmlSettings static bool _is_set_param_ref; - static Q3CString _h_content; + static QByteArray _h_content; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _h_ext; + static QByteArray _h_ext; - static Q3CString _src_ext; + static QByteArray _src_ext; static bool _incl_with_path; @@ -604,7 +604,7 @@ class CppSettings : public UmlSettings static bool _is_generate_javadoc_comment; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/GlobalChange/Dialog.cpp b/genplugouts/GlobalChange/Dialog.cpp index 731816a4f..b4534ce9f 100644 --- a/genplugouts/GlobalChange/Dialog.cpp +++ b/genplugouts/GlobalChange/Dialog.cpp @@ -9,21 +9,20 @@ #include #include #include -#include -#include +#include +#include #include #include //#include //[jasa] has compiler errors. //[jasa] including q3buttongroup.h instead seems to work. -#include -#include -#include +#include +#include "vgridbox.h" +#include "gridbox.h" #include -//Added by qt3to4: -#include +#include #include -#include - +#include +#include #include "UmlCom.h" #include "Context.h" #include "UmlItem.h" @@ -58,171 +57,174 @@ void LineEdit::keyPressEvent(QKeyEvent * e) } } -Dialog::Dialog() : QDialog(0, 0, TRUE) +Dialog::Dialog() : QDialog(0) { - Q3VBoxLayout * vbox = new Q3VBoxLayout(this); - Q3VGroupBox * gbox; - Q3HButtonGroup * bg; - Q3HBox * htab; + setModal(true); + QVBoxLayout * vbox = new QVBoxLayout(this); + VGridBox * gbox; + BButtonGroup * bg; + HHBox * htab; vbox->setMargin(5); - gbox = new Q3VGroupBox("Filters" , this); + gbox = new VGridBox(10,this,"Filters"); vbox->addWidget(gbox); - htab = new Q3HBox(gbox); + gbox->addWidget(htab = new HHBox(gbox)); //htab->setMargin(5); - new QLabel("filter 1 : ", htab); - filter1_le = new LineEdit(htab); + htab->addWidget(new QLabel("filter 1 : ", htab)); + htab->addWidget(filter1_le = new LineEdit(htab)); - new QLabel(" ", htab); + htab->addWidget(new QLabel(" ", htab)); - bg = new Q3HButtonGroup(htab); - bg->setRadioButtonExclusive(TRUE); + htab->addWidget(bg = new BButtonGroup(htab)); + //bg->setRadioButtonExclusive(TRUE); - with1_rb = new QRadioButton("with", bg); - new QRadioButton("without", bg); + bg->addWidget(with1_rb = new QRadioButton("with", bg)); + bg->addWidget(new QRadioButton("without", bg)); with1_rb->setChecked(TRUE); // - htab = new Q3HBox(gbox); + gbox->addWidget(htab = new HHBox(gbox)); //htab->setMargin(5); - new QLabel("", htab); - bg = new Q3HButtonGroup(htab); - bg->setRadioButtonExclusive(TRUE); + htab->addWidget(new QLabel("", htab)); + htab->addWidget(bg = new BButtonGroup(htab)); + //bg->setRadioButtonExclusive(TRUE); - and12_rb = new QRadioButton("and", bg); - new QRadioButton("or", bg); + bg->addWidget(and12_rb = new QRadioButton("and", bg)); + bg->addWidget(new QRadioButton("or", bg)); and12_rb->setChecked(TRUE); - new QLabel("", htab); + htab->addWidget(new QLabel("", htab)); // - htab = new Q3HBox(gbox); + gbox->addWidget(htab = new HHBox(gbox)); //htab->setMargin(5); - new QLabel("filter 2 : ", htab); - filter2_le = new LineEdit(htab); + htab->addWidget(new QLabel("filter 2 : ", htab)); + htab->addWidget(filter2_le = new LineEdit(htab)); - new QLabel(" ", htab); + htab->addWidget(new QLabel(" ", htab)); - bg = new Q3HButtonGroup(htab); - bg->setRadioButtonExclusive(TRUE); + htab->addWidget(bg = new BButtonGroup(htab)); + //bg->setRadioButtonExclusive(TRUE); - with2_rb = new QRadioButton("with", bg); - new QRadioButton("without", bg); + bg->addWidget(with2_rb = new QRadioButton("with", bg)); + bg->addWidget(new QRadioButton("without", bg)); with2_rb->setChecked(TRUE); // - htab = new Q3HBox(gbox); + gbox->addWidget(htab = new HHBox(gbox)); //htab->setMargin(5); - new QLabel("", htab); - bg = new Q3HButtonGroup(htab); - bg->setRadioButtonExclusive(TRUE); + htab->addWidget(new QLabel("", htab)); + htab->addWidget(bg = new BButtonGroup(htab)); + //bg->setRadioButtonExclusive(TRUE); - and23_rb = new QRadioButton("and", bg); - new QRadioButton("or", bg); + bg->addWidget(and23_rb = new QRadioButton("and", bg)); + bg->addWidget(new QRadioButton("or", bg)); and23_rb->setChecked(TRUE); - new QLabel("", htab); + htab->addWidget(new QLabel("", htab)); // - htab = new Q3HBox(gbox); + gbox->addWidget(htab = new HHBox(gbox)); //htab->setMargin(5); - new QLabel("filter 3 : ", htab); - filter3_le = new LineEdit(htab); + htab->addWidget(new QLabel("filter 3 : ", htab)); + htab->addWidget(filter3_le = new LineEdit(htab)); - new QLabel(" ", htab); + htab->addWidget(new QLabel(" ", htab)); - bg = new Q3HButtonGroup(htab); - bg->setRadioButtonExclusive(TRUE); + htab->addWidget(bg = new BButtonGroup(htab)); + //bg->setRadioButtonExclusive(TRUE); - with3_rb = new QRadioButton("with", bg); - new QRadioButton("without", bg); + bg->addWidget(with3_rb = new QRadioButton("with", bg)); + bg->addWidget(new QRadioButton("without", bg)); with3_rb->setChecked(TRUE); // // - gbox = new Q3VGroupBox("Stereotype" , this); + gbox = new VGridBox(2,this,"Stereotype" ); vbox->addWidget(gbox); - htab = new Q3HBox(gbox); + gbox->addWidget(htab = new HHBox(gbox)); //htab->setMargin(5); - bg = new Q3HButtonGroup(htab); - bg->setRadioButtonExclusive(TRUE); + htab->addWidget(bg = new BButtonGroup(htab)); + //bg->setRadioButtonExclusive(TRUE); - any_rb = new QRadioButton("any", bg); - is_rb = new QRadioButton("is", bg); - isnot_rb = new QRadioButton("is not", bg); + bg->addWidget(any_rb = new QRadioButton("any", bg)); + bg->addWidget(is_rb = new QRadioButton("is", bg)); + bg->addWidget(isnot_rb = new QRadioButton("is not", bg)); any_rb->setChecked(TRUE); - stereotype_le = new QLineEdit(htab); + htab->addWidget(stereotype_le = new QLineEdit(htab)); // // - gbox = new Q3VGroupBox("Targets" , this); + gbox = new VGridBox(2,this,"Targets" ); vbox->addWidget(gbox); - htab = new Q3HBox(gbox); + gbox->addWidget(htab = new HHBox(gbox)); //htab->setMargin(5); - artifact_cb = new QCheckBox("artifact", htab); - class_cb = new QCheckBox("class", htab); - operation_cb = new QCheckBox("operation", htab); - attribute_cb = new QCheckBox("attribute", htab); - relation_cb = new QCheckBox("relation", htab); + htab->addWidget(artifact_cb = new QCheckBox("artifact", htab)); + htab->addWidget(class_cb = new QCheckBox("class", htab)); + htab->addWidget(operation_cb = new QCheckBox("operation", htab)); + htab->addWidget(attribute_cb = new QCheckBox("attribute", htab)); + htab->addWidget(relation_cb = new QCheckBox("relation", htab)); // // - gbox = new Q3VGroupBox("Languages" , this); + gbox = new VGridBox(2,this,"Languages"); vbox->addWidget(gbox); - htab = new Q3HBox(gbox); + gbox->addWidget(htab = new HHBox(gbox)); //htab->setMargin(5); - cpp_cb = new QCheckBox("C++", htab); - java_cb = new QCheckBox("Java", htab); - php_cb = new QCheckBox("Php", htab); - python_cb = new QCheckBox("Python", htab); - idl_cb = new QCheckBox("Idl", htab); + htab->addWidget(cpp_cb = new QCheckBox("C++", htab)); + htab->addWidget(java_cb = new QCheckBox("Java", htab)); + htab->addWidget(php_cb = new QCheckBox("Php", htab)); + htab->addWidget(python_cb = new QCheckBox("Python", htab)); + htab->addWidget(idl_cb = new QCheckBox("Idl", htab)); // // - Q3Grid * grid = new Q3Grid(2, this); + GridBox * grid = new GridBox(2, this); vbox->addWidget(grid); grid->setMargin(5); grid->setSpacing(5); - new QLabel("current : ", grid); - current_le = new LineEdit(grid); + grid->addWidget(new QLabel("current : ", grid)); + grid->addWidget(current_le = new LineEdit(grid)); - new QLabel("new : ", grid); - new_le = new LineEdit(grid); + grid->addWidget(new QLabel("new : ", grid)); + grid->addWidget(new_le = new LineEdit(grid)); // // - htab = new Q3HBox(this); + htab = new HHBox(this); htab->setMargin(5); vbox->addWidget(htab); - new QLabel(htab); - QPushButton * replace = new QPushButton("Replace", htab); - new QLabel(htab); - QPushButton * quit = new QPushButton("Quit", htab); - new QLabel(htab); + htab->addWidget(new QLabel(htab)); + QPushButton * replace; + htab->addWidget(replace = new QPushButton("Replace", htab)); + htab->addWidget(new QLabel(htab)); + QPushButton * quit; + htab->addWidget(quit = new QPushButton("Quit", htab)); + htab->addWidget(new QLabel(htab)); QSize bs(replace->sizeHint()); @@ -245,7 +247,7 @@ void Dialog::do_replace() if (err != 0) QMessageBox::critical(this, "Global change", err); else { - ctx.set_stereotype(Q3CString(stereotype_le->text().toAscii()),//[jasa] change QString to QByteArray to const char* for Q3CString constructor. + ctx.set_stereotype(QByteArray(stereotype_le->text().toLatin1()),//[jasa] change QString to QByteArray to const char* for QByteArray constructor. is_rb->isChecked(), isnot_rb->isChecked()); ctx.set_targets(artifact_cb->isChecked(), class_cb->isChecked(), operation_cb->isChecked(), attribute_cb->isChecked(), relation_cb->isChecked()); @@ -270,28 +272,28 @@ void Dialog::do_replace() } } -Q3CString Dialog::digest(const QString s) +QByteArray Dialog::digest(const QString s) { - Q3CString c = (const char *) s; + QByteArray c = s.toLatin1(); int index; index = 0; - while ((index = c.find("\\n", index)) != -1) { + while ((index = c.indexOf("\\n", index)) != -1) { c.replace(index, 2, "\n"); index += 1; } index = 0; - while ((index = c.find("\\t", index)) != -1) { + while ((index = c.indexOf("\\t", index)) != -1) { c.replace(index, 2, "\t"); index += 1; } index = 0; - while ((index = c.find("\r", index)) != -1) { + while ((index = c.indexOf("\r", index)) != -1) { c.remove(index, 1); } @@ -300,57 +302,31 @@ Q3CString Dialog::digest(const QString s) void Dialog::polish() { - QDialog::polish(); + QDialog::ensurePolished(); QSize sz = size(); // width = height resize(sz.height(), sz.height()); - // try to read .doumlrc - // note : QFile fp(QDir::home().absFilePath(".doumlrc")) doesn't work - // if the path contains non latin1 characters, for instance cyrillic ! - QString s = QDir::home().absFilePath(".doumlrc"); - FILE * fp = fopen((const char *) s, "r"); - -#ifdef WIN32 - - if (fp == 0) { - QString hd = getenv("USERPROFILE"); - - if (! hd.isEmpty()) { - QDir d(hd); - QString s2 = d.absFilePath(".doumlrc"); - - fp = fopen((const char *) s2, "r"); - } - } - -#endif - - if (fp != 0) { - char line[512]; - - while (fgets(line, sizeof(line) - 1, fp) != 0) { - if (!strncmp(line, "DESKTOP ", 8)) { - int l, t, r, b; - - if (sscanf(line + 8, "%d %d %d %d", &l, &t, &r, &b) == 4) { - if (!((r == 0) && (t == 0) && (r == 0) && (b == 0)) && - !((r < 0) || (t < 0) || (r < 0) || (b < 0)) && - !((r <= l) || (b <= t))) { - int cx = (r + l) / 2; - int cy = (t + b) / 2; - - move(x() + cx - (x() + width() / 2), - y() + cy - (y() + height() / 2)); - } - } - - break; - } - } - - fclose(fp); + QSettings settings(QSettings::IniFormat, QSettings::UserScope, "DoUML", "settings"); + settings.setIniCodec("UTF-8"); + int l, t, r, b; + l = settings.value("Desktop/left", -1).toInt(); + r = settings.value("Desktop/right", -1).toInt(); + t = settings.value("Desktop/top", -1).toInt(); + b = settings.value("Desktop/bottom", -1).toInt(); + + if(l != -1 && r != -1 && t != -1 && b != -1) + { + if (!((r == 0) && (t == 0) && (r == 0) && (b == 0)) && + !((r < 0) || (t < 0) || (r < 0) || (b < 0)) && + !((r <= l) || (b <= t))) + { + int cx = (r + l) / 2; + int cy = (t + b) / 2; + + move(x() + cx - (x() + width() / 2), y() + cy - (y() + height() / 2)); + } } } diff --git a/genplugouts/GlobalChange/Dialog.h b/genplugouts/GlobalChange/Dialog.h index 9edb07c1b..0c9a2f8f7 100644 --- a/genplugouts/GlobalChange/Dialog.h +++ b/genplugouts/GlobalChange/Dialog.h @@ -2,7 +2,7 @@ #define _DIALOG_H -#include + #include #include @@ -86,7 +86,7 @@ class Dialog : public QDialog protected slots: void do_replace(); - Q3CString digest(const QString s); + QByteArray digest(const QString s); virtual void polish(); diff --git a/genplugouts/GlobalChange/FlowBehavior.h b/genplugouts/GlobalChange/FlowBehavior.h index 55dde8146..09f17529a 100644 --- a/genplugouts/GlobalChange/FlowBehavior.h +++ b/genplugouts/GlobalChange/FlowBehavior.h @@ -2,18 +2,18 @@ #define _FLOWBEHAVIOR_H -#include + class FlowBehavior { public: - Q3CString weight; + QByteArray weight; - Q3CString guard; + QByteArray guard; - Q3CString selection; + QByteArray selection; - Q3CString transformation; + QByteArray transformation; void read(); diff --git a/genplugouts/GlobalChange/GlobalChange.pro b/genplugouts/GlobalChange/GlobalChange.pro index 965c3e32d..48a822a27 100644 --- a/genplugouts/GlobalChange/GlobalChange.pro +++ b/genplugouts/GlobalChange/GlobalChange.pro @@ -1,7 +1,10 @@ TEMPLATE = app TARGET = global_change -CONFIG += warn_on qt -DEFINES = WITHCPP WITHJAVA WITHIDL WITHPHP WITHPYTHON +CONFIG -= app_bundle +CONFIG += qt warn_on c++11 +QMAKE_POST_LINK = " " +DEFINES += QT_DEPRECATED_WARNINGS +DEFINES += WITHCPP WITHJAVA WITHIDL WITHPHP WITHPYTHON HEADERS = ./UmlBaseUseCaseAssociation.h \ ./UmlActivityDiagram.h \ ./UmlForkPseudoState.h \ @@ -199,7 +202,12 @@ HEADERS = ./UmlBaseUseCaseAssociation.h \ ./UmlPackage.h \ ./UmlBaseExpansionNode.h \ ./UmlBaseArtifact.h \ - ./UmlBaseChoicePseudoState.h + ./UmlBaseChoicePseudoState.h \ + vgridbox.h \ + vvbox.h \ + gridbox.h \ + hhbox.h \ + bbuttongroup.h SOURCES = ./UmlBaseUseCaseAssociation.cpp \ ./UmlActivityDiagram.cpp \ ./UmlForkPseudoState.cpp \ @@ -398,25 +406,26 @@ SOURCES = ./UmlBaseUseCaseAssociation.cpp \ ./UmlPackage.cpp \ ./UmlBaseExpansionNode.cpp \ ./UmlBaseArtifact.cpp \ - ./UmlBaseChoicePseudoState.cpp + ./UmlBaseChoicePseudoState.cpp \ + vgridbox.cpp \ + vvbox.cpp \ + gridbox.cpp \ + hhbox.cpp \ + bbuttongroup.cpp -#The following line was inserted by qt3to4 -QT += network qt3support +QT += network widgets +DEFINES += TRUE=true FALSE=false INCLUDEPATH += ../../src -CONFIG += qtestlib -Release{ - - - MOC_DIR = bin/douml/global_change/MOC_release - OBJECTS_DIR = bin/douml/global_change/Obj_release +QT += testlib +DESTDIR = ../../bin +CONFIG(release, debug|release) { + DEFINES += NDEBUG + MOC_DIR = $${DESTDIR}/moc_release/global_change + OBJECTS_DIR = $${DESTDIR}/obj_release/global_change } - -Debug{ - MOC_DIR = bin/douml/global_change/MOC_Debug - OBJECTS_DIR = bin/douml/global_change/Obj_Debug - +CONFIG(debug, debug|release) { + DEFINES += TRACE DEBUG DEBUG_DOUML + MOC_DIR = $${DESTDIR}/moc_debug/global_change + OBJECTS_DIR = $${DESTDIR}/obj_debug/global_change } - UI_DIR = src/ui - DESTDIR = ../../bin - -QMAKE_CXXFLAGS += -std=gnu++11 +UI_DIR = src/ui diff --git a/genplugouts/GlobalChange/IdlSettings.cpp b/genplugouts/GlobalChange/IdlSettings.cpp index de9092f14..84d4dba81 100644 --- a/genplugouts/GlobalChange/IdlSettings.cpp +++ b/genplugouts/GlobalChange/IdlSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool IdlSettings::useDefaults() { UmlCom::send_cmd(idlSettingsCmd, getIdlUseDefaultsCmd); @@ -22,22 +22,22 @@ bool IdlSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString IdlSettings::type(Q3CString s) +QByteArray IdlSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_Type(Q3CString s, Q3CString v) +bool IdlSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlTypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -50,29 +50,29 @@ bool IdlSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::umlType(Q3CString s) +QByteArray IdlSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::idl); } -Q3CString IdlSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray IdlSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -85,29 +85,29 @@ bool IdlSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::relationAttributeUmlStereotype(Q3CString s) +QByteArray IdlSettings::relationAttributeUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::classStereotype(Q3CString s) +QByteArray IdlSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlClassStereotypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -120,32 +120,32 @@ bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::classUmlStereotype(Q3CString s) +QByteArray IdlSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::include(Q3CString s) +QByteArray IdlSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool IdlSettings::set_Include(Q3CString s, Q3CString v) +bool IdlSettings::set_Include(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlIncludeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -156,14 +156,14 @@ bool IdlSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::rootDir() +const QByteArray & IdlSettings::rootDir() { read_if_needed_(); return _root; } -bool IdlSettings::set_RootDir(Q3CString v) +bool IdlSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlRootDirCmd, (const char *)v); //[jasa] handle ambiguous call @@ -175,14 +175,14 @@ bool IdlSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceContent() +const QByteArray & IdlSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool IdlSettings::set_SourceContent(Q3CString v) +bool IdlSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceContentCmd, (const char *)v); //[jasa] handle ambiguous call @@ -194,14 +194,14 @@ bool IdlSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceExtension() +const QByteArray & IdlSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool IdlSettings::set_SourceExtension(Q3CString v) +bool IdlSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceExtensionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -213,14 +213,14 @@ bool IdlSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::interfaceDecl() +const QByteArray & IdlSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool IdlSettings::set_InterfaceDecl(Q3CString v) +bool IdlSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlInterfaceDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -232,14 +232,14 @@ bool IdlSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeDecl() +const QByteArray & IdlSettings::valuetypeDecl() { read_if_needed_(); return _valuetype_decl; } -bool IdlSettings::set_ValuetypeDecl(Q3CString v) +bool IdlSettings::set_ValuetypeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -251,14 +251,14 @@ bool IdlSettings::set_ValuetypeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::externalClassDecl() +const QByteArray & IdlSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool IdlSettings::set_ExternalClassDecl(Q3CString v) +bool IdlSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExternalClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -270,14 +270,14 @@ bool IdlSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::structDecl() +const QByteArray & IdlSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool IdlSettings::set_StructDecl(Q3CString v) +bool IdlSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlStructDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -289,14 +289,14 @@ bool IdlSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::typedefDecl() +const QByteArray & IdlSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool IdlSettings::set_TypedefDecl(Q3CString v) +bool IdlSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlTypedefDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -308,14 +308,14 @@ bool IdlSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::exceptionDecl() +const QByteArray & IdlSettings::exceptionDecl() { read_if_needed_(); return _exception_decl; } -bool IdlSettings::set_ExceptionDecl(Q3CString v) +bool IdlSettings::set_ExceptionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExceptionDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -327,14 +327,14 @@ bool IdlSettings::set_ExceptionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::unionDecl() +const QByteArray & IdlSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool IdlSettings::set_UnionDecl(Q3CString v) +bool IdlSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -346,14 +346,14 @@ bool IdlSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumDecl() +const QByteArray & IdlSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool IdlSettings::set_EnumDecl(Q3CString v) +bool IdlSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -365,14 +365,14 @@ bool IdlSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::attributeDecl(const char * multiplicity) +const QByteArray & IdlSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlAttributeDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -385,14 +385,14 @@ bool IdlSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeAttributeDecl(const char * multiplicity) +const QByteArray & IdlSettings::valuetypeAttributeDecl(const char * multiplicity) { read_if_needed_(); return _valuetype_attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeAttributeDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -405,14 +405,14 @@ bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, Q3CStrin return FALSE; } -const Q3CString & IdlSettings::unionItemDecl(const char * multiplicity) +const QByteArray & IdlSettings::unionItemDecl(const char * multiplicity) { read_if_needed_(); return _union_item_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_UnionItemDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_UnionItemDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlUnionItemDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -425,14 +425,14 @@ bool IdlSettings::set_UnionItemDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumItemDecl() +const QByteArray & IdlSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool IdlSettings::set_EnumItemDecl(Q3CString v) +bool IdlSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumItemDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -444,14 +444,14 @@ bool IdlSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::constDecl(const char * multiplicity) +const QByteArray & IdlSettings::constDecl(const char * multiplicity) { read_if_needed_(); return _const_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ConstDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ConstDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlConstDeclCmd, multiplicity, (const char *)v); @@ -464,14 +464,14 @@ bool IdlSettings::set_ConstDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::relationDecl(const char * multiplicity) +const QByteArray & IdlSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlRelationDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -484,14 +484,14 @@ bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::valuetypeRelationDecl(const char * multiplicity) { read_if_needed_(); return _valuetype_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeRelationDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -504,14 +504,14 @@ bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString return FALSE; } -const Q3CString & IdlSettings::unionRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::unionRelationDecl(const char * multiplicity) { read_if_needed_(); return _union_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlUnionRelationDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -524,14 +524,14 @@ bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::operationDecl() +const QByteArray & IdlSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool IdlSettings::set_OperationDecl(Q3CString v) +bool IdlSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlOperationDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -543,14 +543,14 @@ bool IdlSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::getName() +const QByteArray & IdlSettings::getName() { read_if_needed_(); return _get_name; } -bool IdlSettings::set_GetName(Q3CString v) +bool IdlSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlGetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -562,14 +562,14 @@ bool IdlSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::setName() +const QByteArray & IdlSettings::setName() { read_if_needed_(); return _set_name; } -bool IdlSettings::set_SetName(Q3CString v) +bool IdlSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -602,60 +602,60 @@ bool IdlSettings::set_IsSetOneway(bool v) bool IdlSettings::_defined; -Q3CString IdlSettings::_root; +QByteArray IdlSettings::_root; -Q3CString IdlSettings::_interface_decl; +QByteArray IdlSettings::_interface_decl; -Q3CString IdlSettings::_valuetype_decl; +QByteArray IdlSettings::_valuetype_decl; -Q3CString IdlSettings::_struct_decl; +QByteArray IdlSettings::_struct_decl; -Q3CString IdlSettings::_typedef_decl; +QByteArray IdlSettings::_typedef_decl; -Q3CString IdlSettings::_exception_decl; +QByteArray IdlSettings::_exception_decl; -Q3CString IdlSettings::_union_decl; +QByteArray IdlSettings::_union_decl; -Q3CString IdlSettings::_enum_decl; +QByteArray IdlSettings::_enum_decl; -Q3CString IdlSettings::_external_class_decl; +QByteArray IdlSettings::_external_class_decl; -Q3CString IdlSettings::_attr_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_attr_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_valuetype_attr_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_valuetype_attr_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_union_item_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_union_item_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_enum_item_decl; +QByteArray IdlSettings::_enum_item_decl; -Q3CString IdlSettings::_const_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_const_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_union_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_union_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_oper_decl; +QByteArray IdlSettings::_oper_decl; -Q3CString IdlSettings::_get_name; +QByteArray IdlSettings::_get_name; -Q3CString IdlSettings::_set_name; +QByteArray IdlSettings::_set_name; bool IdlSettings::_is_set_oneway; -Q3CString IdlSettings::_src_content; +QByteArray IdlSettings::_src_content; -Q3CString IdlSettings::_ext; +QByteArray IdlSettings::_ext; -Q3Dict IdlSettings::_map_includes; +QHash IdlSettings::_map_includes; void IdlSettings::read_() { _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -677,13 +677,13 @@ void IdlSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/GlobalChange/IdlSettings.h b/genplugouts/GlobalChange/IdlSettings.h index d28a0bf7a..86e0b1473 100644 --- a/genplugouts/GlobalChange/IdlSettings.h +++ b/genplugouts/GlobalChange/IdlSettings.h @@ -4,9 +4,9 @@ #ifdef WITHIDL -#include + #include "UmlSettings.h" -#include + // This class manages settings concerning IDL, configured through // the 'Generation settings' dialog. @@ -31,244 +31,244 @@ class IdlSettings : public UmlSettings // returns the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the IDL type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString relationAttributeUmlStereotype(Q3CString s); + static QByteArray relationAttributeUmlStereotype(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the files produced by the Idl code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the files produced by the Idl code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of a valuetype - static const Q3CString & valuetypeDecl(); + static const QByteArray & valuetypeDecl(); // set the default definition of a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeDecl(Q3CString v); + static bool set_ValuetypeDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an exception - static const Q3CString & exceptionDecl(); + static const QByteArray & exceptionDecl(); // set the default definition of an exception // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExceptionDecl(Q3CString v); + static bool set_ExceptionDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an attribute // placed in a valuetype depending on the multiplicity - static const Q3CString & valuetypeAttributeDecl(const char * multiplicity); + static const QByteArray & valuetypeAttributeDecl(const char * multiplicity); // set the default definition of an attribute // placed in a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeAttributeDecl(const char * multiplicity, Q3CString v); + static bool set_ValuetypeAttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an union item depending on the multiplicity - static const Q3CString & unionItemDecl(const char * multiplicity); + static const QByteArray & unionItemDecl(const char * multiplicity); // set the default definition of an union item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionItemDecl(const char * multiplicity, Q3CString v); + static bool set_UnionItemDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a constant attribute depending on the multiplicity - static const Q3CString & constDecl(const char * multiplicity); + static const QByteArray & constDecl(const char * multiplicity); // set the default definition of a constant attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ConstDecl(const char * multiplicity, Q3CString v); + static bool set_ConstDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in a valuetype // depending on the multiplicity given in argument. - static const Q3CString & valuetypeRelationDecl(const char * multiplicity); + static const QByteArray & valuetypeRelationDecl(const char * multiplicity); // set the default definition of a relation in a valuetype // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v); + static bool set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in an union // depending on the multiplicity given in argument. - static const Q3CString & unionRelationDecl(const char * multiplicity); + static const QByteArray & unionRelationDecl(const char * multiplicity); // set the default definition of a relation in an union // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionRelationDecl(const char * multiplicity, Q3CString v); + static bool set_UnionRelationDecl(const char * multiplicity, QByteArray v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is oneway by default @@ -287,53 +287,53 @@ class IdlSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _valuetype_decl; + static QByteArray _valuetype_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _exception_decl; + static QByteArray _exception_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _valuetype_attr_decl[3/*multiplicity*/]; + static QByteArray _valuetype_attr_decl[3/*multiplicity*/]; - static Q3CString _union_item_decl[3/*multiplicity*/]; + static QByteArray _union_item_decl[3/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _const_decl[3/*multiplicity*/]; + static QByteArray _const_decl[3/*multiplicity*/]; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _valuetype_rel_decl[3/*multiplicity*/]; + static QByteArray _valuetype_rel_decl[3/*multiplicity*/]; - static Q3CString _union_rel_decl[3/*multiplicity*/]; + static QByteArray _union_rel_decl[3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _get_name; + static QByteArray _get_name; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_oneway; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/GlobalChange/JavaSettings.cpp b/genplugouts/GlobalChange/JavaSettings.cpp index e95f2d595..f7f1985f8 100644 --- a/genplugouts/GlobalChange/JavaSettings.cpp +++ b/genplugouts/GlobalChange/JavaSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool JavaSettings::useDefaults() { UmlCom::send_cmd(javaSettingsCmd, getJavaUseDefaultsCmd); @@ -22,22 +22,22 @@ bool JavaSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString JavaSettings::type(const Q3CString & s) +QByteArray JavaSettings::type(const QByteArray & s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_Type(Q3CString s, Q3CString v) +bool JavaSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaTypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -50,29 +50,29 @@ bool JavaSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::umlType(const Q3CString & s) +QByteArray JavaSettings::umlType(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::java); } -Q3CString JavaSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray JavaSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -85,29 +85,29 @@ bool JavaSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::relationAttributeUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::relationAttributeUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::classStereotype(const Q3CString & s) +QByteArray JavaSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaClassStereotypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -120,32 +120,32 @@ bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::classUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::get_import(const Q3CString & s) +QByteArray JavaSettings::get_import(const QByteArray & s) { read_if_needed_(); - Q3CString * r = _map_imports[s]; + QByteArray * r = _map_imports[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool JavaSettings::set_Import(Q3CString s, Q3CString v) +bool JavaSettings::set_Import(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaImportCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - Q3CString * r = _map_imports.take(s); + QByteArray * r = _map_imports.take(s); if (!v.isEmpty()) - _map_imports.insert(s, new Q3CString(v)); + _map_imports.insert(s, new QByteArray(v)); if (r) delete r; @@ -156,14 +156,14 @@ bool JavaSettings::set_Import(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::rootDir() +const QByteArray & JavaSettings::rootDir() { read_if_needed_(); return _root; } -bool JavaSettings::set_RootDir(Q3CString v) +bool JavaSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaRootdirCmd, (const char *)v); //[jasa] handle ambiguous call @@ -175,14 +175,14 @@ bool JavaSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceContent() +const QByteArray & JavaSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool JavaSettings::set_SourceContent(Q3CString v) +bool JavaSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceContentCmd, (const char *)v); //[jasa] handle ambiguous call @@ -194,14 +194,14 @@ bool JavaSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceExtension() +const QByteArray & JavaSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool JavaSettings::set_SourceExtension(Q3CString v) +bool JavaSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceExtensionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -251,14 +251,14 @@ bool JavaSettings::set_IsForcePackagePrefixGeneration(bool v) return FALSE; } -const Q3CString & JavaSettings::classDecl() +const QByteArray & JavaSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool JavaSettings::set_ClassDecl(Q3CString v) +bool JavaSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -270,14 +270,14 @@ bool JavaSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::externalClassDecl() +const QByteArray & JavaSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool JavaSettings::set_ExternalClassDecl(Q3CString v) +bool JavaSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaExternalClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -289,14 +289,14 @@ bool JavaSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternDecl() +const QByteArray & JavaSettings::enumPatternDecl() { read_if_needed_(); return _enum_pattern_decl; } -bool JavaSettings::set_EnumPatternDecl(Q3CString v) +bool JavaSettings::set_EnumPatternDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -308,14 +308,14 @@ bool JavaSettings::set_EnumPatternDecl(Q3CString v) return FALSE; } -Q3CString JavaSettings::enumDecl() +QByteArray JavaSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool JavaSettings::set_EnumDecl(Q3CString v) +bool JavaSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -327,14 +327,14 @@ bool JavaSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::interfaceDecl() +const QByteArray & JavaSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool JavaSettings::set_InterfaceDecl(Q3CString v) +bool JavaSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaInterfaceDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -346,14 +346,14 @@ bool JavaSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::attributeDecl(const char * multiplicity) +const QByteArray & JavaSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool JavaSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool JavaSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaAttributeDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -366,14 +366,14 @@ bool JavaSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternItemDecl() +const QByteArray & JavaSettings::enumPatternItemDecl() { read_if_needed_(); return _enum_pattern_item_decl; } -bool JavaSettings::set_EnumPatternItemDecl(Q3CString v) +bool JavaSettings::set_EnumPatternItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternItemDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -385,14 +385,14 @@ bool JavaSettings::set_EnumPatternItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternItemCase() +const QByteArray & JavaSettings::enumPatternItemCase() { read_if_needed_(); return _enum_pattern_item_case; } -bool JavaSettings::set_EnumPatternItemCase(Q3CString v) +bool JavaSettings::set_EnumPatternItemCase(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternItemCaseCmd, (const char *)v); //[jasa] handle ambiguous call @@ -404,14 +404,14 @@ bool JavaSettings::set_EnumPatternItemCase(Q3CString v) return FALSE; } -Q3CString JavaSettings::enumItemDecl() +QByteArray JavaSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool JavaSettings::set_EnumItemDecl(Q3CString v) +bool JavaSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumItemDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -423,14 +423,14 @@ bool JavaSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::relationDecl(const char * multiplicity) +const QByteArray & JavaSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool JavaSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaRelationDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -443,14 +443,14 @@ bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::operationDef() +const QByteArray & JavaSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool JavaSettings::set_OperationDef(Q3CString v) +bool JavaSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaOperationDefCmd, (const char *)v); //[jasa] handle ambiguous call @@ -481,14 +481,14 @@ bool JavaSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & JavaSettings::getName() +const QByteArray & JavaSettings::getName() { read_if_needed_(); return _get_name; } -bool JavaSettings::set_GetName(Q3CString v) +bool JavaSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaGetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -500,14 +500,14 @@ bool JavaSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::setName() +const QByteArray & JavaSettings::setName() { read_if_needed_(); return _set_name; } -bool JavaSettings::set_SetName(Q3CString v) +bool JavaSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -597,60 +597,60 @@ bool JavaSettings::set_IsSetParamFinal(bool v) bool JavaSettings::_defined; -Q3CString JavaSettings::_root; +QByteArray JavaSettings::_root; -Q3CString JavaSettings::_class_decl; +QByteArray JavaSettings::_class_decl; -Q3CString JavaSettings::_external_class_decl; +QByteArray JavaSettings::_external_class_decl; -Q3CString JavaSettings::_enum_pattern_decl; +QByteArray JavaSettings::_enum_pattern_decl; -Q3CString JavaSettings::_enum_decl; +QByteArray JavaSettings::_enum_decl; -Q3CString JavaSettings::_interface_decl; +QByteArray JavaSettings::_interface_decl; -Q3CString JavaSettings::_attr_decl[3/*multiplicity*/]; +QByteArray JavaSettings::_attr_decl[3/*multiplicity*/]; -Q3CString JavaSettings::_enum_pattern_item_decl; +QByteArray JavaSettings::_enum_pattern_item_decl; -Q3CString JavaSettings::_enum_pattern_item_case; +QByteArray JavaSettings::_enum_pattern_item_case; -Q3CString JavaSettings::_enum_item_decl; +QByteArray JavaSettings::_enum_item_decl; -Q3CString JavaSettings::_rel_decl[3/*multiplicity*/]; +QByteArray JavaSettings::_rel_decl[3/*multiplicity*/]; -Q3CString JavaSettings::_oper_def; +QByteArray JavaSettings::_oper_def; aVisibility JavaSettings::_get_visibility; -Q3CString JavaSettings::_get_name; +QByteArray JavaSettings::_get_name; bool JavaSettings::_is_get_final; aVisibility JavaSettings::_set_visibility; -Q3CString JavaSettings::_set_name; +QByteArray JavaSettings::_set_name; bool JavaSettings::_is_set_final; bool JavaSettings::_is_set_param_final; -Q3CString JavaSettings::_src_content; +QByteArray JavaSettings::_src_content; -Q3CString JavaSettings::_ext; +QByteArray JavaSettings::_ext; bool JavaSettings::_is_generate_javadoc_comment; bool JavaSettings::_is_force_package_gen; -Q3Dict JavaSettings::_map_imports; +QHash JavaSettings::_map_imports; void JavaSettings::read_() { _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -672,13 +672,13 @@ void JavaSettings::read_() _map_imports.clear(); if (n > _map_imports.size()) - _map_imports.resize(n); + _map_imports.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_imports.insert(t, new Q3CString(i)); + _map_imports.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/GlobalChange/JavaSettings.h b/genplugouts/GlobalChange/JavaSettings.h index 2c0fc5e18..12192156a 100644 --- a/genplugouts/GlobalChange/JavaSettings.h +++ b/genplugouts/GlobalChange/JavaSettings.h @@ -4,10 +4,10 @@ #ifdef WITHJAVA -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning JAVA, configured through // the 'Generation settings' dialog. @@ -31,80 +31,80 @@ class JavaSettings : public UmlSettings // returns the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(const Q3CString & s); + static QByteArray type(const QByteArray & s); // set the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the JAVA type given in argument - static Q3CString umlType(const Q3CString & s); + static QByteArray umlType(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString relationAttributeUmlStereotype(const Q3CString & s); + static QByteArray relationAttributeUmlStereotype(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); //returns the import or other form specified in the last //'Generation settings' tab for the Java type given in argument. - static Q3CString get_import(const Q3CString & s); + static QByteArray get_import(const QByteArray & s); // set the import or other form specified in the last // 'Generation settings' tab for the Java type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Import(Q3CString s, Q3CString v); + static bool set_Import(QByteArray s, QByteArray v); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the JAVA code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the JAVA code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // return if generate Javadoc style comment static bool isGenerateJavadocStyleComment(); @@ -126,100 +126,100 @@ class JavaSettings : public UmlSettings static bool set_IsForcePackagePrefixGeneration(bool v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration implemented // through an abstract class having constant attributes - static const Q3CString & enumPatternDecl(); + static const QByteArray & enumPatternDecl(); // set the default definition of an enumeration implemented // through an abstract class having constant attributes // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternDecl(Q3CString v); + static bool set_EnumPatternDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumPatternItemDecl(); + static const QByteArray & enumPatternItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternItemDecl(Q3CString v); + static bool set_EnumPatternItemDecl(QByteArray v); //Returns the 'case' form produced in the fromInt operation //for each enumeration item - static const Q3CString & enumPatternItemCase(); + static const QByteArray & enumPatternItemCase(); // set the 'case' form produced in the fromInt operation // for each enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternItemCase(Q3CString v); + static bool set_EnumPatternItemCase(QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default visibility of a 'get' operation generated // through the attribute and relation 'add get operation' @@ -233,23 +233,23 @@ class JavaSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // return if a 'get' operation generated through the attribute // and relation 'add get operation' menu is final by default @@ -298,53 +298,53 @@ class JavaSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_pattern_decl; + static QByteArray _enum_pattern_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _enum_pattern_item_decl; + static QByteArray _enum_pattern_item_decl; - static Q3CString _enum_pattern_item_case; + static QByteArray _enum_pattern_item_case; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _oper_def; + static QByteArray _oper_def; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_final; static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_final; static bool _is_set_param_final; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; static bool _is_generate_javadoc_comment; static bool _is_force_package_gen; - static Q3Dict _map_imports; + static QHash _map_imports; protected: diff --git a/genplugouts/GlobalChange/PhpSettings.cpp b/genplugouts/GlobalChange/PhpSettings.cpp index 2d453b551..6fd1b65ef 100644 --- a/genplugouts/GlobalChange/PhpSettings.cpp +++ b/genplugouts/GlobalChange/PhpSettings.cpp @@ -8,7 +8,7 @@ #include "Tools/ApiCmd.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include #ifdef WITHJAVA #include "JavaSettings.h" #endif @@ -24,22 +24,22 @@ bool PhpSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString PhpSettings::classStereotype(const Q3CString & s) +QByteArray PhpSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->php : s; } -bool PhpSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool PhpSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(phpSettingsCmd, setPhpClassStereotypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -52,21 +52,21 @@ bool PhpSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PhpSettings::classUmlStereotype(const Q3CString & s) +QByteArray PhpSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::php); } -const Q3CString & PhpSettings::rootDir() +const QByteArray & PhpSettings::rootDir() { read_if_needed_(); return _root; } -bool PhpSettings::set_RootDir(Q3CString v) +bool PhpSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpRootdirCmd, (const char *)v); //[jasa] handle ambiguous call @@ -78,14 +78,14 @@ bool PhpSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::sourceContent() +const QByteArray & PhpSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool PhpSettings::set_SourceContent(Q3CString v) +bool PhpSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSourceContentCmd, (const char *)v); //[jasa] handle ambiguous call @@ -97,14 +97,14 @@ bool PhpSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::sourceExtension() +const QByteArray & PhpSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool PhpSettings::set_SourceExtension(Q3CString v) +bool PhpSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSourceExtensionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -135,14 +135,14 @@ bool PhpSettings::set_IsGenerateJavadocStyleComment(bool v) return FALSE; } -const Q3CString & PhpSettings::classDecl() +const QByteArray & PhpSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool PhpSettings::set_ClassDecl(Q3CString v) +bool PhpSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -154,14 +154,14 @@ bool PhpSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::externalClassDecl() +const QByteArray & PhpSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool PhpSettings::set_ExternalClassDecl(Q3CString v) +bool PhpSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpExternalClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -173,14 +173,14 @@ bool PhpSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -Q3CString PhpSettings::enumDecl() +QByteArray PhpSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool PhpSettings::set_EnumDecl(Q3CString v) +bool PhpSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpEnumDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -192,14 +192,14 @@ bool PhpSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::interfaceDecl() +const QByteArray & PhpSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool PhpSettings::set_InterfaceDecl(Q3CString v) +bool PhpSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpInterfaceDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -211,14 +211,14 @@ bool PhpSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::attributeDecl() +const QByteArray & PhpSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool PhpSettings::set_AttributeDecl(Q3CString v) +bool PhpSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpAttributeDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -230,14 +230,14 @@ bool PhpSettings::set_AttributeDecl(Q3CString v) return FALSE; } -Q3CString PhpSettings::enumItemDecl() +QByteArray PhpSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool PhpSettings::set_EnumItemDecl(Q3CString v) +bool PhpSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpEnumItemDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -249,14 +249,14 @@ bool PhpSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::relationDecl() +const QByteArray & PhpSettings::relationDecl() { read_if_needed_(); return _rel_decl; } -bool PhpSettings::set_RelationDecl(Q3CString v) +bool PhpSettings::set_RelationDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpRelationDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -268,14 +268,14 @@ bool PhpSettings::set_RelationDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::operationDef() +const QByteArray & PhpSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool PhpSettings::set_OperationDef(Q3CString v) +bool PhpSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpOperationDefCmd, (const char *)v); //[jasa] handle ambiguous call @@ -315,14 +315,14 @@ bool PhpSettings::set_GetVisibility(aVisibility v) #endif } -const Q3CString & PhpSettings::getName() +const QByteArray & PhpSettings::getName() { read_if_needed_(); return _get_name; } -bool PhpSettings::set_GetName(Q3CString v) +bool PhpSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpGetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -334,14 +334,14 @@ bool PhpSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::setName() +const QByteArray & PhpSettings::setName() { read_if_needed_(); return _set_name; } -bool PhpSettings::set_SetName(Q3CString v) +bool PhpSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -421,29 +421,29 @@ bool PhpSettings::set_SetVisibility(aVisibility v) bool PhpSettings::_defined; -Q3CString PhpSettings::_root; +QByteArray PhpSettings::_root; -Q3CString PhpSettings::_class_decl; +QByteArray PhpSettings::_class_decl; -Q3CString PhpSettings::_external_class_decl; +QByteArray PhpSettings::_external_class_decl; -Q3CString PhpSettings::_enum_decl; +QByteArray PhpSettings::_enum_decl; -Q3CString PhpSettings::_interface_decl; +QByteArray PhpSettings::_interface_decl; -Q3CString PhpSettings::_attr_decl; +QByteArray PhpSettings::_attr_decl; -Q3CString PhpSettings::_enum_item_decl; +QByteArray PhpSettings::_enum_item_decl; -Q3CString PhpSettings::_rel_decl; +QByteArray PhpSettings::_rel_decl; -Q3CString PhpSettings::_oper_def; +QByteArray PhpSettings::_oper_def; #ifndef WITHJAVA aVisibility PhpSettings::_get_visibility; #endif -Q3CString PhpSettings::_get_name; +QByteArray PhpSettings::_get_name; bool PhpSettings::_is_get_final; @@ -451,15 +451,29 @@ bool PhpSettings::_is_get_final; aVisibility PhpSettings::_set_visibility; #endif -Q3CString PhpSettings::_set_name; +QByteArray PhpSettings::_set_name; bool PhpSettings::_is_set_final; -Q3CString PhpSettings::_src_content; +QByteArray PhpSettings::_src_content; -Q3CString PhpSettings::_ext; +QByteArray PhpSettings::_ext; +QByteArray PhpSettings::_dir_regexp; + +bool PhpSettings::_dir_regexp_case_sensitive; + +QByteArray PhpSettings::_file_regexp; + +bool PhpSettings::_file_regexp_case_sensitive; bool PhpSettings::_is_generate_javadoc_comment; +bool PhpSettings::_req_with_path; + +bool PhpSettings::_is_relative_path; + +bool PhpSettings::_is_root_relative_path; + +bool PhpSettings::_is_force_namespace_gen; void PhpSettings::read_() { @@ -485,18 +499,31 @@ void PhpSettings::read_() _rel_decl = UmlCom::read_string(); _oper_def = UmlCom::read_string(); #ifndef WITHJAVA - _get_visibility = + _get_visibility = (aVisibility) UmlCom::read_char(); +#else + UmlCom::read_char(); #endif - (aVisibility) UmlCom::read_char(); _get_name = UmlCom::read_string(); _is_get_final = UmlCom::read_bool(); #ifndef WITHJAVA - _set_visibility = + _set_visibility = (aVisibility) UmlCom::read_char(); +#else + UmlCom::read_char(); #endif - (aVisibility) UmlCom::read_char(); _set_name = UmlCom::read_string(); _is_set_final = UmlCom::read_bool(); _is_generate_javadoc_comment = UmlCom::read_bool(); + _req_with_path = UmlCom::read_bool(); + _is_relative_path = UmlCom::read_bool(); + _is_root_relative_path = UmlCom::read_bool(); + + _dir_regexp = UmlCom::read_string(); + _dir_regexp_case_sensitive = UmlCom::read_bool(); + + _file_regexp = UmlCom::read_string(); + _file_regexp_case_sensitive = UmlCom::read_bool(); + + _is_force_namespace_gen = UmlCom::read_bool(); } void PhpSettings::read_if_needed_() diff --git a/genplugouts/GlobalChange/PhpSettings.h b/genplugouts/GlobalChange/PhpSettings.h index 2f83561bc..17775cb79 100644 --- a/genplugouts/GlobalChange/PhpSettings.h +++ b/genplugouts/GlobalChange/PhpSettings.h @@ -4,7 +4,7 @@ #ifdef WITHPHP -#include + #include "aVisibility.h" #include "UmlSettings.h" @@ -29,41 +29,41 @@ class PhpSettings : public UmlSettings // returns the PHP stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the PHP stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the PHP one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the PHP code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the PHP code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // return if generate Javadoc style comment static bool isGenerateJavadocStyleComment(); @@ -74,68 +74,68 @@ class PhpSettings : public UmlSettings static bool set_IsGenerateJavadocStyleComment(bool v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of an relation - static const Q3CString & relationDecl(); + static const QByteArray & relationDecl(); // set the default definition of an relation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(Q3CString v); + static bool set_RelationDecl(QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default visibility of a 'get' operation generated // through the attribute and relation 'add get operation' @@ -153,23 +153,23 @@ class PhpSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // return if a 'get' operation generated through the attribute // and relation 'add get operation' menu is final by default @@ -212,29 +212,29 @@ class PhpSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl; + static QByteArray _rel_decl; - static Q3CString _oper_def; + static QByteArray _oper_def; #ifndef WITHJAVA static aVisibility _get_visibility; #endif - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_final; @@ -242,15 +242,29 @@ class PhpSettings : public UmlSettings static aVisibility _set_visibility; #endif - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_final; - static Q3CString _src_content; + static QByteArray _src_content; + + static QByteArray _ext; + + static QByteArray _dir_regexp; + + static bool _dir_regexp_case_sensitive; - static Q3CString _ext; + static QByteArray _file_regexp; + static bool _file_regexp_case_sensitive; static bool _is_generate_javadoc_comment; + static bool _req_with_path; + + static bool _is_relative_path; + + static bool _is_root_relative_path; + + static bool _is_force_namespace_gen; protected: diff --git a/genplugouts/GlobalChange/PythonSettings.cpp b/genplugouts/GlobalChange/PythonSettings.cpp index f14fabfd5..77558457d 100644 --- a/genplugouts/GlobalChange/PythonSettings.cpp +++ b/genplugouts/GlobalChange/PythonSettings.cpp @@ -7,7 +7,7 @@ #include "Tools/ApiCmd.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool PythonSettings::isPython_2_2() { read_if_needed_(); @@ -26,7 +26,7 @@ bool PythonSettings::set_IsPython_2_2(bool y) return FALSE; } -const Q3CString & PythonSettings::indentStep() +const QByteArray & PythonSettings::indentStep() { read_if_needed_(); return _indent_step; @@ -56,22 +56,22 @@ bool PythonSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString PythonSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray PythonSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->python : s; } -bool PythonSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool PythonSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -84,29 +84,29 @@ bool PythonSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PythonSettings::relationAttributeUmlStereotype(const Q3CString & s) +QByteArray PythonSettings::relationAttributeUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::python); } -Q3CString PythonSettings::classStereotype(const Q3CString & s) +QByteArray PythonSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->python : s; } -bool PythonSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool PythonSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonClassStereotypeCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -119,32 +119,32 @@ bool PythonSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PythonSettings::classUmlStereotype(const Q3CString & s) +QByteArray PythonSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::python); } -Q3CString PythonSettings::get_import(const Q3CString & s) +QByteArray PythonSettings::get_import(const QByteArray & s) { read_if_needed_(); - Q3CString * r = _map_imports[s]; + QByteArray * r = _map_imports[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool PythonSettings::set_Import(Q3CString s, Q3CString v) +bool PythonSettings::set_Import(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonImportCmd, (const char *)s, (const char *)v); //[jasa] handle ambiguous call if (UmlCom::read_bool()) { - Q3CString * r = _map_imports.take(s); + QByteArray * r = _map_imports.take(s); if (!v.isEmpty()) - _map_imports.insert(s, new Q3CString(v)); + _map_imports.insert(s, new QByteArray(v)); if (r) delete r; @@ -155,14 +155,14 @@ bool PythonSettings::set_Import(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & PythonSettings::rootDir() +const QByteArray & PythonSettings::rootDir() { read_if_needed_(); return _root; } -bool PythonSettings::set_RootDir(Q3CString v) +bool PythonSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonRootdirCmd, (const char *)v); //[jasa] handle ambiguous call @@ -174,14 +174,14 @@ bool PythonSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::sourceContent() +const QByteArray & PythonSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool PythonSettings::set_SourceContent(Q3CString v) +bool PythonSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSourceContentCmd, (const char *)v); //[jasa] handle ambiguous call @@ -193,14 +193,14 @@ bool PythonSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::sourceExtension() +const QByteArray & PythonSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool PythonSettings::set_SourceExtension(Q3CString v) +bool PythonSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSourceExtensionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -212,14 +212,14 @@ bool PythonSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::classDecl() +const QByteArray & PythonSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool PythonSettings::set_ClassDecl(Q3CString v) +bool PythonSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -231,14 +231,14 @@ bool PythonSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::externalClassDecl() +const QByteArray & PythonSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool PythonSettings::set_ExternalClassDecl(Q3CString v) +bool PythonSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonExternalClassDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -250,14 +250,14 @@ bool PythonSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -Q3CString PythonSettings::enumDecl() +QByteArray PythonSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool PythonSettings::set_EnumDecl(Q3CString v) +bool PythonSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonEnumDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -269,14 +269,14 @@ bool PythonSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::attributeDecl(const char * multiplicity) +const QByteArray & PythonSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[mult_column(multiplicity)]; } -bool PythonSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool PythonSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonAttributeDeclCmd, multiplicity, (const char *)v); //[jasa] handle ambiguous call @@ -289,14 +289,14 @@ bool PythonSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -Q3CString PythonSettings::enumItemDecl() +QByteArray PythonSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool PythonSettings::set_EnumItemDecl(Q3CString v) +bool PythonSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonEnumItemDeclCmd, (const char *)v); //[jasa] handle ambiguous call @@ -308,7 +308,7 @@ bool PythonSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::relationDecl(bool by_value, const char * multiplicity) +const QByteArray & PythonSettings::relationDecl(bool by_value, const char * multiplicity) { read_if_needed_(); @@ -328,14 +328,14 @@ bool PythonSettings::set_RelationDecl(bool by_value, const char * multiplicity, return FALSE; } -const Q3CString & PythonSettings::operationDef() +const QByteArray & PythonSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool PythonSettings::set_OperationDef(Q3CString v) +bool PythonSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonOperationDefCmd, (const char *)v); //[jasa] handle ambiguous call @@ -347,14 +347,14 @@ bool PythonSettings::set_OperationDef(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::getName() +const QByteArray & PythonSettings::getName() { read_if_needed_(); return _get_name; } -bool PythonSettings::set_GetName(Q3CString v) +bool PythonSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonGetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -366,14 +366,14 @@ bool PythonSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::setName() +const QByteArray & PythonSettings::setName() { read_if_needed_(); return _set_name; } -bool PythonSettings::set_SetName(Q3CString v) +bool PythonSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSetNameCmd, (const char *)v); //[jasa] handle ambiguous call @@ -385,7 +385,7 @@ bool PythonSettings::set_SetName(Q3CString v) return FALSE; } -unsigned PythonSettings::mult_column(const Q3CString & mult) +unsigned PythonSettings::mult_column(const QByteArray & mult) { return (mult.isEmpty() || (mult == "1")) ? 0 : 1; } @@ -394,33 +394,33 @@ bool PythonSettings::_defined; bool PythonSettings::_2_2; -Q3CString PythonSettings::_indent_step; +QByteArray PythonSettings::_indent_step; -Q3CString PythonSettings::_root; +QByteArray PythonSettings::_root; -Q3CString PythonSettings::_class_decl; +QByteArray PythonSettings::_class_decl; -Q3CString PythonSettings::_external_class_decl; +QByteArray PythonSettings::_external_class_decl; -Q3CString PythonSettings::_enum_decl; +QByteArray PythonSettings::_enum_decl; -Q3CString PythonSettings::_attr_decl[2/*multiplicity*/]; +QByteArray PythonSettings::_attr_decl[2/*multiplicity*/]; -Q3CString PythonSettings::_enum_item_decl; +QByteArray PythonSettings::_enum_item_decl; -Q3CString PythonSettings::_rel_decl[2/*relation kind*/][2/*multiplicity*/]; +QByteArray PythonSettings::_rel_decl[2/*relation kind*/][2/*multiplicity*/]; -Q3CString PythonSettings::_oper_def; +QByteArray PythonSettings::_oper_def; -Q3CString PythonSettings::_get_name; +QByteArray PythonSettings::_get_name; -Q3CString PythonSettings::_set_name; +QByteArray PythonSettings::_set_name; -Q3CString PythonSettings::_src_content; +QByteArray PythonSettings::_src_content; -Q3CString PythonSettings::_ext; +QByteArray PythonSettings::_ext; -Q3Dict PythonSettings::_map_imports; +QHash PythonSettings::_map_imports; void PythonSettings::read_() { @@ -430,8 +430,8 @@ void PythonSettings::read_() _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -447,13 +447,13 @@ void PythonSettings::read_() _map_imports.clear(); if (n > _map_imports.size()) - _map_imports.resize(n); + _map_imports.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_imports.insert(t, new Q3CString(i)); + _map_imports.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/GlobalChange/PythonSettings.h b/genplugouts/GlobalChange/PythonSettings.h index 5b32a95f4..a5f985577 100644 --- a/genplugouts/GlobalChange/PythonSettings.h +++ b/genplugouts/GlobalChange/PythonSettings.h @@ -4,9 +4,9 @@ #ifdef WITHPYTHON -#include + #include "UmlSettings.h" -#include + // This class manages settings concerning PYTHON, configured through // the 'Generation settings' dialog. @@ -26,7 +26,7 @@ class PythonSettings : public UmlSettings static bool set_IsPython_2_2(bool y); // return the default indent step - static const Q3CString & indentStep(); + static const QByteArray & indentStep(); // set default indent step // @@ -45,109 +45,109 @@ class PythonSettings : public UmlSettings // returns the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the PYTHON one given in argument - static Q3CString relationAttributeUmlStereotype(const Q3CString & s); + static QByteArray relationAttributeUmlStereotype(const QByteArray & s); // returns the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the PYTHON one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); //returns the import or other form specified in the last //'Generation settings' tab for the Python type given in argument. - static Q3CString get_import(const Q3CString & s); + static QByteArray get_import(const QByteArray & s); // set the import or other form specified in the last // 'Generation settings' tab for the Python type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Import(Q3CString s, Q3CString v); + static bool set_Import(QByteArray s, QByteArray v); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the PYTHON code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the PYTHON code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. - static const Q3CString & relationDecl(bool by_value, const char * multiplicity); + static const QByteArray & relationDecl(bool by_value, const char * multiplicity); // set the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. @@ -156,71 +156,71 @@ class PythonSettings : public UmlSettings static bool set_RelationDecl(bool by_value, const char * multiplicity, const char * v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); private: // never called ! PythonSettings() {}; - static unsigned mult_column(const Q3CString & mult); + static unsigned mult_column(const QByteArray & mult); static bool _defined; static bool _2_2; - static Q3CString _indent_step; + static QByteArray _indent_step; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _attr_decl[2/*multiplicity*/]; + static QByteArray _attr_decl[2/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[2/*relation kind*/][2/*multiplicity*/]; + static QByteArray _rel_decl[2/*relation kind*/][2/*multiplicity*/]; - static Q3CString _oper_def; + static QByteArray _oper_def; - static Q3CString _get_name; + static QByteArray _get_name; - static Q3CString _set_name; + static QByteArray _set_name; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_imports; + static QHash _map_imports; protected: diff --git a/genplugouts/GlobalChange/SlotAttribute.h b/genplugouts/GlobalChange/SlotAttribute.h index d1c59eabf..768d9c729 100644 --- a/genplugouts/GlobalChange/SlotAttribute.h +++ b/genplugouts/GlobalChange/SlotAttribute.h @@ -1,21 +1,21 @@ #ifndef _SLOTATTRIBUTE_H #define _SLOTATTRIBUTE_H +#include -#include class UmlAttribute; struct SlotAttribute { UmlAttribute * attribute; - Q3CString value; + QByteArray value; // because of QValueList use SlotAttribute() : attribute(0) { } - SlotAttribute(UmlAttribute * a, Q3CString v) : attribute(a), value(v) { + SlotAttribute(UmlAttribute * a, QByteArray v) : attribute(a), value(v) { } }; diff --git a/genplugouts/GlobalChange/StateBehavior.h b/genplugouts/GlobalChange/StateBehavior.h index 91a42cb82..66ac09c00 100644 --- a/genplugouts/GlobalChange/StateBehavior.h +++ b/genplugouts/GlobalChange/StateBehavior.h @@ -2,16 +2,16 @@ #define _STATEBEHAVIOR_H -#include + class StateBehavior { public: - Q3CString on_entry; + QByteArray on_entry; - Q3CString on_exit; + QByteArray on_exit; - Q3CString do_activity; + QByteArray do_activity; void read(); diff --git a/genplugouts/GlobalChange/TransitionBehavior.h b/genplugouts/GlobalChange/TransitionBehavior.h index 856ede3c0..8714c541d 100644 --- a/genplugouts/GlobalChange/TransitionBehavior.h +++ b/genplugouts/GlobalChange/TransitionBehavior.h @@ -2,16 +2,16 @@ #define _TRANSITIONBEHAVIOR_H -#include + class TransitionBehavior { public: - Q3CString trigger; + QByteArray trigger; - Q3CString guard; + QByteArray guard; - Q3CString activity; + QByteArray activity; void read(); diff --git a/genplugouts/GlobalChange/UmlAccessVariableValueAction.h b/genplugouts/GlobalChange/UmlAccessVariableValueAction.h index dc92b3e25..8d4f9ae87 100644 --- a/genplugouts/GlobalChange/UmlAccessVariableValueAction.h +++ b/genplugouts/GlobalChange/UmlAccessVariableValueAction.h @@ -3,13 +3,13 @@ #include "UmlBaseAccessVariableValueAction.h" -#include + class UmlAccessVariableValueAction : public UmlBaseAccessVariableValueAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlAccessVariableValueAction(void * id, const Q3CString & s) : UmlBaseAccessVariableValueAction(id, s) { + UmlAccessVariableValueAction(void * id, const QByteArray & s) : UmlBaseAccessVariableValueAction(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivity.h b/genplugouts/GlobalChange/UmlActivity.h index 8f9886b0e..6f8bd5244 100644 --- a/genplugouts/GlobalChange/UmlActivity.h +++ b/genplugouts/GlobalChange/UmlActivity.h @@ -3,13 +3,13 @@ #include "UmlBaseActivity.h" -#include + class UmlActivity : public UmlBaseActivity { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivity(void * id, const Q3CString & s) : UmlBaseActivity(id, s) { + UmlActivity(void * id, const QByteArray & s) : UmlBaseActivity(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityAction.h b/genplugouts/GlobalChange/UmlActivityAction.h index f359c755a..3079e18ba 100644 --- a/genplugouts/GlobalChange/UmlActivityAction.h +++ b/genplugouts/GlobalChange/UmlActivityAction.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityAction.h" -#include + class UmlActivityAction : public UmlBaseActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityAction(void * id, const Q3CString & s) : UmlBaseActivityAction(id, s) { + UmlActivityAction(void * id, const QByteArray & s) : UmlBaseActivityAction(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityActionClasses.h b/genplugouts/GlobalChange/UmlActivityActionClasses.h index 15677a746..62369cdab 100644 --- a/genplugouts/GlobalChange/UmlActivityActionClasses.h +++ b/genplugouts/GlobalChange/UmlActivityActionClasses.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityActionClasses.h" -#include + class UmlSendObjectAction : public UmlBaseSendObjectAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlSendObjectAction(void * id, const Q3CString & s) : UmlBaseSendObjectAction(id, s) { + UmlSendObjectAction(void * id, const QByteArray & s) : UmlBaseSendObjectAction(id, s) { } }; @@ -18,7 +18,7 @@ class UmlUnmarshallAction : public UmlBaseUnmarshallAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlUnmarshallAction(void * id, const Q3CString & s) : UmlBaseUnmarshallAction(id, s) { + UmlUnmarshallAction(void * id, const QByteArray & s) : UmlBaseUnmarshallAction(id, s) { } }; @@ -27,7 +27,7 @@ class UmlSendSignalAction : public UmlBaseSendSignalAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlSendSignalAction(void * id, const Q3CString & s) : UmlBaseSendSignalAction(id, s) { + UmlSendSignalAction(void * id, const QByteArray & s) : UmlBaseSendSignalAction(id, s) { } }; @@ -36,7 +36,7 @@ class UmlBroadcastSignalAction : public UmlBaseBroadcastSignalAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlBroadcastSignalAction(void * id, const Q3CString & s) : UmlBaseBroadcastSignalAction(id, s) { + UmlBroadcastSignalAction(void * id, const QByteArray & s) : UmlBaseBroadcastSignalAction(id, s) { } }; @@ -45,7 +45,7 @@ class UmlValueSpecificationAction : public UmlBaseValueSpecificationAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlValueSpecificationAction(void * id, const Q3CString & s) : UmlBaseValueSpecificationAction(id, s) { + UmlValueSpecificationAction(void * id, const QByteArray & s) : UmlBaseValueSpecificationAction(id, s) { } }; @@ -54,7 +54,7 @@ class UmlOpaqueAction : public UmlBaseOpaqueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlOpaqueAction(void * id, const Q3CString & s) : UmlBaseOpaqueAction(id, s) { + UmlOpaqueAction(void * id, const QByteArray & s) : UmlBaseOpaqueAction(id, s) { } }; @@ -63,7 +63,7 @@ class UmlAcceptEventAction : public UmlBaseAcceptEventAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlAcceptEventAction(void * id, const Q3CString & s) : UmlBaseAcceptEventAction(id, s) { + UmlAcceptEventAction(void * id, const QByteArray & s) : UmlBaseAcceptEventAction(id, s) { } }; @@ -72,7 +72,7 @@ class UmlCallOperationAction : public UmlBaseCallOperationAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlCallOperationAction(void * id, const Q3CString & s) : UmlBaseCallOperationAction(id, s) { + UmlCallOperationAction(void * id, const QByteArray & s) : UmlBaseCallOperationAction(id, s) { } }; @@ -81,7 +81,7 @@ class UmlCallBehaviorAction : public UmlBaseCallBehaviorAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlCallBehaviorAction(void * id, const Q3CString & s) : UmlBaseCallBehaviorAction(id, s) { + UmlCallBehaviorAction(void * id, const QByteArray & s) : UmlBaseCallBehaviorAction(id, s) { } }; @@ -90,7 +90,7 @@ class UmlClearVariableValueAction : public UmlBaseClearVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlClearVariableValueAction(void * id, const Q3CString & s) : UmlBaseClearVariableValueAction(id, s) { + UmlClearVariableValueAction(void * id, const QByteArray & s) : UmlBaseClearVariableValueAction(id, s) { } }; @@ -99,7 +99,7 @@ class UmlReadVariableValueAction : public UmlBaseReadVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlReadVariableValueAction(void * id, const Q3CString & s) : UmlBaseReadVariableValueAction(id, s) { + UmlReadVariableValueAction(void * id, const QByteArray & s) : UmlBaseReadVariableValueAction(id, s) { } }; @@ -108,7 +108,7 @@ class UmlWriteVariableValueAction : public UmlBaseWriteVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlWriteVariableValueAction(void * id, const Q3CString & s) : UmlBaseWriteVariableValueAction(id, s) { + UmlWriteVariableValueAction(void * id, const QByteArray & s) : UmlBaseWriteVariableValueAction(id, s) { } }; @@ -117,7 +117,7 @@ class UmlAddVariableValueAction : public UmlBaseAddVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlAddVariableValueAction(void * id, const Q3CString & s) : UmlBaseAddVariableValueAction(id, s) { + UmlAddVariableValueAction(void * id, const QByteArray & s) : UmlBaseAddVariableValueAction(id, s) { } }; @@ -126,7 +126,7 @@ class UmlRemoveVariableValueAction : public UmlBaseRemoveVariableValueAction { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlRemoveVariableValueAction(void * id, const Q3CString & s) : UmlBaseRemoveVariableValueAction(id, s) { + UmlRemoveVariableValueAction(void * id, const QByteArray & s) : UmlBaseRemoveVariableValueAction(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityControlNode.h b/genplugouts/GlobalChange/UmlActivityControlNode.h index 8ebf04bf7..1396fd3e2 100644 --- a/genplugouts/GlobalChange/UmlActivityControlNode.h +++ b/genplugouts/GlobalChange/UmlActivityControlNode.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityControlNode.h" -#include + class UmlActivityControlNode : public UmlBaseActivityControlNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityControlNode(void * id, const Q3CString & s) : UmlBaseActivityControlNode(id, s) { + UmlActivityControlNode(void * id, const QByteArray & s) : UmlBaseActivityControlNode(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityControlNodeClasses.h b/genplugouts/GlobalChange/UmlActivityControlNodeClasses.h index f698adeca..2be0cd946 100644 --- a/genplugouts/GlobalChange/UmlActivityControlNodeClasses.h +++ b/genplugouts/GlobalChange/UmlActivityControlNodeClasses.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityControlNodeClasses.h" -#include + class UmlInitialActivityNode : public UmlBaseInitialActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlInitialActivityNode(void * id, const Q3CString & s) : UmlBaseInitialActivityNode(id, s) { + UmlInitialActivityNode(void * id, const QByteArray & s) : UmlBaseInitialActivityNode(id, s) { } }; @@ -18,7 +18,7 @@ class UmlFlowFinalActivityNode : public UmlBaseFlowFinalActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlFlowFinalActivityNode(void * id, const Q3CString & s) : UmlBaseFlowFinalActivityNode(id, s) { + UmlFlowFinalActivityNode(void * id, const QByteArray & s) : UmlBaseFlowFinalActivityNode(id, s) { } }; @@ -27,7 +27,7 @@ class UmlActivityFinalActivityNode : public UmlBaseActivityFinalActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityFinalActivityNode(void * id, const Q3CString & s) : UmlBaseActivityFinalActivityNode(id, s) { + UmlActivityFinalActivityNode(void * id, const QByteArray & s) : UmlBaseActivityFinalActivityNode(id, s) { } }; @@ -36,7 +36,7 @@ class UmlDecisionActivityNode : public UmlBaseDecisionActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlDecisionActivityNode(void * id, const Q3CString & s) : UmlBaseDecisionActivityNode(id, s) { + UmlDecisionActivityNode(void * id, const QByteArray & s) : UmlBaseDecisionActivityNode(id, s) { } }; @@ -45,7 +45,7 @@ class UmlMergeActivityNode : public UmlBaseMergeActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlMergeActivityNode(void * id, const Q3CString & s) : UmlBaseMergeActivityNode(id, s) { + UmlMergeActivityNode(void * id, const QByteArray & s) : UmlBaseMergeActivityNode(id, s) { } }; @@ -54,7 +54,7 @@ class UmlForkActivityNode : public UmlBaseForkActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlForkActivityNode(void * id, const Q3CString & s) : UmlBaseForkActivityNode(id, s) { + UmlForkActivityNode(void * id, const QByteArray & s) : UmlBaseForkActivityNode(id, s) { } }; @@ -63,7 +63,7 @@ class UmlJoinActivityNode : public UmlBaseJoinActivityNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlJoinActivityNode(void * id, const Q3CString & s) : UmlBaseJoinActivityNode(id, s) { + UmlJoinActivityNode(void * id, const QByteArray & s) : UmlBaseJoinActivityNode(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityDiagram.h b/genplugouts/GlobalChange/UmlActivityDiagram.h index 4b48b12f2..b45a0410a 100644 --- a/genplugouts/GlobalChange/UmlActivityDiagram.h +++ b/genplugouts/GlobalChange/UmlActivityDiagram.h @@ -4,7 +4,7 @@ #include "UmlBaseActivityDiagram.h" #include "UmlActivityItem.h" -#include + // This class manages 'activity diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -15,7 +15,7 @@ class UmlActivityDiagram : public UmlBaseActivityDiagram, public UmlActivityItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityDiagram(void * id, const Q3CString & s) : UmlBaseActivityDiagram(id, s) { + UmlActivityDiagram(void * id, const QByteArray & s) : UmlBaseActivityDiagram(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityNode.h b/genplugouts/GlobalChange/UmlActivityNode.h index 8429d2396..770c06359 100644 --- a/genplugouts/GlobalChange/UmlActivityNode.h +++ b/genplugouts/GlobalChange/UmlActivityNode.h @@ -4,13 +4,13 @@ #include "UmlBaseActivityNode.h" #include "UmlActivityItem.h" -#include + class UmlActivityNode : public UmlBaseActivityNode, public UmlActivityItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityNode(void * id, const Q3CString & s) : UmlBaseActivityNode(id, s) { + UmlActivityNode(void * id, const QByteArray & s) : UmlBaseActivityNode(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityObject.h b/genplugouts/GlobalChange/UmlActivityObject.h index f75bccd9b..22de36492 100644 --- a/genplugouts/GlobalChange/UmlActivityObject.h +++ b/genplugouts/GlobalChange/UmlActivityObject.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityObject.h" -#include + class UmlActivityObject : public UmlBaseActivityObject { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityObject(void * id, const Q3CString & s) : UmlBaseActivityObject(id, s) { + UmlActivityObject(void * id, const QByteArray & s) : UmlBaseActivityObject(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityParameter.h b/genplugouts/GlobalChange/UmlActivityParameter.h index b51b0fec0..57474b452 100644 --- a/genplugouts/GlobalChange/UmlActivityParameter.h +++ b/genplugouts/GlobalChange/UmlActivityParameter.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityParameter.h" -#include + class UmlActivityParameter : public UmlBaseActivityParameter { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityParameter(void * id, const Q3CString & s) : UmlBaseActivityParameter(id, s) { + UmlActivityParameter(void * id, const QByteArray & s) : UmlBaseActivityParameter(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityPin.h b/genplugouts/GlobalChange/UmlActivityPin.h index 5d7ae2e0f..a53330fe2 100644 --- a/genplugouts/GlobalChange/UmlActivityPin.h +++ b/genplugouts/GlobalChange/UmlActivityPin.h @@ -3,13 +3,13 @@ #include "UmlBaseActivityPin.h" -#include + class UmlActivityPin : public UmlBaseActivityPin { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityPin(void * id, const Q3CString & s) : UmlBaseActivityPin(id, s) { + UmlActivityPin(void * id, const QByteArray & s) : UmlBaseActivityPin(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlActivityRegion.h b/genplugouts/GlobalChange/UmlActivityRegion.h index 420b4bde2..1db9fe05f 100644 --- a/genplugouts/GlobalChange/UmlActivityRegion.h +++ b/genplugouts/GlobalChange/UmlActivityRegion.h @@ -4,13 +4,13 @@ #include "UmlBaseActivityRegion.h" #include "UmlActivityItem.h" -#include + class UmlActivityRegion : public UmlBaseActivityRegion, public UmlActivityItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityRegion(void * id, const Q3CString & s) : UmlBaseActivityRegion(id, s) { + UmlActivityRegion(void * id, const QByteArray & s) : UmlBaseActivityRegion(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlArtifact.cpp b/genplugouts/GlobalChange/UmlArtifact.cpp index c95c5289c..c3aadc72a 100644 --- a/genplugouts/GlobalChange/UmlArtifact.cpp +++ b/genplugouts/GlobalChange/UmlArtifact.cpp @@ -2,20 +2,20 @@ #include "UmlArtifact.h" #include "Context.h" //Added by qt3to4: -#include +#include void UmlArtifact::change(Context & ctx) { if (ctx.onArtifact() && ctx.match_stereotype(stereotype())) { if (ctx.cpp()) { - const Q3CString & h = cppHeader(); + const QByteArray & h = cppHeader(); if (!h.isEmpty() && ctx.match(h)) { if (!set_CppHeader(ctx.replace(h))) ctx.err(); } - const Q3CString & c = cppSource(); + const QByteArray & c = cppSource(); if (!h.isEmpty() && ctx.match(c)) { if (!set_CppSource(ctx.replace(c))) @@ -24,7 +24,7 @@ void UmlArtifact::change(Context & ctx) } if (ctx.java()) { - const Q3CString & c = javaSource(); + const QByteArray & c = javaSource(); if (!c.isEmpty() && ctx.match(c)) { if (!set_JavaSource(ctx.replace(c))) @@ -33,7 +33,7 @@ void UmlArtifact::change(Context & ctx) } if (ctx.php()) { - const Q3CString & c = phpSource(); + const QByteArray & c = phpSource(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PhpSource(ctx.replace(c))) @@ -42,7 +42,7 @@ void UmlArtifact::change(Context & ctx) } if (ctx.python()) { - const Q3CString & c = pythonSource(); + const QByteArray & c = pythonSource(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PythonSource(ctx.replace(c))) @@ -51,7 +51,7 @@ void UmlArtifact::change(Context & ctx) } if (ctx.idl()) { - const Q3CString & c = idlSource(); + const QByteArray & c = idlSource(); if (!c.isEmpty() && ctx.match(c)) { if (!set_IdlSource(ctx.replace(c))) diff --git a/genplugouts/GlobalChange/UmlArtifact.h b/genplugouts/GlobalChange/UmlArtifact.h index 4b6cd6555..4417b415d 100644 --- a/genplugouts/GlobalChange/UmlArtifact.h +++ b/genplugouts/GlobalChange/UmlArtifact.h @@ -3,7 +3,7 @@ #include "UmlBaseArtifact.h" -#include + class Context; @@ -13,7 +13,7 @@ class Context; class UmlArtifact : public UmlBaseArtifact { public: - UmlArtifact(void * id, const Q3CString & n) : UmlBaseArtifact(id, n) {}; + UmlArtifact(void * id, const QByteArray & n) : UmlBaseArtifact(id, n) {}; virtual void change(Context & ctx); diff --git a/genplugouts/GlobalChange/UmlAttribute.cpp b/genplugouts/GlobalChange/UmlAttribute.cpp index 37515e0c0..fa4ad411c 100644 --- a/genplugouts/GlobalChange/UmlAttribute.cpp +++ b/genplugouts/GlobalChange/UmlAttribute.cpp @@ -2,13 +2,13 @@ #include "UmlAttribute.h" #include "Context.h" //Added by qt3to4: -#include +#include void UmlAttribute::change(Context & ctx) { if (ctx.onAttribute() && ctx.match_stereotype(stereotype())) { if (ctx.cpp()) { - const Q3CString & c = cppDecl(); + const QByteArray & c = cppDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_CppDecl(ctx.replace(c))) @@ -17,7 +17,7 @@ void UmlAttribute::change(Context & ctx) } if (ctx.java()) { - const Q3CString & c = javaDecl(); + const QByteArray & c = javaDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_JavaDecl(ctx.replace(c))) @@ -26,7 +26,7 @@ void UmlAttribute::change(Context & ctx) } if (ctx.php()) { - const Q3CString & c = phpDecl(); + const QByteArray & c = phpDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PhpDecl(ctx.replace(c))) @@ -35,7 +35,7 @@ void UmlAttribute::change(Context & ctx) } if (ctx.python()) { - const Q3CString & c = pythonDecl(); + const QByteArray & c = pythonDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PythonDecl(ctx.replace(c))) @@ -44,7 +44,7 @@ void UmlAttribute::change(Context & ctx) } if (ctx.idl()) { - const Q3CString & c = idlDecl(); + const QByteArray & c = idlDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_IdlDecl(ctx.replace(c))) diff --git a/genplugouts/GlobalChange/UmlAttribute.h b/genplugouts/GlobalChange/UmlAttribute.h index 9da206d83..7a9f7a621 100644 --- a/genplugouts/GlobalChange/UmlAttribute.h +++ b/genplugouts/GlobalChange/UmlAttribute.h @@ -3,7 +3,7 @@ #include "UmlBaseAttribute.h" -#include + class Context; @@ -14,7 +14,7 @@ class Context; class UmlAttribute : public UmlBaseAttribute { public: - UmlAttribute(void * id, const Q3CString & n) : UmlBaseAttribute(id, n) {}; + UmlAttribute(void * id, const QByteArray & n) : UmlBaseAttribute(id, n) {}; virtual void change(Context & ctx); diff --git a/genplugouts/GlobalChange/UmlBaseAccessVariableValueAction.h b/genplugouts/GlobalChange/UmlBaseAccessVariableValueAction.h index 311fefa08..0e2856d02 100644 --- a/genplugouts/GlobalChange/UmlBaseAccessVariableValueAction.h +++ b/genplugouts/GlobalChange/UmlBaseAccessVariableValueAction.h @@ -3,7 +3,7 @@ #include "UmlActivityAction.h" -#include + class UmlItem; @@ -11,7 +11,7 @@ class UmlBaseAccessVariableValueAction : public UmlActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAccessVariableValueAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseAccessVariableValueAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } diff --git a/genplugouts/GlobalChange/UmlBaseActivity.cpp b/genplugouts/GlobalChange/UmlBaseActivity.cpp index 2f992ddd1..45801f46c 100644 --- a/genplugouts/GlobalChange/UmlBaseActivity.cpp +++ b/genplugouts/GlobalChange/UmlBaseActivity.cpp @@ -5,7 +5,7 @@ #include "UmlClassView.h" #include "UmlActivityDiagram.h" //Added by qt3to4: -#include +#include UmlActivity * UmlBaseActivity::create(UmlClassView * parent, const char * s) { @@ -17,7 +17,7 @@ anItemKind UmlBaseActivity::kind() return anActivity; } -const Q3CString & UmlBaseActivity::preCondition() +const QByteArray & UmlBaseActivity::preCondition() { read_if_needed_(); return _pre_condition; @@ -28,7 +28,7 @@ bool UmlBaseActivity::set_PreCondition(const char * v) return set_it_(_pre_condition, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::postCondition() +const QByteArray & UmlBaseActivity::postCondition() { read_if_needed_(); return _post_condition; @@ -40,7 +40,7 @@ bool UmlBaseActivity::set_PostCondition(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivity::cppPreCondition() +const QByteArray & UmlBaseActivity::cppPreCondition() { read_if_needed_(); return _cpp_pre_condition; @@ -51,7 +51,7 @@ bool UmlBaseActivity::set_CppPreCondition(const char * v) return set_it_(_cpp_pre_condition, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::cppPostCondition() +const QByteArray & UmlBaseActivity::cppPostCondition() { read_if_needed_(); return _cpp_post_condition; @@ -64,7 +64,7 @@ bool UmlBaseActivity::set_CppPostCondition(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivity::javaPreCondition() +const QByteArray & UmlBaseActivity::javaPreCondition() { read_if_needed_(); return _java_pre_condition; @@ -75,7 +75,7 @@ bool UmlBaseActivity::set_JavaPreCondition(const char * v) return set_it_(_java_pre_condition, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseActivity::javaPostCondition() +const QByteArray & UmlBaseActivity::javaPostCondition() { read_if_needed_(); return _java_post_condition; diff --git a/genplugouts/GlobalChange/UmlBaseActivity.h b/genplugouts/GlobalChange/UmlBaseActivity.h index a0eca47eb..0d009bd8f 100644 --- a/genplugouts/GlobalChange/UmlBaseActivity.h +++ b/genplugouts/GlobalChange/UmlBaseActivity.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlActivity; class UmlClassView; @@ -26,13 +26,13 @@ class UmlBaseActivity : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivity(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivity(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the pre condition - const Q3CString & preCondition(); + const QByteArray & preCondition(); // set the pre condition // @@ -40,7 +40,7 @@ class UmlBaseActivity : public UmlItem bool set_PreCondition(const char * v); // return the post condition - const Q3CString & postCondition(); + const QByteArray & postCondition(); // set the post condition // @@ -49,7 +49,7 @@ class UmlBaseActivity : public UmlItem #ifdef WITHCPP // return the pre condition in C++ - const Q3CString & cppPreCondition(); + const QByteArray & cppPreCondition(); // set the pre condition in C++ // @@ -57,7 +57,7 @@ class UmlBaseActivity : public UmlItem bool set_CppPreCondition(const char * v); // return the post condition in C++ - const Q3CString & cppPostCondition(); + const QByteArray & cppPostCondition(); // set the post condition in C++ // @@ -67,7 +67,7 @@ class UmlBaseActivity : public UmlItem #ifdef WITHJAVA // return the pre condition in Java - const Q3CString & javaPreCondition(); + const QByteArray & javaPreCondition(); // set the pre condition in Java // @@ -75,7 +75,7 @@ class UmlBaseActivity : public UmlItem bool set_JavaPreCondition(const char * v); // return the post condition in Java - const Q3CString & javaPostCondition(); + const QByteArray & javaPostCondition(); // set the post condition in Java // @@ -117,20 +117,20 @@ class UmlBaseActivity : public UmlItem private: - Q3CString _pre_condition; + QByteArray _pre_condition; - Q3CString _post_condition; + QByteArray _post_condition; #ifdef WITHCPP - Q3CString _cpp_pre_condition; + QByteArray _cpp_pre_condition; - Q3CString _cpp_post_condition; + QByteArray _cpp_post_condition; #endif #ifdef WITHJAVA - Q3CString _java_pre_condition; + QByteArray _java_pre_condition; - Q3CString _java_post_condition; + QByteArray _java_post_condition; #endif bool _read_only; diff --git a/genplugouts/GlobalChange/UmlBaseActivityAction.cpp b/genplugouts/GlobalChange/UmlBaseActivityAction.cpp index fb47b7b1b..de084771d 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityAction.cpp +++ b/genplugouts/GlobalChange/UmlBaseActivityAction.cpp @@ -3,9 +3,9 @@ #include "UmlBaseActivityAction.h" #include "UmlDiagram.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlBaseActivityAction::preCondition() +const QByteArray & UmlBaseActivityAction::preCondition() { read_if_needed_(); return _pre_condition; @@ -16,7 +16,7 @@ bool UmlBaseActivityAction::set_PreCondition(const char * v) return set_it_(_pre_condition, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::postCondition() +const QByteArray & UmlBaseActivityAction::postCondition() { read_if_needed_(); return _post_condition; @@ -28,7 +28,7 @@ bool UmlBaseActivityAction::set_PostCondition(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivityAction::cppPreCondition() +const QByteArray & UmlBaseActivityAction::cppPreCondition() { read_if_needed_(); return _cpp_pre_condition; @@ -39,7 +39,7 @@ bool UmlBaseActivityAction::set_CppPreCondition(const char * v) return set_it_(_cpp_pre_condition, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::cppPostCondition() +const QByteArray & UmlBaseActivityAction::cppPostCondition() { read_if_needed_(); return _cpp_post_condition; @@ -52,7 +52,7 @@ bool UmlBaseActivityAction::set_CppPostCondition(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivityAction::javaPreCondition() +const QByteArray & UmlBaseActivityAction::javaPreCondition() { read_if_needed_(); return _java_pre_condition; @@ -63,7 +63,7 @@ bool UmlBaseActivityAction::set_JavaPreCondition(const char * v) return set_it_(_java_pre_condition, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseActivityAction::javaPostCondition() +const QByteArray & UmlBaseActivityAction::javaPostCondition() { read_if_needed_(); return _java_post_condition; diff --git a/genplugouts/GlobalChange/UmlBaseActivityAction.h b/genplugouts/GlobalChange/UmlBaseActivityAction.h index 4a06ccffe..a0c197cab 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityAction.h +++ b/genplugouts/GlobalChange/UmlBaseActivityAction.h @@ -3,7 +3,7 @@ #include "UmlActivityNode.h" -#include + class UmlDiagram; @@ -11,13 +11,13 @@ class UmlBaseActivityAction : public UmlActivityNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityAction(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityAction(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } public: // return the pre condition - const Q3CString & preCondition(); + const QByteArray & preCondition(); // set the pre condition // @@ -25,7 +25,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_PreCondition(const char * v); // return the post condition - const Q3CString & postCondition(); + const QByteArray & postCondition(); // set the post condition // @@ -34,7 +34,7 @@ class UmlBaseActivityAction : public UmlActivityNode #ifdef WITHCPP // return the pre condition in C++ - const Q3CString & cppPreCondition(); + const QByteArray & cppPreCondition(); // set the pre condition in C++ // @@ -42,7 +42,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_CppPreCondition(const char * v); // return the post condition in C++ - const Q3CString & cppPostCondition(); + const QByteArray & cppPostCondition(); // set the post condition in C++ // @@ -52,7 +52,7 @@ class UmlBaseActivityAction : public UmlActivityNode #ifdef WITHJAVA // return the pre condition in Java - const Q3CString & javaPreCondition(); + const QByteArray & javaPreCondition(); // set the pre condition in Java // @@ -60,7 +60,7 @@ class UmlBaseActivityAction : public UmlActivityNode bool set_JavaPreCondition(const char * v); // return the post condition in Java - const Q3CString & javaPostCondition(); + const QByteArray & javaPostCondition(); // set the post condition in Java // @@ -86,20 +86,20 @@ class UmlBaseActivityAction : public UmlActivityNode private: - Q3CString _pre_condition; + QByteArray _pre_condition; - Q3CString _post_condition; + QByteArray _post_condition; #ifdef WITHCPP - Q3CString _cpp_pre_condition; + QByteArray _cpp_pre_condition; - Q3CString _cpp_post_condition; + QByteArray _cpp_post_condition; #endif #ifdef WITHJAVA - Q3CString _java_pre_condition; + QByteArray _java_pre_condition; - Q3CString _java_post_condition; + QByteArray _java_post_condition; #endif UmlDiagram * _assoc_diagram; diff --git a/genplugouts/GlobalChange/UmlBaseActivityActionClasses.cpp b/genplugouts/GlobalChange/UmlBaseActivityActionClasses.cpp index adeceb749..eba28a614 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityActionClasses.cpp +++ b/genplugouts/GlobalChange/UmlBaseActivityActionClasses.cpp @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "UmlOperation.h" //Added by qt3to4: -#include +#include UmlSendObjectAction * UmlBaseSendObjectAction::create(UmlItem * parent, const char * s) { @@ -57,7 +57,7 @@ anItemKind UmlBaseValueSpecificationAction::kind() return aValueSpecificationAction; } -const Q3CString & UmlBaseValueSpecificationAction::value() +const QByteArray & UmlBaseValueSpecificationAction::value() { read_if_needed_(); return _value; @@ -69,7 +69,7 @@ bool UmlBaseValueSpecificationAction::set_Value(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseValueSpecificationAction::cppValue() +const QByteArray & UmlBaseValueSpecificationAction::cppValue() { read_if_needed_(); return _cpp_value; @@ -82,7 +82,7 @@ bool UmlBaseValueSpecificationAction::set_CppValue(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseValueSpecificationAction::javaValue() +const QByteArray & UmlBaseValueSpecificationAction::javaValue() { read_if_needed_(); return _java_value; @@ -138,7 +138,7 @@ anItemKind UmlBaseOpaqueAction::kind() return anOpaqueAction; } -const Q3CString & UmlBaseOpaqueAction::behavior() +const QByteArray & UmlBaseOpaqueAction::behavior() { read_if_needed_(); return _behavior; @@ -150,7 +150,7 @@ bool UmlBaseOpaqueAction::set_Behavior(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseOpaqueAction::cppBehavior() +const QByteArray & UmlBaseOpaqueAction::cppBehavior() { read_if_needed_(); return _cpp_behavior; @@ -163,7 +163,7 @@ bool UmlBaseOpaqueAction::set_CppBehavior(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseOpaqueAction::javaBehavior() +const QByteArray & UmlBaseOpaqueAction::javaBehavior() { read_if_needed_(); return _java_behavior; @@ -241,7 +241,7 @@ bool UmlBaseAcceptEventAction::set_isTimeEvent(bool v) return set_it_(_timeevent, v, setTimeEventCmd); } -const Q3CString & UmlBaseAcceptEventAction::trigger() +const QByteArray & UmlBaseAcceptEventAction::trigger() { read_if_needed_(); return _trigger; @@ -253,7 +253,7 @@ bool UmlBaseAcceptEventAction::set_Trigger(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseAcceptEventAction::cppTrigger() +const QByteArray & UmlBaseAcceptEventAction::cppTrigger() { read_if_needed_(); return _cpp_trigger; @@ -266,7 +266,7 @@ bool UmlBaseAcceptEventAction::set_CppTrigger(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseAcceptEventAction::javaTrigger() +const QByteArray & UmlBaseAcceptEventAction::javaTrigger() { read_if_needed_(); return _java_trigger; diff --git a/genplugouts/GlobalChange/UmlBaseActivityActionClasses.h b/genplugouts/GlobalChange/UmlBaseActivityActionClasses.h index 1a3b14b5f..1a826cd23 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityActionClasses.h +++ b/genplugouts/GlobalChange/UmlBaseActivityActionClasses.h @@ -4,7 +4,7 @@ #include "UmlActivityAction.h" #include "anItemKind.h" -#include + #include "UmlOnSignalAction.h" #include "UmlAccessVariableValueAction.h" @@ -41,7 +41,7 @@ class UmlBaseSendObjectAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSendObjectAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseSendObjectAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } }; @@ -62,7 +62,7 @@ class UmlBaseUnmarshallAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUnmarshallAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseUnmarshallAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } }; @@ -83,7 +83,7 @@ class UmlBaseSendSignalAction : public UmlOnSignalAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSendSignalAction(void * id, const Q3CString & s) : UmlOnSignalAction(id, s) { + UmlBaseSendSignalAction(void * id, const QByteArray & s) : UmlOnSignalAction(id, s) { } }; @@ -104,7 +104,7 @@ class UmlBaseBroadcastSignalAction : public UmlOnSignalAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseBroadcastSignalAction(void * id, const Q3CString & s) : UmlOnSignalAction(id, s) { + UmlBaseBroadcastSignalAction(void * id, const QByteArray & s) : UmlOnSignalAction(id, s) { } }; @@ -125,13 +125,13 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseValueSpecificationAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseValueSpecificationAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the value - const Q3CString & value(); + const QByteArray & value(); // set the value // @@ -140,7 +140,7 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction #ifdef WITHCPP // return the value in C++ - const Q3CString & cppValue(); + const QByteArray & cppValue(); // set the value in C++ // @@ -150,7 +150,7 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction #ifdef WITHJAVA // return the value in Java - const Q3CString & javaValue(); + const QByteArray & javaValue(); // set the value in Java // @@ -168,14 +168,14 @@ class UmlBaseValueSpecificationAction : public UmlActivityAction private: - Q3CString _value; + QByteArray _value; #ifdef WITHCPP - Q3CString _cpp_value; + QByteArray _cpp_value; #endif #ifdef WITHJAVA - Q3CString _java_value; + QByteArray _java_value; #endif @@ -208,13 +208,13 @@ class UmlBaseOpaqueAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOpaqueAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseOpaqueAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the behavior - const Q3CString & behavior(); + const QByteArray & behavior(); // set the behavior // @@ -223,7 +223,7 @@ class UmlBaseOpaqueAction : public UmlActivityAction #ifdef WITHCPP // return the behavior in C++ - const Q3CString & cppBehavior(); + const QByteArray & cppBehavior(); // set the behavior in C++ // @@ -233,7 +233,7 @@ class UmlBaseOpaqueAction : public UmlActivityAction #ifdef WITHJAVA // return the behavior in Java - const Q3CString & javaBehavior(); + const QByteArray & javaBehavior(); // set the behavior in Java // @@ -251,14 +251,14 @@ class UmlBaseOpaqueAction : public UmlActivityAction private: - Q3CString _behavior; + QByteArray _behavior; #ifdef WITHCPP - Q3CString _cpp_behavior; + QByteArray _cpp_behavior; #endif #ifdef WITHJAVA - Q3CString _java_behavior; + QByteArray _java_behavior; #endif @@ -291,7 +291,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAcceptEventAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseAcceptEventAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -313,7 +313,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction bool set_isTimeEvent(bool v); // return the trigger - const Q3CString & trigger(); + const QByteArray & trigger(); // set the trigger // @@ -322,7 +322,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction #ifdef WITHCPP // return the trigger in C++ - const Q3CString & cppTrigger(); + const QByteArray & cppTrigger(); // set the trigger in C++ // @@ -332,7 +332,7 @@ class UmlBaseAcceptEventAction : public UmlActivityAction #ifdef WITHJAVA // return the trigger in Java - const Q3CString & javaTrigger(); + const QByteArray & javaTrigger(); // set the trigger in Java // @@ -354,14 +354,14 @@ class UmlBaseAcceptEventAction : public UmlActivityAction bool _timeevent; - Q3CString _trigger; + QByteArray _trigger; #ifdef WITHCPP - Q3CString _cpp_trigger; + QByteArray _cpp_trigger; #endif #ifdef WITHJAVA - Q3CString _java_trigger; + QByteArray _java_trigger; #endif @@ -394,7 +394,7 @@ class UmlBaseCallOperationAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCallOperationAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseCallOperationAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -443,7 +443,7 @@ class UmlBaseCallBehaviorAction : public UmlActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCallBehaviorAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseCallBehaviorAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } @@ -492,7 +492,7 @@ class UmlBaseClearVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClearVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseClearVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -513,7 +513,7 @@ class UmlBaseReadVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseReadVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseReadVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -534,7 +534,7 @@ class UmlBaseWriteVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseWriteVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseWriteVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } }; @@ -555,7 +555,7 @@ class UmlBaseAddVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAddVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseAddVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } @@ -594,7 +594,7 @@ class UmlBaseRemoveVariableValueAction : public UmlAccessVariableValueAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRemoveVariableValueAction(void * id, const Q3CString & s) : UmlAccessVariableValueAction(id, s) { + UmlBaseRemoveVariableValueAction(void * id, const QByteArray & s) : UmlAccessVariableValueAction(id, s) { } diff --git a/genplugouts/GlobalChange/UmlBaseActivityControlNode.h b/genplugouts/GlobalChange/UmlBaseActivityControlNode.h index 9f1c0931a..3d07467c1 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityControlNode.h +++ b/genplugouts/GlobalChange/UmlBaseActivityControlNode.h @@ -3,13 +3,13 @@ #include "UmlActivityNode.h" -#include + class UmlBaseActivityControlNode : public UmlActivityNode { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityControlNode(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityControlNode(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseActivityControlNodeClasses.h b/genplugouts/GlobalChange/UmlBaseActivityControlNodeClasses.h index 84dd781f7..1ef579e8c 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityControlNodeClasses.h +++ b/genplugouts/GlobalChange/UmlBaseActivityControlNodeClasses.h @@ -4,7 +4,7 @@ #include "UmlActivityControlNode.h" #include "anItemKind.h" -#include + class UmlInitialActivityNode; class UmlItem; @@ -31,7 +31,7 @@ class UmlBaseInitialActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInitialActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseInitialActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -52,7 +52,7 @@ class UmlBaseFlowFinalActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFlowFinalActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseFlowFinalActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -73,7 +73,7 @@ class UmlBaseActivityFinalActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityFinalActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseActivityFinalActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -94,7 +94,7 @@ class UmlBaseDecisionActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDecisionActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseDecisionActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -115,7 +115,7 @@ class UmlBaseMergeActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseMergeActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseMergeActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -136,7 +136,7 @@ class UmlBaseForkActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseForkActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseForkActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; @@ -157,7 +157,7 @@ class UmlBaseJoinActivityNode : public UmlActivityControlNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJoinActivityNode(void * id, const Q3CString & s) : UmlActivityControlNode(id, s) { + UmlBaseJoinActivityNode(void * id, const QByteArray & s) : UmlActivityControlNode(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseActivityDiagram.h b/genplugouts/GlobalChange/UmlBaseActivityDiagram.h index 8ed6ca9d6..67d2ff8af 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseActivityDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlActivityDiagram; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseActivityDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseActivityDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseActivityNode.h b/genplugouts/GlobalChange/UmlBaseActivityNode.h index 9018d75ce..54536ed90 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityNode.h +++ b/genplugouts/GlobalChange/UmlBaseActivityNode.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + class UmlBaseActivityNode : public UmlItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityNode(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivityNode(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseActivityObject.cpp b/genplugouts/GlobalChange/UmlBaseActivityObject.cpp index 748e7c22b..f96d4a344 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityObject.cpp +++ b/genplugouts/GlobalChange/UmlBaseActivityObject.cpp @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "UmlActivityDiagram.h" //Added by qt3to4: -#include +#include UmlActivityObject * UmlBaseActivityObject::create(UmlItem * parent, const char * s) { @@ -28,7 +28,7 @@ bool UmlBaseActivityObject::set_Type(const UmlTypeSpec & v) return set_it_(_type, v, setTypeCmd); } -const Q3CString & UmlBaseActivityObject::multiplicity() +const QByteArray & UmlBaseActivityObject::multiplicity() { read_if_needed_(); return _multiplicity; @@ -39,7 +39,7 @@ bool UmlBaseActivityObject::set_Multiplicity(const char * v) return set_it_(_multiplicity, v, setMultiplicityCmd); } -const Q3CString & UmlBaseActivityObject::inState() +const QByteArray & UmlBaseActivityObject::inState() { read_if_needed_(); return _in_state; @@ -50,7 +50,7 @@ bool UmlBaseActivityObject::set_InState(const char * v) return set_it_(_in_state, v, setInStateCmd); } -const Q3CString & UmlBaseActivityObject::selection() +const QByteArray & UmlBaseActivityObject::selection() { read_if_needed_(); return _selection; @@ -62,7 +62,7 @@ bool UmlBaseActivityObject::set_Selection(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseActivityObject::cppSelection() +const QByteArray & UmlBaseActivityObject::cppSelection() { read_if_needed_(); return _cpp_selection; @@ -75,7 +75,7 @@ bool UmlBaseActivityObject::set_CppSelection(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseActivityObject::javaSelection() +const QByteArray & UmlBaseActivityObject::javaSelection() { read_if_needed_(); return _java_selection; diff --git a/genplugouts/GlobalChange/UmlBaseActivityObject.h b/genplugouts/GlobalChange/UmlBaseActivityObject.h index 5c1938905..8b331ae01 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityObject.h +++ b/genplugouts/GlobalChange/UmlBaseActivityObject.h @@ -4,7 +4,7 @@ #include "UmlActivityNode.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" #include "anOrdering.h" @@ -28,7 +28,7 @@ class UmlBaseActivityObject : public UmlActivityNode protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityObject(void * id, const Q3CString & s) : UmlActivityNode(id, s) { + UmlBaseActivityObject(void * id, const QByteArray & s) : UmlActivityNode(id, s) { } @@ -42,7 +42,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_Type(const UmlTypeSpec & v); // return the multiplicity - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // set the multiplicity // @@ -50,7 +50,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_Multiplicity(const char * v); // return the inState attribute - const Q3CString & inState(); + const QByteArray & inState(); // set the inState attribute // @@ -58,7 +58,7 @@ class UmlBaseActivityObject : public UmlActivityNode bool set_InState(const char * v); // return the selection in OCL - const Q3CString & selection(); + const QByteArray & selection(); // set the selection in OCL // @@ -67,7 +67,7 @@ class UmlBaseActivityObject : public UmlActivityNode #ifdef WITHCPP // return the selection in C++ - const Q3CString & cppSelection(); + const QByteArray & cppSelection(); // set the selection in C++ // @@ -77,7 +77,7 @@ class UmlBaseActivityObject : public UmlActivityNode #ifdef WITHJAVA // return the selection in Java - const Q3CString & javaSelection(); + const QByteArray & javaSelection(); // set the selection in Java // @@ -123,18 +123,18 @@ class UmlBaseActivityObject : public UmlActivityNode UmlTypeSpec _type; - Q3CString _multiplicity; + QByteArray _multiplicity; - Q3CString _in_state; + QByteArray _in_state; - Q3CString _selection; + QByteArray _selection; #ifdef WITHCPP - Q3CString _cpp_selection; + QByteArray _cpp_selection; #endif #ifdef WITHJAVA - Q3CString _java_selection; + QByteArray _java_selection; #endif anOrdering _ordering : 8; diff --git a/genplugouts/GlobalChange/UmlBaseActivityParameter.cpp b/genplugouts/GlobalChange/UmlBaseActivityParameter.cpp index 067b1ba5c..0e5dd560c 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityParameter.cpp +++ b/genplugouts/GlobalChange/UmlBaseActivityParameter.cpp @@ -4,7 +4,7 @@ #include "UmlActivityParameter.h" #include "UmlActivity.h" //Added by qt3to4: -#include +#include UmlActivityParameter * UmlBaseActivityParameter::create(UmlActivity * parent, const char * s) { @@ -16,7 +16,7 @@ anItemKind UmlBaseActivityParameter::kind() return anActivityParameter; } -const Q3CString & UmlBaseActivityParameter::defaultValue() +const QByteArray & UmlBaseActivityParameter::defaultValue() { read_if_needed_(); return _default_value; diff --git a/genplugouts/GlobalChange/UmlBaseActivityParameter.h b/genplugouts/GlobalChange/UmlBaseActivityParameter.h index 1f05aabe8..fcdd9cecc 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityParameter.h +++ b/genplugouts/GlobalChange/UmlBaseActivityParameter.h @@ -4,7 +4,7 @@ #include "UmlPinParameter.h" #include "anItemKind.h" -#include + class UmlActivityParameter; class UmlActivity; @@ -25,13 +25,13 @@ class UmlBaseActivityParameter : public UmlPinParameter protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityParameter(void * id, const Q3CString & s) : UmlPinParameter(id, s) { + UmlBaseActivityParameter(void * id, const QByteArray & s) : UmlPinParameter(id, s) { } public: // return the default value - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // set the default value // @@ -48,7 +48,7 @@ class UmlBaseActivityParameter : public UmlPinParameter private: - Q3CString _default_value; + QByteArray _default_value; protected: diff --git a/genplugouts/GlobalChange/UmlBaseActivityPin.h b/genplugouts/GlobalChange/UmlBaseActivityPin.h index 52f5d4072..9ef909129 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityPin.h +++ b/genplugouts/GlobalChange/UmlBaseActivityPin.h @@ -4,7 +4,7 @@ #include "UmlPinParameter.h" #include "anItemKind.h" -#include + class UmlActivityPin; class UmlActivityAction; @@ -25,7 +25,7 @@ class UmlBaseActivityPin : public UmlPinParameter protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityPin(void * id, const Q3CString & s) : UmlPinParameter(id, s) { + UmlBaseActivityPin(void * id, const QByteArray & s) : UmlPinParameter(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseActivityRegion.h b/genplugouts/GlobalChange/UmlBaseActivityRegion.h index 95e516e75..cf3b637c1 100644 --- a/genplugouts/GlobalChange/UmlBaseActivityRegion.h +++ b/genplugouts/GlobalChange/UmlBaseActivityRegion.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + class UmlActivityDiagram; @@ -11,7 +11,7 @@ class UmlBaseActivityRegion : public UmlItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseActivityRegion(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseActivityRegion(void * id, const QByteArray & s) : UmlItem(id, s) { } diff --git a/genplugouts/GlobalChange/UmlBaseArtifact.cpp b/genplugouts/GlobalChange/UmlBaseArtifact.cpp index d3707b9e2..0898cb139 100644 --- a/genplugouts/GlobalChange/UmlBaseArtifact.cpp +++ b/genplugouts/GlobalChange/UmlBaseArtifact.cpp @@ -7,7 +7,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlArtifact * UmlBaseArtifact::create(UmlDeploymentView * parent, const char * s) { return (UmlArtifact *) parent->create_(anArtifact, s); @@ -37,7 +37,7 @@ bool UmlBaseArtifact::set_AssociatedDiagram(UmlDeploymentDiagram * d) return FALSE; } -const Q3PtrVector & UmlBaseArtifact::associatedClasses() +const QVector & UmlBaseArtifact::associatedClasses() { read_if_needed_(); @@ -51,8 +51,9 @@ bool UmlBaseArtifact::addAssociatedClass(UmlClass * cl) if (UmlCom::read_bool()) { if (_defined) { - _assoc_classes.resize(_assoc_classes.size() + 1); - _assoc_classes.insert(_assoc_classes.size() - 1, cl); + //_assoc_classes.reserve(_assoc_classes.size() + 1); + //_assoc_classes.insert(_assoc_classes.size() - 1, cl); + _assoc_classes.append(cl); } return TRUE; @@ -68,7 +69,7 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) if (UmlCom::read_bool()) { if (_defined) { - unsigned index = (unsigned) _assoc_classes.findRef(cl); + unsigned index = (unsigned) _assoc_classes.indexOf(cl); if (((int) index) == -1) // theo impossible @@ -77,7 +78,7 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) unsigned last = _assoc_classes.size() - 1; if (index != last) - _assoc_classes.insert(index, _assoc_classes[last]); + _assoc_classes[index] = _assoc_classes[last]; _assoc_classes.resize(last); } @@ -88,9 +89,9 @@ bool UmlBaseArtifact::removeAssociatedClass(UmlClass * cl) return FALSE; } -bool UmlBaseArtifact::set_AssociatedClasses(const Q3PtrVector & l) +bool UmlBaseArtifact::set_AssociatedClasses(const QVector & l) { - UmlCom::send_cmd(_identifier, setAssocClassesCmd, (const Q3PtrVector &) l); + UmlCom::send_cmd(_identifier, setAssocClassesCmd, (const QVector &) l); if (UmlCom::read_bool()) { if (_defined) @@ -102,7 +103,7 @@ bool UmlBaseArtifact::set_AssociatedClasses(const Q3PtrVector & l) return FALSE; } -const Q3PtrVector & UmlBaseArtifact::associatedArtifacts() +const QVector & UmlBaseArtifact::associatedArtifacts() { read_if_needed_(); @@ -116,8 +117,9 @@ bool UmlBaseArtifact::addAssociatedArtifact(UmlArtifact * cp) if (UmlCom::read_bool()) { if (_defined) { - _associated.resize(_associated.size() + 1); - _associated.insert(_associated.size() - 1, cp); + // _associated.resize(_associated.size() + 1); + // _associated.insert(_associated.size() - 1, cp); + _associated.append(cp); } return TRUE; @@ -133,7 +135,7 @@ bool UmlBaseArtifact::removeAssociatedArtifact(UmlArtifact * cp) if (UmlCom::read_bool()) { if (_defined) { - unsigned index = (unsigned) _associated.findRef(cp); + unsigned index = (unsigned) _associated.indexOf(cp); if (((int) index) == -1) // theo impossible @@ -142,7 +144,7 @@ bool UmlBaseArtifact::removeAssociatedArtifact(UmlArtifact * cp) unsigned last = _associated.size() - 1; if (index != last) - _associated.insert(index, _associated[last]); + _associated[index] = _associated[last]; _associated.resize(last); } @@ -166,82 +168,82 @@ bool UmlBaseArtifact::removeAllAssociatedArtifacts() } #ifdef WITHCPP -const Q3CString & UmlBaseArtifact::cppHeader() +const QByteArray & UmlBaseArtifact::cppHeader() { read_if_needed_(); return _cpp_h; } -bool UmlBaseArtifact::set_CppHeader(const Q3CString & s) +bool UmlBaseArtifact::set_CppHeader(const QByteArray & s) { return set_it_(_cpp_h, s, setCppHCmd); } -const Q3CString & UmlBaseArtifact::cppSource() +const QByteArray & UmlBaseArtifact::cppSource() { read_if_needed_(); return _cpp_src; } -bool UmlBaseArtifact::set_CppSource(const Q3CString & s) +bool UmlBaseArtifact::set_CppSource(const QByteArray & s) { return set_it_(_cpp_src, s, setCppSrcCmd); } #endif #ifdef WITHJAVA -const Q3CString & UmlBaseArtifact::javaSource() +const QByteArray & UmlBaseArtifact::javaSource() { read_if_needed_(); return _java_src; } -bool UmlBaseArtifact::set_JavaSource(const Q3CString & s) +bool UmlBaseArtifact::set_JavaSource(const QByteArray & s) { return set_it_(_java_src, s, setJavaSrcCmd); } #endif #ifdef WITHPHP -const Q3CString & UmlBaseArtifact::phpSource() +const QByteArray & UmlBaseArtifact::phpSource() { read_if_needed_(); return _php_src; } -bool UmlBaseArtifact::set_PhpSource(const Q3CString & s) +bool UmlBaseArtifact::set_PhpSource(const QByteArray & s) { return set_it_(_php_src, s, setPhpSrcCmd); } #endif #ifdef WITHPYTHON -const Q3CString & UmlBaseArtifact::pythonSource() +const QByteArray & UmlBaseArtifact::pythonSource() { read_if_needed_(); return _python_src; } -bool UmlBaseArtifact::set_PythonSource(const Q3CString & s) +bool UmlBaseArtifact::set_PythonSource(const QByteArray & s) { return set_it_(_python_src, s, setPythonSrcCmd); } #endif #ifdef WITHIDL -const Q3CString & UmlBaseArtifact::idlSource() +const QByteArray & UmlBaseArtifact::idlSource() { read_if_needed_(); return _idl_src; } -bool UmlBaseArtifact::set_IdlSource(const Q3CString & s) +bool UmlBaseArtifact::set_IdlSource(const QByteArray & s) { return set_it_(_idl_src, s, setIdlSrcCmd); } @@ -282,13 +284,13 @@ void UmlBaseArtifact::read_uml_() _assoc_classes.resize(n); for (index = 0; index != n; index += 1) - _assoc_classes.insert(index, (UmlClass *) UmlBaseItem::read_()); + _assoc_classes[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _associated.resize(n); for (index = 0; index != n; index += 1) - _associated.insert(index, (UmlArtifact *) UmlBaseItem::read_()); + _associated[index] = (UmlArtifact *) UmlBaseItem::read_(); } #ifdef WITHCPP diff --git a/genplugouts/GlobalChange/UmlBaseArtifact.h b/genplugouts/GlobalChange/UmlBaseArtifact.h index 19359a371..bfe0b9a0b 100644 --- a/genplugouts/GlobalChange/UmlBaseArtifact.h +++ b/genplugouts/GlobalChange/UmlBaseArtifact.h @@ -4,8 +4,8 @@ #include "UmlItem.h" #include "anItemKind.h" -#include -#include +#include + #include "UmlClass.h" // to avoid destructor problem class UmlArtifact; @@ -37,7 +37,7 @@ class UmlBaseArtifact : public UmlItem // returns (in Java a copy of) the optional associated classes // significant when the artifact is stereotyped <> - const Q3PtrVector & associatedClasses(); + const QVector & associatedClasses(); // adds 'cl' at the end of the associated classes list, returns false // if 'cl' is already an associate class. @@ -56,11 +56,11 @@ class UmlBaseArtifact : public UmlItem // significant when the artifact is stereotyped <> // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_AssociatedClasses(const Q3PtrVector & l); + bool set_AssociatedClasses(const QVector & l); // returns (in Java a copy of) the associated artifacts list // significant when the artifact is not stereotyped <> - const Q3PtrVector & associatedArtifacts(); + const QVector & associatedArtifacts(); // adds an associated artifacts, returns false if 'cp' is already // an associate artifact. @@ -83,60 +83,60 @@ class UmlBaseArtifact : public UmlItem #ifdef WITHCPP // returns the C++ header file definition - const Q3CString & cppHeader(); + const QByteArray & cppHeader(); // to set the C++ header file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppHeader(const Q3CString & s); + bool set_CppHeader(const QByteArray & s); // returns the C++ source file definition - const Q3CString & cppSource(); + const QByteArray & cppSource(); // to set the C++ source file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppSource(const Q3CString & s); + bool set_CppSource(const QByteArray & s); #endif #ifdef WITHJAVA // returns the Java file definition - const Q3CString & javaSource(); + const QByteArray & javaSource(); // to set the Java file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaSource(const Q3CString & s); + bool set_JavaSource(const QByteArray & s); #endif #ifdef WITHPHP // returns the Php file definition - const Q3CString & phpSource(); + const QByteArray & phpSource(); // to set the Php file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PhpSource(const Q3CString & s); + bool set_PhpSource(const QByteArray & s); #endif #ifdef WITHPYTHON // returns the Python file definition - const Q3CString & pythonSource(); + const QByteArray & pythonSource(); // to set the Python file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PythonSource(const Q3CString & s); + bool set_PythonSource(const QByteArray & s); #endif #ifdef WITHIDL // returns the Idl file definition - const Q3CString & idlSource(); + const QByteArray & idlSource(); // to set the Idl file definition // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlSource(const Q3CString & s); + bool set_IdlSource(const QByteArray & s); #endif // to unload the object to free memory, it will be reloaded @@ -147,30 +147,30 @@ class UmlBaseArtifact : public UmlItem private: UmlDeploymentDiagram * _assoc_diagram; - Q3PtrVector _assoc_classes; + QVector _assoc_classes; - Q3PtrVector _associated; + QVector _associated; #ifdef WITHCPP - Q3CString _cpp_h; + QByteArray _cpp_h; - Q3CString _cpp_src; + QByteArray _cpp_src; #endif #ifdef WITHJAVA - Q3CString _java_src; + QByteArray _java_src; #endif #ifdef WITHPHP - Q3CString _php_src; + QByteArray _php_src; #endif #ifdef WITHPYTHON - Q3CString _python_src; + QByteArray _python_src; #endif #ifdef WITHIDL - Q3CString _idl_src; + QByteArray _idl_src; #endif @@ -210,12 +210,12 @@ class UmlBaseArtifact : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseArtifact(void * id, const Q3CString & n); + UmlBaseArtifact(void * id, const QByteArray & n); friend class UmlBaseClass; }; -inline UmlBaseArtifact::UmlBaseArtifact(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseArtifact::UmlBaseArtifact(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/GlobalChange/UmlBaseAttribute.cpp b/genplugouts/GlobalChange/UmlBaseAttribute.cpp index 5a9b4b549..ae721c8dd 100644 --- a/genplugouts/GlobalChange/UmlBaseAttribute.cpp +++ b/genplugouts/GlobalChange/UmlBaseAttribute.cpp @@ -6,7 +6,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlAttribute * UmlBaseAttribute::create(UmlClass * parent, const char * s) { return (UmlAttribute *) parent->create_(anAttribute, s); @@ -98,7 +98,7 @@ bool UmlBaseAttribute::set_isUnique(bool v) return FALSE; } -const Q3CString & UmlBaseAttribute::defaultValue() +const QByteArray & UmlBaseAttribute::defaultValue() { read_if_needed_(); @@ -122,7 +122,7 @@ bool UmlBaseAttribute::set_Type(const UmlTypeSpec & t) return set_it_(_type, t, setTypeCmd); } -const Q3CString & UmlBaseAttribute::multiplicity() +const QByteArray & UmlBaseAttribute::multiplicity() { read_if_needed_(); @@ -215,7 +215,7 @@ bool UmlBaseAttribute::set_isJavaTransient(bool y) #endif #ifdef WITHIDL -Q3CString UmlBaseAttribute::idlCase() +QByteArray UmlBaseAttribute::idlCase() { read_if_needed_(); diff --git a/genplugouts/GlobalChange/UmlBaseAttribute.h b/genplugouts/GlobalChange/UmlBaseAttribute.h index 766a99f05..d3094bdf4 100644 --- a/genplugouts/GlobalChange/UmlBaseAttribute.h +++ b/genplugouts/GlobalChange/UmlBaseAttribute.h @@ -4,7 +4,7 @@ #include "UmlClassMember.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" class UmlAttribute; @@ -62,7 +62,7 @@ class UmlBaseAttribute : public UmlClassMember bool set_isUnique(bool v); // returns the default attribute value, may be an empty string - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // to set the default attribute value ("" allowed) // @@ -78,7 +78,7 @@ class UmlBaseAttribute : public UmlClassMember bool set_Type(const UmlTypeSpec & t); // returns the multiplicity (may be an empty string) - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // to set the multiplicity // @@ -125,7 +125,7 @@ class UmlBaseAttribute : public UmlClassMember #ifdef WITHIDL // in case the attribute is an IDL union's member returns the // corresponding 'case', an empty string in case it is not specified - Q3CString idlCase(); + QByteArray idlCase(); // to set the 'case' even the attribute is not (already) known as // an IDL union's member @@ -163,9 +163,9 @@ class UmlBaseAttribute : public UmlClassMember bool _java_transient : 1; #endif - Q3CString _multiplicity; + QByteArray _multiplicity; - Q3CString _default_value; + QByteArray _default_value; UmlTypeSpec _type; @@ -177,13 +177,13 @@ class UmlBaseAttribute : public UmlClassMember // exclusive with idl_explicit_case UmlAttribute * _idl_case; - Q3CString _idl_explicit_case; + QByteArray _idl_explicit_case; #endif public: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseAttribute(void * id, const Q3CString & n); + UmlBaseAttribute(void * id, const QByteArray & n); protected: @@ -223,7 +223,7 @@ class UmlBaseAttribute : public UmlClassMember }; -inline UmlBaseAttribute::UmlBaseAttribute(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseAttribute::UmlBaseAttribute(void * id, const QByteArray & n) : UmlClassMember(id, n) { _get_oper = 0; _set_oper = 0; diff --git a/genplugouts/GlobalChange/UmlBaseChoicePseudoState.h b/genplugouts/GlobalChange/UmlBaseChoicePseudoState.h index fb682dd91..8d15fc093 100644 --- a/genplugouts/GlobalChange/UmlBaseChoicePseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseChoicePseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlChoicePseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseChoicePseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseChoicePseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseChoicePseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseClass.cpp b/genplugouts/GlobalChange/UmlBaseClass.cpp index cb2f5544b..34ab5a54c 100644 --- a/genplugouts/GlobalChange/UmlBaseClass.cpp +++ b/genplugouts/GlobalChange/UmlBaseClass.cpp @@ -11,8 +11,8 @@ #include "Tools/ApiCmd.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include -#include +#include +#include UmlClass * UmlBaseClass::create(UmlItem * parent, const char * s) { return (UmlClass *) parent->create_(aClass, s); @@ -47,11 +47,11 @@ bool UmlBaseClass::set_BaseType(const UmlTypeSpec & t) return set_it_(_base_type, t, setBaseTypeCmd); } -Q3ValueList UmlBaseClass::formals() +QList UmlBaseClass::formals() { UmlCom::send_cmd(_identifier, formalsCmd); - Q3ValueList formals; + QList formals; for (unsigned n = UmlCom::read_unsigned(); n; n -= 1) { UmlFormalParameter f; @@ -83,11 +83,11 @@ bool UmlBaseClass::replaceFormal(unsigned int rank, const UmlFormalParameter & f return UmlCom::read_bool(); } -Q3ValueList UmlBaseClass::actuals() +QList UmlBaseClass::actuals() { UmlCom::send_cmd(_identifier, actualsCmd); - Q3ValueList actuals; + QList actuals; for (unsigned n = UmlCom::read_unsigned(); n; n -= 1) { UmlActualParameter a; @@ -132,17 +132,17 @@ UmlArtifact * UmlBaseClass::associatedArtifact() return (UmlArtifact *) UmlBaseItem::read_(); } -const Q3PtrVector UmlBaseClass::associatedComponents() +const QVector UmlBaseClass::associatedComponents() { UmlCom::send_cmd(_identifier, assocComponentCmd); - Q3PtrVector result; + QVector result; unsigned n = UmlCom::read_unsigned(); result.resize(n); for (unsigned index = 0; index != n; index += 1) - result.insert(index, (UmlComponent *) UmlBaseItem::read_()); + result[index] = (UmlComponent *) UmlBaseItem::read_(); return result; } @@ -370,7 +370,7 @@ bool UmlBaseClass::set_isIdlCustom(bool y) } #endif -UmlClass * UmlBaseClass::get(const Q3CString & n, const UmlPackage * p) +UmlClass * UmlBaseClass::get(const QByteArray & n, const UmlPackage * p) { if (p == 0) { UmlClass * x = _classes[n]; @@ -385,7 +385,7 @@ UmlClass * UmlBaseClass::get(const Q3CString & n, const UmlPackage * p) return (UmlClass *) UmlBaseItem::read_(); } -UmlClass * UmlBaseClass::findStereotype(Q3CString s, bool caseSensitive) +UmlClass * UmlBaseClass::findStereotype(QByteArray s, bool caseSensitive) { UmlCom::send_cmd(packageGlobalCmd, findStereotypeCmd, (caseSensitive) ? "y" : "n", (const char *) s); @@ -403,15 +403,15 @@ void UmlBaseClass::unload(bool rec, bool del) UmlBaseClassItem::unload(rec, del); } -bool UmlBaseClass::set_Name(const Q3CString & s) +bool UmlBaseClass::set_Name(const QByteArray & s) { if (!UmlBaseItem::set_Name(s)) return FALSE; - const Q3PtrVector ch = children(); - Q3CString destr = "~" + name(); + const QVector ch = children(); + QByteArray destr = "~" + name(); - for (unsigned i = 0; i != ch.size(); i += 1) { + for (int i = 0; i != ch.size(); i += 1) { if (ch[i]->kind() == anOperation) { if (ch[i]->name() == name()) ch[i]->set_Name(s); @@ -423,9 +423,9 @@ bool UmlBaseClass::set_Name(const Q3CString & s) return TRUE; } -Q3Dict UmlBaseClass::_classes(1001); +QHash UmlBaseClass::_classes; -UmlBaseClass::UmlBaseClass(void * id, const Q3CString & n) +UmlBaseClass::UmlBaseClass(void * id, const QByteArray & n) : UmlClassMember(id, n) { _assoc_diagram = 0; @@ -433,7 +433,7 @@ UmlBaseClass::UmlBaseClass(void * id, const Q3CString & n) _classes.insert(n, (UmlClass *) this); if ((_classes.count() / 2) >= _classes.size()) - _classes.resize(_classes.size() * 2 - 1); + _classes.reserve(_classes.size() * 2 - 1); } void UmlBaseClass::read_uml_() diff --git a/genplugouts/GlobalChange/UmlBaseClass.h b/genplugouts/GlobalChange/UmlBaseClass.h index b297e2cf6..c31cbe36f 100644 --- a/genplugouts/GlobalChange/UmlBaseClass.h +++ b/genplugouts/GlobalChange/UmlBaseClass.h @@ -5,10 +5,10 @@ #include "UmlClassMember.h" #include "anItemKind.h" #include "UmlTypeSpec.h" -#include -#include -#include -#include +#include + + + #include "UmlFormalParameter.h" #include "UmlActualParameter.h" @@ -54,7 +54,7 @@ class UmlBaseClass : public UmlClassMember bool set_BaseType(const UmlTypeSpec & t); // returns (a copy of) the formals list - Q3ValueList formals(); + QList formals(); // remove the formal of the given rank (0...), returns 0 on error // @@ -77,7 +77,7 @@ class UmlBaseClass : public UmlClassMember bool replaceFormal(unsigned int rank, const UmlFormalParameter & formal); // returns (a copy of) the actuals list - Q3ValueList actuals(); + QList actuals(); // replace the actual value at the given rank (0...) // @@ -100,7 +100,7 @@ class UmlBaseClass : public UmlClassMember // returns the components realizing or providing the class. // To set them refer to the UmlBaseComponent's operation setAssociatedClasses() - const Q3PtrVector associatedComponents(); + const QVector associatedComponents(); #ifdef WITHCPP // returns TRUE if the class is external, its definition @@ -224,11 +224,11 @@ class UmlBaseClass : public UmlClassMember //exist, else 0/null. In case the package is specified (not 0/null), //the returned class will be defined in a sub-level of the package. - static UmlClass * get(const Q3CString & n, const UmlPackage * p); + static UmlClass * get(const QByteArray & n, const UmlPackage * p); // Return the class supporting the stereotype corresponding to // the first parameter being 'profile_name:stereotype_name', or 0/null - static UmlClass * findStereotype(Q3CString s, bool caseSensitive); + static UmlClass * findStereotype(QByteArray s, bool caseSensitive); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -241,11 +241,12 @@ class UmlBaseClass : public UmlClassMember // to set the name // // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Name(const Q3CString & s); + virtual bool set_Name(const QByteArray & s); private: - static Q3Dict _classes; + static QHash _classes; + bool _abstract; @@ -292,7 +293,7 @@ class UmlBaseClass : public UmlClassMember protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClass(void * id, const Q3CString & n); + UmlBaseClass(void * id, const QByteArray & n); //internal, do NOT use it diff --git a/genplugouts/GlobalChange/UmlBaseClassDiagram.h b/genplugouts/GlobalChange/UmlBaseClassDiagram.h index e0990d31f..a3f406b00 100644 --- a/genplugouts/GlobalChange/UmlBaseClassDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseClassDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlClassDiagram; class UmlClassView; @@ -26,7 +26,7 @@ class UmlBaseClassDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseClassDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseClassInstance.cpp b/genplugouts/GlobalChange/UmlBaseClassInstance.cpp index 772b8fe6b..4c185c3fb 100644 --- a/genplugouts/GlobalChange/UmlBaseClassInstance.cpp +++ b/genplugouts/GlobalChange/UmlBaseClassInstance.cpp @@ -7,7 +7,7 @@ #include "UmlRelation.h" #include "UmlObjectDiagram.h" //Added by qt3to4: -#include +#include anItemKind UmlBaseClassInstance::kind() { @@ -46,7 +46,7 @@ bool UmlBaseClassInstance::set_Type(UmlClass * v) else return FALSE; } -void UmlBaseClassInstance::attributesValue(Q3ValueList & result) +void UmlBaseClassInstance::attributesValue(QList & result) { UmlCom::send_cmd(_identifier, attributesCmd, (char) 0); @@ -61,7 +61,7 @@ void UmlBaseClassInstance::attributesValue(Q3ValueList & result) } } -void UmlBaseClassInstance::relationsValue(Q3ValueList & result) +void UmlBaseClassInstance::relationsValue(QList & result) { UmlCom::send_cmd(_identifier, relationsCmd, (void *) 0); @@ -76,16 +76,16 @@ void UmlBaseClassInstance::relationsValue(Q3ValueList & result) } } -void UmlBaseClassInstance::availableAttributes(Q3PtrVector & result) +void UmlBaseClassInstance::availableAttributes(QVector &result) { UmlCom::send_cmd(_identifier, attributesCmd, (char) 1); - UmlCom::read_item_list((Q3PtrVector &) result); + UmlCom::read_item_list((QVector &) result); } -void UmlBaseClassInstance::availableRelations(UmlClassInstance * other, Q3PtrVector & result) +void UmlBaseClassInstance::availableRelations(UmlClassInstance * other, QVector &result) { UmlCom::send_cmd(_identifier, relationsCmd, other->_identifier); - UmlCom::read_item_list((Q3PtrVector &) result); + UmlCom::read_item_list((QVector &) result); } bool UmlBaseClassInstance::set_AttributeValue(UmlAttribute * attribute, const char * value) @@ -96,7 +96,7 @@ bool UmlBaseClassInstance::set_AttributeValue(UmlAttribute * attribute, const ch bool UmlBaseClassInstance::add_Relation(UmlRelation * relation, UmlClassInstance * other) { - Q3PtrVector v(2); + QVector v(2); v.insert(0, relation); v.insert(1, other); @@ -106,7 +106,7 @@ bool UmlBaseClassInstance::add_Relation(UmlRelation * relation, UmlClassInstance bool UmlBaseClassInstance::remove_Relation(UmlRelation * relation, UmlClassInstance * other) { - Q3PtrVector v(2); + QVector v(2); v.insert(0, relation); v.insert(1, other); diff --git a/genplugouts/GlobalChange/UmlBaseClassInstance.h b/genplugouts/GlobalChange/UmlBaseClassInstance.h index 3dde839de..a78dfd230 100644 --- a/genplugouts/GlobalChange/UmlBaseClassInstance.h +++ b/genplugouts/GlobalChange/UmlBaseClassInstance.h @@ -6,9 +6,9 @@ #include "SlotRelation.h" #include "UmlItem.h" #include "anItemKind.h" -#include -#include -#include +#include + + class UmlClassInstance; class UmlClass; @@ -40,17 +40,17 @@ class UmlBaseClassInstance : public UmlItem bool set_Type(UmlClass * v); // Returns the attributes having a value - void attributesValue(Q3ValueList & result); + void attributesValue(QList & result); // Returns the attributes having a value - void relationsValue(Q3ValueList & result); + void relationsValue(QList & result); // Returns all the attributes of the class instance, // including the inherited - void availableAttributes(Q3PtrVector & result); + void availableAttributes(QVector & result); // Returns all the possible relations from the current instance to 'other', including the inherited - void availableRelations(UmlClassInstance * other, Q3PtrVector & result); + void availableRelations(UmlClassInstance * other, QVector &result); // Remove the slot if the value is an empty string. // Else set the value for the given attribute, replacing it @@ -87,7 +87,7 @@ class UmlBaseClassInstance : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassInstance(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseClassInstance(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseClassInstanceReference.cpp b/genplugouts/GlobalChange/UmlBaseClassInstanceReference.cpp index 1223c08e8..c3c0d64a0 100644 --- a/genplugouts/GlobalChange/UmlBaseClassInstanceReference.cpp +++ b/genplugouts/GlobalChange/UmlBaseClassInstanceReference.cpp @@ -4,14 +4,14 @@ #include "UmlClass.h" #include "UmlClassInstance.h" //Added by qt3to4: -#include +#include UmlClass * UmlBaseClassInstanceReference::type() const { return (_instance) ? _instance->type() : _class; } -const Q3CString & UmlBaseClassInstanceReference::name() const +const QByteArray & UmlBaseClassInstanceReference::name() const { return (_instance) ? _instance->name() : _name; } diff --git a/genplugouts/GlobalChange/UmlBaseClassInstanceReference.h b/genplugouts/GlobalChange/UmlBaseClassInstanceReference.h index f21836362..be081ecd7 100644 --- a/genplugouts/GlobalChange/UmlBaseClassInstanceReference.h +++ b/genplugouts/GlobalChange/UmlBaseClassInstanceReference.h @@ -1,8 +1,8 @@ #ifndef _UMLBASECLASSINSTANCEREFERENCE_H #define _UMLBASECLASSINSTANCEREFERENCE_H +#include -#include class UmlClass; class UmlClassInstance; @@ -20,7 +20,7 @@ class UmlBaseClassInstanceReference } // return the name of the instance - const Q3CString & name() const; + const QByteArray & name() const; private: @@ -28,7 +28,7 @@ class UmlBaseClassInstanceReference UmlClassInstance * _instance; - Q3CString _name; + QByteArray _name; // internal, don't call it void read_(); diff --git a/genplugouts/GlobalChange/UmlBaseClassItem.cpp b/genplugouts/GlobalChange/UmlBaseClassItem.cpp index fa856e466..3a02e784e 100644 --- a/genplugouts/GlobalChange/UmlBaseClassItem.cpp +++ b/genplugouts/GlobalChange/UmlBaseClassItem.cpp @@ -3,9 +3,9 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include #ifdef WITHCPP -const Q3CString & UmlBaseClassItem::cppDecl() +const QByteArray & UmlBaseClassItem::cppDecl() { read_if_needed_(); @@ -19,7 +19,7 @@ bool UmlBaseClassItem::set_CppDecl(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseClassItem::javaDecl() +const QByteArray & UmlBaseClassItem::javaDecl() { read_if_needed_(); @@ -33,7 +33,7 @@ bool UmlBaseClassItem::set_JavaDecl(const char * s) #endif #ifdef WITHPHP -const Q3CString & UmlBaseClassItem::phpDecl() +const QByteArray & UmlBaseClassItem::phpDecl() { read_if_needed_(); @@ -47,7 +47,7 @@ bool UmlBaseClassItem::set_PhpDecl(const char * s) #endif #ifdef WITHPYTHON -const Q3CString & UmlBaseClassItem::pythonDecl() +const QByteArray & UmlBaseClassItem::pythonDecl() { read_if_needed_(); @@ -61,7 +61,7 @@ bool UmlBaseClassItem::set_PythonDecl(const char * s) #endif #ifdef WITHIDL -const Q3CString & UmlBaseClassItem::idlDecl() +const QByteArray & UmlBaseClassItem::idlDecl() { read_if_needed_(); diff --git a/genplugouts/GlobalChange/UmlBaseClassItem.h b/genplugouts/GlobalChange/UmlBaseClassItem.h index 19037f5fe..c3749c6e1 100644 --- a/genplugouts/GlobalChange/UmlBaseClassItem.h +++ b/genplugouts/GlobalChange/UmlBaseClassItem.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + // Mother class of the all the class's items including the class themself class UmlBaseClassItem : public UmlItem @@ -12,7 +12,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHCPP // return the C++ declaration - const Q3CString & cppDecl(); + const QByteArray & cppDecl(); // to set the C++ declaration // @@ -23,7 +23,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHJAVA // return the Java defininition - const Q3CString & javaDecl(); + const QByteArray & javaDecl(); // to set the Java definition // @@ -34,7 +34,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHPHP // return the Php defininition - const Q3CString & phpDecl(); + const QByteArray & phpDecl(); // to set the Php definition // @@ -45,7 +45,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHPYTHON // return the Python defininition - const Q3CString & pythonDecl(); + const QByteArray & pythonDecl(); // to set the Python definition // @@ -56,7 +56,7 @@ class UmlBaseClassItem : public UmlItem #ifdef WITHIDL // return the IDL declaration - const Q3CString & idlDecl(); + const QByteArray & idlDecl(); // set the IDL declaration // @@ -69,28 +69,28 @@ class UmlBaseClassItem : public UmlItem private: #ifdef WITHCPP - Q3CString _cpp_decl; + QByteArray _cpp_decl; #endif #ifdef WITHJAVA - Q3CString _java_decl; + QByteArray _java_decl; #endif #ifdef WITHPHP - Q3CString _php_decl; + QByteArray _php_decl; #endif #ifdef WITHPYTHON - Q3CString _python_decl; + QByteArray _python_decl; #endif #ifdef WITHIDL - Q3CString _idl_decl; + QByteArray _idl_decl; #endif protected: - UmlBaseClassItem(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseClassItem(void * id, const QByteArray & n) : UmlItem(id, n) {}; #ifdef WITHCPP //internal, do NOT use it diff --git a/genplugouts/GlobalChange/UmlBaseClassMember.cpp b/genplugouts/GlobalChange/UmlBaseClassMember.cpp index da9a56bb5..47325ddfb 100644 --- a/genplugouts/GlobalChange/UmlBaseClassMember.cpp +++ b/genplugouts/GlobalChange/UmlBaseClassMember.cpp @@ -3,7 +3,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include bool UmlBaseClassMember::isClassMember() { read_if_needed_(); @@ -70,7 +70,7 @@ bool UmlBaseClassMember::set_CppVisibility(aVisibility v) #endif #ifdef WITHJAVA -Q3CString UmlBaseClassMember::javaAnnotations() +QByteArray UmlBaseClassMember::javaAnnotations() { read_if_needed_(); @@ -83,7 +83,7 @@ bool UmlBaseClassMember::set_JavaAnnotations(const char * v) } #endif -const Q3CString & UmlBaseClassMember::constraint() +const QByteArray & UmlBaseClassMember::constraint() { read_if_needed_(); return _constraint; diff --git a/genplugouts/GlobalChange/UmlBaseClassMember.h b/genplugouts/GlobalChange/UmlBaseClassMember.h index f19767bf8..19e4f15ba 100644 --- a/genplugouts/GlobalChange/UmlBaseClassMember.h +++ b/genplugouts/GlobalChange/UmlBaseClassMember.h @@ -4,7 +4,7 @@ #include "UmlClassItem.h" #include "aVisibility.h" -#include + #include "UmlBaseClassItem.h" // This class manages 'true' class's items : attributes, relation, @@ -57,7 +57,7 @@ class UmlBaseClassMember : public UmlClassItem #ifdef WITHJAVA // returns the Java annotations - Q3CString javaAnnotations(); + QByteArray javaAnnotations(); // set the Java annotations // @@ -66,7 +66,7 @@ class UmlBaseClassMember : public UmlClassItem #endif // return the constraint - const Q3CString & constraint(); + const QByteArray & constraint(); // set the constraint // @@ -86,14 +86,14 @@ class UmlBaseClassMember : public UmlClassItem #endif #ifdef WITHJAVA - Q3CString _java_annotation; + QByteArray _java_annotation; #endif - Q3CString _constraint; + QByteArray _constraint; protected: - UmlBaseClassMember(void * id, const Q3CString & n) : UmlClassItem(id, n) {}; + UmlBaseClassMember(void * id, const QByteArray & n) : UmlClassItem(id, n) {}; //internal, do NOT use it diff --git a/genplugouts/GlobalChange/UmlBaseClassView.h b/genplugouts/GlobalChange/UmlBaseClassView.h index 43fb0714a..2de2d70e7 100644 --- a/genplugouts/GlobalChange/UmlBaseClassView.h +++ b/genplugouts/GlobalChange/UmlBaseClassView.h @@ -4,7 +4,7 @@ #include "UmlView.h" #include "anItemKind.h" -#include + class UmlClassView; class UmlPackage; @@ -44,7 +44,7 @@ class UmlBaseClassView : public UmlView virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseClassView(void * id, const Q3CString & n) : UmlView(id, n) {}; + UmlBaseClassView(void * id, const QByteArray & n) : UmlView(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseCollaborationDiagram.h b/genplugouts/GlobalChange/UmlBaseCollaborationDiagram.h index 001de487c..f5f96e840 100644 --- a/genplugouts/GlobalChange/UmlBaseCollaborationDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseCollaborationDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlCollaborationDiagram; class UmlItem; @@ -27,7 +27,7 @@ class UmlBaseCollaborationDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseCollaborationDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n), _def(0) {}; + UmlBaseCollaborationDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n), _def(0) {}; public: diff --git a/genplugouts/GlobalChange/UmlBaseCollaborationDiagramDefinition.cpp b/genplugouts/GlobalChange/UmlBaseCollaborationDiagramDefinition.cpp index 63b89f7b5..177cc8c00 100644 --- a/genplugouts/GlobalChange/UmlBaseCollaborationDiagramDefinition.cpp +++ b/genplugouts/GlobalChange/UmlBaseCollaborationDiagramDefinition.cpp @@ -4,7 +4,7 @@ void UmlBaseCollaborationDiagramDefinition::read_() { - Q3PtrDict instances; + QHash instances; unsigned n; unsigned rank; @@ -15,11 +15,11 @@ void UmlBaseCollaborationDiagramDefinition::read_() UmlClassInstanceReference * i = new UmlClassInstanceReference(); _instances.insert(rank, i); - instances.insert((void *) UmlCom::read_unsigned(), i); + instances.insert(reinterpret_cast(uintptr_t(UmlCom::read_unsigned())), i); i->read_(); } - _instances.setAutoDelete(TRUE); + //_instances.setAutoDelete(TRUE); n = UmlCom::read_unsigned(); _messages.resize(n); @@ -31,7 +31,7 @@ void UmlBaseCollaborationDiagramDefinition::read_() m->read_(instances); } - _messages.setAutoDelete(TRUE); + //_messages.setAutoDelete(TRUE); } UmlBaseCollaborationDiagramDefinition::~UmlBaseCollaborationDiagramDefinition() diff --git a/genplugouts/GlobalChange/UmlBaseCollaborationDiagramDefinition.h b/genplugouts/GlobalChange/UmlBaseCollaborationDiagramDefinition.h index 7053607ce..905cc6dc5 100644 --- a/genplugouts/GlobalChange/UmlBaseCollaborationDiagramDefinition.h +++ b/genplugouts/GlobalChange/UmlBaseCollaborationDiagramDefinition.h @@ -1,12 +1,12 @@ #ifndef _UMLBASECOLLABORATIONDIAGRAMDEFINITION_H #define _UMLBASECOLLABORATIONDIAGRAMDEFINITION_H - +#include // to avoid compiler warning #include "UmlCollaborationMessage.h" #include "UmlClassInstanceReference.h" -#include + class UmlClassInstanceReference; class UmlCollaborationMessage; @@ -16,21 +16,21 @@ class UmlBaseCollaborationDiagramDefinition { public: // return the instances present in the diagram - const Q3PtrVector & instances() const { + const QVector & instances() const { return _instances; } // return the messages present in the diagram, // ordonned following their rank - const Q3PtrVector & messages() const { + const QVector & messages() const { return _messages; } private: - Q3PtrVector _instances; + QVector _instances; - Q3PtrVector _messages; + QVector _messages; // internal, don't call it void read_(); diff --git a/genplugouts/GlobalChange/UmlBaseCollaborationMessage.cpp b/genplugouts/GlobalChange/UmlBaseCollaborationMessage.cpp index 8ea8e0890..12a94d5de 100644 --- a/genplugouts/GlobalChange/UmlBaseCollaborationMessage.cpp +++ b/genplugouts/GlobalChange/UmlBaseCollaborationMessage.cpp @@ -3,7 +3,7 @@ #include "UmlBaseCollaborationMessage.h" #include "UmlClassInstanceReference.h" -void UmlBaseCollaborationMessage::read_(const Q3PtrDict & instances) +void UmlBaseCollaborationMessage::read_(const QHash & instances) { UmlBaseMessage::read_(instances); _rank = (int) UmlCom::read_unsigned(); diff --git a/genplugouts/GlobalChange/UmlBaseCollaborationMessage.h b/genplugouts/GlobalChange/UmlBaseCollaborationMessage.h index 276b0801e..a273c2714 100644 --- a/genplugouts/GlobalChange/UmlBaseCollaborationMessage.h +++ b/genplugouts/GlobalChange/UmlBaseCollaborationMessage.h @@ -2,8 +2,8 @@ #define _UMLBASECOLLABORATIONMESSAGE_H -#include -#include + + #include "UmlMessage.h" class UmlClassInstanceReference; @@ -18,7 +18,7 @@ class UmlBaseCollaborationMessage : public UmlMessage } // return the hierarchical rank of the message - const Q3CString & hrank() const { + const QByteArray & hrank() const { return _hrank; } @@ -26,10 +26,10 @@ class UmlBaseCollaborationMessage : public UmlMessage private: int _rank; - Q3CString _hrank; + QByteArray _hrank; // internal, don't call it - void read_(const Q3PtrDict & instances); + void read_(const QHash & instances); friend class UmlBaseCollaborationDiagramDefinition; }; diff --git a/genplugouts/GlobalChange/UmlBaseComponent.cpp b/genplugouts/GlobalChange/UmlBaseComponent.cpp index 211d911fb..aa2d770b0 100644 --- a/genplugouts/GlobalChange/UmlBaseComponent.cpp +++ b/genplugouts/GlobalChange/UmlBaseComponent.cpp @@ -35,28 +35,28 @@ bool UmlBaseComponent::set_AssociatedDiagram(UmlComponentDiagram * d) return FALSE; } -const Q3PtrVector & UmlBaseComponent::realizingClasses() +const QVector & UmlBaseComponent::realizingClasses() { read_if_needed_(); return _realizing; } -const Q3PtrVector & UmlBaseComponent::providedClasses() +const QVector & UmlBaseComponent::providedClasses() { read_if_needed_(); return _provided; } -const Q3PtrVector & UmlBaseComponent::requiredClasses() +const QVector & UmlBaseComponent::requiredClasses() { read_if_needed_(); return _required; } -bool UmlBaseComponent::set_AssociatedClasses(const Q3PtrVector & realizing, const Q3PtrVector & provided, const Q3PtrVector & required) +bool UmlBaseComponent::set_AssociatedClasses(const QVector & realizing, const QVector & provided, const QVector & required) { UmlCom::send_cmd(_identifier, setAssocClassesCmd, realizing, provided, required); @@ -95,18 +95,18 @@ void UmlBaseComponent::read_uml_() _realizing.resize(n); for (index = 0; index != n; index += 1) - _realizing.insert(index, (UmlClass *) UmlBaseItem::read_()); + _realizing[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _provided.resize(n); for (index = 0; index != n; index += 1) - _provided.insert(index, (UmlClass *) UmlBaseItem::read_()); + _provided[index] = (UmlClass *) UmlBaseItem::read_(); n = UmlCom::read_unsigned(); _required.resize(n); for (index = 0; index != n; index += 1) - _required.insert(index, (UmlClass *) UmlBaseItem::read_()); + _required[index] = (UmlClass *) UmlBaseItem::read_(); } diff --git a/genplugouts/GlobalChange/UmlBaseComponent.h b/genplugouts/GlobalChange/UmlBaseComponent.h index 209914a57..9f5cf4553 100644 --- a/genplugouts/GlobalChange/UmlBaseComponent.h +++ b/genplugouts/GlobalChange/UmlBaseComponent.h @@ -1,11 +1,11 @@ #ifndef _UMLBASECOMPONENT_H #define _UMLBASECOMPONENT_H - +#include #include "UmlItem.h" #include "anItemKind.h" -#include -#include + + #include "UmlClass.h" // to avoid destructor problem class UmlComponent; @@ -36,18 +36,18 @@ class UmlBaseComponent : public UmlItem bool set_AssociatedDiagram(UmlComponentDiagram * d); // returns (in Java a copy of) the optional realizing classes - const Q3PtrVector & realizingClasses(); + const QVector & realizingClasses(); // returns (in Java a copy of) the optional provided classes - const Q3PtrVector & providedClasses(); + const QVector & providedClasses(); // returns (in Java a copy of) the optional required classes - const Q3PtrVector & requiredClasses(); + const QVector & requiredClasses(); // set the realizing, provided and required classes lists // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_AssociatedClasses(const Q3PtrVector & realizing, const Q3PtrVector & provided, const Q3PtrVector & required); + bool set_AssociatedClasses(const QVector & realizing, const QVector & provided, const QVector & required); // to unload the object to free memory, it will be reloaded // automatically if needed. args unused @@ -57,11 +57,11 @@ class UmlBaseComponent : public UmlItem private: UmlComponentDiagram * _assoc_diagram; - Q3PtrVector _realizing; + QVector _realizing; - Q3PtrVector _provided; + QVector _provided; - Q3PtrVector _required; + QVector _required; protected: @@ -70,11 +70,11 @@ class UmlBaseComponent : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponent(void * id, const Q3CString & n); + UmlBaseComponent(void * id, const QByteArray & n); }; -inline UmlBaseComponent::UmlBaseComponent(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseComponent::UmlBaseComponent(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/GlobalChange/UmlBaseComponentDiagram.h b/genplugouts/GlobalChange/UmlBaseComponentDiagram.h index 43466da7c..b235e0717 100644 --- a/genplugouts/GlobalChange/UmlBaseComponentDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseComponentDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlComponentDiagram; class UmlComponentView; @@ -26,7 +26,7 @@ class UmlBaseComponentDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponentDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseComponentDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseComponentView.h b/genplugouts/GlobalChange/UmlBaseComponentView.h index 0b9d2d0bd..e70c3b9d5 100644 --- a/genplugouts/GlobalChange/UmlBaseComponentView.h +++ b/genplugouts/GlobalChange/UmlBaseComponentView.h @@ -4,7 +4,7 @@ #include "UmlView.h" #include "anItemKind.h" -#include + class UmlComponentView; class UmlPackage; @@ -26,7 +26,7 @@ class UmlBaseComponentView : public UmlView protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseComponentView(void * id, const Q3CString & n) : UmlView(id, n) {}; + UmlBaseComponentView(void * id, const QByteArray & n) : UmlView(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseDeepHistoryPseudoState.h b/genplugouts/GlobalChange/UmlBaseDeepHistoryPseudoState.h index 0ac36e22d..9224eb152 100644 --- a/genplugouts/GlobalChange/UmlBaseDeepHistoryPseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseDeepHistoryPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlDeepHistoryPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseDeepHistoryPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeepHistoryPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseDeepHistoryPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseDeployment.h b/genplugouts/GlobalChange/UmlBaseDeployment.h index b268e0c17..b16902170 100644 --- a/genplugouts/GlobalChange/UmlBaseDeployment.h +++ b/genplugouts/GlobalChange/UmlBaseDeployment.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + // Manage the deployments class UmlBaseDeployment : public UmlItem { protected: - UmlBaseDeployment(void * id, Q3CString n) : UmlItem(id, n) {}; + UmlBaseDeployment(void * id, QByteArray n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseDeploymentDiagram.h b/genplugouts/GlobalChange/UmlBaseDeploymentDiagram.h index 8f2aacbd5..db1cfc67d 100644 --- a/genplugouts/GlobalChange/UmlBaseDeploymentDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseDeploymentDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlDeploymentDiagram; class UmlDeploymentView; @@ -26,7 +26,7 @@ class UmlBaseDeploymentDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeploymentDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n) {}; + UmlBaseDeploymentDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseDeploymentView.h b/genplugouts/GlobalChange/UmlBaseDeploymentView.h index f5213d38a..12b21aefe 100644 --- a/genplugouts/GlobalChange/UmlBaseDeploymentView.h +++ b/genplugouts/GlobalChange/UmlBaseDeploymentView.h @@ -4,7 +4,7 @@ #include "UmlView.h" #include "anItemKind.h" -#include + class UmlDeploymentView; class UmlPackage; @@ -26,7 +26,7 @@ class UmlBaseDeploymentView : public UmlView protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDeploymentView(void * id, const Q3CString & n) : UmlView(id, n) {}; + UmlBaseDeploymentView(void * id, const QByteArray & n) : UmlView(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseDiagram.cpp b/genplugouts/GlobalChange/UmlBaseDiagram.cpp index 303d79211..899b1e32a 100644 --- a/genplugouts/GlobalChange/UmlBaseDiagram.cpp +++ b/genplugouts/GlobalChange/UmlBaseDiagram.cpp @@ -3,8 +3,8 @@ #include "UmlCom.h" //Added by qt3to4: -#include -bool UmlBaseDiagram::saveIn(const Q3CString & s) const +#include +bool UmlBaseDiagram::saveIn(const QByteArray & s) const { UmlCom::send_cmd(_identifier, saveInCmd, (const char *)s); //[jasa] handle ambiguous call return UmlCom::read_bool(); diff --git a/genplugouts/GlobalChange/UmlBaseDiagram.h b/genplugouts/GlobalChange/UmlBaseDiagram.h index 9cf05ff22..19e34654b 100644 --- a/genplugouts/GlobalChange/UmlBaseDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseDiagram.h @@ -3,7 +3,7 @@ #include "UmlItem.h" -#include + // Mother class of all the classes managing the diagrams class UmlBaseDiagram : public UmlItem @@ -18,12 +18,12 @@ class UmlBaseDiagram : public UmlItem // - else the default diagram aspect, which is probably not as you want // // On error return FALSE in C++, produce a RuntimeException in Java - bool saveIn(const Q3CString & s) const; + bool saveIn(const QByteArray & s) const; protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseDiagram(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseDiagram(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseEntryPointPseudoState.h b/genplugouts/GlobalChange/UmlBaseEntryPointPseudoState.h index dbfd3ef1a..60dd28bb0 100644 --- a/genplugouts/GlobalChange/UmlBaseEntryPointPseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseEntryPointPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlEntryPointPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseEntryPointPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseEntryPointPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseEntryPointPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseExitPointPseudoState.h b/genplugouts/GlobalChange/UmlBaseExitPointPseudoState.h index ff2ad12bc..29563f22b 100644 --- a/genplugouts/GlobalChange/UmlBaseExitPointPseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseExitPointPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlExitPointPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseExitPointPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExitPointPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseExitPointPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseExpansionNode.h b/genplugouts/GlobalChange/UmlBaseExpansionNode.h index 41bcbece2..6642afe1b 100644 --- a/genplugouts/GlobalChange/UmlBaseExpansionNode.h +++ b/genplugouts/GlobalChange/UmlBaseExpansionNode.h @@ -4,7 +4,7 @@ #include "UmlActivityObject.h" #include "anItemKind.h" -#include + class UmlExpansionNode; class UmlExpansionRegion; @@ -25,7 +25,7 @@ class UmlBaseExpansionNode : public UmlActivityObject protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExpansionNode(void * id, const Q3CString & s) : UmlActivityObject(id, s) { + UmlBaseExpansionNode(void * id, const QByteArray & s) : UmlActivityObject(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseExpansionRegion.h b/genplugouts/GlobalChange/UmlBaseExpansionRegion.h index 913b4ec4a..2ca1994ad 100644 --- a/genplugouts/GlobalChange/UmlBaseExpansionRegion.h +++ b/genplugouts/GlobalChange/UmlBaseExpansionRegion.h @@ -4,7 +4,7 @@ #include "UmlActivityRegion.h" #include "anItemKind.h" -#include + #include "anExpansionKind.h" class UmlExpansionRegion; @@ -26,7 +26,7 @@ class UmlBaseExpansionRegion : public UmlActivityRegion protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExpansionRegion(void * id, const Q3CString & s) : UmlActivityRegion(id, s) { + UmlBaseExpansionRegion(void * id, const QByteArray & s) : UmlActivityRegion(id, s) { } diff --git a/genplugouts/GlobalChange/UmlBaseExtraClassMember.cpp b/genplugouts/GlobalChange/UmlBaseExtraClassMember.cpp index 2bb66cd9e..2dd2228c3 100644 --- a/genplugouts/GlobalChange/UmlBaseExtraClassMember.cpp +++ b/genplugouts/GlobalChange/UmlBaseExtraClassMember.cpp @@ -5,7 +5,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlExtraClassMember * UmlBaseExtraClassMember::create(UmlClass * parent, const char * name) { return (UmlExtraClassMember *) parent->create_(anExtraClassMember, name); @@ -29,7 +29,7 @@ bool UmlBaseExtraClassMember::set_isCppInline(bool y) return set_it_(_cpp_inline, y, setIsCppInlineCmd); } -const Q3CString & UmlBaseExtraClassMember::cppDef() +const QByteArray & UmlBaseExtraClassMember::cppDef() { read_if_needed_(); diff --git a/genplugouts/GlobalChange/UmlBaseExtraClassMember.h b/genplugouts/GlobalChange/UmlBaseExtraClassMember.h index e2b9d4f30..4f07b5583 100644 --- a/genplugouts/GlobalChange/UmlBaseExtraClassMember.h +++ b/genplugouts/GlobalChange/UmlBaseExtraClassMember.h @@ -4,7 +4,7 @@ #include "UmlClassItem.h" #include "anItemKind.h" -#include + class UmlExtraClassMember; class UmlClass; @@ -37,7 +37,7 @@ class UmlBaseExtraClassMember : public UmlClassItem // returns the operation's definition in C++, notes that the declaration // is returned by the inherited ClassItemBase::CppDecl() operation - const Q3CString & cppDef(); + const QByteArray & cppDef(); // sets the operation's definition in C++, notes that the declaration // is set through the inherited ClassItemBase::set_CppDecl() operation @@ -56,12 +56,12 @@ class UmlBaseExtraClassMember : public UmlClassItem bool _cpp_inline; - Q3CString _cpp_def; + QByteArray _cpp_def; #endif protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseExtraClassMember(void * id, const Q3CString & n) : UmlClassItem(id, n) {}; + UmlBaseExtraClassMember(void * id, const QByteArray & n) : UmlClassItem(id, n) {}; #ifdef WITHCPP //internal, do NOT use it diff --git a/genplugouts/GlobalChange/UmlBaseFinalState.h b/genplugouts/GlobalChange/UmlBaseFinalState.h index 16e0816cf..2fa133da6 100644 --- a/genplugouts/GlobalChange/UmlBaseFinalState.h +++ b/genplugouts/GlobalChange/UmlBaseFinalState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlFinalState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseFinalState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFinalState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseFinalState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseFlow.cpp b/genplugouts/GlobalChange/UmlBaseFlow.cpp index 5da07fbe8..b05e3eb62 100644 --- a/genplugouts/GlobalChange/UmlBaseFlow.cpp +++ b/genplugouts/GlobalChange/UmlBaseFlow.cpp @@ -4,7 +4,7 @@ #include "UmlFlow.h" #include "UmlActivityNode.h" //Added by qt3to4: -#include +#include anItemKind UmlBaseFlow::kind() { @@ -29,7 +29,7 @@ UmlActivityNode * UmlBaseFlow::target() return _target; } -const Q3CString & UmlBaseFlow::weight() +const QByteArray & UmlBaseFlow::weight() { read_if_needed_(); return _uml.weight; @@ -40,7 +40,7 @@ bool UmlBaseFlow::set_Weight(const char * v) return set_it_(_uml.weight, v, setUmlActivityCmd); } -const Q3CString & UmlBaseFlow::guard() +const QByteArray & UmlBaseFlow::guard() { read_if_needed_(); return _uml.guard; @@ -51,7 +51,7 @@ bool UmlBaseFlow::set_Guard(const char * v) return set_it_(_uml.guard, v, setUmlGuardCmd); } -const Q3CString & UmlBaseFlow::selection() +const QByteArray & UmlBaseFlow::selection() { read_if_needed_(); return _uml.selection; @@ -62,7 +62,7 @@ bool UmlBaseFlow::set_Selection(const char * v) return set_it_(_uml.selection, v, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::transformation() +const QByteArray & UmlBaseFlow::transformation() { read_if_needed_(); return _uml.transformation; @@ -74,7 +74,7 @@ bool UmlBaseFlow::set_Transformation(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseFlow::cppWeight() +const QByteArray & UmlBaseFlow::cppWeight() { read_if_needed_(); return _cpp.weight; @@ -85,7 +85,7 @@ bool UmlBaseFlow::set_CppWeight(const char * v) return set_it_(_cpp.weight, v, setCppActivityCmd); } -const Q3CString & UmlBaseFlow::cppGuard() +const QByteArray & UmlBaseFlow::cppGuard() { read_if_needed_(); return _cpp.guard; @@ -96,7 +96,7 @@ bool UmlBaseFlow::set_CppGuard(const char * v) return set_it_(_cpp.guard, v, setCppGuardCmd); } -const Q3CString & UmlBaseFlow::cppSelection() +const QByteArray & UmlBaseFlow::cppSelection() { read_if_needed_(); return _cpp.selection; @@ -107,7 +107,7 @@ bool UmlBaseFlow::set_CppSelection(const char * v) return set_it_(_cpp.selection, v, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::cppTransformation() +const QByteArray & UmlBaseFlow::cppTransformation() { read_if_needed_(); return _cpp.transformation; @@ -120,7 +120,7 @@ bool UmlBaseFlow::set_CppTransformation(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseFlow::javaWeight() +const QByteArray & UmlBaseFlow::javaWeight() { read_if_needed_(); return _java.weight; @@ -131,7 +131,7 @@ bool UmlBaseFlow::set_JavaWeight(const char * v) return set_it_(_java.weight, v, setJavaActivityCmd); } -const Q3CString & UmlBaseFlow::javaGuard() +const QByteArray & UmlBaseFlow::javaGuard() { read_if_needed_(); return _java.guard; @@ -142,7 +142,7 @@ bool UmlBaseFlow::set_JavaGuard(const char * v) return set_it_(_java.guard, v, setJavaGuardCmd); } -const Q3CString & UmlBaseFlow::javaSelection() +const QByteArray & UmlBaseFlow::javaSelection() { read_if_needed_(); return _java.selection; @@ -153,7 +153,7 @@ bool UmlBaseFlow::set_JavaSelection(const char * v) return set_it_(_java.selection, v, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseFlow::javaTransformation() +const QByteArray & UmlBaseFlow::javaTransformation() { read_if_needed_(); return _java.transformation; diff --git a/genplugouts/GlobalChange/UmlBaseFlow.h b/genplugouts/GlobalChange/UmlBaseFlow.h index b50ce3323..4edb40caf 100644 --- a/genplugouts/GlobalChange/UmlBaseFlow.h +++ b/genplugouts/GlobalChange/UmlBaseFlow.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "FlowBehavior.h" class UmlFlow; @@ -27,7 +27,7 @@ class UmlBaseFlow : public UmlItem virtual UmlActivityNode * target(); // return the weight in OCL - const Q3CString & weight(); + const QByteArray & weight(); // set the weight in OCL // @@ -35,7 +35,7 @@ class UmlBaseFlow : public UmlItem bool set_Weight(const char * v); // return the guard in OCL - const Q3CString & guard(); + const QByteArray & guard(); // set the guard in OCL // @@ -43,7 +43,7 @@ class UmlBaseFlow : public UmlItem bool set_Guard(const char * v); // return the selection in OCL - const Q3CString & selection(); + const QByteArray & selection(); // set the selection in OCL // @@ -51,7 +51,7 @@ class UmlBaseFlow : public UmlItem bool set_Selection(const char * v); // return the transformation in OCL - const Q3CString & transformation(); + const QByteArray & transformation(); // set the transformation in OCL // @@ -60,7 +60,7 @@ class UmlBaseFlow : public UmlItem #ifdef WITHCPP // return the weight in C++ - const Q3CString & cppWeight(); + const QByteArray & cppWeight(); // set the weight in C++ // @@ -68,7 +68,7 @@ class UmlBaseFlow : public UmlItem bool set_CppWeight(const char * v); // return the guard in C++ - const Q3CString & cppGuard(); + const QByteArray & cppGuard(); // set the guard in C++ // @@ -76,7 +76,7 @@ class UmlBaseFlow : public UmlItem bool set_CppGuard(const char * v); // return the selection in C++ - const Q3CString & cppSelection(); + const QByteArray & cppSelection(); // set the selection in C++ // @@ -84,7 +84,7 @@ class UmlBaseFlow : public UmlItem bool set_CppSelection(const char * v); // return the transformation in C++ - const Q3CString & cppTransformation(); + const QByteArray & cppTransformation(); // set the transformation in C++ // @@ -94,7 +94,7 @@ class UmlBaseFlow : public UmlItem #ifdef WITHJAVA // return the weight in Java - const Q3CString & javaWeight(); + const QByteArray & javaWeight(); // set the weight in Java // @@ -102,7 +102,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaWeight(const char * v); // return the guard in Java - const Q3CString & javaGuard(); + const QByteArray & javaGuard(); // set the guard in Java // @@ -110,7 +110,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaGuard(const char * v); // return the selection in Java - const Q3CString & javaSelection(); + const QByteArray & javaSelection(); // set the selection in Java // @@ -118,7 +118,7 @@ class UmlBaseFlow : public UmlItem bool set_JavaSelection(const char * v); // return the transformation in Java - const Q3CString & javaTransformation(); + const QByteArray & javaTransformation(); // set the transformation in Java // @@ -161,7 +161,7 @@ class UmlBaseFlow : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseFlow(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseFlow(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseForkPseudoState.h b/genplugouts/GlobalChange/UmlBaseForkPseudoState.h index 009499bfa..9dfa5025c 100644 --- a/genplugouts/GlobalChange/UmlBaseForkPseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseForkPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlForkPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseForkPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseForkPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseForkPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseFormalParameter.h b/genplugouts/GlobalChange/UmlBaseFormalParameter.h index d8284c71d..aafb2fb40 100644 --- a/genplugouts/GlobalChange/UmlBaseFormalParameter.h +++ b/genplugouts/GlobalChange/UmlBaseFormalParameter.h @@ -2,7 +2,7 @@ #define _UMLBASEFORMALPARAMETER_H -#include + #include "UmlTypeSpec.h" // This class manages 'formal parameters' of a template class. For instance 'T' in @@ -14,12 +14,12 @@ class UmlBaseFormalParameter UmlBaseFormalParameter() {}; // returns the name of the formal - const Q3CString & name() const { + const QByteArray & name() const { return _name; }; // returns the type of a formal, probably "class" - const Q3CString & type() const { + const QByteArray & type() const { return _type; }; @@ -34,10 +34,10 @@ class UmlBaseFormalParameter }; protected: - Q3CString _name; + QByteArray _name; // "class" ... - Q3CString _type; + QByteArray _type; UmlTypeSpec _default_value; diff --git a/genplugouts/GlobalChange/UmlBaseFragment.cpp b/genplugouts/GlobalChange/UmlBaseFragment.cpp index 730755358..44fdee6e6 100644 --- a/genplugouts/GlobalChange/UmlBaseFragment.cpp +++ b/genplugouts/GlobalChange/UmlBaseFragment.cpp @@ -25,7 +25,7 @@ void UmlBaseFragment::read_() fc->read_(this, rank); } - _compartments.setAutoDelete(TRUE); + //_compartments.setAutoDelete(TRUE); _container = 0; _refer = (UmlDiagram *) UmlBaseItem::read_(); _arguments = UmlCom::read_string(); @@ -38,7 +38,7 @@ int UmlBaseFragment::vcenter_(int rank) const return (t + _compartments[rank]->b()) / 2; } -void UmlBaseFragment::read_covered_(Q3PtrDict & instances) +void UmlBaseFragment::read_covered_(QHash & instances) { unsigned n = UmlCom::read_unsigned(); unsigned rank; @@ -46,10 +46,10 @@ void UmlBaseFragment::read_covered_(Q3PtrDict & insta _covered.resize(n); for (rank = 0; rank != n; rank += 1) - _covered.insert(rank, instances[(void *) UmlCom::read_unsigned()]); + _covered.insert(rank, instances[reinterpret_cast(uintptr_t(UmlCom::read_unsigned()))]); } -UmlFragmentCompartment * UmlBaseFragment::get_container_(int x, int y, int w, int h, const Q3PtrVector & fragments) +UmlFragmentCompartment * UmlBaseFragment::get_container_(int x, int y, int w, int h, const QVector & fragments) { UmlFragmentCompartment * r = 0; int nf = fragments.count(); @@ -82,7 +82,7 @@ UmlFragmentCompartment * UmlBaseFragment::get_container_(int x, int y, int w, in return r; } -void UmlBaseFragment::compute_container_(Q3PtrVector & fragments) +void UmlBaseFragment::compute_container_(QVector & fragments) { int rank = fragments.count(); diff --git a/genplugouts/GlobalChange/UmlBaseFragment.h b/genplugouts/GlobalChange/UmlBaseFragment.h index 932913148..8443a2eab 100644 --- a/genplugouts/GlobalChange/UmlBaseFragment.h +++ b/genplugouts/GlobalChange/UmlBaseFragment.h @@ -1,11 +1,8 @@ #ifndef _UMLBASEFRAGMENT_H #define _UMLBASEFRAGMENT_H - - -#include -#include -#include - +#include +#include +#include class UmlFragmentCompartment; class UmlDiagram; class UmlClassInstanceReference; @@ -16,12 +13,12 @@ class UmlBaseFragment { public: // return the name - const Q3CString & name() const { + const QByteArray & name() const { return _name; } // return the compartments, at least one compartment exists - const Q3PtrVector & compartments() const { + const QVector & compartments() const { return _compartments; } @@ -39,12 +36,12 @@ class UmlBaseFragment // return the form corresponding to the arguments // and return value of the interaction use - Q3CString arguments() const { + QByteArray arguments() const { return _arguments; } // return the the list of covered instances (life lines) - const Q3PtrVector & covered() const { + const QVector & covered() const { return _covered; } @@ -52,9 +49,9 @@ class UmlBaseFragment private: UmlFragmentCompartment * _container; - Q3PtrVector _compartments; + QVector _compartments; - Q3CString _name; + QByteArray _name; int _x; @@ -66,9 +63,9 @@ class UmlBaseFragment UmlDiagram * _refer; - Q3CString _arguments; + QByteArray _arguments; - Q3PtrVector _covered; + QVector _covered; // internal, don't call it void read_(); @@ -81,15 +78,15 @@ class UmlBaseFragment //internal, do NOT use it - void read_covered_(Q3PtrDict & instances); + void read_covered_(QHash & instances); // internal - static UmlFragmentCompartment * get_container_(int x, int y, int w, int h, const Q3PtrVector & fragments); + static UmlFragmentCompartment * get_container_(int x, int y, int w, int h, const QVector & fragments); private: // internal - static void compute_container_(Q3PtrVector & fragments); + static void compute_container_(QVector & fragments); public: diff --git a/genplugouts/GlobalChange/UmlBaseFragmentCompartment.cpp b/genplugouts/GlobalChange/UmlBaseFragmentCompartment.cpp index 2ff876f6a..148f56823 100644 --- a/genplugouts/GlobalChange/UmlBaseFragmentCompartment.cpp +++ b/genplugouts/GlobalChange/UmlBaseFragmentCompartment.cpp @@ -3,21 +3,23 @@ #include "UmlBaseFragmentCompartment.h" #include "UmlBaseFragment.h" //Added by qt3to4: -#include +#include void UmlBaseFragmentCompartment::add_contained_(UmlFragment * x) { - _contained.resize(_contained.size() + 1); - _contained.insert(_contained.size() - 1, x); + //_contained.resize(_contained.size() + 1); + //_contained.insert(_contained.size() - 1, x); + _contained.append(x); } -void UmlBaseFragmentCompartment::add_text_(Q3CString x) +void UmlBaseFragmentCompartment::add_text_(QByteArray x) { - _texts.resize(_texts.size() + 1); - _texts.insert(_texts.size() - 1, strdup(x)); + //_texts.resize(_texts.size() + 1); + //_texts.insert(_texts.size() - 1, strdup(x)); + _texts.append(strdup(x)); } -void UmlBaseFragmentCompartment::add_cont_(Q3CString s, int cy) +void UmlBaseFragmentCompartment::add_cont_(QByteArray s, int cy) { if (cy < _fragment->vcenter_(_rank)) _start_continuation = s; diff --git a/genplugouts/GlobalChange/UmlBaseFragmentCompartment.h b/genplugouts/GlobalChange/UmlBaseFragmentCompartment.h index 8943ecf60..129b1dc86 100644 --- a/genplugouts/GlobalChange/UmlBaseFragmentCompartment.h +++ b/genplugouts/GlobalChange/UmlBaseFragmentCompartment.h @@ -5,8 +5,8 @@ // to avoid compiler warning #include "UmlFragment.h" -#include -#include + + class UmlFragment; class UmlBaseFragment; @@ -27,23 +27,23 @@ class UmlBaseFragmentCompartment } // the texts placed in the compartment - const Q3PtrVector & texts() const { + const QVector & texts() const { return _texts; } // return the fragments contained in the compartment, // may be none - const Q3PtrVector & contained() const { + const QVector & contained() const { return _contained; } // return the continuation ('label' case), or an empty string/null - Q3CString startContinuation() const { + QByteArray startContinuation() const { return _start_continuation; } // return the continuation ('goto' case), or an empty string/null - Q3CString endContinuation() const { + QByteArray endContinuation() const { return _end_continuation; } @@ -51,27 +51,27 @@ class UmlBaseFragmentCompartment private: UmlFragment * _fragment; - Q3PtrVector _contained; + QVector _contained; int _rank; - Q3PtrVector _texts; + QVector _texts; int _y; - Q3CString _start_continuation; + QByteArray _start_continuation; - Q3CString _end_continuation; + QByteArray _end_continuation; public: void add_contained_(UmlFragment * x); - void add_text_(Q3CString x); + void add_text_(QByteArray x); //internal, do NOT use it - void add_cont_(Q3CString s, int cy); + void add_cont_(QByteArray s, int cy); int b() const { return _y; diff --git a/genplugouts/GlobalChange/UmlBaseInitialPseudoState.h b/genplugouts/GlobalChange/UmlBaseInitialPseudoState.h index 88dae1cc6..2f31e4340 100644 --- a/genplugouts/GlobalChange/UmlBaseInitialPseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseInitialPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlInitialPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseInitialPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInitialPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseInitialPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseInterruptibleActivityRegion.h b/genplugouts/GlobalChange/UmlBaseInterruptibleActivityRegion.h index 70f988488..de6e56aed 100644 --- a/genplugouts/GlobalChange/UmlBaseInterruptibleActivityRegion.h +++ b/genplugouts/GlobalChange/UmlBaseInterruptibleActivityRegion.h @@ -4,7 +4,7 @@ #include "UmlActivityRegion.h" #include "anItemKind.h" -#include + class UmlInterruptibleActivityRegion; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseInterruptibleActivityRegion : public UmlActivityRegion protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseInterruptibleActivityRegion(void * id, const Q3CString & s) : UmlActivityRegion(id, s) { + UmlBaseInterruptibleActivityRegion(void * id, const QByteArray & s) : UmlActivityRegion(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseItem.cpp b/genplugouts/GlobalChange/UmlBaseItem.cpp index a1a4991d4..7c6b24f40 100644 --- a/genplugouts/GlobalChange/UmlBaseItem.cpp +++ b/genplugouts/GlobalChange/UmlBaseItem.cpp @@ -57,9 +57,9 @@ #include "UmlActivityControlNodeClasses.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include +#include -bool UmlBaseItem::set_Name(const Q3CString & s) +bool UmlBaseItem::set_Name(const QByteArray & s) { UmlCom::send_cmd(_identifier, setNameCmd, (const char *)s); //[jasa] handle ambiguous call @@ -71,14 +71,14 @@ bool UmlBaseItem::set_Name(const Q3CString & s) return FALSE; } -const Q3CString & UmlBaseItem::stereotype() +const QByteArray & UmlBaseItem::stereotype() { read_if_needed_(); return _stereotype; } -bool UmlBaseItem::set_Stereotype(const Q3CString & s) +bool UmlBaseItem::set_Stereotype(const QByteArray & s) { return set_it_(_stereotype, s, setStereotypeCmd); } @@ -93,14 +93,14 @@ bool UmlBaseItem::applyStereotype() return TRUE; } -const Q3CString & UmlBaseItem::description() +const QByteArray & UmlBaseItem::description() { read_if_needed_(); return _description; } -bool UmlBaseItem::set_Description(const Q3CString & s) +bool UmlBaseItem::set_Description(const QByteArray & s) { return set_it_(_description, s, setDescriptionCmd); } @@ -116,7 +116,7 @@ UmlItem * UmlBaseItem::parent() return _parent; } -const Q3PtrVector UmlBaseItem::children() +const QVector UmlBaseItem::children() { if (_children == 0) read_children_(); @@ -136,11 +136,11 @@ bool UmlBaseItem::set_childrenVisible(bool y) return UmlCom::read_bool(); } -bool UmlBaseItem::propertyValue(const Q3CString & k, Q3CString & v) +bool UmlBaseItem::propertyValue(const QByteArray & k, QByteArray & v) { read_if_needed_(); - Q3CString * s = _dict[k]; + QByteArray * s = _dict[k]; if (s == 0) return FALSE; @@ -150,7 +150,7 @@ bool UmlBaseItem::propertyValue(const Q3CString & k, Q3CString & v) } -bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) +bool UmlBaseItem::set_PropertyValue(const QByteArray & k, const QByteArray & v) { read_if_needed_(); @@ -158,10 +158,10 @@ bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) if (UmlCom::read_bool()) { if (_defined) { - Q3CString * s = _dict[k]; + QByteArray * s = _dict[k]; if (s == 0) - _dict.insert(k, new Q3CString(v)); + _dict.insert(k, new QByteArray(v)); else *s = v; } @@ -172,7 +172,7 @@ bool UmlBaseItem::set_PropertyValue(const Q3CString & k, const Q3CString & v) return FALSE; } -const Q3Dict UmlBaseItem::properties() +const QHash UmlBaseItem::properties() { read_if_needed_(); @@ -191,7 +191,7 @@ bool UmlBaseItem::moveAfter(const UmlItem * x) return FALSE; } -Q3CString UmlBaseItem::supportFile() +QByteArray UmlBaseItem::supportFile() { UmlCom::send_cmd(_identifier, supportFileCmd); return UmlCom::read_string(); @@ -203,7 +203,7 @@ bool UmlBaseItem::isWritable() return UmlCom::read_bool(); } -int UmlBaseItem::apply(Q3CString cmd) +int UmlBaseItem::apply(QByteArray cmd) { UmlCom::send_cmd(_identifier, applyCmd, (const char *)cmd); //[jasa] handle ambiguous call return (int) UmlCom::read_unsigned(); @@ -221,11 +221,11 @@ bool UmlBaseItem::set_isMarked(bool y) return set_it_(_marked, y, setMarkedCmd); } -const Q3PtrVector UmlBaseItem::referencedBy() +const QVector UmlBaseItem::referencedBy() { UmlCom::send_cmd(_identifier, referencedByCmd); - Q3PtrVector result; + QVector result; UmlCom::read_item_list(result); return result; @@ -247,7 +247,7 @@ void UmlBaseItem::unload(bool rec, bool del) if (_children != 0) { if (rec) { - for (unsigned chindex = 0; chindex != _children->size(); chindex += 1) { + for (int chindex = 0; chindex != _children->size(); chindex += 1) { _children->at(chindex)->unload(TRUE, del); if (del) @@ -276,17 +276,17 @@ bool UmlBaseItem::isToolRunning(int id) return UmlCom::read_bool(); } -const Q3PtrVector UmlBaseItem::markedItems() +const QVector UmlBaseItem::markedItems() { UmlCom::send_cmd(miscGlobalCmd, allMarkedCmd); - Q3PtrVector result; + QVector result; UmlCom::read_item_list(result); return result; } -Q3PtrDict UmlBaseItem::_all(997); +QHash UmlBaseItem::_all; void UmlBaseItem::read_if_needed_() { @@ -370,9 +370,9 @@ void UmlBaseItem::read_uml_() unsigned n = UmlCom::read_unsigned(); while (n--) { - Q3CString k = UmlCom::read_string(); + QByteArray k = UmlCom::read_string(); - _dict.insert(k, new Q3CString(UmlCom::read_string())); + _dict.insert(k, new QByteArray(UmlCom::read_string())); } _description = UmlCom::read_string(); @@ -414,7 +414,7 @@ void UmlBaseItem::read_idl_() void UmlBaseItem::read_children_() { UmlCom::send_cmd(_identifier, childrenCmd); - _children = new Q3PtrVector; + _children = new QVector; UmlCom::read_item_list(*_children); @@ -468,7 +468,7 @@ bool UmlBaseItem::set_it_(aDirection & r, aDirection v, OnInstanceCmd cmd) return FALSE; } -bool UmlBaseItem::set_it_(Q3CString & r, const char * v, OnInstanceCmd cmd) +bool UmlBaseItem::set_it_(QByteArray & r, const char * v, OnInstanceCmd cmd) { UmlCom::send_cmd(_identifier, cmd, v); @@ -505,7 +505,7 @@ UmlItem * UmlBaseItem::read_() const char * name = UmlCom::read_string(); #ifndef WIN32 - //cout << "UmlBaseItem::read id " << id << " kind " << kind << " name " << name << '\n'; + //qDebug() << "UmlBaseItem::read id " << id << " kind " << kind << " name " << name << '\n'; #endif UmlItem * result = _all[id]; @@ -727,20 +727,20 @@ UmlItem * UmlBaseItem::read_() default: UmlCom::bye(); - UmlCom::fatal_error(Q3CString("unknown item type ") + Q3CString().setNum(kind)); + UmlCom::fatal_error(QByteArray("unknown item type ") + QByteArray().setNum(kind)); } } return result; } -UmlBaseItem::UmlBaseItem(void * id, const Q3CString & n) +UmlBaseItem::UmlBaseItem(void * id, const QByteArray & n) : _defined(FALSE), _identifier(id), _name(n), _parent(0), _children(0) { _all.insert(id, (UmlItem *) this); if (_all.count() / _all.size() > 10) - _all.resize(_all.size() * 2 - 1); + _all.reserve(_all.size() * 2 - 1); } UmlBaseItem::~UmlBaseItem() diff --git a/genplugouts/GlobalChange/UmlBaseItem.h b/genplugouts/GlobalChange/UmlBaseItem.h index 67b03808c..994f7546e 100644 --- a/genplugouts/GlobalChange/UmlBaseItem.h +++ b/genplugouts/GlobalChange/UmlBaseItem.h @@ -1,15 +1,16 @@ #ifndef _UMLBASEITEM_H #define _UMLBASEITEM_H - +#include #include "anItemKind.h" -#include -#include -#include -#include + + + + //#include "OnInstanceCmd.h" #include "aVisibility.h" #include "aDirection.h" +#include class UmlItem; class UmlTypeSpec; @@ -37,21 +38,21 @@ class UmlBaseItem virtual anItemKind kind() = 0; // returns the name - const Q3CString & name() { + const QByteArray & name() { return _name; }; // to set the name // // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Name(const Q3CString & s); + virtual bool set_Name(const QByteArray & s); // returns the stereotype - const Q3CString & stereotype(); + const QByteArray & stereotype(); // to set the stereotype // On error return FALSE in C++, produce a RuntimeException in Java - virtual bool set_Stereotype(const Q3CString & s); + virtual bool set_Stereotype(const QByteArray & s); // If the current stereotype is part of a profile add needed properties. // In all cases remove extra properties whose keys contain two ':'. @@ -60,18 +61,18 @@ class UmlBaseItem bool applyStereotype(); // returns the description - const Q3CString & description(); + const QByteArray & description(); // to set the description // On error return FALSE in C++, produce a RuntimeException in Java - bool set_Description(const Q3CString & s); + bool set_Description(const QByteArray & s); // returns the parent (0/null if it is applied on the project itself), // to go all over the browser tree UmlItem * parent(); // returns (in Java : a copy of) the children list, to go all over the browser tree - const Q3PtrVector children(); + const QVector children(); // return TRUE if the children exist and are visible (independently // of the scroll bar) in the browser, else FALSE @@ -96,16 +97,16 @@ class UmlBaseItem // // These properties may be edited through the object dialog last tab // named 'user' - bool propertyValue(const Q3CString & k, Q3CString & v); + bool propertyValue(const QByteArray & k, QByteArray & v); // to set (may be insert a new) the value 'v' associated to the key 'k' // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PropertyValue(const Q3CString & k, const Q3CString & v); + bool set_PropertyValue(const QByteArray & k, const QByteArray & v); // returns all the properties of the object through (in Java a copy of) a dictionnary - const Q3Dict properties(); + const QHash properties(); // If the parameter is null, move the current item to be // the first child of its parent. Else the current item and @@ -140,7 +141,7 @@ class UmlBaseItem // external type and edited through the last Idl tab of the // 'Generation Settings' dialog is saved in the file 'idl_includes' // - Q3CString supportFile(); + QByteArray supportFile(); // return TRUE in case the item may be modified, i.e. it is not // an API base 'plug-out' class and the corresponding file(s) are not @@ -148,7 +149,7 @@ class UmlBaseItem bool isWritable(); // Apply asynchronously the tool on the item, returns an identifier to call isToolDone() - int apply(Q3CString cmd); + int apply(QByteArray cmd); //return TRUE in case the item is marked bool isMarked(); @@ -161,7 +162,7 @@ class UmlBaseItem // The result may contains UmlAttribute, UmlRelations, UmlNcRelations, // UmlOperation (their bodies are not taken into account) , UmlClass // and UmlComponents. - const Q3PtrVector referencedBy(); + const QVector referencedBy(); // return a constant identifier, it is unique within a given // kind of element (two classes can't have the same identifiers, but @@ -187,7 +188,7 @@ class UmlBaseItem // 'id' is an identifier returned by apply(), indicates if the tool is still running static bool isToolRunning(int id); - static const Q3PtrVector markedItems(); + static const QVector markedItems(); private: @@ -203,21 +204,23 @@ class UmlBaseItem private: - Q3CString _name; + QByteArray _name; // Note : protected in Java for internal reason, but do NOT // access to this field yourself ! - Q3CString _stereotype; + QByteArray _stereotype; - Q3CString _description; + QByteArray _description; UmlItem * _parent; - Q3PtrVector * _children; + QVector * _children; + + QHash _dict; + - Q3Dict _dict; + static QHash _all; - static Q3PtrDict _all; protected: @@ -285,7 +288,7 @@ class UmlBaseItem //internal, do NOT use it - bool set_it_(Q3CString & r, const char * v, OnInstanceCmd cmd); + bool set_it_(QByteArray & r, const char * v, OnInstanceCmd cmd); //internal, do NOT use it @@ -298,7 +301,7 @@ class UmlBaseItem public: // the constructor, do not call it yourself ! - UmlBaseItem(void * id, const Q3CString & n); + UmlBaseItem(void * id, const QByteArray & n); // the destructor, do not delete objects yourself !!!!!!!!!! virtual ~UmlBaseItem(); diff --git a/genplugouts/GlobalChange/UmlBaseJoinPseudoState.h b/genplugouts/GlobalChange/UmlBaseJoinPseudoState.h index 31976dfff..c95cfff9c 100644 --- a/genplugouts/GlobalChange/UmlBaseJoinPseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseJoinPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlJoinPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseJoinPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJoinPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseJoinPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseJunctionPseudoState.h b/genplugouts/GlobalChange/UmlBaseJunctionPseudoState.h index 9b76d88e7..96cdfe959 100644 --- a/genplugouts/GlobalChange/UmlBaseJunctionPseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseJunctionPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlJunctionPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseJunctionPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseJunctionPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseJunctionPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseMessage.cpp b/genplugouts/GlobalChange/UmlBaseMessage.cpp index 77851f8dd..2d220aa8e 100644 --- a/genplugouts/GlobalChange/UmlBaseMessage.cpp +++ b/genplugouts/GlobalChange/UmlBaseMessage.cpp @@ -4,13 +4,13 @@ #include "UmlClassInstanceReference.h" #include "UmlOperation.h" -void UmlBaseMessage::read_(const Q3PtrDict & instances) +void UmlBaseMessage::read_(const QHash & instances) { _operation = (UmlOperation *) UmlBaseItem::read_(); if (_operation == 0) _form = UmlCom::read_string(); - _from = instances[(void *) UmlCom::read_unsigned()]; - _to = instances[(void *) UmlCom::read_unsigned()]; + _from = instances[reinterpret_cast(uintptr_t(UmlCom::read_unsigned()))]; + _to = instances[reinterpret_cast(uintptr_t(UmlCom::read_unsigned()))]; } diff --git a/genplugouts/GlobalChange/UmlBaseMessage.h b/genplugouts/GlobalChange/UmlBaseMessage.h index 81fc500c8..ca6f6fc5e 100644 --- a/genplugouts/GlobalChange/UmlBaseMessage.h +++ b/genplugouts/GlobalChange/UmlBaseMessage.h @@ -1,10 +1,7 @@ #ifndef _UMLBASEMESSAGE_H #define _UMLBASEMESSAGE_H - - -#include -#include - +#include +#include class UmlClassInstanceReference; class UmlOperation; @@ -30,7 +27,7 @@ class UmlBaseMessage // return message as a string, may be empty/null, // exclusive with operation() - const Q3CString & form() const { + const QByteArray & form() const { return _form; } @@ -42,10 +39,10 @@ class UmlBaseMessage UmlOperation * _operation; - Q3CString _form; + QByteArray _form; // internal, don't call it - void read_(const Q3PtrDict & instances); + void read_(const QHash & instances); friend class UmlBaseSequenceMessage; friend class UmlBaseCollaborationMessage; diff --git a/genplugouts/GlobalChange/UmlBaseNcRelation.h b/genplugouts/GlobalChange/UmlBaseNcRelation.h index 7418e3406..0ad29c67b 100644 --- a/genplugouts/GlobalChange/UmlBaseNcRelation.h +++ b/genplugouts/GlobalChange/UmlBaseNcRelation.h @@ -5,7 +5,7 @@ #include "UmlItem.h" #include "aRelationKind.h" #include "anItemKind.h" -#include + class UmlNcRelation; @@ -43,11 +43,11 @@ class UmlBaseNcRelation : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseNcRelation(void * id, const Q3CString & n); + UmlBaseNcRelation(void * id, const QByteArray & n); }; -inline UmlBaseNcRelation::UmlBaseNcRelation(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBaseNcRelation::UmlBaseNcRelation(void * id, const QByteArray & n) : UmlItem(id, n) { _target = 0; } diff --git a/genplugouts/GlobalChange/UmlBaseNode.h b/genplugouts/GlobalChange/UmlBaseNode.h index 07a980e66..208e951f2 100644 --- a/genplugouts/GlobalChange/UmlBaseNode.h +++ b/genplugouts/GlobalChange/UmlBaseNode.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlNode; class UmlDeploymentDiagram; @@ -38,7 +38,7 @@ class UmlBaseNode : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseNode(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseNode(void * id, const QByteArray & n) : UmlItem(id, n) {}; //internal, do NOT use it diff --git a/genplugouts/GlobalChange/UmlBaseObjectDiagram.h b/genplugouts/GlobalChange/UmlBaseObjectDiagram.h index dfe6983ef..720256a2d 100644 --- a/genplugouts/GlobalChange/UmlBaseObjectDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseObjectDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlObjectDiagram; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseObjectDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseObjectDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseObjectDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseOnSignalAction.cpp b/genplugouts/GlobalChange/UmlBaseOnSignalAction.cpp index 8c887e113..aec5db337 100644 --- a/genplugouts/GlobalChange/UmlBaseOnSignalAction.cpp +++ b/genplugouts/GlobalChange/UmlBaseOnSignalAction.cpp @@ -2,9 +2,9 @@ #include "UmlCom.h" #include "UmlBaseOnSignalAction.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlBaseOnSignalAction::signal() +const QByteArray & UmlBaseOnSignalAction::signal() { read_if_needed_(); return _signal; @@ -16,7 +16,7 @@ bool UmlBaseOnSignalAction::set_Signal(const char * v) } #ifdef WITHCPP -const Q3CString & UmlBaseOnSignalAction::cppSignal() +const QByteArray & UmlBaseOnSignalAction::cppSignal() { read_if_needed_(); return _cpp_signal; @@ -29,7 +29,7 @@ bool UmlBaseOnSignalAction::set_CppSignal(const char * v) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseOnSignalAction::javaSignal() +const QByteArray & UmlBaseOnSignalAction::javaSignal() { read_if_needed_(); return _java_signal; diff --git a/genplugouts/GlobalChange/UmlBaseOnSignalAction.h b/genplugouts/GlobalChange/UmlBaseOnSignalAction.h index 6ad499b79..0d648e38c 100644 --- a/genplugouts/GlobalChange/UmlBaseOnSignalAction.h +++ b/genplugouts/GlobalChange/UmlBaseOnSignalAction.h @@ -3,19 +3,19 @@ #include "UmlActivityAction.h" -#include + class UmlBaseOnSignalAction : public UmlActivityAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOnSignalAction(void * id, const Q3CString & s) : UmlActivityAction(id, s) { + UmlBaseOnSignalAction(void * id, const QByteArray & s) : UmlActivityAction(id, s) { } public: // return the signal - const Q3CString & signal(); + const QByteArray & signal(); // set the signal // @@ -24,7 +24,7 @@ class UmlBaseOnSignalAction : public UmlActivityAction #ifdef WITHCPP // return the signal in C++ - const Q3CString & cppSignal(); + const QByteArray & cppSignal(); // set the signal in C++ // @@ -34,7 +34,7 @@ class UmlBaseOnSignalAction : public UmlActivityAction #ifdef WITHJAVA // return the signal in Java - const Q3CString & javaSignal(); + const QByteArray & javaSignal(); // set the signal in Java // @@ -52,14 +52,14 @@ class UmlBaseOnSignalAction : public UmlActivityAction private: - Q3CString _signal; + QByteArray _signal; #ifdef WITHCPP - Q3CString _cpp_signal; + QByteArray _cpp_signal; #endif #ifdef WITHJAVA - Q3CString _java_signal; + QByteArray _java_signal; #endif diff --git a/genplugouts/GlobalChange/UmlBaseOperation.cpp b/genplugouts/GlobalChange/UmlBaseOperation.cpp index dc2247fab..1d2b61490 100644 --- a/genplugouts/GlobalChange/UmlBaseOperation.cpp +++ b/genplugouts/GlobalChange/UmlBaseOperation.cpp @@ -7,8 +7,8 @@ #include "UmlBaseClass.h" #include "UmlClassMember.h" //Added by qt3to4: -#include -#include +#include +#include UmlOperation * UmlBaseOperation::create(UmlClass * parent, const char * s) { return (UmlOperation *) parent->create_(anOperation, s); @@ -72,7 +72,7 @@ bool UmlBaseOperation::set_ReturnType(const UmlTypeSpec & t) return set_it_(_return_type, t, setReturnTypeCmd); } -const Q3ValueList UmlBaseOperation::params() +const QList UmlBaseOperation::params() { read_if_needed_(); @@ -86,7 +86,7 @@ bool UmlBaseOperation::addParameter(unsigned rank, const UmlParameter & p) if (UmlCom::read_bool()) { if (_defined) - _params.insert(_params.at(rank), p); + _params.insert(rank, p); return TRUE; } @@ -100,7 +100,7 @@ bool UmlBaseOperation::removeParameter(unsigned rank) if (UmlCom::read_bool()) { if (_defined) - _params.remove(_params.at(rank)); + _params.removeAt(rank); return TRUE; } @@ -123,7 +123,7 @@ bool UmlBaseOperation::replaceParameter(unsigned rank, const UmlParameter & p) return FALSE; } -const Q3ValueList UmlBaseOperation::exceptions() +const QList UmlBaseOperation::exceptions() { read_if_needed_(); @@ -136,7 +136,7 @@ bool UmlBaseOperation::addException(unsigned rank, const UmlTypeSpec & t) if (UmlCom::read_bool()) { if (_defined) - _exceptions.insert(_exceptions.at(rank), t); + _exceptions.insert(rank, t); return TRUE; } @@ -150,7 +150,7 @@ bool UmlBaseOperation::removeException(unsigned rank) if (UmlCom::read_bool()) { if (_defined) - _exceptions.remove(_exceptions.at(rank)); + _exceptions.removeAt(rank); return TRUE; } @@ -263,7 +263,7 @@ bool UmlBaseOperation::set_isCppInline(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::cppDef() +const QByteArray & UmlBaseOperation::cppDef() { read_if_needed_(); @@ -275,7 +275,7 @@ bool UmlBaseOperation::set_CppDef(const char * s) return set_it_(_cpp_def, s, setCppDefCmd); } -Q3CString UmlBaseOperation::cppBody() +QByteArray UmlBaseOperation::cppBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, cppBodyCmd); @@ -289,7 +289,7 @@ bool UmlBaseOperation::set_CppBody(const char * s) return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::cppNameSpec() +const QByteArray & UmlBaseOperation::cppNameSpec() { read_if_needed_(); @@ -381,7 +381,7 @@ bool UmlBaseOperation::set_isJavaSynchronized(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::javaDef() +const QByteArray & UmlBaseOperation::javaDef() { return javaDecl(); } @@ -391,7 +391,7 @@ bool UmlBaseOperation::set_JavaDef(const char * s) return set_JavaDecl(s); } -Q3CString UmlBaseOperation::javaBody() +QByteArray UmlBaseOperation::javaBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, javaBodyCmd); @@ -405,7 +405,7 @@ bool UmlBaseOperation::set_JavaBody(const char * s) return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::javaNameSpec() +const QByteArray & UmlBaseOperation::javaNameSpec() { read_if_needed_(); @@ -478,7 +478,7 @@ bool UmlBaseOperation::set_isPhpFinal(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::phpDef() +const QByteArray & UmlBaseOperation::phpDef() { return phpDecl(); } @@ -488,7 +488,7 @@ bool UmlBaseOperation::set_PhpDef(const char * s) return set_PhpDecl(s); } -Q3CString UmlBaseOperation::phpBody() +QByteArray UmlBaseOperation::phpBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, phpBodyCmd); @@ -502,7 +502,7 @@ bool UmlBaseOperation::set_PhpBody(const char * s) return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::phpNameSpec() +const QByteArray & UmlBaseOperation::phpNameSpec() { read_if_needed_(); @@ -556,7 +556,7 @@ bool UmlBaseOperation::set_PhpContextualBodyIndent(bool v) #endif #ifdef WITHPYTHON -const Q3CString & UmlBaseOperation::pythonDef() +const QByteArray & UmlBaseOperation::pythonDef() { return pythonDecl(); } @@ -566,7 +566,7 @@ bool UmlBaseOperation::set_PythonDef(const char * s) return set_PythonDecl(s); } -Q3CString UmlBaseOperation::pythonBody() +QByteArray UmlBaseOperation::pythonBody() { // not memorized in the instance for memory size reason UmlCom::send_cmd(_identifier, pythonBodyCmd); @@ -580,7 +580,7 @@ bool UmlBaseOperation::set_PythonBody(const char * s) return UmlCom::read_bool(); } -const Q3CString & UmlBaseOperation::pythonNameSpec() +const QByteArray & UmlBaseOperation::pythonNameSpec() { read_if_needed_(); @@ -634,7 +634,7 @@ bool UmlBaseOperation::set_PythonContextualBodyIndent(bool v) #endif #ifdef WITHPYTHON -const Q3CString & UmlBaseOperation::pythonDecorators() +const QByteArray & UmlBaseOperation::pythonDecorators() { read_if_needed_(); return _python_decorators; @@ -666,7 +666,7 @@ bool UmlBaseOperation::set_isIdlOneway(bool y) return FALSE; } -const Q3CString & UmlBaseOperation::idlNameSpec() +const QByteArray & UmlBaseOperation::idlNameSpec() { read_if_needed_(); diff --git a/genplugouts/GlobalChange/UmlBaseOperation.h b/genplugouts/GlobalChange/UmlBaseOperation.h index fd0437960..14c03ec99 100644 --- a/genplugouts/GlobalChange/UmlBaseOperation.h +++ b/genplugouts/GlobalChange/UmlBaseOperation.h @@ -5,8 +5,8 @@ #include "UmlClassMember.h" #include "anItemKind.h" #include "UmlTypeSpec.h" -#include -#include +#include + #include "UmlParameter.h" class UmlOperation; @@ -52,7 +52,7 @@ class UmlBaseOperation : public UmlClassMember bool set_ReturnType(const UmlTypeSpec & t); // returns (in java a copy of) the parameters list - const Q3ValueList params(); + const QList params(); // adds a parameter at the given rank (0...) // @@ -70,7 +70,7 @@ class UmlBaseOperation : public UmlClassMember bool replaceParameter(unsigned rank, const UmlParameter & p); // returns the exceptions - const Q3ValueList exceptions(); + const QList exceptions(); // adds the exception at the given rank (0...) // @@ -130,7 +130,7 @@ class UmlBaseOperation : public UmlClassMember // returns the operation's definition in C++, notes that the declaration // is returned by the inherited ClassItemBase::CppDecl() operation - const Q3CString & cppDef(); + const QByteArray & cppDef(); // sets the operation's definition in C++, notes that the declaration // is set through the inherited ClassItemBase::set_CppDecl() operation @@ -139,9 +139,9 @@ class UmlBaseOperation : public UmlClassMember bool set_CppDef(const char * s); // returns the operation's body in C++, useless if the def does not - // contains ${body}. Note that the body is get each time from BOUML + // contains ${body}. Note that the body is get each time from DOUML // for memory size reason - Q3CString cppBody(); + QByteArray cppBody(); // sets the operation's body in C++, useless if the def does not // contains ${body} @@ -151,7 +151,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's C++ name must be generated - const Q3CString & cppNameSpec(); + const QByteArray & cppNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's C++ name must be generated @@ -199,7 +199,7 @@ class UmlBaseOperation : public UmlClassMember // returns the operation's definition in Java, notes that it is // already made by the inherited JavaDecl operation - const Q3CString & javaDef(); + const QByteArray & javaDef(); // sets the operation's definition in Java, notes that it is // already made by the inherited set_JavaDecl operation @@ -208,9 +208,9 @@ class UmlBaseOperation : public UmlClassMember bool set_JavaDef(const char * s); // returns the operation's body in Java++, useless if the def does - // not contains ${body} Note that the body is get each time from BOUML + // not contains ${body} Note that the body is get each time from DOUML // for memory size reason - Q3CString javaBody(); + QByteArray javaBody(); // sets the operation's body in Java, useless if the def does not // contains ${body} @@ -220,7 +220,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's JAVA name must be generated - const Q3CString & javaNameSpec(); + const QByteArray & javaNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's JAVA name must be generated @@ -260,7 +260,7 @@ class UmlBaseOperation : public UmlClassMember // returns the operation's definition in Php, notes that it is // already made by the inherited PhpDecl operation - const Q3CString & phpDef(); + const QByteArray & phpDef(); // sets the operation's definition in Php, notes that it is // already made by the inherited set_PhpDecl operation @@ -269,9 +269,9 @@ class UmlBaseOperation : public UmlClassMember bool set_PhpDef(const char * s); // returns the operation's body in Php++, useless if the def does - // not contains ${body} Note that the body is get each time from BOUML + // not contains ${body} Note that the body is get each time from DOUML // for memory size reason - Q3CString phpBody(); + QByteArray phpBody(); // sets the operation's body in Php, useless if the def does not // contains ${body} @@ -281,7 +281,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's PHP name must be generated - const Q3CString & phpNameSpec(); + const QByteArray & phpNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's PHP name must be generated @@ -313,7 +313,7 @@ class UmlBaseOperation : public UmlClassMember #ifdef WITHPYTHON // returns the operation's definition in Python, notes that it is // already made by the inherited PythonDecl operation - const Q3CString & pythonDef(); + const QByteArray & pythonDef(); // sets the operation's definition in Python, notes that it is // already made by the inherited set_PythonDecl operation @@ -322,9 +322,9 @@ class UmlBaseOperation : public UmlClassMember bool set_PythonDef(const char * s); // returns the operation's body in Python++, useless if the def does - // not contains ${body} Note that the body is get each time from BOUML + // not contains ${body} Note that the body is get each time from DOUML // for memory size reason - Q3CString pythonBody(); + QByteArray pythonBody(); // sets the operation's body in Python, useless if the def does not // contains ${body} @@ -334,7 +334,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's PYTHON name must be generated - const Q3CString & pythonNameSpec(); + const QByteArray & pythonNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's PYTHON name must be generated @@ -365,7 +365,7 @@ class UmlBaseOperation : public UmlClassMember #ifdef WITHPYTHON // return the decorators - const Q3CString & pythonDecorators(); + const QByteArray & pythonDecorators(); // set the decorators // @@ -384,7 +384,7 @@ class UmlBaseOperation : public UmlClassMember // in case the operation is a 'get' or 'set' operation, returns how // the operation's IDL name must be generated - const Q3CString & idlNameSpec(); + const QByteArray & idlNameSpec(); // in case the operation is a 'get' or 'set' operation, returns how // the operation's IDL name must be generated @@ -478,32 +478,32 @@ class UmlBaseOperation : public UmlClassMember UmlTypeSpec _return_type; - Q3ValueList _params; + QList _params; - Q3ValueList _exceptions; + QList _exceptions; #ifdef WITHCPP - Q3CString _cpp_def; + QByteArray _cpp_def; - Q3CString _cpp_name_spec; + QByteArray _cpp_name_spec; #endif #ifdef WITHJAVA - Q3CString _java_name_spec; + QByteArray _java_name_spec; #endif #ifdef WITHPHP - Q3CString _php_name_spec; + QByteArray _php_name_spec; #endif #ifdef WITHPYTHON - Q3CString _python_name_spec; + QByteArray _python_name_spec; - Q3CString _python_decorators; + QByteArray _python_decorators; #endif #ifdef WITHIDL - Q3CString _idl_name_spec; + QByteArray _idl_name_spec; #endif // exclusive with set_of @@ -515,7 +515,7 @@ class UmlBaseOperation : public UmlClassMember protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseOperation(void * id, const Q3CString & n); + UmlBaseOperation(void * id, const QByteArray & n); //internal, do NOT use it @@ -553,7 +553,7 @@ class UmlBaseOperation : public UmlClassMember }; -inline UmlBaseOperation::UmlBaseOperation(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseOperation::UmlBaseOperation(void * id, const QByteArray & n) : UmlClassMember(id, n) { _get_of = 0; _set_of = 0; diff --git a/genplugouts/GlobalChange/UmlBasePackage.cpp b/genplugouts/GlobalChange/UmlBasePackage.cpp index dcef8ed04..a4a083250 100644 --- a/genplugouts/GlobalChange/UmlBasePackage.cpp +++ b/genplugouts/GlobalChange/UmlBasePackage.cpp @@ -7,7 +7,7 @@ #include "Tools/ApiCmd.h" #include "Tools/ApiCmd.h" //Added by qt3to4: -#include +#include UmlPackage * UmlBasePackage::create(UmlPackage * parent, const char * name) { return (UmlPackage *) parent->create_(aPackage, name); @@ -38,43 +38,43 @@ bool UmlBasePackage::set_AssociatedDiagram(UmlDiagram * d) } #ifdef WITHCPP -const Q3CString & UmlBasePackage::cppSrcDir() +const QByteArray & UmlBasePackage::cppSrcDir() { read_if_needed_(); return _cpp_src_dir; } -bool UmlBasePackage::set_CppSrcDir(const Q3CString & s) +bool UmlBasePackage::set_CppSrcDir(const QByteArray & s) { return set_it_(_cpp_src_dir, s, setCppSrcDirCmd); } -const Q3CString & UmlBasePackage::cppHDir() +const QByteArray & UmlBasePackage::cppHDir() { read_if_needed_(); return _cpp_h_dir; } -bool UmlBasePackage::set_CppHDir(const Q3CString & s) +bool UmlBasePackage::set_CppHDir(const QByteArray & s) { return set_it_(_cpp_h_dir, s, setCppHDirCmd); } -Q3CString UmlBasePackage::cppNamespace() +QByteArray UmlBasePackage::cppNamespace() { read_if_needed_(); return _cpp_namespace; } -bool UmlBasePackage::set_CppNamespace(const Q3CString & s) +bool UmlBasePackage::set_CppNamespace(const QByteArray & s) { return set_it_(_cpp_namespace, s, setCppNamespaceCmd); } -UmlPackage * UmlBasePackage::findCppNamespace(const Q3CString & n) const +UmlPackage * UmlBasePackage::findCppNamespace(const QByteArray & n) const { UmlCom::send_cmd(packageGlobalCmd, findCppNamespaceCmd, _identifier, n); @@ -83,31 +83,31 @@ UmlPackage * UmlBasePackage::findCppNamespace(const Q3CString & n) const #endif #ifdef WITHJAVA -const Q3CString & UmlBasePackage::javaDir() +const QByteArray & UmlBasePackage::javaDir() { read_if_needed_(); return _java_dir; } -bool UmlBasePackage::set_JavaDir(const Q3CString & s) +bool UmlBasePackage::set_JavaDir(const QByteArray & s) { return set_it_(_java_dir, s, setJavaDirCmd); } -Q3CString UmlBasePackage::javaPackage() +QByteArray UmlBasePackage::javaPackage() { read_if_needed_(); return _java_package; } -bool UmlBasePackage::set_JavaPackage(const Q3CString & s) +bool UmlBasePackage::set_JavaPackage(const QByteArray & s) { return set_it_(_java_package, s, setJavaPackageCmd); } -UmlPackage * UmlBasePackage::findJavaPackage(const Q3CString & n) const +UmlPackage * UmlBasePackage::findJavaPackage(const QByteArray & n) const { UmlCom::send_cmd(packageGlobalCmd, findJavaPackageCmd, _identifier, n); @@ -116,45 +116,45 @@ UmlPackage * UmlBasePackage::findJavaPackage(const Q3CString & n) const #endif #ifdef WITHPHP -const Q3CString & UmlBasePackage::phpDir() +const QByteArray & UmlBasePackage::phpDir() { read_if_needed_(); return _php_dir; } -bool UmlBasePackage::set_PhpDir(const Q3CString & s) +bool UmlBasePackage::set_PhpDir(const QByteArray & s) { return set_it_(_php_dir, s, setPhpDirCmd); } #endif #ifdef WITHPYTHON -const Q3CString & UmlBasePackage::pythonDir() +const QByteArray & UmlBasePackage::pythonDir() { read_if_needed_(); return _python_dir; } -bool UmlBasePackage::set_PythonDir(const Q3CString & s) +bool UmlBasePackage::set_PythonDir(const QByteArray & s) { return set_it_(_python_dir, s, setPythonDirCmd); } -Q3CString UmlBasePackage::pythonPackage() +QByteArray UmlBasePackage::pythonPackage() { read_if_needed_(); return _python_package; } -bool UmlBasePackage::set_PythonPackage(const Q3CString & s) +bool UmlBasePackage::set_PythonPackage(const QByteArray & s) { return set_it_(_python_package, s, setPythonPackageCmd); } -UmlPackage * UmlBasePackage::findPythonPackage(const Q3CString & n) const +UmlPackage * UmlBasePackage::findPythonPackage(const QByteArray & n) const { UmlCom::send_cmd(packageGlobalCmd, findPythonPackageCmd, _identifier, n); @@ -163,31 +163,31 @@ UmlPackage * UmlBasePackage::findPythonPackage(const Q3CString & n) const #endif #ifdef WITHIDL -const Q3CString & UmlBasePackage::idlDir() +const QByteArray & UmlBasePackage::idlDir() { read_if_needed_(); return _idl_dir; } -bool UmlBasePackage::set_IdlDir(const Q3CString & s) +bool UmlBasePackage::set_IdlDir(const QByteArray & s) { return set_it_(_idl_dir, s, setIdlDirCmd); } -Q3CString UmlBasePackage::idlModule() +QByteArray UmlBasePackage::idlModule() { read_if_needed_(); return _idl_module; } -bool UmlBasePackage::set_IdlModule(const Q3CString & s) +bool UmlBasePackage::set_IdlModule(const QByteArray & s) { return set_it_(_idl_module, s, setIdlModuleCmd); } -UmlPackage * UmlBasePackage::findIdlModule(const Q3CString & n) const +UmlPackage * UmlBasePackage::findIdlModule(const QByteArray & n) const { UmlCom::send_cmd(packageGlobalCmd, findIdlModuleCmd, _identifier, n); @@ -214,7 +214,7 @@ void UmlBasePackage::saveProject() UmlCom::send_cmd(packageGlobalCmd, saveProjectCmd); } -void UmlBasePackage::loadProject(Q3CString p) +void UmlBasePackage::loadProject(QByteArray p) { UmlCom::send_cmd(miscGlobalCmd, loadCmd, (const char *) p); } diff --git a/genplugouts/GlobalChange/UmlBasePackage.h b/genplugouts/GlobalChange/UmlBasePackage.h index 5e761888b..de75405b3 100644 --- a/genplugouts/GlobalChange/UmlBasePackage.h +++ b/genplugouts/GlobalChange/UmlBasePackage.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlPackage; class UmlDiagram; @@ -34,125 +34,125 @@ class UmlBasePackage : public UmlItem #ifdef WITHCPP // returns the path where the C++ source files are generated by the // c++ generator. - const Q3CString & cppSrcDir(); + const QByteArray & cppSrcDir(); // to set the path where the C++ source files are generated by the // C++ generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppSrcDir(const Q3CString & s); + bool set_CppSrcDir(const QByteArray & s); // returns the path where the C++ header files are generated by the // C++ generator. - const Q3CString & cppHDir(); + const QByteArray & cppHDir(); // to set the path where the C++ header files are generated by the // C++ generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppHDir(const Q3CString & s); + bool set_CppHDir(const QByteArray & s); //returns the namespace name associed to the package - Q3CString cppNamespace(); + QByteArray cppNamespace(); //to set the namespace name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_CppNamespace(const Q3CString & s); + bool set_CppNamespace(const QByteArray & s); // returns a sub package of the current one having the c++ namespace 'n' // (including the current one), else 0/null - UmlPackage * findCppNamespace(const Q3CString & n) const; + UmlPackage * findCppNamespace(const QByteArray & n) const; #endif #ifdef WITHJAVA // returns the path where the JAVA files are generated by the // JAVA generator. - const Q3CString & javaDir(); + const QByteArray & javaDir(); // to set the path where the JAVA files are generated by the // JAVA generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaDir(const Q3CString & s); + bool set_JavaDir(const QByteArray & s); //returns the java package name associed to the package - Q3CString javaPackage(); + QByteArray javaPackage(); // to set the java package name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_JavaPackage(const Q3CString & s); + bool set_JavaPackage(const QByteArray & s); // returns a sub package of the current one having the Java package 'n' // (including the current one), else 0/null - UmlPackage * findJavaPackage(const Q3CString & n) const; + UmlPackage * findJavaPackage(const QByteArray & n) const; #endif #ifdef WITHPHP // returns the path where the PHP files are generated by the // PHP generator. - const Q3CString & phpDir(); + const QByteArray & phpDir(); // to set the path where the PHP files are generated by the // PHP generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PhpDir(const Q3CString & s); + bool set_PhpDir(const QByteArray & s); #endif #ifdef WITHPYTHON // returns the path where the PYTHON files are generated by the // PYTHON generator. - const Q3CString & pythonDir(); + const QByteArray & pythonDir(); // to set the path where the PYTHON files are generated by the // PYTHON generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PythonDir(const Q3CString & s); + bool set_PythonDir(const QByteArray & s); //returns the python package name associed to the package - Q3CString pythonPackage(); + QByteArray pythonPackage(); // to set the python package name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_PythonPackage(const Q3CString & s); + bool set_PythonPackage(const QByteArray & s); // returns a sub package of the current one having the Python package 'n' // (including the current one), else 0/null - UmlPackage * findPythonPackage(const Q3CString & n) const; + UmlPackage * findPythonPackage(const QByteArray & n) const; #endif #ifdef WITHIDL // returns the path where the IDL files are generated by the // IDL generator. - const Q3CString & idlDir(); + const QByteArray & idlDir(); // to set the path where the IDL files are generated by the // IDL generator, may be relative even the 'root' path is not // (already) an absolute path // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlDir(const Q3CString & s); + bool set_IdlDir(const QByteArray & s); //returns the module name associed to the package - Q3CString idlModule(); + QByteArray idlModule(); // to set the module name associed to the package. // // On error return FALSE in C++, produce a RuntimeException in Java - bool set_IdlModule(const Q3CString & s); + bool set_IdlModule(const QByteArray & s); // returns a sub package of the current one having the IDL module 'n' // (including the current one), else 0/null - UmlPackage * findIdlModule(const Q3CString & n) const; + UmlPackage * findIdlModule(const QByteArray & n) const; #endif // Returns the project @@ -165,12 +165,12 @@ class UmlBasePackage : public UmlItem //save the project if needed static void saveProject(); - //Does nothing in case an edition is on going under BOUML. Else : + //Does nothing in case an edition is on going under DOUML. Else : //close the current project (in case it is not saved the last modifications are lost), //load the specified one, and all the communications with the plug-outs including the //current one are closed. - static void loadProject(Q3CString p); + static void loadProject(QByteArray p); // Force consistency concerning the profiles and their stereotypes @@ -189,35 +189,35 @@ class UmlBasePackage : public UmlItem UmlDiagram * _assoc_diagram; #ifdef WITHCPP - Q3CString _cpp_src_dir; + QByteArray _cpp_src_dir; - Q3CString _cpp_h_dir; + QByteArray _cpp_h_dir; - Q3CString _cpp_namespace; + QByteArray _cpp_namespace; #endif #ifdef WITHJAVA - Q3CString _java_dir; + QByteArray _java_dir; - Q3CString _java_package; + QByteArray _java_package; #endif #ifdef WITHPHP - Q3CString _php_dir; + QByteArray _php_dir; #endif #ifdef WITHPYTHON - Q3CString _python_dir; + QByteArray _python_dir; - Q3CString _python_package; + QByteArray _python_package; #endif #ifdef WITHIDL - Q3CString _idl_dir; + QByteArray _idl_dir; - Q3CString _idl_module; + QByteArray _idl_module; #endif @@ -258,11 +258,11 @@ class UmlBasePackage : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBasePackage(void * id, const Q3CString & n); + UmlBasePackage(void * id, const QByteArray & n); }; -inline UmlBasePackage::UmlBasePackage(void * id, const Q3CString & n) : UmlItem(id, n) +inline UmlBasePackage::UmlBasePackage(void * id, const QByteArray & n) : UmlItem(id, n) { _assoc_diagram = 0; } diff --git a/genplugouts/GlobalChange/UmlBaseParameter.h b/genplugouts/GlobalChange/UmlBaseParameter.h index 71202a64d..0fdea9d7f 100644 --- a/genplugouts/GlobalChange/UmlBaseParameter.h +++ b/genplugouts/GlobalChange/UmlBaseParameter.h @@ -2,16 +2,16 @@ #define _UMLBASEPARAMETER_H -#include + #include "UmlTypeSpec.h" #include "aDirection.h" // Represent an operation's parameter struct UmlBaseParameter { - Q3CString name; + QByteArray name; - Q3CString default_value; + QByteArray default_value; UmlTypeSpec type; diff --git a/genplugouts/GlobalChange/UmlBaseParameterSet.cpp b/genplugouts/GlobalChange/UmlBaseParameterSet.cpp index 307417d45..2c680249f 100644 --- a/genplugouts/GlobalChange/UmlBaseParameterSet.cpp +++ b/genplugouts/GlobalChange/UmlBaseParameterSet.cpp @@ -15,15 +15,15 @@ anItemKind UmlBaseParameterSet::kind() return aParameterSet; } -const Q3PtrVector & UmlBaseParameterSet::pins() +const QVector & UmlBaseParameterSet::pins() { read_if_needed_(); return _pins; } -bool UmlBaseParameterSet::set_Pins(const Q3PtrVector & v) +bool UmlBaseParameterSet::set_Pins(const QVector & v) { - UmlCom::send_cmd(_identifier, replaceParameterCmd, (const Q3PtrVector &) v); + UmlCom::send_cmd(_identifier, replaceParameterCmd, (const QVector &) v); if (UmlCom::read_bool()) { if (_defined) _pins = v; @@ -43,6 +43,6 @@ void UmlBaseParameterSet::unload(bool rec, bool del) void UmlBaseParameterSet::read_uml_() { UmlBaseItem::read_uml_(); - UmlCom::read_item_list((Q3PtrVector &) _pins); + UmlCom::read_item_list((QVector &) _pins); } diff --git a/genplugouts/GlobalChange/UmlBaseParameterSet.h b/genplugouts/GlobalChange/UmlBaseParameterSet.h index 71e77cbfe..37c507a5b 100644 --- a/genplugouts/GlobalChange/UmlBaseParameterSet.h +++ b/genplugouts/GlobalChange/UmlBaseParameterSet.h @@ -1,11 +1,11 @@ #ifndef _UMLBASEPARAMETERSET_H #define _UMLBASEPARAMETERSET_H - +#include #include "UmlItem.h" #include "anItemKind.h" -#include -#include + + class UmlActivityParameter; class UmlActivityAction; @@ -27,16 +27,16 @@ class UmlBaseParameterSet : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseParameterSet(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseParameterSet(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the pins part of the parameter set - const Q3PtrVector & pins(); + const QVector & pins(); // set the pins - bool set_Pins(const Q3PtrVector & v); + bool set_Pins(const QVector & v); // to unload the object to free memory, it will be reloaded automatically // if needed. Recursively done for the sub items if 'rec' is TRUE. @@ -48,7 +48,7 @@ class UmlBaseParameterSet : public UmlItem private: - Q3PtrVector _pins; + QVector _pins; protected: diff --git a/genplugouts/GlobalChange/UmlBasePinParameter.h b/genplugouts/GlobalChange/UmlBasePinParameter.h index d629b7122..6b3d683a4 100644 --- a/genplugouts/GlobalChange/UmlBasePinParameter.h +++ b/genplugouts/GlobalChange/UmlBasePinParameter.h @@ -3,7 +3,7 @@ #include "UmlActivityObject.h" -#include + #include "aDirection.h" #include "aParameterEffectKind.h" @@ -11,7 +11,7 @@ class UmlBasePinParameter : public UmlActivityObject { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBasePinParameter(void * id, const Q3CString & s) : UmlActivityObject(id, s) { + UmlBasePinParameter(void * id, const QByteArray & s) : UmlActivityObject(id, s) { } diff --git a/genplugouts/GlobalChange/UmlBaseRegion.h b/genplugouts/GlobalChange/UmlBaseRegion.h index 58a9f8b78..efd32acb9 100644 --- a/genplugouts/GlobalChange/UmlBaseRegion.h +++ b/genplugouts/GlobalChange/UmlBaseRegion.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlRegion; class UmlState; @@ -25,7 +25,7 @@ class UmlBaseRegion : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRegion(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseRegion(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseRelation.cpp b/genplugouts/GlobalChange/UmlBaseRelation.cpp index 3c141d439..860b61402 100644 --- a/genplugouts/GlobalChange/UmlBaseRelation.cpp +++ b/genplugouts/GlobalChange/UmlBaseRelation.cpp @@ -7,7 +7,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlRelation * UmlBaseRelation::create(aRelationKind kind, UmlClass * start, UmlClass * end) { UmlCom::send_cmd(start->_identifier, createCmd, aRelation, @@ -139,7 +139,7 @@ bool UmlBaseRelation::set_isUnique(bool v) return FALSE; } -const Q3CString & UmlBaseRelation::defaultValue() +const QByteArray & UmlBaseRelation::defaultValue() { read_if_needed_(); @@ -151,7 +151,7 @@ bool UmlBaseRelation::set_DefaultValue(const char * s) return set_it_(_default_value, s, setDefaultValueCmd); } -bool UmlBaseRelation::set_Stereotype(const Q3CString & s) +bool UmlBaseRelation::set_Stereotype(const QByteArray & s) { if (UmlBaseItem::set_Stereotype(s)) { UmlBaseRelation * other = (UmlBaseRelation *) UmlBaseItem::read_(); @@ -193,7 +193,7 @@ bool UmlBaseRelation::set_Association(const UmlTypeSpec & t) return FALSE; } -const Q3CString & UmlBaseRelation::roleName() +const QByteArray & UmlBaseRelation::roleName() { read_if_needed_(); @@ -205,7 +205,7 @@ bool UmlBaseRelation::set_RoleName(const char * s) return set_it_(_role_name, s, setRoleNameCmd); } -const Q3CString & UmlBaseRelation::multiplicity() +const QByteArray & UmlBaseRelation::multiplicity() { read_if_needed_(); @@ -337,7 +337,7 @@ bool UmlBaseRelation::set_isIdlTruncatableInheritance(bool y) return FALSE; } -Q3CString UmlBaseRelation::idlCase() +QByteArray UmlBaseRelation::idlCase() { read_if_needed_(); diff --git a/genplugouts/GlobalChange/UmlBaseRelation.h b/genplugouts/GlobalChange/UmlBaseRelation.h index 536a4eee9..ed2d12172 100644 --- a/genplugouts/GlobalChange/UmlBaseRelation.h +++ b/genplugouts/GlobalChange/UmlBaseRelation.h @@ -5,7 +5,7 @@ #include "UmlClassMember.h" #include "aRelationKind.h" #include "anItemKind.h" -#include + #include "UmlTypeSpec.h" class UmlRelation; @@ -71,7 +71,7 @@ class UmlBaseRelation : public UmlClassMember bool set_isUnique(bool v); // returns the default relation value, may be an empty string - const Q3CString & defaultValue(); + const QByteArray & defaultValue(); // to set the default relation value ("" allowed) // @@ -83,7 +83,7 @@ class UmlBaseRelation : public UmlClassMember // On error return FALSE in C++, produce a RuntimeException in Java // redefined in case the relation is bidirectional to set the stereotype // of the relation corresponding to the other direction - virtual bool set_Stereotype(const Q3CString & s); + virtual bool set_Stereotype(const QByteArray & s); // returns the 'end' class (the 'start' class is the parent of the relation) no set ! UmlClass * roleType(); @@ -97,7 +97,7 @@ class UmlBaseRelation : public UmlClassMember bool set_Association(const UmlTypeSpec & t); // returns the name of the role - const Q3CString & roleName(); + const QByteArray & roleName(); // to set the name of the role // @@ -105,7 +105,7 @@ class UmlBaseRelation : public UmlClassMember bool set_RoleName(const char * s); // returns the multiplicity (may be an empty string) - const Q3CString & multiplicity(); + const QByteArray & multiplicity(); // to set the multiplicity // @@ -168,7 +168,7 @@ class UmlBaseRelation : public UmlClassMember // in case the relation is an IDL union's member returns the // corresponding 'case', an empty string in case it is not specified - Q3CString idlCase(); + QByteArray idlCase(); // to set the 'case' even the relation is not (already) known as // an IDL union's member @@ -215,13 +215,13 @@ class UmlBaseRelation : public UmlClassMember bool _idl_truncatable : 1; #endif - Q3CString _default_value; + QByteArray _default_value; UmlClass * _role_type; - Q3CString _role_name; + QByteArray _role_name; - Q3CString _multiplicity; + QByteArray _multiplicity; UmlTypeSpec _association; @@ -233,7 +233,7 @@ class UmlBaseRelation : public UmlClassMember UmlAttribute * _idl_case; #ifdef WITHIDL - Q3CString _idl_explicit_case; + QByteArray _idl_explicit_case; #endif @@ -273,11 +273,11 @@ class UmlBaseRelation : public UmlClassMember #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseRelation(void * id, const Q3CString & n); + UmlBaseRelation(void * id, const QByteArray & n); }; -inline UmlBaseRelation::UmlBaseRelation(void * id, const Q3CString & n) : UmlClassMember(id, n) +inline UmlBaseRelation::UmlBaseRelation(void * id, const QByteArray & n) : UmlClassMember(id, n) { _role_type = 0; _get_oper = 0; diff --git a/genplugouts/GlobalChange/UmlBaseSequenceDiagram.h b/genplugouts/GlobalChange/UmlBaseSequenceDiagram.h index 345c08b13..5f33ab882 100644 --- a/genplugouts/GlobalChange/UmlBaseSequenceDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseSequenceDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlSequenceDiagram; class UmlItem; @@ -27,7 +27,7 @@ class UmlBaseSequenceDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseSequenceDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n), _def(0) {}; + UmlBaseSequenceDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n), _def(0) {}; public: diff --git a/genplugouts/GlobalChange/UmlBaseSequenceDiagramDefinition.cpp b/genplugouts/GlobalChange/UmlBaseSequenceDiagramDefinition.cpp index eb3b1751b..975bbd0c3 100644 --- a/genplugouts/GlobalChange/UmlBaseSequenceDiagramDefinition.cpp +++ b/genplugouts/GlobalChange/UmlBaseSequenceDiagramDefinition.cpp @@ -2,7 +2,7 @@ #include "UmlCom.h" #include "UmlBaseSequenceDiagramDefinition.h" //Added by qt3to4: -#include +#include static void qsort(UmlSequenceMessage ** v, int low, int high) { @@ -40,7 +40,7 @@ static void qsort(UmlSequenceMessage ** v, int low, int high) } void UmlBaseSequenceDiagramDefinition::read_() { - Q3PtrDict instances; + QHash instances; unsigned n; unsigned rank; @@ -54,7 +54,7 @@ void UmlBaseSequenceDiagramDefinition::read_() f->read_(); } - _fragments.setAutoDelete(TRUE); + //_fragments.setAutoDelete(TRUE); UmlBaseFragment::compute_container_(_fragments); n = UmlCom::read_unsigned(); @@ -64,11 +64,11 @@ void UmlBaseSequenceDiagramDefinition::read_() UmlClassInstanceReference * i = new UmlClassInstanceReference(); _instances.insert(rank, i); - instances.insert((void *) UmlCom::read_unsigned(), i); + instances.insert(reinterpret_cast(uintptr_t(UmlCom::read_unsigned())), i); i->read_(); } - _instances.setAutoDelete(TRUE); + //_instances.setAutoDelete(TRUE); n = UmlCom::read_unsigned(); _messages.resize(n); @@ -82,7 +82,7 @@ void UmlBaseSequenceDiagramDefinition::read_() } ::qsort(_messages.data(), 0, n - 1); - _messages.setAutoDelete(TRUE); + //_messages.setAutoDelete(TRUE); } n = _fragments.count(); @@ -92,7 +92,7 @@ void UmlBaseSequenceDiagramDefinition::read_() while (UmlCom::read_bool()) { - Q3CString s = UmlCom::read_string(); + QByteArray s = UmlCom::read_string(); int x = (int) UmlCom::read_unsigned(); int y = (int) UmlCom::read_unsigned(); int w = (int) UmlCom::read_unsigned(); @@ -103,7 +103,7 @@ void UmlBaseSequenceDiagramDefinition::read_() } while (UmlCom::read_bool()) { - Q3CString s = UmlCom::read_string(); + QByteArray s = UmlCom::read_string(); int x = (int) UmlCom::read_unsigned(); int y = (int) UmlCom::read_unsigned(); int w = (int) UmlCom::read_unsigned(); diff --git a/genplugouts/GlobalChange/UmlBaseSequenceDiagramDefinition.h b/genplugouts/GlobalChange/UmlBaseSequenceDiagramDefinition.h index 6be419e66..f80c8b3f6 100644 --- a/genplugouts/GlobalChange/UmlBaseSequenceDiagramDefinition.h +++ b/genplugouts/GlobalChange/UmlBaseSequenceDiagramDefinition.h @@ -8,7 +8,7 @@ #include "UmlClassInstanceReference.h" #include "UmlSequenceMessage.h" -#include + class UmlClassInstanceReference; class UmlSequenceMessage; @@ -19,28 +19,28 @@ class UmlBaseSequenceDiagramDefinition { public: // return the instances present in the diagram - const Q3PtrVector & instances() const { + const QVector & instances() const { return _instances; } // return the messages present in the diagram, // ordonned following the sending time - const Q3PtrVector & messages() const { + const QVector & messages() const { return _messages; } // return the fragments present in the diagram - const Q3PtrVector & fragments() const { + const QVector & fragments() const { return _fragments; } private: - Q3PtrVector _instances; + QVector _instances; - Q3PtrVector _messages; + QVector _messages; - Q3PtrVector _fragments; + QVector _fragments; // internal, don't call it void read_(); diff --git a/genplugouts/GlobalChange/UmlBaseSequenceMessage.cpp b/genplugouts/GlobalChange/UmlBaseSequenceMessage.cpp index 379ba53a7..459327d24 100644 --- a/genplugouts/GlobalChange/UmlBaseSequenceMessage.cpp +++ b/genplugouts/GlobalChange/UmlBaseSequenceMessage.cpp @@ -5,7 +5,7 @@ #include "UmlClassInstanceReference.h" #include "UmlFragment.h" -void UmlBaseSequenceMessage::read_(const Q3PtrDict & instances, const Q3PtrVector & fragments) +void UmlBaseSequenceMessage::read_(const QHash &instances, const QVector &fragments) { UmlBaseMessage::read_(instances); _kind = (aMessageKind) UmlCom::read_char(); diff --git a/genplugouts/GlobalChange/UmlBaseSequenceMessage.h b/genplugouts/GlobalChange/UmlBaseSequenceMessage.h index 4eb0b884d..e53b0a32d 100644 --- a/genplugouts/GlobalChange/UmlBaseSequenceMessage.h +++ b/genplugouts/GlobalChange/UmlBaseSequenceMessage.h @@ -3,9 +3,9 @@ #include "aMessageKind.h" -#include -#include -#include + + + #include "UmlMessage.h" class UmlFragmentCompartment; @@ -37,7 +37,7 @@ class UmlBaseSequenceMessage : public UmlMessage } // return the arguments of the operation, may be empty - const Q3CString & arguments() const { + const QByteArray & arguments() const { return _args; } @@ -53,10 +53,10 @@ class UmlBaseSequenceMessage : public UmlMessage int _received_at; - Q3CString _args; + QByteArray _args; // internal, don't call it - void read_(const Q3PtrDict & instances, const Q3PtrVector & fragments); + void read_(const QHash &instances, const QVector &fragments); friend class UmlBaseSequenceDiagramDefinition; }; diff --git a/genplugouts/GlobalChange/UmlBaseShallowHistoryPseudoState.h b/genplugouts/GlobalChange/UmlBaseShallowHistoryPseudoState.h index 92bf0ce18..cb82c3ec1 100644 --- a/genplugouts/GlobalChange/UmlBaseShallowHistoryPseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseShallowHistoryPseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlShallowHistoryPseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseShallowHistoryPseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseShallowHistoryPseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseShallowHistoryPseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseState.cpp b/genplugouts/GlobalChange/UmlBaseState.cpp index fbdec19f6..5437698d7 100644 --- a/genplugouts/GlobalChange/UmlBaseState.cpp +++ b/genplugouts/GlobalChange/UmlBaseState.cpp @@ -4,7 +4,7 @@ #include "UmlState.h" #include "UmlStateDiagram.h" //Added by qt3to4: -#include +#include UmlState * UmlBaseState::create(UmlItem * parent, const char * s) { @@ -16,7 +16,7 @@ anItemKind UmlBaseState::kind() return aState; } -const Q3CString & UmlBaseState::entryBehavior() +const QByteArray & UmlBaseState::entryBehavior() { read_if_needed_(); return _uml.on_entry; @@ -27,7 +27,7 @@ bool UmlBaseState::set_EntryBehavior(const char * s) return set_it_(_uml.on_entry, s, setUmlEntryBehaviorCmd); } -const Q3CString & UmlBaseState::exitBehavior() +const QByteArray & UmlBaseState::exitBehavior() { read_if_needed_(); return _uml.on_exit; @@ -38,7 +38,7 @@ bool UmlBaseState::set_ExitBehavior(const char * s) return set_it_(_uml.on_exit, s, setUmlExitBehaviorCmd); } -const Q3CString & UmlBaseState::doActivity() +const QByteArray & UmlBaseState::doActivity() { read_if_needed_(); return _uml.do_activity; @@ -50,7 +50,7 @@ bool UmlBaseState::set_DoActivity(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseState::cppEntryBehavior() +const QByteArray & UmlBaseState::cppEntryBehavior() { read_if_needed_(); return _cpp.on_entry; @@ -61,7 +61,7 @@ bool UmlBaseState::set_CppEntryBehavior(const char * s) return set_it_(_cpp.on_entry, s, setCppEntryBehaviorCmd); } -const Q3CString & UmlBaseState::cppExitBehavior() +const QByteArray & UmlBaseState::cppExitBehavior() { read_if_needed_(); return _cpp.on_exit; @@ -72,7 +72,7 @@ bool UmlBaseState::set_CppExitBehavior(const char * s) return set_it_(_cpp.on_exit, s, setCppExitBehaviorCmd); } -const Q3CString & UmlBaseState::cppDoActivity() +const QByteArray & UmlBaseState::cppDoActivity() { read_if_needed_(); return _cpp.do_activity; @@ -85,7 +85,7 @@ bool UmlBaseState::set_CppDoActivity(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseState::javaEntryBehavior() +const QByteArray & UmlBaseState::javaEntryBehavior() { read_if_needed_(); return _java.on_entry; @@ -96,7 +96,7 @@ bool UmlBaseState::set_JavaEntryBehavior(const char * s) return set_it_(_java.on_entry, s, setJavaEntryBehaviorCmd); } -const Q3CString & UmlBaseState::javaExitBehavior() +const QByteArray & UmlBaseState::javaExitBehavior() { read_if_needed_(); return _java.on_exit; @@ -107,7 +107,7 @@ bool UmlBaseState::set_JavaExitBehavior(const char * s) return set_it_(_java.on_exit, s, setJavaExitBehaviorCmd); } -const Q3CString & UmlBaseState::javaDoActivity() +const QByteArray & UmlBaseState::javaDoActivity() { read_if_needed_(); return _java.do_activity; diff --git a/genplugouts/GlobalChange/UmlBaseState.h b/genplugouts/GlobalChange/UmlBaseState.h index 97337032a..480d1688a 100644 --- a/genplugouts/GlobalChange/UmlBaseState.h +++ b/genplugouts/GlobalChange/UmlBaseState.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "StateBehavior.h" class UmlState; @@ -26,13 +26,13 @@ class UmlBaseState : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseState(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseState(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the entry behavior in OCL - const Q3CString & entryBehavior(); + const QByteArray & entryBehavior(); // set the entry behavior in OCL // @@ -40,7 +40,7 @@ class UmlBaseState : public UmlItem bool set_EntryBehavior(const char * s); // return the exit behavior in OCL - const Q3CString & exitBehavior(); + const QByteArray & exitBehavior(); // set the exit behavior in OCL // @@ -48,7 +48,7 @@ class UmlBaseState : public UmlItem bool set_ExitBehavior(const char * s); // return the activity in OCL - const Q3CString & doActivity(); + const QByteArray & doActivity(); // set the activity in OCL // @@ -57,7 +57,7 @@ class UmlBaseState : public UmlItem #ifdef WITHCPP // return the entry behavior in C++ - const Q3CString & cppEntryBehavior(); + const QByteArray & cppEntryBehavior(); // set the entry behavior in C++ // @@ -65,7 +65,7 @@ class UmlBaseState : public UmlItem bool set_CppEntryBehavior(const char * s); // return the exit behavior in C++ - const Q3CString & cppExitBehavior(); + const QByteArray & cppExitBehavior(); // set the exit behavior in C++ // @@ -73,7 +73,7 @@ class UmlBaseState : public UmlItem bool set_CppExitBehavior(const char * s); // return the activity in C++ - const Q3CString & cppDoActivity(); + const QByteArray & cppDoActivity(); // set the activity in C++ // @@ -83,7 +83,7 @@ class UmlBaseState : public UmlItem #ifdef WITHJAVA // return the entry behavior in Java - const Q3CString & javaEntryBehavior(); + const QByteArray & javaEntryBehavior(); // set the entry behavior in Java // @@ -91,7 +91,7 @@ class UmlBaseState : public UmlItem bool set_JavaEntryBehavior(const char * s); // return the exit behavior in Java - const Q3CString & javaExitBehavior(); + const QByteArray & javaExitBehavior(); // set the exit behavior in Java // @@ -99,7 +99,7 @@ class UmlBaseState : public UmlItem bool set_JavaExitBehavior(const char * s); // return the activity in Java - const Q3CString & javaDoActivity(); + const QByteArray & javaDoActivity(); // set the activity in Java // diff --git a/genplugouts/GlobalChange/UmlBaseStateAction.cpp b/genplugouts/GlobalChange/UmlBaseStateAction.cpp index 32063a1ac..ddae8212d 100644 --- a/genplugouts/GlobalChange/UmlBaseStateAction.cpp +++ b/genplugouts/GlobalChange/UmlBaseStateAction.cpp @@ -3,7 +3,7 @@ #include "UmlBaseStateAction.h" #include "UmlStateAction.h" //Added by qt3to4: -#include +#include UmlStateAction * UmlBaseStateAction::create(UmlItem * parent) { @@ -15,7 +15,7 @@ anItemKind UmlBaseStateAction::kind() return aStateAction; } -const Q3CString & UmlBaseStateAction::expression() +const QByteArray & UmlBaseStateAction::expression() { read_if_needed_(); return _uml; @@ -27,7 +27,7 @@ bool UmlBaseStateAction::set_Expression(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseStateAction::cppExpression() +const QByteArray & UmlBaseStateAction::cppExpression() { read_if_needed_(); return _cpp; @@ -40,7 +40,7 @@ bool UmlBaseStateAction::set_CppExpression(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseStateAction::javaExpression() +const QByteArray & UmlBaseStateAction::javaExpression() { read_if_needed_(); return _java; diff --git a/genplugouts/GlobalChange/UmlBaseStateAction.h b/genplugouts/GlobalChange/UmlBaseStateAction.h index 058903e1f..0ddee639e 100644 --- a/genplugouts/GlobalChange/UmlBaseStateAction.h +++ b/genplugouts/GlobalChange/UmlBaseStateAction.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlStateAction; @@ -24,13 +24,13 @@ class UmlBaseStateAction : public UmlItem protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseStateAction(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseStateAction(void * id, const QByteArray & s) : UmlItem(id, s) { } public: // return the expression in OCL - const Q3CString & expression(); + const QByteArray & expression(); // set the expression in OCL // @@ -39,7 +39,7 @@ class UmlBaseStateAction : public UmlItem #ifdef WITHCPP // return the expression in C++ - const Q3CString & cppExpression(); + const QByteArray & cppExpression(); // set the expression in C++ // @@ -49,7 +49,7 @@ class UmlBaseStateAction : public UmlItem #ifdef WITHJAVA // return the expression in Java - const Q3CString & javaExpression(); + const QByteArray & javaExpression(); // set the expression in Java // @@ -67,14 +67,14 @@ class UmlBaseStateAction : public UmlItem private: - Q3CString _uml; + QByteArray _uml; #ifdef WITHCPP - Q3CString _cpp; + QByteArray _cpp; #endif #ifdef WITHJAVA - Q3CString _java; + QByteArray _java; #endif diff --git a/genplugouts/GlobalChange/UmlBaseStateDiagram.h b/genplugouts/GlobalChange/UmlBaseStateDiagram.h index ea7e37ee0..d3c5bd101 100644 --- a/genplugouts/GlobalChange/UmlBaseStateDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseStateDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlStateDiagram; class UmlState; @@ -25,7 +25,7 @@ class UmlBaseStateDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseStateDiagram(void * id, const Q3CString & s) : UmlDiagram(id, s) { + UmlBaseStateDiagram(void * id, const QByteArray & s) : UmlDiagram(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseSubject.cpp b/genplugouts/GlobalChange/UmlBaseSubject.cpp index b15d380d3..f55c74c8a 100644 --- a/genplugouts/GlobalChange/UmlBaseSubject.cpp +++ b/genplugouts/GlobalChange/UmlBaseSubject.cpp @@ -12,7 +12,7 @@ void UmlBaseSubject::read_() _h = (int) UmlCom::read_unsigned(); } -UmlSubject * UmlBaseSubject::get_container_(int x, int y, int w, int h, const Q3PtrVector & subjects) +UmlSubject * UmlBaseSubject::get_container_(int x, int y, int w, int h, const QVector & subjects) { int rank = subjects.count(); diff --git a/genplugouts/GlobalChange/UmlBaseSubject.h b/genplugouts/GlobalChange/UmlBaseSubject.h index da0098ff6..a7ee545c2 100644 --- a/genplugouts/GlobalChange/UmlBaseSubject.h +++ b/genplugouts/GlobalChange/UmlBaseSubject.h @@ -1,10 +1,10 @@ #ifndef _UMLBASESUBJECT_H #define _UMLBASESUBJECT_H +#include -#include -#include +#include class UmlSubject; // this class manages subjects @@ -12,13 +12,13 @@ class UmlBaseSubject { public: // return the name - const Q3CString & name() const { + const QByteArray & name() const { return _name; } private: - Q3CString _name; + QByteArray _name; int _x; @@ -34,7 +34,7 @@ class UmlBaseSubject public: // internal - static UmlSubject * get_container_(int x, int y, int w, int h, const Q3PtrVector & subjects); + static UmlSubject * get_container_(int x, int y, int w, int h, const QVector & subjects); friend class UmlBaseUseCaseDiagramDefinition; }; diff --git a/genplugouts/GlobalChange/UmlBaseTerminatePseudoState.h b/genplugouts/GlobalChange/UmlBaseTerminatePseudoState.h index e8553f4be..5328f4055 100644 --- a/genplugouts/GlobalChange/UmlBaseTerminatePseudoState.h +++ b/genplugouts/GlobalChange/UmlBaseTerminatePseudoState.h @@ -4,7 +4,7 @@ #include "UmlPseudoState.h" #include "anItemKind.h" -#include + class UmlTerminatePseudoState; class UmlItem; @@ -25,7 +25,7 @@ class UmlBaseTerminatePseudoState : public UmlPseudoState protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseTerminatePseudoState(void * id, const Q3CString & s) : UmlPseudoState(id, s) { + UmlBaseTerminatePseudoState(void * id, const QByteArray & s) : UmlPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseTransition.cpp b/genplugouts/GlobalChange/UmlBaseTransition.cpp index 8fe2570a0..7dec536d7 100644 --- a/genplugouts/GlobalChange/UmlBaseTransition.cpp +++ b/genplugouts/GlobalChange/UmlBaseTransition.cpp @@ -3,7 +3,7 @@ #include "UmlBaseTransition.h" #include "UmlTransition.h" //Added by qt3to4: -#include +#include anItemKind UmlBaseTransition::kind() { @@ -39,7 +39,7 @@ bool UmlBaseTransition::set_IsExternal(bool v) return set_it_(_is_external, v, setIsCppExternalCmd); } -const Q3CString & UmlBaseTransition::trigger() +const QByteArray & UmlBaseTransition::trigger() { read_if_needed_(); return _uml.trigger; @@ -50,7 +50,7 @@ bool UmlBaseTransition::set_Trigger(const char * s) return set_it_(_uml.trigger, s, setUmlTriggerCmd); } -const Q3CString & UmlBaseTransition::guard() +const QByteArray & UmlBaseTransition::guard() { read_if_needed_(); return _uml.guard; @@ -61,7 +61,7 @@ bool UmlBaseTransition::set_Guard(const char * s) return set_it_(_uml.guard, s, setUmlGuardCmd); } -const Q3CString & UmlBaseTransition::activity() +const QByteArray & UmlBaseTransition::activity() { read_if_needed_(); return _uml.activity; @@ -73,7 +73,7 @@ bool UmlBaseTransition::set_Activity(const char * s) } #ifdef WITHCPP -const Q3CString & UmlBaseTransition::cppTrigger() +const QByteArray & UmlBaseTransition::cppTrigger() { read_if_needed_(); return _cpp.trigger; @@ -84,7 +84,7 @@ bool UmlBaseTransition::set_CppTrigger(const char * s) return set_it_(_cpp.trigger, s, setCppTriggerCmd); } -const Q3CString & UmlBaseTransition::cppGuard() +const QByteArray & UmlBaseTransition::cppGuard() { read_if_needed_(); return _cpp.guard; @@ -95,7 +95,7 @@ bool UmlBaseTransition::set_CppGuard(const char * s) return set_it_(_cpp.guard, s, setCppGuardCmd); } -const Q3CString & UmlBaseTransition::cppActivity() +const QByteArray & UmlBaseTransition::cppActivity() { read_if_needed_(); return _cpp.activity; @@ -108,7 +108,7 @@ bool UmlBaseTransition::set_CppActivity(const char * s) #endif #ifdef WITHJAVA -const Q3CString & UmlBaseTransition::javaTrigger() +const QByteArray & UmlBaseTransition::javaTrigger() { read_if_needed_(); return _java.trigger; @@ -119,7 +119,7 @@ bool UmlBaseTransition::set_JavaTrigger(const char * s) return set_it_(_java.trigger, s, setJavaTriggerCmd); } -const Q3CString & UmlBaseTransition::javaGuard() +const QByteArray & UmlBaseTransition::javaGuard() { read_if_needed_(); return _java.guard; @@ -130,7 +130,7 @@ bool UmlBaseTransition::set_JavaGuard(const char * s) return set_it_(_java.guard, s, setJavaGuardCmd); } -const Q3CString & UmlBaseTransition::javaActivity() +const QByteArray & UmlBaseTransition::javaActivity() { read_if_needed_(); return _java.activity; diff --git a/genplugouts/GlobalChange/UmlBaseTransition.h b/genplugouts/GlobalChange/UmlBaseTransition.h index 0cf346693..df0dded28 100644 --- a/genplugouts/GlobalChange/UmlBaseTransition.h +++ b/genplugouts/GlobalChange/UmlBaseTransition.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + #include "TransitionBehavior.h" class UmlTransition; @@ -36,7 +36,7 @@ class UmlBaseTransition : public UmlItem bool set_IsExternal(bool v); // return the trigger in OCL - const Q3CString & trigger(); + const QByteArray & trigger(); // set the trigger in OCL // @@ -44,7 +44,7 @@ class UmlBaseTransition : public UmlItem bool set_Trigger(const char * s); // return the guard in OCL - const Q3CString & guard(); + const QByteArray & guard(); // set the guard in OCL // @@ -52,7 +52,7 @@ class UmlBaseTransition : public UmlItem bool set_Guard(const char * s); // return the activity in OCL - const Q3CString & activity(); + const QByteArray & activity(); // set the activity in OCL // @@ -61,7 +61,7 @@ class UmlBaseTransition : public UmlItem #ifdef WITHCPP // return the trigger in C++ - const Q3CString & cppTrigger(); + const QByteArray & cppTrigger(); // set the trigger in C++ // @@ -69,7 +69,7 @@ class UmlBaseTransition : public UmlItem bool set_CppTrigger(const char * s); // return the guard in C++ - const Q3CString & cppGuard(); + const QByteArray & cppGuard(); // set the guard in C++ // @@ -77,7 +77,7 @@ class UmlBaseTransition : public UmlItem bool set_CppGuard(const char * s); // return the activity in C++ - const Q3CString & cppActivity(); + const QByteArray & cppActivity(); // set the activity in C++ // @@ -87,7 +87,7 @@ class UmlBaseTransition : public UmlItem #ifdef WITHJAVA // return the trigger in Java - const Q3CString & javaTrigger(); + const QByteArray & javaTrigger(); // set the trigger in Java // @@ -95,7 +95,7 @@ class UmlBaseTransition : public UmlItem bool set_JavaTrigger(const char * s); // return the guard in Java - const Q3CString & javaGuard(); + const QByteArray & javaGuard(); // set the guard in Java // @@ -103,7 +103,7 @@ class UmlBaseTransition : public UmlItem bool set_JavaGuard(const char * s); // return the activity in Java - const Q3CString & javaActivity(); + const QByteArray & javaActivity(); // set the activity in Java // @@ -152,7 +152,7 @@ class UmlBaseTransition : public UmlItem #endif // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseTransition(void * id, const Q3CString & n) : UmlItem(id, n) { + UmlBaseTransition(void * id, const QByteArray & n) : UmlItem(id, n) { } }; diff --git a/genplugouts/GlobalChange/UmlBaseTypeSpec.cpp b/genplugouts/GlobalChange/UmlBaseTypeSpec.cpp index 4070a4a45..cddda026a 100644 --- a/genplugouts/GlobalChange/UmlBaseTypeSpec.cpp +++ b/genplugouts/GlobalChange/UmlBaseTypeSpec.cpp @@ -2,9 +2,9 @@ #include "UmlBaseTypeSpec.h" #include "UmlClass.h" //Added by qt3to4: -#include +#include -const Q3CString & UmlBaseTypeSpec::toString() const +const QByteArray & UmlBaseTypeSpec::toString() const { return (type) ? type->name() : explicit_type; } diff --git a/genplugouts/GlobalChange/UmlBaseTypeSpec.h b/genplugouts/GlobalChange/UmlBaseTypeSpec.h index 16fce750a..65940678a 100644 --- a/genplugouts/GlobalChange/UmlBaseTypeSpec.h +++ b/genplugouts/GlobalChange/UmlBaseTypeSpec.h @@ -1,8 +1,8 @@ #ifndef _UMLBASETYPESPEC_H #define _UMLBASETYPESPEC_H +#include -#include class UmlClass; @@ -17,10 +17,10 @@ class UmlBaseTypeSpec UmlBaseTypeSpec() : type(0) {}; // returns the type as a string in all cases - const Q3CString & toString() const; + const QByteArray & toString() const; // significant in case type == 0 - Q3CString explicit_type; + QByteArray explicit_type; UmlClass * type; diff --git a/genplugouts/GlobalChange/UmlBaseUseCase.cpp b/genplugouts/GlobalChange/UmlBaseUseCase.cpp index 5e1d6d1b3..c85af9ddc 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCase.cpp +++ b/genplugouts/GlobalChange/UmlBaseUseCase.cpp @@ -5,7 +5,7 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include UmlUseCase * UmlBaseUseCase::create(UmlItem * parent, const char * s) { return (UmlUseCase *) parent->create_(anUseCase, s); @@ -35,7 +35,7 @@ bool UmlBaseUseCase::set_AssociatedDiagram(UmlUseCaseDiagram * d) return FALSE; } -const Q3CString & UmlBaseUseCase::extensionPoints() +const QByteArray & UmlBaseUseCase::extensionPoints() { read_if_needed_(); return _extension_points; diff --git a/genplugouts/GlobalChange/UmlBaseUseCase.h b/genplugouts/GlobalChange/UmlBaseUseCase.h index 9bd21249f..c1898a3c8 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCase.h +++ b/genplugouts/GlobalChange/UmlBaseUseCase.h @@ -4,7 +4,7 @@ #include "UmlItem.h" #include "anItemKind.h" -#include + class UmlUseCase; class UmlUseCaseDiagram; @@ -32,7 +32,7 @@ class UmlBaseUseCase : public UmlItem bool set_AssociatedDiagram(UmlUseCaseDiagram * d); // return the extension points - const Q3CString & extensionPoints(); + const QByteArray & extensionPoints(); // set the extension points // @@ -41,7 +41,7 @@ class UmlBaseUseCase : public UmlItem private: - Q3CString _extension_points; + QByteArray _extension_points; UmlUseCaseDiagram * _assoc_diagram; @@ -52,7 +52,7 @@ class UmlBaseUseCase : public UmlItem virtual void read_uml_(); // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCase(void * id, const Q3CString & n) : UmlItem(id, n) {}; + UmlBaseUseCase(void * id, const QByteArray & n) : UmlItem(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseUseCaseAssociation.cpp b/genplugouts/GlobalChange/UmlBaseUseCaseAssociation.cpp index ebee930a9..6a91c0e5c 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCaseAssociation.cpp +++ b/genplugouts/GlobalChange/UmlBaseUseCaseAssociation.cpp @@ -4,9 +4,9 @@ #include "UmlUseCaseReference.h" #include "UmlClass.h" -void UmlBaseUseCaseAssociation::read_(const Q3PtrDict & useCases) +void UmlBaseUseCaseAssociation::read_(const QHash & useCases) { - _use_case = (UmlUseCaseReference *) useCases[(void *) UmlCom::read_unsigned()]; + _use_case = (UmlUseCaseReference *) useCases[reinterpret_cast(uintptr_t(UmlCom::read_unsigned()))]; _actor = (UmlClass *) UmlBaseItem::read_(); _primary = UmlCom::read_bool(); _name = UmlCom::read_string(); diff --git a/genplugouts/GlobalChange/UmlBaseUseCaseAssociation.h b/genplugouts/GlobalChange/UmlBaseUseCaseAssociation.h index 9538e6ba7..c02d52d03 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCaseAssociation.h +++ b/genplugouts/GlobalChange/UmlBaseUseCaseAssociation.h @@ -2,9 +2,9 @@ #define _UMLBASEUSECASEASSOCIATION_H -#include -#include +#include +#include class UmlUseCaseReference; class UmlClass; @@ -13,12 +13,12 @@ class UmlBaseUseCaseAssociation { public: // return the name - const Q3CString & name() const { + const QByteArray & name() const { return _name; } // return the stereotype - const Q3CString & stereotype() const { + const QByteArray & stereotype() const { return _stereotype; } @@ -43,14 +43,14 @@ class UmlBaseUseCaseAssociation UmlClass * _actor; - Q3CString _name; + QByteArray _name; - Q3CString _stereotype; + QByteArray _stereotype; bool _primary; // internal, don't call it - void read_(const Q3PtrDict & useCases); + void read_(const QHash &useCases); friend class UmlBaseUseCaseDiagramDefinition; }; diff --git a/genplugouts/GlobalChange/UmlBaseUseCaseDiagram.h b/genplugouts/GlobalChange/UmlBaseUseCaseDiagram.h index 4370e63a4..9467f8f23 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCaseDiagram.h +++ b/genplugouts/GlobalChange/UmlBaseUseCaseDiagram.h @@ -4,7 +4,7 @@ #include "UmlDiagram.h" #include "anItemKind.h" -#include + class UmlUseCaseDiagram; class UmlItem; @@ -27,7 +27,7 @@ class UmlBaseUseCaseDiagram : public UmlDiagram protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCaseDiagram(void * id, const Q3CString & n) : UmlDiagram(id, n), _def(0) {}; + UmlBaseUseCaseDiagram(void * id, const QByteArray & n) : UmlDiagram(id, n), _def(0) {}; public: diff --git a/genplugouts/GlobalChange/UmlBaseUseCaseDiagramDefinition.cpp b/genplugouts/GlobalChange/UmlBaseUseCaseDiagramDefinition.cpp index b8780daf2..00a1ebe8a 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCaseDiagramDefinition.cpp +++ b/genplugouts/GlobalChange/UmlBaseUseCaseDiagramDefinition.cpp @@ -4,7 +4,7 @@ void UmlBaseUseCaseDiagramDefinition::read_() { - Q3PtrDict ucrefs; + QHash ucrefs; unsigned n; unsigned rank; @@ -18,7 +18,7 @@ void UmlBaseUseCaseDiagramDefinition::read_() f->read_(); } - _fragments.setAutoDelete(TRUE); + //_fragments.setAutoDelete(TRUE); UmlBaseFragment::compute_container_(_fragments); n = UmlCom::read_unsigned(); @@ -31,7 +31,7 @@ void UmlBaseUseCaseDiagramDefinition::read_() sb->read_(); } - _subjects.setAutoDelete(TRUE); + //_subjects.setAutoDelete(TRUE); n = UmlCom::read_unsigned(); _use_cases.resize(n); @@ -40,11 +40,11 @@ void UmlBaseUseCaseDiagramDefinition::read_() UmlUseCaseReference * uc = new UmlUseCaseReference(); _use_cases.insert(rank, uc); - ucrefs.insert((void *) UmlCom::read_unsigned(), uc); + ucrefs.insert(reinterpret_cast(uintptr_t(UmlCom::read_unsigned())), uc); uc->read_(_fragments, _subjects); } - _use_cases.setAutoDelete(TRUE); + //_use_cases.setAutoDelete(TRUE); n = UmlCom::read_unsigned(); _actors.resize(n); @@ -62,7 +62,7 @@ void UmlBaseUseCaseDiagramDefinition::read_() r->read_(ucrefs); } - _rels.setAutoDelete(TRUE); + //_rels.setAutoDelete(TRUE); } UmlBaseUseCaseDiagramDefinition::~UmlBaseUseCaseDiagramDefinition() diff --git a/genplugouts/GlobalChange/UmlBaseUseCaseDiagramDefinition.h b/genplugouts/GlobalChange/UmlBaseUseCaseDiagramDefinition.h index d2cefc68d..fe556d93b 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCaseDiagramDefinition.h +++ b/genplugouts/GlobalChange/UmlBaseUseCaseDiagramDefinition.h @@ -10,7 +10,7 @@ #include "UmlUseCaseReference.h" #include "UmlUseCaseAssociation.h" -#include + class UmlUseCaseReference; class UmlClass; @@ -23,41 +23,41 @@ class UmlBaseUseCaseDiagramDefinition { public: // return the use cases present in the diagram - const Q3PtrVector & useCases() const { + const QVector & useCases() const { return _use_cases; } // return the actors present in the diagram - const Q3PtrVector & actors() const { + const QVector & actors() const { return _actors; } // return the associations between actor and use case present in the diagram - const Q3PtrVector & associations() const { + const QVector & associations() const { return _rels; } // return the fragments present in the diagram - const Q3PtrVector & fragments() const { + const QVector & fragments() const { return _fragments; } // return the subjects present in the diagram - const Q3PtrVector & subjects() const { + const QVector & subjects() const { return _subjects; } private: - Q3PtrVector _use_cases; + QVector _use_cases; - Q3PtrVector _actors; + QVector _actors; - Q3PtrVector _rels; + QVector _rels; - Q3PtrVector _fragments; + QVector _fragments; - Q3PtrVector _subjects; + QVector _subjects; // internal, don't call it void read_(); diff --git a/genplugouts/GlobalChange/UmlBaseUseCaseReference.cpp b/genplugouts/GlobalChange/UmlBaseUseCaseReference.cpp index c599f87d4..d20f93f30 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCaseReference.cpp +++ b/genplugouts/GlobalChange/UmlBaseUseCaseReference.cpp @@ -6,7 +6,7 @@ #include "UmlSubject.h" #include "UmlFragment.h" -void UmlBaseUseCaseReference::read_(const Q3PtrVector & fragments, const Q3PtrVector & subjects) +void UmlBaseUseCaseReference::read_(const QVector & fragments, const QVector & subjects) { _use_case = (UmlUseCase *) UmlBaseItem::read_(); _x = (int) UmlCom::read_unsigned(); diff --git a/genplugouts/GlobalChange/UmlBaseUseCaseReference.h b/genplugouts/GlobalChange/UmlBaseUseCaseReference.h index 5e5590920..b29d782cc 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCaseReference.h +++ b/genplugouts/GlobalChange/UmlBaseUseCaseReference.h @@ -1,8 +1,8 @@ #ifndef _UMLBASEUSECASEREFERENCE_H #define _UMLBASEUSECASEREFERENCE_H +#include -#include class UmlUseCase; class UmlFragmentCompartment; @@ -46,7 +46,7 @@ class UmlBaseUseCaseReference int _h; // internal, don't call it - void read_(const Q3PtrVector & fragments, const Q3PtrVector & subjects); + void read_(const QVector &fragments, const QVector &subjects); friend class UmlBaseUseCaseDiagramDefinition; }; diff --git a/genplugouts/GlobalChange/UmlBaseUseCaseView.h b/genplugouts/GlobalChange/UmlBaseUseCaseView.h index 19d836b64..b5140abd8 100644 --- a/genplugouts/GlobalChange/UmlBaseUseCaseView.h +++ b/genplugouts/GlobalChange/UmlBaseUseCaseView.h @@ -4,7 +4,7 @@ #include "UmlView.h" #include "anItemKind.h" -#include + class UmlUseCaseView; class UmlItem; @@ -26,7 +26,7 @@ class UmlBaseUseCaseView : public UmlView protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseUseCaseView(void * id, const Q3CString & n) : UmlView(id, n) {}; + UmlBaseUseCaseView(void * id, const QByteArray & n) : UmlView(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlBaseView.h b/genplugouts/GlobalChange/UmlBaseView.h index ee8c0dd38..1e346b17b 100644 --- a/genplugouts/GlobalChange/UmlBaseView.h +++ b/genplugouts/GlobalChange/UmlBaseView.h @@ -3,13 +3,13 @@ #include "UmlItem.h" -#include + class UmlBaseView : public UmlItem { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlBaseView(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlBaseView(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlBuiltin.h b/genplugouts/GlobalChange/UmlBuiltin.h index 4f5c16f41..9194f9c76 100644 --- a/genplugouts/GlobalChange/UmlBuiltin.h +++ b/genplugouts/GlobalChange/UmlBuiltin.h @@ -1,32 +1,33 @@ #ifndef _UMLBUILTIN_H #define _UMLBUILTIN_H +#include + -#include // Internal class used to memorize the types defined through the first 'generation settings' tab struct UmlBuiltin { - Q3CString uml; + QByteArray uml; #ifdef WITHCPP - Q3CString cpp; + QByteArray cpp; - Q3CString cpp_in; + QByteArray cpp_in; - Q3CString cpp_out; + QByteArray cpp_out; - Q3CString cpp_inout; + QByteArray cpp_inout; #endif - Q3CString cpp_return; + QByteArray cpp_return; #ifdef WITHJAVA - Q3CString java; + QByteArray java; #endif #ifdef WITHIDL - Q3CString idl; + QByteArray idl; #endif }; diff --git a/genplugouts/GlobalChange/UmlClass.cpp b/genplugouts/GlobalChange/UmlClass.cpp index e0fa7577a..24ee2bcf4 100644 --- a/genplugouts/GlobalChange/UmlClass.cpp +++ b/genplugouts/GlobalChange/UmlClass.cpp @@ -1,14 +1,14 @@ #include "UmlClass.h" #include "Context.h" -//Added by qt3to4: -#include +#include +#include void UmlClass::change(Context & ctx) { if (ctx.onClass() && ctx.match_stereotype(stereotype())) { if (ctx.cpp()) { - const Q3CString & c = cppDecl(); + const QByteArray & c = cppDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_CppDecl(ctx.replace(c))) @@ -17,7 +17,7 @@ void UmlClass::change(Context & ctx) } if (ctx.java()) { - const Q3CString & c = javaDecl(); + const QByteArray & c = javaDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_JavaDecl(ctx.replace(c))) @@ -26,7 +26,7 @@ void UmlClass::change(Context & ctx) } if (ctx.php()) { - const Q3CString & c = phpDecl(); + const QByteArray & c = phpDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PhpDecl(ctx.replace(c))) @@ -35,7 +35,7 @@ void UmlClass::change(Context & ctx) } if (ctx.python()) { - const Q3CString & c = pythonDecl(); + const QByteArray & c = pythonDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PythonDecl(ctx.replace(c))) @@ -44,7 +44,7 @@ void UmlClass::change(Context & ctx) } if (ctx.idl()) { - const Q3CString & c = idlDecl(); + const QByteArray & c = idlDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_IdlDecl(ctx.replace(c))) @@ -53,8 +53,8 @@ void UmlClass::change(Context & ctx) } } - const Q3PtrVector ch = children(); - unsigned i; + const QVector ch = children(); + int i; for (i = 0; i != ch.size(); i += 1) ch[i]->change(ctx); diff --git a/genplugouts/GlobalChange/UmlClass.h b/genplugouts/GlobalChange/UmlClass.h index d9bcccd8d..da6b4a5ca 100644 --- a/genplugouts/GlobalChange/UmlClass.h +++ b/genplugouts/GlobalChange/UmlClass.h @@ -3,7 +3,7 @@ #include "UmlBaseClass.h" -#include + class Context; @@ -14,7 +14,7 @@ class Context; class UmlClass : public UmlBaseClass { public: - UmlClass(void * id, const Q3CString & n) : UmlBaseClass(id, n) {}; + UmlClass(void * id, const QByteArray & n) : UmlBaseClass(id, n) {}; virtual void change(Context & ctx); diff --git a/genplugouts/GlobalChange/UmlClassDiagram.h b/genplugouts/GlobalChange/UmlClassDiagram.h index 76134392d..ac4781283 100644 --- a/genplugouts/GlobalChange/UmlClassDiagram.h +++ b/genplugouts/GlobalChange/UmlClassDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseClassDiagram.h" -#include + // This class manages 'class diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlClassDiagram : public UmlBaseClassDiagram { public: - UmlClassDiagram(void * id, const Q3CString & n) : UmlBaseClassDiagram(id, n) {}; + UmlClassDiagram(void * id, const QByteArray & n) : UmlBaseClassDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlClassInstance.h b/genplugouts/GlobalChange/UmlClassInstance.h index c0c0e5a90..cb4473236 100644 --- a/genplugouts/GlobalChange/UmlClassInstance.h +++ b/genplugouts/GlobalChange/UmlClassInstance.h @@ -3,13 +3,13 @@ #include "UmlBaseClassInstance.h" -#include + class UmlClassInstance : public UmlBaseClassInstance { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlClassInstance(void * id, const Q3CString & s) : UmlBaseClassInstance(id, s) { + UmlClassInstance(void * id, const QByteArray & s) : UmlBaseClassInstance(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlClassItem.h b/genplugouts/GlobalChange/UmlClassItem.h index bf64f4dbb..7c4a888f7 100644 --- a/genplugouts/GlobalChange/UmlClassItem.h +++ b/genplugouts/GlobalChange/UmlClassItem.h @@ -3,7 +3,7 @@ #include "UmlBaseClassItem.h" -#include + // This class globaly manages class's children including UmlClassExtraMember // @@ -11,7 +11,7 @@ class UmlClassItem : public UmlBaseClassItem { public: - UmlClassItem(void * id, const Q3CString & n) : UmlBaseClassItem(id, n) {}; + UmlClassItem(void * id, const QByteArray & n) : UmlBaseClassItem(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlClassMember.h b/genplugouts/GlobalChange/UmlClassMember.h index 9119443c6..35fdddb52 100644 --- a/genplugouts/GlobalChange/UmlClassMember.h +++ b/genplugouts/GlobalChange/UmlClassMember.h @@ -2,7 +2,7 @@ #define _UMLCLASSMEMBER_H -#include + #include "UmlBaseClassMember.h" // This class globaly manages class's relations, attributes, operations @@ -12,7 +12,7 @@ class UmlClassMember : public UmlBaseClassMember { public: - UmlClassMember(void * id, const Q3CString & n) : UmlBaseClassMember(id, n) {}; + UmlClassMember(void * id, const QByteArray & n) : UmlBaseClassMember(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlClassView.cpp b/genplugouts/GlobalChange/UmlClassView.cpp index d4257984f..4d4dbc3cb 100644 --- a/genplugouts/GlobalChange/UmlClassView.cpp +++ b/genplugouts/GlobalChange/UmlClassView.cpp @@ -1,13 +1,14 @@ #include "UmlClassView.h" #include "Context.h" +#include void UmlClassView::change(Context & ctx) { if (ctx.onClass() || ctx.onOperation() || ctx.onAttribute() || ctx.onRelation()) { - const Q3PtrVector ch = children(); - unsigned i; + const QVector ch = children(); + int i; for (i = 0; i != ch.size(); i += 1) ch[i]->change(ctx); diff --git a/genplugouts/GlobalChange/UmlClassView.h b/genplugouts/GlobalChange/UmlClassView.h index 8b6c90e34..a1c9e29b3 100644 --- a/genplugouts/GlobalChange/UmlClassView.h +++ b/genplugouts/GlobalChange/UmlClassView.h @@ -3,7 +3,7 @@ #include "UmlBaseClassView.h" -#include + class Context; @@ -13,7 +13,7 @@ class Context; class UmlClassView : public UmlBaseClassView { public: - UmlClassView(void * id, const Q3CString & n) : UmlBaseClassView(id, n) {}; + UmlClassView(void * id, const QByteArray & n) : UmlBaseClassView(id, n) {}; virtual void change(Context & ctx); diff --git a/genplugouts/GlobalChange/UmlCollaborationDiagram.h b/genplugouts/GlobalChange/UmlCollaborationDiagram.h index ab1388561..fc69dea4c 100644 --- a/genplugouts/GlobalChange/UmlCollaborationDiagram.h +++ b/genplugouts/GlobalChange/UmlCollaborationDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseCollaborationDiagram.h" -#include + // This class manages 'collaboration diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlCollaborationDiagram : public UmlBaseCollaborationDiagram { public: - UmlCollaborationDiagram(void * id, const Q3CString & n) : UmlBaseCollaborationDiagram(id, n) {}; + UmlCollaborationDiagram(void * id, const QByteArray & n) : UmlBaseCollaborationDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlCom.cpp b/genplugouts/GlobalChange/UmlCom.cpp index 35d409bee..809316374 100644 --- a/genplugouts/GlobalChange/UmlCom.cpp +++ b/genplugouts/GlobalChange/UmlCom.cpp @@ -1,9 +1,9 @@ #include "UmlCom.h" -#include +#include //Added by qt3to4: -#include +#include #include "UmlCom.h" #include "UmlItem.h" @@ -11,10 +11,11 @@ #include "UmlClass.h" #include "UmlSettings.h" #include "Tools/ApiCmd.h" +#include bool UmlCom::connect(unsigned int port) { - sock = new Q3SocketDevice(Q3SocketDevice::Stream); - sock->setAddressReusable(TRUE); + sock = new QTcpSocket(/*QTcpSocket::Stream*/0); + //sock->setAddressReusable(TRUE); buffer_in_size = 1024; buffer_in = new char[buffer_in_size]; @@ -28,7 +29,9 @@ bool UmlCom::connect(unsigned int port) ha.setAddress("127.0.0.1"); - if (sock->connect(ha, port)) { + sock->connectToHost(ha, port); + if (sock->waitForConnected()) { + // send API version write_unsigned(42); flush(); @@ -75,11 +78,11 @@ void UmlCom::close() sock = 0; } -Q3SocketDevice * UmlCom::sock; +QTcpSocket * UmlCom::sock; char * UmlCom::buffer_in; -unsigned int UmlCom::buffer_in_size; +size_t UmlCom::buffer_in_size; char * UmlCom::p_buffer_in; @@ -89,11 +92,11 @@ char * UmlCom::buffer_out; char * UmlCom::p_buffer_out; -unsigned int UmlCom::buffer_out_size; +size_t UmlCom::buffer_out_size; -void UmlCom::check_size_out(unsigned int len) +void UmlCom::check_size_out(size_t len) { - unsigned used = p_buffer_out - buffer_out; + ptrdiff_t used = p_buffer_out - buffer_out; if ((used + len) >= buffer_out_size) { buffer_out_size = used + len + 1024; @@ -110,13 +113,13 @@ void UmlCom::check_size_out(unsigned int len) void UmlCom::read_if_needed() { #ifdef TRACE - //cout << "UmlCom::read_if_needed " << buffer_in_end - p_buffer_in << '\n'; + //qDebug() << "UmlCom::read_if_needed " << buffer_in_end - p_buffer_in << '\n'; #endif if (p_buffer_in == buffer_in_end) { read_buffer(4); #ifdef TRACE - cout << "UmlCom::read " << ((((unsigned char *) buffer_in)[0] << 24) + (((unsigned char *) buffer_in)[1] << 16) + (((unsigned char *) buffer_in)[2] << 8) + ((unsigned char *) buffer_in)[3]) << " bytes\n"; + qDebug() << "UmlCom::read " << ((((unsigned char *) buffer_in)[0] << 24) + (((unsigned char *) buffer_in)[1] << 16) + (((unsigned char *) buffer_in)[2] << 8) + ((unsigned char *) buffer_in)[3]) << " bytes\n"; #endif read_buffer((((unsigned char *) buffer_in)[0] << 24) + (((unsigned char *) buffer_in)[1] << 16) + @@ -125,10 +128,10 @@ void UmlCom::read_if_needed() } } -void UmlCom::read_buffer(unsigned int len) +void UmlCom::read_buffer(size_t len) { #ifdef TRACE - //cout << "enter UmlCom::read_buffer(" << len << ")\n"; + //qDebug() << "enter UmlCom::read_buffer(" << len << ")\n"; #endif if (buffer_in_size < len) { @@ -137,16 +140,16 @@ void UmlCom::read_buffer(unsigned int len) buffer_in = new char[buffer_in_size]; } - int remainder = (int) len; - int nread; + qint64 remainder = len; + qint64 nread; char * p = buffer_in; for (;;) { - if ((nread = sock->readBlock(p, remainder)) == -1) { + if ((nread = sock->read(p, remainder)) == -1) { if (sock->error() != 0) { #ifdef TRACE - cout << "UmlCom::read_buffer ERROR, already " << p - buffer_in - << " remainder " << remainder << '\n'; + qDebug() << "UmlCom::read_buffer ERROR, already " << p - buffer_in + << " remainder " << remainder << '\n'; #endif fatal_error("UmlCom read error"); } @@ -155,18 +158,18 @@ void UmlCom::read_buffer(unsigned int len) } #ifdef TRACE - //cout << "UmlCom a lu " << nread << '\n'; + //qDebug() << "UmlCom a lu " << nread << '\n'; #endif if ((remainder -= nread) == 0) break; p += nread; - sock->waitForMore(100); + sock->waitForReadyRead(100); } #ifdef TRACE - //cout << "exit UmlCom::read_buffer()\n"; + //qDebug() << "exit UmlCom::read_buffer()\n"; #endif p_buffer_in = buffer_in; @@ -212,7 +215,7 @@ void UmlCom::write_string(const char * p) if (p == 0) p = ""; - unsigned len = strlen(p) + 1; + size_t len = strlen(p) + 1; check_size_out(len); memcpy(p_buffer_out, p, len); @@ -222,7 +225,7 @@ void UmlCom::write_string(const char * p) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ")\n"; #endif write_char(f); @@ -233,7 +236,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s, bool b) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << b << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << b << ")\n"; #endif write_char(f); @@ -246,7 +249,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s, bool b) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, char arg) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << (int) arg << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << (int) arg << ")\n"; #endif write_char(f); @@ -258,7 +261,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, char arg) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, int arg, const char *) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << arg << ", dummy)\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << arg << ", dummy)\n"; #endif write_char(f); @@ -270,7 +273,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, int arg, const char *) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ")\n"; #endif write_char(f); @@ -282,7 +285,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ")\n"; #endif write_char(f); @@ -294,7 +297,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id, const char * n) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ", " << ((n) ? n : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << id << ", " << ((n) ? n : "") << ")\n"; #endif write_char(f); @@ -307,7 +310,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, void * id, const char * n) void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s, const char * v) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; #endif write_char(f); @@ -320,7 +323,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, const char * s, const char void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, bool b, const char * s, const char * v) { #ifdef TRACE - cout << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << b << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; + qDebug() << "UmlCom::send_cmd((CmdFamily) " << f << ", " << cmd << ", " << b << ", " << ((s) ? s : "") << ", " << ((v) ? v : "") << ")\n"; #endif write_char(f); @@ -334,7 +337,7 @@ void UmlCom::send_cmd(CmdFamily f, unsigned int cmd, bool b, const char * s, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ")\n"; #endif write_char(onInstanceCmd); @@ -346,7 +349,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg) ? arg : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg) ? arg : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -359,7 +362,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, char arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((int) arg) << '\n'; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((int) arg) << '\n'; #endif write_char(onInstanceCmd); @@ -372,7 +375,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, char arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg << '\n'; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg << '\n'; #endif write_char(onInstanceCmd); @@ -385,7 +388,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const UmlTypeSpec & arg) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -407,7 +410,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const UmlTypeSpec & ar void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg1) ? arg1 : "") << ", " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << ((arg1) ? arg1 : "") << ", " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -421,7 +424,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const char * arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -435,7 +438,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, const void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, aRelationKind arg2, const void * id2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << arg2 << ", " << id2 << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << arg2 << ", " << id2 << ")\n"; #endif write_char(onInstanceCmd); @@ -450,7 +453,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, anItemKind arg1, aRela void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", id1)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", id1)\n"; #endif write_char(onInstanceCmd); @@ -463,7 +466,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1) void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1, const char * arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", id1, " << ((arg2) ? arg2 : "") << ")\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", id1, " << ((arg2) ? arg2 : "") << ")\n"; #endif write_char(onInstanceCmd); @@ -477,7 +480,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const void * id1, cons void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, const UmlTypeSpec & arg2) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -499,8 +502,8 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, const char * arg2, const char * arg3, const UmlTypeSpec & arg4, const UmlTypeSpec & arg5) { -#ifdef DEBUGBOUML - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << \", \"" << arg2 << "\", \"" << arg3 << "\", " << ", UmlTypeSpec, UmlTypeSpec)\n"; +#ifdef DEBUG_DOUML + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << "\", \"" << arg2 << "\", \"" << arg3 << "\", " << ", UmlTypeSpec, UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -533,7 +536,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, con void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, char arg2, const char * arg3, const char * arg4, const UmlTypeSpec & arg5) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << (int) arg2 << ", " << ((arg3) ? arg3 : "") << ", " << ((arg4) ? arg4 : "") << ", UmlTypeSpec)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", " << arg1 << ", " << (int) arg2 << ", " << ((arg3) ? arg3 : "") << ", " << ((arg4) ? arg4 : "") << ", UmlTypeSpec)\n"; #endif write_char(onInstanceCmd); @@ -556,10 +559,10 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, cha flush(); } -void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l) +void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", const Q3PtrVector & l)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", const QVector & l)\n"; #endif write_char(onInstanceCmd); @@ -576,10 +579,10 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3) +void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l1, const QVector & l2, const QVector & l3) { #ifdef TRACE - cout << "UmlCom::send_cmd(id, " << cmd << ", const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3)\n"; + qDebug() << "UmlCom::send_cmd(id, " << cmd << ", const QVector & l1, const QVector & l2, const QVector & l3)\n"; #endif write_char(onInstanceCmd); @@ -613,7 +616,7 @@ void UmlCom::send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & v) +void UmlCom::read_item_list(QVector & v) { unsigned n = read_unsigned(); v.resize(n); #ifdef TRACE - //cout << "UmlCom::read_item_list " << n << " items\n"; + //qDebug() << "UmlCom::read_item_list " << n << " items\n"; #endif for (unsigned index = 0; index != n; index += 1) - v.insert(index, UmlBaseItem::read_()); + //v.insert(index, UmlBaseItem::read_()); + v[index] = UmlBaseItem::read_(); } -void UmlCom::fatal_error(const Q3CString & -#ifdef DEBUG_BOUML +void UmlCom::fatal_error(const QByteArray & +#ifdef DEBUG_DOUML msg #endif ) { -#ifdef DEBUG_BOUML - cout << msg << '\n'; +#ifdef DEBUG_DOUML + qDebug() << msg << '\n'; #endif throw 0; @@ -708,7 +712,7 @@ void UmlCom::fatal_error(const Q3CString & void UmlCom::flush() { if (sock != 0) { - int len = p_buffer_out - buffer_out - 4; + ptrdiff_t len = p_buffer_out - buffer_out - 4; /* the four first bytes of buffer_out are free to contains the length */ buffer_out[0] = len >> 24; buffer_out[1] = len >> 16; @@ -719,7 +723,7 @@ void UmlCom::flush() p_buffer_out = buffer_out; for (;;) { - int sent = sock->writeBlock(p_buffer_out, len); + qint64 sent = sock->write(p_buffer_out, len); if (sent == -1) { close(); // to not try to send "bye" ! diff --git a/genplugouts/GlobalChange/UmlCom.h b/genplugouts/GlobalChange/UmlCom.h index ecdb8d127..bfce98c00 100644 --- a/genplugouts/GlobalChange/UmlCom.h +++ b/genplugouts/GlobalChange/UmlCom.h @@ -2,21 +2,21 @@ #define _UMLCOM_H -#include +#include //#include "CmdFamily.h" //#include "OnInstanceCmd.h" #include "anItemKind.h" #include "aRelationKind.h" -#include -#include + + #include class UmlItem; class UmlTypeSpec; class UmlClass; -class Q3SocketDevice; +class QTcpSocket; class UmlItem; class UmlTypeSpec; class UmlClass; @@ -77,11 +77,11 @@ class UmlCom static void close(); private: - static Q3SocketDevice * sock; + static QTcpSocket * sock; static char * buffer_in; - static unsigned int buffer_in_size; + static size_t buffer_in_size; static char * p_buffer_in; @@ -91,19 +91,19 @@ class UmlCom static char * p_buffer_out; - static unsigned int buffer_out_size; + static size_t buffer_out_size; protected: //internal, do NOT use it - static void check_size_out(unsigned int len); + static void check_size_out(size_t len); //internal, do NOT use it static void read_if_needed(); //internal, do NOT use it - static void read_buffer(unsigned int len); + static void read_buffer(size_t len); //internal, do NOT use it static void write_bool(bool b); @@ -193,8 +193,8 @@ class UmlCom static void send_cmd(const void * id, OnInstanceCmd cmd, unsigned int arg1, char arg2, const char * arg3, const char * arg4, const UmlTypeSpec & arg5); //internal, do NOT use it - static void send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l); - static void send_cmd(const void * id, OnInstanceCmd cmd, const Q3PtrVector & l1, const Q3PtrVector & l2, const Q3PtrVector & l3); + static void send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l); + static void send_cmd(const void * id, OnInstanceCmd cmd, const QVector & l1, const QVector & l2, const QVector & l3); //internal, do NOT use it @@ -217,10 +217,10 @@ class UmlCom static unsigned int read_unsigned(); // internal, do NOT use it - static void read_item_list(Q3PtrVector & v); + static void read_item_list(QVector & v); //internal, do NOT use it - static void fatal_error(const Q3CString & msg); + static void fatal_error(const QByteArray & msg); //internal, do NOT use it static void flush(); diff --git a/genplugouts/GlobalChange/UmlComponent.h b/genplugouts/GlobalChange/UmlComponent.h index bb4fdbb25..e8961ed60 100644 --- a/genplugouts/GlobalChange/UmlComponent.h +++ b/genplugouts/GlobalChange/UmlComponent.h @@ -3,7 +3,7 @@ #include "UmlBaseComponent.h" -#include + // This class manages 'components' // @@ -11,7 +11,7 @@ class UmlComponent : public UmlBaseComponent { public: - UmlComponent(void * id, const Q3CString & n) : UmlBaseComponent(id, n) {}; + UmlComponent(void * id, const QByteArray & n) : UmlBaseComponent(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlComponentDiagram.h b/genplugouts/GlobalChange/UmlComponentDiagram.h index 15d707dc2..9afaa7eb4 100644 --- a/genplugouts/GlobalChange/UmlComponentDiagram.h +++ b/genplugouts/GlobalChange/UmlComponentDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseComponentDiagram.h" -#include + // This class manages 'ccomponent diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlComponentDiagram : public UmlBaseComponentDiagram { public: - UmlComponentDiagram(void * id, const Q3CString & n) : UmlBaseComponentDiagram(id, n) {}; + UmlComponentDiagram(void * id, const QByteArray & n) : UmlBaseComponentDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlComponentView.h b/genplugouts/GlobalChange/UmlComponentView.h index 000a74744..cc09cecc6 100644 --- a/genplugouts/GlobalChange/UmlComponentView.h +++ b/genplugouts/GlobalChange/UmlComponentView.h @@ -3,7 +3,7 @@ #include "UmlBaseComponentView.h" -#include + // This class manages 'component view' // @@ -11,7 +11,7 @@ class UmlComponentView : public UmlBaseComponentView { public: - UmlComponentView(void * id, const Q3CString & n) : UmlBaseComponentView(id, n) {}; + UmlComponentView(void * id, const QByteArray & n) : UmlBaseComponentView(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlDeploymentDiagram.h b/genplugouts/GlobalChange/UmlDeploymentDiagram.h index 727d0ffd0..1f0add3d0 100644 --- a/genplugouts/GlobalChange/UmlDeploymentDiagram.h +++ b/genplugouts/GlobalChange/UmlDeploymentDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseDeploymentDiagram.h" -#include + // This class manages 'deployment diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlDeploymentDiagram : public UmlBaseDeploymentDiagram { public: - UmlDeploymentDiagram(void * id, const Q3CString & n) : UmlBaseDeploymentDiagram(id, n) {}; + UmlDeploymentDiagram(void * id, const QByteArray & n) : UmlBaseDeploymentDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlDeploymentView.cpp b/genplugouts/GlobalChange/UmlDeploymentView.cpp index 222b10e29..c7c0970b1 100644 --- a/genplugouts/GlobalChange/UmlDeploymentView.cpp +++ b/genplugouts/GlobalChange/UmlDeploymentView.cpp @@ -1,12 +1,13 @@ #include "UmlDeploymentView.h" #include "Context.h" +#include void UmlDeploymentView::change(Context & ctx) { if (ctx.onArtifact()) { - const Q3PtrVector ch = children(); - unsigned i; + const QVector ch = children(); + int i; for (i = 0; i != ch.size(); i += 1) ch[i]->change(ctx); diff --git a/genplugouts/GlobalChange/UmlDeploymentView.h b/genplugouts/GlobalChange/UmlDeploymentView.h index f70c2a23a..99e2e6fd0 100644 --- a/genplugouts/GlobalChange/UmlDeploymentView.h +++ b/genplugouts/GlobalChange/UmlDeploymentView.h @@ -3,7 +3,7 @@ #include "UmlBaseDeploymentView.h" -#include + class Context; @@ -13,7 +13,7 @@ class Context; class UmlDeploymentView : public UmlBaseDeploymentView { public: - UmlDeploymentView(void * id, const Q3CString & n) : UmlBaseDeploymentView(id, n) {}; + UmlDeploymentView(void * id, const QByteArray & n) : UmlBaseDeploymentView(id, n) {}; virtual void change(Context & ctx); diff --git a/genplugouts/GlobalChange/UmlDiagram.h b/genplugouts/GlobalChange/UmlDiagram.h index ffee38e5c..99e0f81e4 100644 --- a/genplugouts/GlobalChange/UmlDiagram.h +++ b/genplugouts/GlobalChange/UmlDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseDiagram.h" -#include + // This class allows to manage extra class member, mainly defined fot C++ // it allows to insert C++ pre-processor directive (even they may be placed @@ -14,7 +14,7 @@ class UmlDiagram : public UmlBaseDiagram { public: - UmlDiagram(void * id, const Q3CString & n) : UmlBaseDiagram(id, n) {}; + UmlDiagram(void * id, const QByteArray & n) : UmlBaseDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlEntryPointPseudoState.h b/genplugouts/GlobalChange/UmlEntryPointPseudoState.h index 838a4bf5b..3fd7f6eca 100644 --- a/genplugouts/GlobalChange/UmlEntryPointPseudoState.h +++ b/genplugouts/GlobalChange/UmlEntryPointPseudoState.h @@ -3,13 +3,13 @@ #include "UmlBaseEntryPointPseudoState.h" -#include + class UmlEntryPointPseudoState : public UmlBaseEntryPointPseudoState { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlEntryPointPseudoState(void * id, const Q3CString & s) : UmlBaseEntryPointPseudoState(id, s) { + UmlEntryPointPseudoState(void * id, const QByteArray & s) : UmlBaseEntryPointPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlExitPointPseudoState.h b/genplugouts/GlobalChange/UmlExitPointPseudoState.h index 1a57b8230..e63c68782 100644 --- a/genplugouts/GlobalChange/UmlExitPointPseudoState.h +++ b/genplugouts/GlobalChange/UmlExitPointPseudoState.h @@ -3,13 +3,13 @@ #include "UmlBaseExitPointPseudoState.h" -#include + class UmlExitPointPseudoState : public UmlBaseExitPointPseudoState { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExitPointPseudoState(void * id, const Q3CString & s) : UmlBaseExitPointPseudoState(id, s) { + UmlExitPointPseudoState(void * id, const QByteArray & s) : UmlBaseExitPointPseudoState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlExpansionNode.h b/genplugouts/GlobalChange/UmlExpansionNode.h index 65d1cff2a..e2dbd5565 100644 --- a/genplugouts/GlobalChange/UmlExpansionNode.h +++ b/genplugouts/GlobalChange/UmlExpansionNode.h @@ -3,13 +3,13 @@ #include "UmlBaseExpansionNode.h" -#include + class UmlExpansionNode : public UmlBaseExpansionNode { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExpansionNode(void * id, const Q3CString & s) : UmlBaseExpansionNode(id, s) { + UmlExpansionNode(void * id, const QByteArray & s) : UmlBaseExpansionNode(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlExpansionRegion.h b/genplugouts/GlobalChange/UmlExpansionRegion.h index cfe999374..6d9130ca6 100644 --- a/genplugouts/GlobalChange/UmlExpansionRegion.h +++ b/genplugouts/GlobalChange/UmlExpansionRegion.h @@ -3,13 +3,13 @@ #include "UmlBaseExpansionRegion.h" -#include + class UmlExpansionRegion : public UmlBaseExpansionRegion { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlExpansionRegion(void * id, const Q3CString & s) : UmlBaseExpansionRegion(id, s) { + UmlExpansionRegion(void * id, const QByteArray & s) : UmlBaseExpansionRegion(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlExtraClassMember.h b/genplugouts/GlobalChange/UmlExtraClassMember.h index cf0b2bf47..95b851b8d 100644 --- a/genplugouts/GlobalChange/UmlExtraClassMember.h +++ b/genplugouts/GlobalChange/UmlExtraClassMember.h @@ -3,7 +3,7 @@ #include "UmlBaseExtraClassMember.h" -#include + // This class allows to manage extra class member, It allows to insert // C++ pre-processor directive (even they may be placed in the other member @@ -14,7 +14,7 @@ class UmlExtraClassMember : public UmlBaseExtraClassMember { public: - UmlExtraClassMember(void * id, const Q3CString & n) : UmlBaseExtraClassMember(id, n) {}; + UmlExtraClassMember(void * id, const QByteArray & n) : UmlBaseExtraClassMember(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlFlow.h b/genplugouts/GlobalChange/UmlFlow.h index 6e78a8c4b..e31afeb31 100644 --- a/genplugouts/GlobalChange/UmlFlow.h +++ b/genplugouts/GlobalChange/UmlFlow.h @@ -4,12 +4,12 @@ #include "UmlBaseFlow.h" #include "UmlActivityItem.h" -#include + class UmlFlow : public UmlBaseFlow, public UmlActivityItem { public: - UmlFlow(void * id, const Q3CString & n) : UmlBaseFlow(id, n) { + UmlFlow(void * id, const QByteArray & n) : UmlBaseFlow(id, n) { } }; diff --git a/genplugouts/GlobalChange/UmlInterruptibleActivityRegion.h b/genplugouts/GlobalChange/UmlInterruptibleActivityRegion.h index 0f78665c1..a696f6b2d 100644 --- a/genplugouts/GlobalChange/UmlInterruptibleActivityRegion.h +++ b/genplugouts/GlobalChange/UmlInterruptibleActivityRegion.h @@ -3,13 +3,13 @@ #include "UmlBaseInterruptibleActivityRegion.h" -#include + class UmlInterruptibleActivityRegion : public UmlBaseInterruptibleActivityRegion { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlInterruptibleActivityRegion(void * id, const Q3CString & s) : UmlBaseInterruptibleActivityRegion(id, s) { + UmlInterruptibleActivityRegion(void * id, const QByteArray & s) : UmlBaseInterruptibleActivityRegion(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlItem.h b/genplugouts/GlobalChange/UmlItem.h index 6f3506f63..74b823d69 100644 --- a/genplugouts/GlobalChange/UmlItem.h +++ b/genplugouts/GlobalChange/UmlItem.h @@ -3,7 +3,7 @@ #include "UmlBaseItem.h" -#include + class Context; @@ -14,7 +14,7 @@ class Context; class UmlItem : public UmlBaseItem { public: - UmlItem(void * id, const Q3CString & n) : UmlBaseItem(id, n) {}; + UmlItem(void * id, const QByteArray & n) : UmlBaseItem(id, n) {}; virtual ~UmlItem(); diff --git a/genplugouts/GlobalChange/UmlNcRelation.h b/genplugouts/GlobalChange/UmlNcRelation.h index 60032619a..3d73ec633 100644 --- a/genplugouts/GlobalChange/UmlNcRelation.h +++ b/genplugouts/GlobalChange/UmlNcRelation.h @@ -3,7 +3,7 @@ #include "UmlBaseNcRelation.h" -#include + //This class manages 'relations' between non class objects // @@ -11,7 +11,7 @@ class UmlNcRelation : public UmlBaseNcRelation { public: - UmlNcRelation(void * id, const Q3CString & n) : UmlBaseNcRelation(id, n) {}; + UmlNcRelation(void * id, const QByteArray & n) : UmlBaseNcRelation(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlNode.h b/genplugouts/GlobalChange/UmlNode.h index 95edbe709..4c72e14fd 100644 --- a/genplugouts/GlobalChange/UmlNode.h +++ b/genplugouts/GlobalChange/UmlNode.h @@ -3,7 +3,7 @@ #include "UmlBaseNode.h" -#include + // This class manages 'nodes' // @@ -11,7 +11,7 @@ class UmlNode : public UmlBaseNode { public: - UmlNode(void * id, const Q3CString & n) : UmlBaseNode(id, n) {}; + UmlNode(void * id, const QByteArray & n) : UmlBaseNode(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlObjectDiagram.h b/genplugouts/GlobalChange/UmlObjectDiagram.h index ba429242a..c194e4613 100644 --- a/genplugouts/GlobalChange/UmlObjectDiagram.h +++ b/genplugouts/GlobalChange/UmlObjectDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseObjectDiagram.h" -#include + // This class manages 'object diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -14,7 +14,7 @@ class UmlObjectDiagram : public UmlBaseObjectDiagram { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlObjectDiagram(void * id, const Q3CString & s) : UmlBaseObjectDiagram(id, s) { + UmlObjectDiagram(void * id, const QByteArray & s) : UmlBaseObjectDiagram(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlOnSignalAction.h b/genplugouts/GlobalChange/UmlOnSignalAction.h index 158c0ddc0..82fd5747f 100644 --- a/genplugouts/GlobalChange/UmlOnSignalAction.h +++ b/genplugouts/GlobalChange/UmlOnSignalAction.h @@ -3,13 +3,13 @@ #include "UmlBaseOnSignalAction.h" -#include + class UmlOnSignalAction : public UmlBaseOnSignalAction { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlOnSignalAction(void * id, const Q3CString & s) : UmlBaseOnSignalAction(id, s) { + UmlOnSignalAction(void * id, const QByteArray & s) : UmlBaseOnSignalAction(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlOperation.cpp b/genplugouts/GlobalChange/UmlOperation.cpp index c81ccd11a..c728b1016 100644 --- a/genplugouts/GlobalChange/UmlOperation.cpp +++ b/genplugouts/GlobalChange/UmlOperation.cpp @@ -2,20 +2,20 @@ #include "UmlOperation.h" #include "Context.h" //Added by qt3to4: -#include +#include void UmlOperation::change(Context & ctx) { if (ctx.onOperation() && ctx.match_stereotype(stereotype())) { if (ctx.cpp()) { - const Q3CString & c = cppDecl(); + const QByteArray & c = cppDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_CppDecl(ctx.replace(c))) ctx.err(); } - const Q3CString & f = cppDef(); + const QByteArray & f = cppDef(); if (!f.isEmpty() && ctx.match(f)) { if (!set_CppDef(ctx.replace(f))) @@ -24,7 +24,7 @@ void UmlOperation::change(Context & ctx) } if (ctx.java()) { - const Q3CString & c = javaDecl(); + const QByteArray & c = javaDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_JavaDecl(ctx.replace(c))) @@ -33,7 +33,7 @@ void UmlOperation::change(Context & ctx) } if (ctx.php()) { - const Q3CString & c = phpDecl(); + const QByteArray & c = phpDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PhpDecl(ctx.replace(c))) @@ -42,7 +42,7 @@ void UmlOperation::change(Context & ctx) } if (ctx.python()) { - const Q3CString & c = pythonDecl(); + const QByteArray & c = pythonDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PythonDecl(ctx.replace(c))) @@ -51,7 +51,7 @@ void UmlOperation::change(Context & ctx) } if (ctx.idl()) { - const Q3CString & c = idlDecl(); + const QByteArray & c = idlDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_IdlDecl(ctx.replace(c))) diff --git a/genplugouts/GlobalChange/UmlOperation.h b/genplugouts/GlobalChange/UmlOperation.h index f1268a122..42b33c891 100644 --- a/genplugouts/GlobalChange/UmlOperation.h +++ b/genplugouts/GlobalChange/UmlOperation.h @@ -3,7 +3,7 @@ #include "UmlBaseOperation.h" -#include + class Context; @@ -14,7 +14,7 @@ class Context; class UmlOperation : public UmlBaseOperation { public: - UmlOperation(void * id, const Q3CString & n) : UmlBaseOperation(id, n) {}; + UmlOperation(void * id, const QByteArray & n) : UmlBaseOperation(id, n) {}; virtual void change(Context & ctx); diff --git a/genplugouts/GlobalChange/UmlPackage.cpp b/genplugouts/GlobalChange/UmlPackage.cpp index 74aea16dc..7cc0f863c 100644 --- a/genplugouts/GlobalChange/UmlPackage.cpp +++ b/genplugouts/GlobalChange/UmlPackage.cpp @@ -1,11 +1,11 @@ #include "UmlPackage.h" #include "Context.h" - +#include void UmlPackage::change(Context & ctx) { - const Q3PtrVector ch = children(); - unsigned i; + const QVector ch = children(); + int i; for (i = 0; i != ch.size(); i += 1) ch[i]->change(ctx); diff --git a/genplugouts/GlobalChange/UmlPackage.h b/genplugouts/GlobalChange/UmlPackage.h index 3d6daae6f..647a2f8f1 100644 --- a/genplugouts/GlobalChange/UmlPackage.h +++ b/genplugouts/GlobalChange/UmlPackage.h @@ -3,7 +3,7 @@ #include "UmlBasePackage.h" -#include + class Context; @@ -13,7 +13,7 @@ class Context; class UmlPackage : public UmlBasePackage { public: - UmlPackage(void * id, const Q3CString & n) : UmlBasePackage(id, n) {}; + UmlPackage(void * id, const QByteArray & n) : UmlBasePackage(id, n) {}; virtual void change(Context & ctx); diff --git a/genplugouts/GlobalChange/UmlParameterSet.h b/genplugouts/GlobalChange/UmlParameterSet.h index 55a597fd4..f9927f672 100644 --- a/genplugouts/GlobalChange/UmlParameterSet.h +++ b/genplugouts/GlobalChange/UmlParameterSet.h @@ -3,14 +3,14 @@ #include "UmlBaseParameterSet.h" -#include + #include "UmlActivityItem.h" class UmlParameterSet : public UmlBaseParameterSet, public UmlActivityItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlParameterSet(void * id, const Q3CString & s) : UmlBaseParameterSet(id, s) { + UmlParameterSet(void * id, const QByteArray & s) : UmlBaseParameterSet(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlPinParameter.h b/genplugouts/GlobalChange/UmlPinParameter.h index d48cb7343..3d3283d6b 100644 --- a/genplugouts/GlobalChange/UmlPinParameter.h +++ b/genplugouts/GlobalChange/UmlPinParameter.h @@ -3,13 +3,13 @@ #include "UmlBasePinParameter.h" -#include + class UmlPinParameter : public UmlBasePinParameter { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlPinParameter(void * id, const Q3CString & s) : UmlBasePinParameter(id, s) { + UmlPinParameter(void * id, const QByteArray & s) : UmlBasePinParameter(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlPseudoState.h b/genplugouts/GlobalChange/UmlPseudoState.h index 075761ec7..1c350a942 100644 --- a/genplugouts/GlobalChange/UmlPseudoState.h +++ b/genplugouts/GlobalChange/UmlPseudoState.h @@ -2,7 +2,7 @@ #define _UMLPSEUDOSTATE_H -#include + #include "UmlItem.h" #include "UmlStateItem.h" @@ -10,7 +10,7 @@ class UmlPseudoState : public UmlStateItem, public UmlItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlPseudoState(void * id, const Q3CString & s) : UmlItem(id, s) { + UmlPseudoState(void * id, const QByteArray & s) : UmlItem(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlRegion.h b/genplugouts/GlobalChange/UmlRegion.h index d3f32cb7b..d0ce11dde 100644 --- a/genplugouts/GlobalChange/UmlRegion.h +++ b/genplugouts/GlobalChange/UmlRegion.h @@ -4,13 +4,13 @@ #include "UmlBaseRegion.h" #include "UmlStateItem.h" -#include + class UmlRegion : public UmlBaseRegion, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlRegion(void * id, const Q3CString & s) : UmlBaseRegion(id, s) { + UmlRegion(void * id, const QByteArray & s) : UmlBaseRegion(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlRelation.cpp b/genplugouts/GlobalChange/UmlRelation.cpp index 6fef01375..6acac0964 100644 --- a/genplugouts/GlobalChange/UmlRelation.cpp +++ b/genplugouts/GlobalChange/UmlRelation.cpp @@ -2,13 +2,13 @@ #include "UmlRelation.h" #include "Context.h" //Added by qt3to4: -#include +#include void UmlRelation::change(Context & ctx) { if (ctx.onRelation() && ctx.match_stereotype(stereotype())) { if (ctx.cpp()) { - const Q3CString & c = cppDecl(); + const QByteArray & c = cppDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_CppDecl(ctx.replace(c))) @@ -17,7 +17,7 @@ void UmlRelation::change(Context & ctx) } if (ctx.java()) { - const Q3CString & c = javaDecl(); + const QByteArray & c = javaDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_JavaDecl(ctx.replace(c))) @@ -26,7 +26,7 @@ void UmlRelation::change(Context & ctx) } if (ctx.php()) { - const Q3CString & c = phpDecl(); + const QByteArray & c = phpDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PhpDecl(ctx.replace(c))) @@ -35,7 +35,7 @@ void UmlRelation::change(Context & ctx) } if (ctx.python()) { - const Q3CString & c = pythonDecl(); + const QByteArray & c = pythonDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_PythonDecl(ctx.replace(c))) @@ -44,7 +44,7 @@ void UmlRelation::change(Context & ctx) } if (ctx.idl()) { - const Q3CString & c = idlDecl(); + const QByteArray & c = idlDecl(); if (!c.isEmpty() && ctx.match(c)) { if (!set_IdlDecl(ctx.replace(c))) diff --git a/genplugouts/GlobalChange/UmlRelation.h b/genplugouts/GlobalChange/UmlRelation.h index cf0e48c38..a98630564 100644 --- a/genplugouts/GlobalChange/UmlRelation.h +++ b/genplugouts/GlobalChange/UmlRelation.h @@ -3,7 +3,7 @@ #include "UmlBaseRelation.h" -#include + class Context; @@ -14,7 +14,7 @@ class Context; class UmlRelation : public UmlBaseRelation { public: - UmlRelation(void * id, const Q3CString & n) : UmlBaseRelation(id, n) {}; + UmlRelation(void * id, const QByteArray & n) : UmlBaseRelation(id, n) {}; virtual void change(Context & ctx); diff --git a/genplugouts/GlobalChange/UmlSequenceDiagram.h b/genplugouts/GlobalChange/UmlSequenceDiagram.h index d3b3d83fc..a36e34a65 100644 --- a/genplugouts/GlobalChange/UmlSequenceDiagram.h +++ b/genplugouts/GlobalChange/UmlSequenceDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseSequenceDiagram.h" -#include + // This class manages 'sequence diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlSequenceDiagram : public UmlBaseSequenceDiagram { public: - UmlSequenceDiagram(void * id, const Q3CString & n) : UmlBaseSequenceDiagram(id, n) {}; + UmlSequenceDiagram(void * id, const QByteArray & n) : UmlBaseSequenceDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlSettings.cpp b/genplugouts/GlobalChange/UmlSettings.cpp index e1dbe6f5c..78f70b12a 100644 --- a/genplugouts/GlobalChange/UmlSettings.cpp +++ b/genplugouts/GlobalChange/UmlSettings.cpp @@ -6,15 +6,15 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include -Q3CString UmlSettings::artifactDescription() +#include +QByteArray UmlSettings::artifactDescription() { read_if_needed_(); return _artifact_default_description; } -bool UmlSettings::set_ArtifactDescription(Q3CString v) +bool UmlSettings::set_ArtifactDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultArtifactDescriptionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -26,14 +26,14 @@ bool UmlSettings::set_ArtifactDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::classDescription() +QByteArray UmlSettings::classDescription() { read_if_needed_(); return _class_default_description; } -bool UmlSettings::set_ClassDescription(Q3CString v) +bool UmlSettings::set_ClassDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultClassDescriptionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -45,14 +45,14 @@ bool UmlSettings::set_ClassDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::operationDescription() +QByteArray UmlSettings::operationDescription() { read_if_needed_(); return _operation_default_description; } -bool UmlSettings::set_OperationDescription(Q3CString v) +bool UmlSettings::set_OperationDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultOperationDescriptionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -64,14 +64,14 @@ bool UmlSettings::set_OperationDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::attributeDescription() +QByteArray UmlSettings::attributeDescription() { read_if_needed_(); return _attribute_default_description; } -bool UmlSettings::set_AttributeDescription(Q3CString v) +bool UmlSettings::set_AttributeDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultAttributeDescriptionCmd, (const char *)v); //[jasa] handle ambiguous call @@ -83,14 +83,14 @@ bool UmlSettings::set_AttributeDescription(Q3CString v) return FALSE; } -Q3CString UmlSettings::relationDescription() +QByteArray UmlSettings::relationDescription() { read_if_needed_(); return _relation_default_description; } -bool UmlSettings::set_RelationDescription(Q3CString v) +bool UmlSettings::set_RelationDescription(QByteArray v) { UmlCom::send_cmd(umlSettingsCmd, setDefaultRelationDescriptionCmd, (const char *)v); @@ -146,39 +146,39 @@ aLanguage UmlSettings::_uml_get_name; aLanguage UmlSettings::_uml_set_name; -Q3CString UmlSettings::_artifact_default_description; +QByteArray UmlSettings::_artifact_default_description; -Q3CString UmlSettings::_class_default_description; +QByteArray UmlSettings::_class_default_description; -Q3CString UmlSettings::_operation_default_description; +QByteArray UmlSettings::_operation_default_description; -Q3CString UmlSettings::_attribute_default_description; +QByteArray UmlSettings::_attribute_default_description; -Q3CString UmlSettings::_relation_default_description; +QByteArray UmlSettings::_relation_default_description; -Q3Dict UmlSettings::_map_builtins; +QHash UmlSettings::_map_builtins; UmlBuiltin * UmlSettings::_builtins; -Q3Dict UmlSettings::_map_relation_attribute_stereotypes; +QHash UmlSettings::_map_relation_attribute_stereotypes; UmlStereotype * UmlSettings::_relation_attribute_stereotypes; -Q3Dict UmlSettings::_map_class_stereotypes; +QHash UmlSettings::_map_class_stereotypes; UmlStereotype * UmlSettings::_class_stereotypes; void UmlSettings::read_() { - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); _builtins = new UmlBuiltin[n]; if (n / 2 > _map_builtins.size()) - _map_builtins.resize(_map_builtins.size() * 2 - 1); + _map_builtins.reserve(_map_builtins.size() * 2 - 1); for (index = 0; index != n; index += 1) { _builtins[index].uml = UmlCom::read_string(); @@ -190,7 +190,7 @@ void UmlSettings::read_() _relation_attribute_stereotypes = new UmlStereotype[n]; if (n / 2 > _map_relation_attribute_stereotypes.size()) - _map_relation_attribute_stereotypes.resize(_map_relation_attribute_stereotypes.size() * 2 - 1); + _map_relation_attribute_stereotypes.reserve(_map_relation_attribute_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { _relation_attribute_stereotypes[index].uml = UmlCom::read_string(); @@ -203,7 +203,7 @@ void UmlSettings::read_() _class_stereotypes = new UmlStereotype[n]; if (n / 2 > _map_class_stereotypes.size()) - _map_class_stereotypes.resize(_map_class_stereotypes.size() * 2 - 1); + _map_class_stereotypes.reserve(_map_class_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { _class_stereotypes[index].uml = UmlCom::read_string(); @@ -229,18 +229,18 @@ void UmlSettings::read_if_needed_() } } -unsigned UmlSettings::multiplicity_column(const Q3CString & mult) +unsigned UmlSettings::multiplicity_column(const QByteArray & mult) { if (mult.isEmpty() || (mult == "1")) return 0; - if ((mult == "*") || (mult.find("..") != -1)) + if ((mult == "*") || (mult.indexOf("..") != -1)) return 1; return 2; } -Q3CString UmlSettings::uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f) +QByteArray UmlSettings::uml_type(const QByteArray & t, QByteArray UmlBuiltin::* f) { unsigned index = _map_builtins.count(); @@ -251,7 +251,7 @@ Q3CString UmlSettings::uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f) return 0; } -Q3CString UmlSettings::uml_rel_attr_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f) +QByteArray UmlSettings::uml_rel_attr_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f) { unsigned index = _map_relation_attribute_stereotypes.count(); @@ -262,7 +262,7 @@ Q3CString UmlSettings::uml_rel_attr_stereotype(const Q3CString & t, Q3CString Um return 0; } -Q3CString UmlSettings::uml_class_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f) +QByteArray UmlSettings::uml_class_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f) { unsigned index = _map_class_stereotypes.count(); @@ -273,19 +273,19 @@ Q3CString UmlSettings::uml_class_stereotype(const Q3CString & t, Q3CString UmlSt return 0; } -UmlBuiltin * UmlSettings::add_type(const Q3CString & s) +UmlBuiltin * UmlSettings::add_type(const QByteArray & s) { - unsigned n = _map_builtins.count(); - unsigned index; + int n = _map_builtins.count(); + int index; UmlBuiltin * builtins = new UmlBuiltin[n + 1]; if (n / 2 > _map_builtins.size()) - _map_builtins.resize(_map_builtins.size() * 2 - 1); + _map_builtins.reserve(_map_builtins.size() * 2 - 1); for (index = 0; index != n; index += 1) { builtins[index] = _builtins[index]; - _map_builtins.replace(builtins[index].uml, &builtins[index]); + _map_builtins.insert(builtins[index].uml, &builtins[index]); } builtins[index].uml = s; @@ -310,19 +310,19 @@ UmlBuiltin * UmlSettings::add_type(const Q3CString & s) return &_builtins[index]; } -UmlStereotype * UmlSettings::add_rel_attr_stereotype(const Q3CString & s) +UmlStereotype * UmlSettings::add_rel_attr_stereotype(const QByteArray & s) { - unsigned n = _map_relation_attribute_stereotypes.count(); - unsigned index; + int n = _map_relation_attribute_stereotypes.count(); + int index; UmlStereotype * relation_attribute_stereotypes = new UmlStereotype[n + 1]; if (n / 2 > _map_relation_attribute_stereotypes.size()) - _map_relation_attribute_stereotypes.resize(_map_relation_attribute_stereotypes.size() * 2 - 1); + _map_relation_attribute_stereotypes.reserve(_map_relation_attribute_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { relation_attribute_stereotypes[index] = _relation_attribute_stereotypes[index]; - _map_relation_attribute_stereotypes.replace(relation_attribute_stereotypes[index].uml, + _map_relation_attribute_stereotypes.insert(relation_attribute_stereotypes[index].uml, &relation_attribute_stereotypes[index]); } @@ -345,19 +345,19 @@ UmlStereotype * UmlSettings::add_rel_attr_stereotype(const Q3CString & s) return &_relation_attribute_stereotypes[index]; } -UmlStereotype * UmlSettings::add_class_stereotype(const Q3CString & s) +UmlStereotype * UmlSettings::add_class_stereotype(const QByteArray & s) { - unsigned n = _map_class_stereotypes.count(); - unsigned index; + int n = _map_class_stereotypes.count(); + int index; UmlStereotype * class_stereotypes = new UmlStereotype[n + 1]; if (n / 2 > _map_class_stereotypes.size()) - _map_class_stereotypes.resize(_map_class_stereotypes.size() * 2 - 1); + _map_class_stereotypes.reserve(_map_class_stereotypes.size() * 2 - 1); for (index = 0; index != n; index += 1) { class_stereotypes[index] = _class_stereotypes[index]; - _map_class_stereotypes.replace(class_stereotypes[index].uml, &class_stereotypes[index]); + _map_class_stereotypes.insert(class_stereotypes[index].uml, &class_stereotypes[index]); } class_stereotypes[index].uml = s; diff --git a/genplugouts/GlobalChange/UmlSettings.h b/genplugouts/GlobalChange/UmlSettings.h index c37c13a10..8d88457b8 100644 --- a/genplugouts/GlobalChange/UmlSettings.h +++ b/genplugouts/GlobalChange/UmlSettings.h @@ -1,10 +1,11 @@ #ifndef _UMLSETTINGS_H #define _UMLSETTINGS_H +#include +#include -#include #include "aLanguage.h" -#include + struct UmlBuiltin; struct UmlStereotype; @@ -20,44 +21,44 @@ class UmlSettings { public: // return the default description - static Q3CString artifactDescription(); + static QByteArray artifactDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ArtifactDescription(Q3CString v); + static bool set_ArtifactDescription(QByteArray v); // return the default description - static Q3CString classDescription(); + static QByteArray classDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDescription(Q3CString v); + static bool set_ClassDescription(QByteArray v); // return the default description - static Q3CString operationDescription(); + static QByteArray operationDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDescription(Q3CString v); + static bool set_OperationDescription(QByteArray v); // return the default description - static Q3CString attributeDescription(); + static QByteArray attributeDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDescription(Q3CString v); + static bool set_AttributeDescription(QByteArray v); // return the default description - static Q3CString relationDescription(); + static QByteArray relationDescription(); // set the default description // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDescription(Q3CString v); + static bool set_RelationDescription(QByteArray v); // return the language from which the getter's name rule must be followed at Uml level static aLanguage umlGetName(); @@ -90,25 +91,25 @@ class UmlSettings protected: - static Q3CString _artifact_default_description; + static QByteArray _artifact_default_description; - static Q3CString _class_default_description; + static QByteArray _class_default_description; - static Q3CString _operation_default_description; + static QByteArray _operation_default_description; - static Q3CString _attribute_default_description; + static QByteArray _attribute_default_description; - static Q3CString _relation_default_description; + static QByteArray _relation_default_description; - static Q3Dict _map_builtins; + static QHash _map_builtins; static UmlBuiltin * _builtins; - static Q3Dict _map_relation_attribute_stereotypes; + static QHash _map_relation_attribute_stereotypes; static UmlStereotype * _relation_attribute_stereotypes; - static Q3Dict _map_class_stereotypes; + static QHash _map_class_stereotypes; static UmlStereotype * _class_stereotypes; @@ -122,31 +123,31 @@ class UmlSettings //internal, do NOT use it - static unsigned multiplicity_column(const Q3CString & mult); + static unsigned multiplicity_column(const QByteArray & mult); //internal, do NOT use it - static Q3CString uml_type(const Q3CString & t, Q3CString UmlBuiltin::* f); + static QByteArray uml_type(const QByteArray & t, QByteArray UmlBuiltin::* f); //internal, do NOT use it - static Q3CString uml_rel_attr_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f); + static QByteArray uml_rel_attr_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f); //internal, do NOT use it - static Q3CString uml_class_stereotype(const Q3CString & t, Q3CString UmlStereotype::* f); + static QByteArray uml_class_stereotype(const QByteArray & t, QByteArray UmlStereotype::* f); //internal, do NOT use it - static UmlBuiltin * add_type(const Q3CString & s); + static UmlBuiltin * add_type(const QByteArray & s); //internal, do NOT use it - static UmlStereotype * add_rel_attr_stereotype(const Q3CString & s); + static UmlStereotype * add_rel_attr_stereotype(const QByteArray & s); //internal, do NOT use it - static UmlStereotype * add_class_stereotype(const Q3CString & s); + static UmlStereotype * add_class_stereotype(const QByteArray & s); }; diff --git a/genplugouts/GlobalChange/UmlState.h b/genplugouts/GlobalChange/UmlState.h index b8a04be4a..e760bb6b6 100644 --- a/genplugouts/GlobalChange/UmlState.h +++ b/genplugouts/GlobalChange/UmlState.h @@ -4,13 +4,13 @@ #include "UmlBaseState.h" #include "UmlStateItem.h" -#include + class UmlState : public UmlBaseState, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlState(void * id, const Q3CString & s) : UmlBaseState(id, s) { + UmlState(void * id, const QByteArray & s) : UmlBaseState(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlStateDiagram.h b/genplugouts/GlobalChange/UmlStateDiagram.h index f49b5fb44..c639f9193 100644 --- a/genplugouts/GlobalChange/UmlStateDiagram.h +++ b/genplugouts/GlobalChange/UmlStateDiagram.h @@ -4,13 +4,13 @@ #include "UmlBaseStateDiagram.h" #include "UmlStateItem.h" -#include + class UmlStateDiagram : public UmlBaseStateDiagram, public UmlStateItem { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlStateDiagram(void * id, const Q3CString & s) : UmlBaseStateDiagram(id, s) { + UmlStateDiagram(void * id, const QByteArray & s) : UmlBaseStateDiagram(id, s) { } }; diff --git a/genplugouts/GlobalChange/UmlStereotype.h b/genplugouts/GlobalChange/UmlStereotype.h index 8c5bf56c0..1a43adfdc 100644 --- a/genplugouts/GlobalChange/UmlStereotype.h +++ b/genplugouts/GlobalChange/UmlStereotype.h @@ -2,31 +2,31 @@ #define _UMLSTEREOTYPE_H -#include +#include // Internal class used to know how what code is produced for a stereotype in each language struct UmlStereotype { - Q3CString uml; + QByteArray uml; #ifdef WITHCPP - Q3CString cpp; + QByteArray cpp; #endif #ifdef WITHJAVA - Q3CString java; + QByteArray java; #endif #ifdef WITHPHP - Q3CString php; + QByteArray php; #endif #ifdef WITHPHP - Q3CString python; + QByteArray python; #endif #ifdef WITHIDL - Q3CString idl; + QByteArray idl; #endif }; diff --git a/genplugouts/GlobalChange/UmlTransition.h b/genplugouts/GlobalChange/UmlTransition.h index 3edd626c7..59ccc3e65 100644 --- a/genplugouts/GlobalChange/UmlTransition.h +++ b/genplugouts/GlobalChange/UmlTransition.h @@ -4,12 +4,12 @@ #include "UmlBaseTransition.h" #include "UmlStateItem.h" -#include + class UmlTransition : public UmlBaseTransition, public UmlStateItem { public: - UmlTransition(void * id, const Q3CString & n) : UmlBaseTransition(id, n) { + UmlTransition(void * id, const QByteArray & n) : UmlBaseTransition(id, n) { } }; diff --git a/genplugouts/GlobalChange/UmlUseCase.h b/genplugouts/GlobalChange/UmlUseCase.h index 392773262..c21cc521d 100644 --- a/genplugouts/GlobalChange/UmlUseCase.h +++ b/genplugouts/GlobalChange/UmlUseCase.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCase.h" -#include + // This class manages 'use case' // @@ -11,7 +11,7 @@ class UmlUseCase : public UmlBaseUseCase { public: - UmlUseCase(void * id, const Q3CString & n) : UmlBaseUseCase(id, n) {}; + UmlUseCase(void * id, const QByteArray & n) : UmlBaseUseCase(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlUseCaseDiagram.h b/genplugouts/GlobalChange/UmlUseCaseDiagram.h index 132b56d36..bf490aa90 100644 --- a/genplugouts/GlobalChange/UmlUseCaseDiagram.h +++ b/genplugouts/GlobalChange/UmlUseCaseDiagram.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCaseDiagram.h" -#include + // This class manages 'use case diagrams', notes that the class 'UmlDiagram' // is a mother class of all the diagrams, allowing to generalize their @@ -13,7 +13,7 @@ class UmlUseCaseDiagram : public UmlBaseUseCaseDiagram { public: - UmlUseCaseDiagram(void * id, const Q3CString & n) : UmlBaseUseCaseDiagram(id, n) {}; + UmlUseCaseDiagram(void * id, const QByteArray & n) : UmlBaseUseCaseDiagram(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlUseCaseView.h b/genplugouts/GlobalChange/UmlUseCaseView.h index a715b2f5f..ef475b173 100644 --- a/genplugouts/GlobalChange/UmlUseCaseView.h +++ b/genplugouts/GlobalChange/UmlUseCaseView.h @@ -3,7 +3,7 @@ #include "UmlBaseUseCaseView.h" -#include + // This class manages 'use case view' // @@ -11,7 +11,7 @@ class UmlUseCaseView : public UmlBaseUseCaseView { public: - UmlUseCaseView(void * id, const Q3CString & n) : UmlBaseUseCaseView(id, n) {}; + UmlUseCaseView(void * id, const QByteArray & n) : UmlBaseUseCaseView(id, n) {}; }; diff --git a/genplugouts/GlobalChange/UmlView.h b/genplugouts/GlobalChange/UmlView.h index 418e689ab..2435ce96b 100644 --- a/genplugouts/GlobalChange/UmlView.h +++ b/genplugouts/GlobalChange/UmlView.h @@ -3,13 +3,13 @@ #include "UmlBaseView.h" -#include + class UmlView : public UmlBaseView { protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlView(void * id, const Q3CString & s) : UmlBaseView(id, s) { + UmlView(void * id, const QByteArray & s) : UmlBaseView(id, s) { } }; diff --git a/genplugouts/GlobalChange/bbuttongroup.cpp b/genplugouts/GlobalChange/bbuttongroup.cpp new file mode 100644 index 000000000..4526db928 --- /dev/null +++ b/genplugouts/GlobalChange/bbuttongroup.cpp @@ -0,0 +1,66 @@ +#include "bbuttongroup.h" + +BButtonGroup::BButtonGroup(QWidget *parent) : + QGroupBox(parent) +{ + m_hLayout = 0; + m_vLayout = 0; + m_orientation = Qt::Horizontal; + m_hLayout = new QHBoxLayout(this); + this->setLayout(m_hLayout); + m_hLayout->setSpacing(0); + m_hLayout->setMargin(0); +} + +BButtonGroup::BButtonGroup(const QString &title, QWidget *parent): + QGroupBox(title, parent) +{ + m_hLayout = 0; + m_vLayout = 0; + m_orientation = Qt::Horizontal; + m_hLayout = new QHBoxLayout(this); + this->setLayout(m_hLayout); + m_hLayout->setSpacing(0); + m_hLayout->setMargin(0); +} + +BButtonGroup::BButtonGroup(int strips, Qt::Orientation orientation, const QString &title, QWidget *parent, QString): +QGroupBox(title, parent) +{ + Q_UNUSED(strips); + + m_hLayout = 0; + m_vLayout = 0; + m_orientation = orientation; + if(orientation == Qt::Horizontal) + { + m_hLayout = new QHBoxLayout(this); + this->setLayout(m_hLayout); + m_hLayout->setSpacing(0); + m_hLayout->setMargin(0); + } + else + { + m_vLayout = new QHBoxLayout(this); + this->setLayout(m_vLayout); + m_vLayout->setSpacing(0); + m_vLayout->setMargin(0); + } +} + +void BButtonGroup::setExclusive(bool isEx) +{ + Q_UNUSED(isEx); +} + +void BButtonGroup::addWidget(QWidget *widget) +{ + if(m_orientation == Qt::Horizontal) + { + m_hLayout->addWidget(widget); + } + else + { + m_vLayout->addWidget(widget); + } +} diff --git a/genplugouts/GlobalChange/bbuttongroup.h b/genplugouts/GlobalChange/bbuttongroup.h new file mode 100644 index 000000000..e54f93d2e --- /dev/null +++ b/genplugouts/GlobalChange/bbuttongroup.h @@ -0,0 +1,26 @@ +#ifndef BBUTTONGROUP_H +#define BBUTTONGROUP_H + +#include +#include +#include +#include +class BButtonGroup : public QGroupBox +{ + Q_OBJECT +public: + explicit BButtonGroup(QWidget *parent = 0); + explicit BButtonGroup(const QString &title, QWidget* parent=0); + BButtonGroup( int strips, Qt::Orientation orientation, const QString & title, QWidget * parent = 0, QString = QString()); + void setExclusive(bool isEx); + void addWidget(QWidget* widget); + QHBoxLayout *m_hLayout; + QHBoxLayout *m_vLayout; + Qt::Orientation m_orientation; +signals: + +public slots: + +}; + +#endif // BBUTTONGROUP_H diff --git a/genplugouts/GlobalChange/gridbox.cpp b/genplugouts/GlobalChange/gridbox.cpp new file mode 100644 index 000000000..78233be1d --- /dev/null +++ b/genplugouts/GlobalChange/gridbox.cpp @@ -0,0 +1,37 @@ +#include "gridbox.h" +#include +GridBox::GridBox(int n, QWidget * parent, QString name) : + QGroupBox(name, parent) +{ + m_layout = new QGridLayout(this); + setLayout(m_layout); + m_numCols = n; + currentIndex = 0; + setSpacing(0); + setMargin(0); + if(!name.isEmpty()) + this->setObjectName(name); +} + +void GridBox::setMargin(int mar) +{ + m_layout->setMargin(mar); +} + +void GridBox::setSpacing(int spacing) +{ + m_layout->setSpacing(spacing); +} + +void GridBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget, currentIndex/m_numCols, currentIndex%m_numCols); + currentIndex ++; +} + +QString GridBox::name(QString name) +{ + if(objectName().isEmpty()) + setObjectName(name); + return objectName(); +} diff --git a/genplugouts/GlobalChange/gridbox.h b/genplugouts/GlobalChange/gridbox.h new file mode 100644 index 000000000..64793941d --- /dev/null +++ b/genplugouts/GlobalChange/gridbox.h @@ -0,0 +1,26 @@ +#ifndef GRIDBOX_H +#define GRIDBOX_H + +#include +#include +class QGridLayout; +class GridBox : public QGroupBox +{ + Q_OBJECT +public: + explicit GridBox(int n, QWidget *parent = 0,QString name = QString()); + void setMargin(int mar); + void setSpacing(int spacing); + void addWidget(QWidget *widget); + QString name(QString name = QString()); + +signals: + +public slots: +private: + QGridLayout *m_layout; + int m_numCols; + int currentIndex; +}; + +#endif // GRIDBOX_H diff --git a/genplugouts/GlobalChange/hhbox.cpp b/genplugouts/GlobalChange/hhbox.cpp new file mode 100644 index 000000000..95a09b5ea --- /dev/null +++ b/genplugouts/GlobalChange/hhbox.cpp @@ -0,0 +1,30 @@ +#include "hhbox.h" + +HHBox::HHBox(QWidget *parent, QString name) : + QWidget(parent) +{ + m_layout = new QHBoxLayout(this); + this->setLayout(m_layout); + m_layout->setSpacing(0); + m_layout->setMargin(0); + setObjectName(name); +} + +void HHBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget); +} + +bool HHBox::setStretchFactor(QWidget *w, int stretch) +{ + //if not in layout + if(m_layout->indexOf(w) == -1) + m_layout->addWidget(w); + m_layout->setStretchFactor(w, stretch); + return 0; +} + +void HHBox::setMargin(int margin) +{ + m_layout->setMargin(margin); +} diff --git a/genplugouts/GlobalChange/hhbox.h b/genplugouts/GlobalChange/hhbox.h new file mode 100644 index 000000000..06a8620d6 --- /dev/null +++ b/genplugouts/GlobalChange/hhbox.h @@ -0,0 +1,22 @@ +#ifndef HHBOX_H +#define HHBOX_H + +#include +#include +class HHBox : public QWidget +{ + Q_OBJECT +public: + explicit HHBox(QWidget *parent = 0, QString name= QString()); + void addWidget(QWidget* widget); + bool setStretchFactor(QWidget *w, int stretch); + void setMargin(int margin); + +signals: + +public slots: +private: + QHBoxLayout *m_layout; +}; + +#endif // HHBOX_H diff --git a/genplugouts/GlobalChange/vgridbox.cpp b/genplugouts/GlobalChange/vgridbox.cpp new file mode 100644 index 000000000..69add1149 --- /dev/null +++ b/genplugouts/GlobalChange/vgridbox.cpp @@ -0,0 +1,37 @@ +#include "vgridbox.h" +#include +VGridBox::VGridBox(int n, QWidget * parent, QString name) : + QGroupBox(name, parent) +{ + m_layout = new QGridLayout(this); + setLayout(m_layout); + m_numCols = n; + currentIndex = 0; + setSpacing(0); + setMargin(0); + if(!name.isEmpty()) + this->setObjectName(name); +} + +void VGridBox::setMargin(int mar) +{ + m_layout->setMargin(mar); +} + +void VGridBox::setSpacing(int spacing) +{ + m_layout->setSpacing(spacing); +} + +void VGridBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget, currentIndex%m_numCols, currentIndex/m_numCols); + currentIndex ++; +} + +QString VGridBox::name(QString name) +{ + if(objectName().isEmpty()) + setObjectName(name); + return objectName(); +} diff --git a/genplugouts/GlobalChange/vgridbox.h b/genplugouts/GlobalChange/vgridbox.h new file mode 100644 index 000000000..503424ed5 --- /dev/null +++ b/genplugouts/GlobalChange/vgridbox.h @@ -0,0 +1,26 @@ +#ifndef VGRIDBOX_H +#define VGRIDBOX_H + +#include +#include +class QGridLayout; +class VGridBox : public QGroupBox +{ + Q_OBJECT +public: + explicit VGridBox(int n, QWidget *parent = 0,QString name = QString()); + void setMargin(int mar); + void setSpacing(int spacing); + void addWidget(QWidget *widget); + QString name(QString name = QString()); + +signals: + +public slots: +private: + QGridLayout *m_layout; + int m_numCols; + int currentIndex; +}; + +#endif // GRIDBOX_H diff --git a/genplugouts/GlobalChange/vvbox.cpp b/genplugouts/GlobalChange/vvbox.cpp new file mode 100644 index 000000000..288eb93ac --- /dev/null +++ b/genplugouts/GlobalChange/vvbox.cpp @@ -0,0 +1,26 @@ +#include "vvbox.h" + +VVBox::VVBox(QWidget *parent) : + QWidget(parent) +{ + m_layout = new QVBoxLayout(this); + this->setLayout(m_layout); + m_layout->setSpacing(0); + m_layout->setMargin(0); +} + +void VVBox::addWidget(QWidget *widget) +{ + m_layout->addWidget(widget); +} +bool VVBox::setStretchFactor(QWidget *w, int stretch) +{ + if(m_layout->indexOf(w) == -1) + m_layout->addWidget(w); + m_layout->setStretchFactor(w, stretch); + return 0; +} +void VVBox::setMargin(int margin) +{ + m_layout->setMargin(margin); +} diff --git a/genplugouts/GlobalChange/vvbox.h b/genplugouts/GlobalChange/vvbox.h new file mode 100644 index 000000000..7f27f2ea8 --- /dev/null +++ b/genplugouts/GlobalChange/vvbox.h @@ -0,0 +1,22 @@ +#ifndef VVBOX_H +#define VVBOX_H + +#include +#include +class VVBox : public QWidget +{ + Q_OBJECT +public: + explicit VVBox(QWidget *parent = 0); + void addWidget(QWidget* widget); + + bool setStretchFactor(QWidget *w, int stretch); + void setMargin(int margin); +signals: + +public slots: +private: + QVBoxLayout *m_layout; +}; + +#endif // VVBOX_H diff --git a/genplugouts/HtmlDoc/CppSettings.cpp b/genplugouts/HtmlDoc/CppSettings.cpp index c1ee8e9b4..d04e030e2 100644 --- a/genplugouts/HtmlDoc/CppSettings.cpp +++ b/genplugouts/HtmlDoc/CppSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool CppSettings::useDefaults() { UmlCom::send_cmd(cppSettingsCmd, getCppUseDefaultsCmd); @@ -22,22 +22,22 @@ bool CppSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString CppSettings::type(Q3CString s) +QByteArray CppSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_Type(Q3CString s, Q3CString v) +bool CppSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppTypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -50,29 +50,29 @@ bool CppSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::umlType(Q3CString s) +QByteArray CppSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::cpp); } -Q3CString CppSettings::relationAttributeStereotype(Q3CString s) +QByteArray CppSettings::relationAttributeStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -85,29 +85,29 @@ bool CppSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::relationAttributeUmlStereotype(Q3CString s) +QByteArray CppSettings::relationAttributeUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::classStereotype(Q3CString s) +QByteArray CppSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->cpp : s; } -bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool CppSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppClassStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -120,32 +120,32 @@ bool CppSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::classUmlStereotype(Q3CString s) +QByteArray CppSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::cpp); } -Q3CString CppSettings::include(Q3CString s) +QByteArray CppSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool CppSettings::set_Include(Q3CString s, Q3CString v) +bool CppSettings::set_Include(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppIncludeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -156,14 +156,14 @@ bool CppSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -Q3CString CppSettings::rootDir() +QByteArray CppSettings::rootDir() { read_if_needed_(); return _root; } -bool CppSettings::set_RootDir(Q3CString v) +bool CppSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppRootDirCmd, (const char *)v); //[rageek] Fix prototype @@ -175,14 +175,14 @@ bool CppSettings::set_RootDir(Q3CString v) return FALSE; } -Q3CString CppSettings::headerContent() +QByteArray CppSettings::headerContent() { read_if_needed_(); return _h_content; } -bool CppSettings::set_HeaderContent(Q3CString v) +bool CppSettings::set_HeaderContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderContentCmd, (const char *)v); //[rageek] Fix prototype @@ -194,14 +194,14 @@ bool CppSettings::set_HeaderContent(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceContent() +QByteArray CppSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool CppSettings::set_SourceContent(Q3CString v) +bool CppSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceContentCmd, (const char *)v); //[rageek] Fix prototype @@ -213,14 +213,14 @@ bool CppSettings::set_SourceContent(Q3CString v) return FALSE; } -Q3CString CppSettings::headerExtension() +QByteArray CppSettings::headerExtension() { read_if_needed_(); return _h_ext; } -bool CppSettings::set_HeaderExtension(Q3CString v) +bool CppSettings::set_HeaderExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppHeaderExtensionCmd, (const char *)v); //[rageek] Fix prototype @@ -232,14 +232,14 @@ bool CppSettings::set_HeaderExtension(Q3CString v) return FALSE; } -Q3CString CppSettings::sourceExtension() +QByteArray CppSettings::sourceExtension() { read_if_needed_(); return _src_ext; } -bool CppSettings::set_SourceExtension(Q3CString v) +bool CppSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSourceExtensionCmd, (const char *)v); //[rageek] Fix prototype @@ -251,7 +251,7 @@ bool CppSettings::set_SourceExtension(Q3CString v) return FALSE; } -Q3CString CppSettings::reverseRoundtripDirRegExp() +QByteArray CppSettings::reverseRoundtripDirRegExp() { read_if_needed_(); @@ -265,7 +265,7 @@ bool CppSettings::isReverseRoundtripDirRegExpCaseSensitive() return _dir_regexp_case_sensitive; } -bool CppSettings::set_ReverseRoundtripDirRegExp(Q3CString s, bool cs) +bool CppSettings::set_ReverseRoundtripDirRegExp(QByteArray s, bool cs) { UmlCom::send_cmd(cppSettingsCmd, setCppDirRevFilterCmd, s, cs); @@ -278,7 +278,7 @@ bool CppSettings::set_ReverseRoundtripDirRegExp(Q3CString s, bool cs) return FALSE; } -Q3CString CppSettings::reverseRoundtripFileRegExp() +QByteArray CppSettings::reverseRoundtripFileRegExp() { read_if_needed_(); @@ -292,7 +292,7 @@ bool CppSettings::isReverseRoundtripFileRegExpCaseSensitive() return _file_regexp_case_sensitive; } -bool CppSettings::set_ReverseRoundtripFileRegExp(Q3CString s, bool cs) +bool CppSettings::set_ReverseRoundtripFileRegExp(QByteArray s, bool cs) { UmlCom::send_cmd(cppSettingsCmd, setCppFileRevFilterCmd, s, cs); @@ -425,14 +425,14 @@ bool CppSettings::set_IsGenerateJavadocStyleComment(bool v) return FALSE; } -const Q3CString & CppSettings::visibilityIndent() +const QByteArray & CppSettings::visibilityIndent() { read_if_needed_(); return _visibility_indent; } -bool CppSettings::set_VisibilityIndent(Q3CString v) +bool CppSettings::set_VisibilityIndent(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppIndentVisibilityCmd, (const char *)v); //[rageek] Fix prototype @@ -444,14 +444,14 @@ bool CppSettings::set_VisibilityIndent(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumIn() +const QByteArray & CppSettings::enumIn() { read_if_needed_(); return _enum_in; } -bool CppSettings::set_EnumIn(Q3CString v) +bool CppSettings::set_EnumIn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInCmd, (const char *)v); //[rageek] Fix prototype @@ -463,14 +463,14 @@ bool CppSettings::set_EnumIn(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumOut() +const QByteArray & CppSettings::enumOut() { read_if_needed_(); return _enum_out; } -bool CppSettings::set_EnumOut(Q3CString v) +bool CppSettings::set_EnumOut(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumOutCmd, (const char *)v); //[rageek] Fix prototype @@ -482,14 +482,14 @@ bool CppSettings::set_EnumOut(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumInout() +const QByteArray & CppSettings::enumInout() { read_if_needed_(); return _enum_inout; } -bool CppSettings::set_EnumInout(Q3CString v) +bool CppSettings::set_EnumInout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumInOutCmd, (const char *)v); //[rageek] Fix prototype @@ -501,14 +501,14 @@ bool CppSettings::set_EnumInout(Q3CString v) return FALSE; } -Q3CString CppSettings::enumReturn() +QByteArray CppSettings::enumReturn() { read_if_needed_(); return _enum_return; } -bool CppSettings::set_EnumReturn(Q3CString v) +bool CppSettings::set_EnumReturn(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumReturnCmd, (const char *)v); //[rageek] Fix prototype @@ -520,22 +520,22 @@ bool CppSettings::set_EnumReturn(Q3CString v) return FALSE; } -Q3CString CppSettings::builtinIn(Q3CString s) +QByteArray CppSettings::builtinIn(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_in : Q3CString(); + return (b) ? b->cpp_in : QByteArray(); } -bool CppSettings::set_BuiltinIn(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinIn(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppInCmd, (const char *)type, (const char *)form); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -548,22 +548,22 @@ bool CppSettings::set_BuiltinIn(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinOut(Q3CString s) +QByteArray CppSettings::builtinOut(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_out : Q3CString(); + return (b) ? b->cpp_out : QByteArray(); } -bool CppSettings::set_BuiltinOut(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinOut(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppOutCmd, (const char *)type, (const char *)form); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -576,22 +576,22 @@ bool CppSettings::set_BuiltinOut(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinInOut(Q3CString s) +QByteArray CppSettings::builtinInOut(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_inout : Q3CString(); + return (b) ? b->cpp_inout : QByteArray(); } -bool CppSettings::set_BuiltinInOut(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinInOut(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppInOutCmd, (const char *)type, (const char *)form); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -604,22 +604,22 @@ bool CppSettings::set_BuiltinInOut(Q3CString type, Q3CString form) return FALSE; } -Q3CString CppSettings::builtinReturn(Q3CString s) +QByteArray CppSettings::builtinReturn(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); - return (b) ? b->cpp_return : Q3CString(); + return (b) ? b->cpp_return : QByteArray(); } -bool CppSettings::set_BuiltinReturn(Q3CString type, Q3CString form) +bool CppSettings::set_BuiltinReturn(QByteArray type, QByteArray form) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppReturnCmd, (const char *)type, (const char *)form); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(type); + UmlBuiltin * b = UmlSettings::_map_builtins.value(type); if (b == 0) b = UmlSettings::add_type(type); @@ -632,14 +632,14 @@ bool CppSettings::set_BuiltinReturn(Q3CString type, Q3CString form) return FALSE; } -const Q3CString & CppSettings::in() +const QByteArray & CppSettings::in() { read_if_needed_(); return _in; } -bool CppSettings::set_In(Q3CString v) +bool CppSettings::set_In(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInCmd, (const char *)v, ""); //[rageek] Fix prototype @@ -651,14 +651,14 @@ bool CppSettings::set_In(Q3CString v) return FALSE; } -const Q3CString & CppSettings::out() +const QByteArray & CppSettings::out() { read_if_needed_(); return _out; } -bool CppSettings::set_Out(Q3CString v) +bool CppSettings::set_Out(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOutCmd, (const char *)v, ""); //[rageek] Fix prototype @@ -670,14 +670,14 @@ bool CppSettings::set_Out(Q3CString v) return FALSE; } -const Q3CString & CppSettings::inout() +const QByteArray & CppSettings::inout() { read_if_needed_(); return _inout; } -bool CppSettings::set_Inout(Q3CString v) +bool CppSettings::set_Inout(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppInOutCmd, (const char *)v, ""); //[rageek] Fix prototype @@ -689,14 +689,14 @@ bool CppSettings::set_Inout(Q3CString v) return FALSE; } -Q3CString CppSettings::Return() +QByteArray CppSettings::Return() { read_if_needed_(); return _return; } -bool CppSettings::set_Return(Q3CString v) +bool CppSettings::set_Return(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppReturnCmd, (const char *)v, ""); //[rageek] Fix prototype @@ -708,14 +708,14 @@ bool CppSettings::set_Return(Q3CString v) return FALSE; } -const Q3CString & CppSettings::classDecl() +const QByteArray & CppSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool CppSettings::set_ClassDecl(Q3CString v) +bool CppSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -727,14 +727,14 @@ bool CppSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::externalClassDecl() +const QByteArray & CppSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool CppSettings::set_ExternalClassDecl(Q3CString v) +bool CppSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppExternalClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -746,14 +746,14 @@ bool CppSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::structDecl() +const QByteArray & CppSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool CppSettings::set_StructDecl(Q3CString v) +bool CppSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppStructDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -765,14 +765,14 @@ bool CppSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::unionDecl() +const QByteArray & CppSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool CppSettings::set_UnionDecl(Q3CString v) +bool CppSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppUnionDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -784,14 +784,14 @@ bool CppSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumDecl() +const QByteArray & CppSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool CppSettings::set_EnumDecl(Q3CString v) +bool CppSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -803,14 +803,14 @@ bool CppSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::typedefDecl() +const QByteArray & CppSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool CppSettings::set_TypedefDecl(Q3CString v) +bool CppSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppTypedefDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -822,14 +822,14 @@ bool CppSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::attributeDecl(const char * multiplicity) +const QByteArray & CppSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool CppSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool CppSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(cppSettingsCmd, setCppAttributeDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -842,14 +842,14 @@ bool CppSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & CppSettings::enumItemDecl() +const QByteArray & CppSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool CppSettings::set_EnumItemDecl(Q3CString v) +bool CppSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppEnumItemDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -861,7 +861,7 @@ bool CppSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::relationDecl(bool by_value, const char * multiplicity) +const QByteArray & CppSettings::relationDecl(bool by_value, const char * multiplicity) { read_if_needed_(); @@ -881,14 +881,14 @@ bool CppSettings::set_RelationDecl(bool by_value, const char * multiplicity, con return FALSE; } -const Q3CString & CppSettings::operationDecl() +const QByteArray & CppSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool CppSettings::set_OperationDecl(Q3CString v) +bool CppSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -900,14 +900,14 @@ bool CppSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & CppSettings::operationDef() +const QByteArray & CppSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool CppSettings::set_OperationDef(Q3CString v) +bool CppSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppOperationDefCmd, (const char *)v); //[rageek] Fix prototype @@ -957,14 +957,14 @@ bool CppSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::getName() +const QByteArray & CppSettings::getName() { read_if_needed_(); return _get_name; } -bool CppSettings::set_GetName(Q3CString v) +bool CppSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppGetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -1052,14 +1052,14 @@ bool CppSettings::set_SetVisibility(aVisibility v) return FALSE; } -const Q3CString & CppSettings::setName() +const QByteArray & CppSettings::setName() { read_if_needed_(); return _set_name; } -bool CppSettings::set_SetName(Q3CString v) +bool CppSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(cppSettingsCmd, setCppSetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -1130,51 +1130,51 @@ bool CppSettings::set_IsSetParamRef(bool v) bool CppSettings::_defined; -Q3CString CppSettings::_root; +QByteArray CppSettings::_root; -Q3CString CppSettings::_in; +QByteArray CppSettings::_in; -Q3CString CppSettings::_out; +QByteArray CppSettings::_out; -Q3CString CppSettings::_inout; +QByteArray CppSettings::_inout; -Q3CString CppSettings::_return; +QByteArray CppSettings::_return; -Q3CString CppSettings::_enum_in; +QByteArray CppSettings::_enum_in; -Q3CString CppSettings::_enum_out; +QByteArray CppSettings::_enum_out; -Q3CString CppSettings::_enum_inout; +QByteArray CppSettings::_enum_inout; -Q3CString CppSettings::_enum_return; +QByteArray CppSettings::_enum_return; -Q3CString CppSettings::_class_decl; +QByteArray CppSettings::_class_decl; -Q3CString CppSettings::_external_class_decl; +QByteArray CppSettings::_external_class_decl; -Q3CString CppSettings::_struct_decl; +QByteArray CppSettings::_struct_decl; -Q3CString CppSettings::_union_decl; +QByteArray CppSettings::_union_decl; -Q3CString CppSettings::_enum_decl; +QByteArray CppSettings::_enum_decl; -Q3CString CppSettings::_typedef_decl; +QByteArray CppSettings::_typedef_decl; -Q3CString CppSettings::_attr_decl[3/*multiplicity*/]; +QByteArray CppSettings::_attr_decl[3/*multiplicity*/]; -Q3CString CppSettings::_enum_item_decl; +QByteArray CppSettings::_enum_item_decl; -Q3CString CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; +QByteArray CppSettings::_rel_decl[2/*relation kind*/][3/*multiplicity*/]; -Q3CString CppSettings::_oper_decl; +QByteArray CppSettings::_oper_decl; -Q3CString CppSettings::_oper_def; +QByteArray CppSettings::_oper_def; bool CppSettings::_force_oper_throw; aVisibility CppSettings::_get_visibility; -Q3CString CppSettings::_get_name; +QByteArray CppSettings::_get_name; bool CppSettings::_is_get_inline; @@ -1184,7 +1184,7 @@ bool CppSettings::_is_get_value_const; aVisibility CppSettings::_set_visibility; -Q3CString CppSettings::_set_name; +QByteArray CppSettings::_set_name; bool CppSettings::_is_set_inline; @@ -1192,19 +1192,19 @@ bool CppSettings::_is_set_param_const; bool CppSettings::_is_set_param_ref; -Q3CString CppSettings::_h_content; +QByteArray CppSettings::_h_content; -Q3CString CppSettings::_src_content; +QByteArray CppSettings::_src_content; -Q3CString CppSettings::_h_ext; +QByteArray CppSettings::_h_ext; -Q3CString CppSettings::_src_ext; +QByteArray CppSettings::_src_ext; -Q3CString CppSettings::_dir_regexp; +QByteArray CppSettings::_dir_regexp; bool CppSettings::_dir_regexp_case_sensitive; -Q3CString CppSettings::_file_regexp; +QByteArray CppSettings::_file_regexp; bool CppSettings::_file_regexp_case_sensitive; @@ -1220,16 +1220,16 @@ bool CppSettings::_is_generate_javadoc_comment; bool CppSettings::_is_inline_force_header_in_h; -Q3CString CppSettings::_visibility_indent; +QByteArray CppSettings::_visibility_indent; -Q3Dict CppSettings::_map_includes; +QHash CppSettings::_map_includes; void CppSettings::read_() { _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -1255,13 +1255,13 @@ void CppSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _h_content = UmlCom::read_string(); diff --git a/genplugouts/HtmlDoc/CppSettings.h b/genplugouts/HtmlDoc/CppSettings.h index 086713522..b4c78cd83 100644 --- a/genplugouts/HtmlDoc/CppSettings.h +++ b/genplugouts/HtmlDoc/CppSettings.h @@ -4,10 +4,10 @@ #ifdef WITHCPP -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning C++, configured through // the 'Generation settings' dialog. @@ -31,104 +31,104 @@ class CppSettings : public UmlSettings // returns the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the C++ type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the C++ type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(Q3CString s); + static QByteArray relationAttributeStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString relationAttributeUmlStereotype(Q3CString s); + static QByteArray relationAttributeUmlStereotype(QByteArray s); // returns the C++ stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the C++ stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the C++ one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the C++ type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static Q3CString rootDir(); + static QByteArray rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default header file content - static Q3CString headerContent(); + static QByteArray headerContent(); // set the default header file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderContent(Q3CString v); + static bool set_HeaderContent(QByteArray v); // returns the default source file content - static Q3CString sourceContent(); + static QByteArray sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the header files produced by the // C++ code generator - static Q3CString headerExtension(); + static QByteArray headerExtension(); // set the extension of the header files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_HeaderExtension(Q3CString v); + static bool set_HeaderExtension(QByteArray v); // returns the extension of the source files produced by the // C++ code generator - static Q3CString sourceExtension(); + static QByteArray sourceExtension(); // set the extension of the source files produced by the // C++ code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // return the regular expression used to bypass // dir s on reverse/roundtrip - static Q3CString reverseRoundtripDirRegExp(); + static QByteArray reverseRoundtripDirRegExp(); // return if the regular expression used to bypass // dir s on reverse/roundtrip is case sensitive @@ -137,11 +137,11 @@ class CppSettings : public UmlSettings // set the regular expression used to bypass // dir s on reverse/roundtrip // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ReverseRoundtripDirRegExp(Q3CString s, bool cs); + static bool set_ReverseRoundtripDirRegExp(QByteArray s, bool cs); // return the regular expression used to bypass // file s on reverse/roundtrip - static Q3CString reverseRoundtripFileRegExp(); + static QByteArray reverseRoundtripFileRegExp(); // return if the regular expression used to bypass // file s on reverse/roundtrip is case sensitive @@ -150,7 +150,7 @@ class CppSettings : public UmlSettings // set the regular expression used to bypass // file s on reverse/roundtrip // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ReverseRoundtripFileRegExp(Q3CString s, bool cs); + static bool set_ReverseRoundtripFileRegExp(QByteArray s, bool cs); // indicates to the code generator if the #include may specify // the path of just the file's name @@ -212,56 +212,56 @@ class CppSettings : public UmlSettings // return the indent of the visibility specifiers - static const Q3CString & visibilityIndent(); + static const QByteArray & visibilityIndent(); // set visibility specifiers indent // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_VisibilityIndent(Q3CString v); + static bool set_VisibilityIndent(QByteArray v); // returns the default operation 'in' parameter specification // in case its type is an enum - static const Q3CString & enumIn(); + static const QByteArray & enumIn(); // set the default operation 'in' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumIn(Q3CString v); + static bool set_EnumIn(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is an enum - static const Q3CString & enumOut(); + static const QByteArray & enumOut(); // set the default operation 'out' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumOut(Q3CString v); + static bool set_EnumOut(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is an enum - static const Q3CString & enumInout(); + static const QByteArray & enumInout(); // set the default operation 'inout' parameter specification // in case its type is an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumInout(Q3CString v); + static bool set_EnumInout(QByteArray v); // return the default operation value type form - static Q3CString enumReturn(); + static QByteArray enumReturn(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumReturn(Q3CString v); + static bool set_EnumReturn(QByteArray v); // returns the default operation 'in' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinIn(Q3CString s); + static QByteArray builtinIn(QByteArray s); // set the default operation 'in' parameter specification // in case its type is specified in the first 'Generation @@ -269,13 +269,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinIn(Q3CString type, Q3CString form); + static bool set_BuiltinIn(QByteArray type, QByteArray form); // returns the default operation 'out' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinOut(Q3CString s); + static QByteArray builtinOut(QByteArray s); // set the default operation 'out' parameter specification // in case its type is specified in the first 'Generation @@ -283,13 +283,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinOut(Q3CString type, Q3CString form); + static bool set_BuiltinOut(QByteArray type, QByteArray form); // returns the default operation 'inout' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinInOut(Q3CString s); + static QByteArray builtinInOut(QByteArray s); // set the default operation 'inout' parameter specification // in case its type is specified in the first 'Generation @@ -297,13 +297,13 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinInOut(Q3CString type, Q3CString form); + static bool set_BuiltinInOut(QByteArray type, QByteArray form); // returns the default operation 'return' parameter specification // in case its type is specified in the first 'Generation // settings' tab, else an empty string/null - static Q3CString builtinReturn(Q3CString s); + static QByteArray builtinReturn(QByteArray s); // set the default operation 'return' parameter specification // in case its type is specified in the first 'Generation @@ -311,36 +311,36 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_BuiltinReturn(Q3CString type, Q3CString form); + static bool set_BuiltinReturn(QByteArray type, QByteArray form); // returns the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & in(); + static const QByteArray & in(); // set the default operation 'in' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_In(Q3CString v); + static bool set_In(QByteArray v); // returns the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & out(); + static const QByteArray & out(); // set the default operation 'out' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Out(Q3CString v); + static bool set_Out(QByteArray v); // returns the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the // first 'Generation settings' tab - static const Q3CString & inout(); + static const QByteArray & inout(); // set the default operation 'inout' parameter specification // in case its type is not an enum or a type specified in the @@ -348,83 +348,83 @@ class CppSettings : public UmlSettings // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Inout(Q3CString v); + static bool set_Inout(QByteArray v); // return the default operation value type form - static Q3CString Return(); + static QByteArray Return(); // set the default operation value type form // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Return(Q3CString v); + static bool set_Return(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. - static const Q3CString & relationDecl(bool by_value, const char * multiplicity); + static const QByteArray & relationDecl(bool by_value, const char * multiplicity); // set the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. @@ -433,20 +433,20 @@ class CppSettings : public UmlSettings static bool set_RelationDecl(bool by_value, const char * multiplicity, const char * v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // return TRUE if the operations profile must contain 'throw()' // when the operations does not have exception @@ -470,13 +470,13 @@ class CppSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns if a 'get' operation generated through the attribute // and relation 'add get operation' menu is inline by default @@ -522,14 +522,14 @@ class CppSettings : public UmlSettings // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is inline by default @@ -570,51 +570,51 @@ class CppSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _in; + static QByteArray _in; - static Q3CString _out; + static QByteArray _out; - static Q3CString _inout; + static QByteArray _inout; - static Q3CString _return; + static QByteArray _return; - static Q3CString _enum_in; + static QByteArray _enum_in; - static Q3CString _enum_out; + static QByteArray _enum_out; - static Q3CString _enum_inout; + static QByteArray _enum_inout; - static Q3CString _enum_return; + static QByteArray _enum_return; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[2/*relation kind*/][3/*multiplicity*/]; + static QByteArray _rel_decl[2/*relation kind*/][3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _oper_def; + static QByteArray _oper_def; static bool _force_oper_throw; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_inline; @@ -624,7 +624,7 @@ class CppSettings : public UmlSettings static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_inline; @@ -632,19 +632,19 @@ class CppSettings : public UmlSettings static bool _is_set_param_ref; - static Q3CString _h_content; + static QByteArray _h_content; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _h_ext; + static QByteArray _h_ext; - static Q3CString _src_ext; + static QByteArray _src_ext; - static Q3CString _dir_regexp; + static QByteArray _dir_regexp; static bool _dir_regexp_case_sensitive; - static Q3CString _file_regexp; + static QByteArray _file_regexp; static bool _file_regexp_case_sensitive; @@ -660,9 +660,9 @@ class CppSettings : public UmlSettings static bool _is_inline_force_header_in_h; - static Q3CString _visibility_indent; + static QByteArray _visibility_indent; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/HtmlDoc/FileWriter.cpp b/genplugouts/HtmlDoc/FileWriter.cpp index acd4faa16..94932f870 100644 --- a/genplugouts/HtmlDoc/FileWriter.cpp +++ b/genplugouts/HtmlDoc/FileWriter.cpp @@ -1,12 +1,12 @@ #include "FileWriter.h" -#include +#include #include //Added by qt3to4: -#include +#include -bool FileWriter::open(Q3CString s) +bool FileWriter::open(QByteArray s) { f = new QFile(s); @@ -15,7 +15,7 @@ bool FileWriter::open(Q3CString s) return FALSE; } - ts = new Q3TextStream(f); + ts = new QTextStream(f); return TRUE; } @@ -29,28 +29,32 @@ void FileWriter::close() ts = 0; } -void FileWriter::write(Q3CString s) +void FileWriter::write(QByteArray s) { - ts->writeRawBytes(s, s.length()); + //ts->writeRawBytes(s, s.length()); + *ts<writeRawBytes(s, strlen(s)); + //ts->writeRawBytes(s, strlen(s)); + *ts<writeRawBytes(&c, 1); + //ts->writeRawBytes(&c, 1); + *ts<writeRawBytes(s, s.length()); + //ts->writeRawBytes(s, s.length()); + *ts< -//Added by qt3to4: -#include +#include class QFile; -class Q3TextStream; +class QTextStream; // The original html generator was written in Java to test the Java // version of the API, this class allows to have a source code similar @@ -15,11 +12,11 @@ class Q3TextStream; class FileWriter { public: - bool open(Q3CString s); + bool open(QByteArray s); void close(); - void write(Q3CString s); + void write(QByteArray s); void write(const char * s); @@ -29,7 +26,7 @@ class FileWriter protected: - Q3TextStream * ts; + QTextStream * ts; QFile * f; diff --git a/genplugouts/HtmlDoc/FlowBehavior.h b/genplugouts/HtmlDoc/FlowBehavior.h index 55dde8146..09f17529a 100644 --- a/genplugouts/HtmlDoc/FlowBehavior.h +++ b/genplugouts/HtmlDoc/FlowBehavior.h @@ -2,18 +2,18 @@ #define _FLOWBEHAVIOR_H -#include + class FlowBehavior { public: - Q3CString weight; + QByteArray weight; - Q3CString guard; + QByteArray guard; - Q3CString selection; + QByteArray selection; - Q3CString transformation; + QByteArray transformation; void read(); diff --git a/genplugouts/HtmlDoc/HtmlDoc.pro b/genplugouts/HtmlDoc/HtmlDoc.pro index 209368d9e..e48f8c2f0 100644 --- a/genplugouts/HtmlDoc/HtmlDoc.pro +++ b/genplugouts/HtmlDoc/HtmlDoc.pro @@ -1,7 +1,10 @@ TEMPLATE = app TARGET = ghtml -CONFIG += warn_on qt -DEFINES = WITHCPP WITHJAVA WITHIDL WITHPHP WITHPYTHON +CONFIG -= app_bundle +CONFIG += qt warn_on c++11 +QMAKE_POST_LINK = " " +DEFINES += QT_DEPRECATED_WARNINGS +DEFINES += WITHCPP WITHJAVA WITHIDL WITHPHP WITHPYTHON HEADERS = ./UmlBaseRelation.h \ ./UmlFormalParameter.h \ ./UmlCollaborationMessage.h \ @@ -404,24 +407,20 @@ SOURCES = ./UmlBaseRelation.cpp \ ./UmlBaseActivityNode.cpp \ ./UmlTransition.cpp -#The following line was inserted by qt3to4 -QT += network qt3support +QT += network widgets +DEFINES += TRUE=true FALSE=false INCLUDEPATH += ../../src -CONFIG += qtestlib -Release{ - - - MOC_DIR = bin/douml/html/MOC_release - OBJECTS_DIR = bin/douml/html/Obj_release +QT += testlib +DESTDIR = ../../bin +CONFIG(release, debug|release) { +DEFINES += NDEBUG + MOC_DIR = $${DESTDIR}/moc_release/ghtml + OBJECTS_DIR = $${DESTDIR}/obj_release/ghtml } - -Debug{ - MOC_DIR = bin/douml/html/MOC_Debug - OBJECTS_DIR = bin/douml/html/Obj_Debug - +CONFIG(debug, debug|release) { +DEFINES += TRACE DEBUG DEBUG_DOUML + MOC_DIR = $${DESTDIR}/moc_debug/ghtml + OBJECTS_DIR = $${DESTDIR}/obj_debug/ghtml } - UI_DIR = src/ui - DESTDIR = ../../bin - -QMAKE_CXXFLAGS += -std=gnu++11 +UI_DIR = src/ui diff --git a/genplugouts/HtmlDoc/IdlSettings.cpp b/genplugouts/HtmlDoc/IdlSettings.cpp index 526c000b3..d1d58fb25 100644 --- a/genplugouts/HtmlDoc/IdlSettings.cpp +++ b/genplugouts/HtmlDoc/IdlSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool IdlSettings::useDefaults() { UmlCom::send_cmd(idlSettingsCmd, getIdlUseDefaultsCmd); @@ -22,22 +22,22 @@ bool IdlSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString IdlSettings::type(Q3CString s) +QByteArray IdlSettings::type(QByteArray s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_Type(Q3CString s, Q3CString v) +bool IdlSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlTypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -50,29 +50,29 @@ bool IdlSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::umlType(Q3CString s) +QByteArray IdlSettings::umlType(QByteArray s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::idl); } -Q3CString IdlSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray IdlSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -85,29 +85,29 @@ bool IdlSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::relationAttributeUmlStereotype(Q3CString s) +QByteArray IdlSettings::relationAttributeUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::classStereotype(Q3CString s) +QByteArray IdlSettings::classStereotype(QByteArray s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->idl : s; } -bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool IdlSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlClassStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -120,32 +120,32 @@ bool IdlSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString IdlSettings::classUmlStereotype(Q3CString s) +QByteArray IdlSettings::classUmlStereotype(QByteArray s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::idl); } -Q3CString IdlSettings::include(Q3CString s) +QByteArray IdlSettings::include(QByteArray s) { read_if_needed_(); - Q3CString * r = _map_includes[s]; + QByteArray * r = _map_includes[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool IdlSettings::set_Include(Q3CString s, Q3CString v) +bool IdlSettings::set_Include(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlIncludeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - Q3CString * r = _map_includes.take(s); + QByteArray * r = _map_includes.take(s); if (!v.isEmpty()) - _map_includes.insert(s, new Q3CString(v)); + _map_includes.insert(s, new QByteArray(v)); if (r) delete r; @@ -156,14 +156,14 @@ bool IdlSettings::set_Include(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::rootDir() +const QByteArray & IdlSettings::rootDir() { read_if_needed_(); return _root; } -bool IdlSettings::set_RootDir(Q3CString v) +bool IdlSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlRootDirCmd, (const char *)v); //[rageek] Fix prototype @@ -175,14 +175,14 @@ bool IdlSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceContent() +const QByteArray & IdlSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool IdlSettings::set_SourceContent(Q3CString v) +bool IdlSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceContentCmd, (const char *)v); //[rageek] Fix prototype @@ -194,14 +194,14 @@ bool IdlSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::sourceExtension() +const QByteArray & IdlSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool IdlSettings::set_SourceExtension(Q3CString v) +bool IdlSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSourceExtensionCmd, (const char *)v); //[rageek] Fix prototype @@ -213,14 +213,14 @@ bool IdlSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::interfaceDecl() +const QByteArray & IdlSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool IdlSettings::set_InterfaceDecl(Q3CString v) +bool IdlSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlInterfaceDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -232,14 +232,14 @@ bool IdlSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeDecl() +const QByteArray & IdlSettings::valuetypeDecl() { read_if_needed_(); return _valuetype_decl; } -bool IdlSettings::set_ValuetypeDecl(Q3CString v) +bool IdlSettings::set_ValuetypeDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -251,14 +251,14 @@ bool IdlSettings::set_ValuetypeDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::externalClassDecl() +const QByteArray & IdlSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool IdlSettings::set_ExternalClassDecl(Q3CString v) +bool IdlSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExternalClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -270,14 +270,14 @@ bool IdlSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::structDecl() +const QByteArray & IdlSettings::structDecl() { read_if_needed_(); return _struct_decl; } -bool IdlSettings::set_StructDecl(Q3CString v) +bool IdlSettings::set_StructDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlStructDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -289,14 +289,14 @@ bool IdlSettings::set_StructDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::typedefDecl() +const QByteArray & IdlSettings::typedefDecl() { read_if_needed_(); return _typedef_decl; } -bool IdlSettings::set_TypedefDecl(Q3CString v) +bool IdlSettings::set_TypedefDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlTypedefDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -308,14 +308,14 @@ bool IdlSettings::set_TypedefDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::exceptionDecl() +const QByteArray & IdlSettings::exceptionDecl() { read_if_needed_(); return _exception_decl; } -bool IdlSettings::set_ExceptionDecl(Q3CString v) +bool IdlSettings::set_ExceptionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlExceptionDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -327,14 +327,14 @@ bool IdlSettings::set_ExceptionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::unionDecl() +const QByteArray & IdlSettings::unionDecl() { read_if_needed_(); return _union_decl; } -bool IdlSettings::set_UnionDecl(Q3CString v) +bool IdlSettings::set_UnionDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlUnionDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -346,14 +346,14 @@ bool IdlSettings::set_UnionDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumDecl() +const QByteArray & IdlSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool IdlSettings::set_EnumDecl(Q3CString v) +bool IdlSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -365,14 +365,14 @@ bool IdlSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::attributeDecl(const char * multiplicity) +const QByteArray & IdlSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlAttributeDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -385,14 +385,14 @@ bool IdlSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeAttributeDecl(const char * multiplicity) +const QByteArray & IdlSettings::valuetypeAttributeDecl(const char * multiplicity) { read_if_needed_(); return _valuetype_attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeAttributeDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -405,14 +405,14 @@ bool IdlSettings::set_ValuetypeAttributeDecl(const char * multiplicity, Q3CStrin return FALSE; } -const Q3CString & IdlSettings::unionItemDecl(const char * multiplicity) +const QByteArray & IdlSettings::unionItemDecl(const char * multiplicity) { read_if_needed_(); return _union_item_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_UnionItemDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_UnionItemDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlUnionItemDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -425,14 +425,14 @@ bool IdlSettings::set_UnionItemDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::enumItemDecl() +const QByteArray & IdlSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool IdlSettings::set_EnumItemDecl(Q3CString v) +bool IdlSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlEnumItemDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -444,14 +444,14 @@ bool IdlSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::constDecl(const char * multiplicity) +const QByteArray & IdlSettings::constDecl(const char * multiplicity) { read_if_needed_(); return _const_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ConstDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ConstDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlConstDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -464,14 +464,14 @@ bool IdlSettings::set_ConstDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::relationDecl(const char * multiplicity) +const QByteArray & IdlSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlRelationDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -484,14 +484,14 @@ bool IdlSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::valuetypeRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::valuetypeRelationDecl(const char * multiplicity) { read_if_needed_(); return _valuetype_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlValuetypeRelationDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -504,14 +504,14 @@ bool IdlSettings::set_ValuetypeRelationDecl(const char * multiplicity, Q3CString return FALSE; } -const Q3CString & IdlSettings::unionRelationDecl(const char * multiplicity) +const QByteArray & IdlSettings::unionRelationDecl(const char * multiplicity) { read_if_needed_(); return _union_rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) +bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(idlSettingsCmd, setIdlUnionRelationDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -524,14 +524,14 @@ bool IdlSettings::set_UnionRelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & IdlSettings::operationDecl() +const QByteArray & IdlSettings::operationDecl() { read_if_needed_(); return _oper_decl; } -bool IdlSettings::set_OperationDecl(Q3CString v) +bool IdlSettings::set_OperationDecl(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlOperationDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -543,14 +543,14 @@ bool IdlSettings::set_OperationDecl(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::getName() +const QByteArray & IdlSettings::getName() { read_if_needed_(); return _get_name; } -bool IdlSettings::set_GetName(Q3CString v) +bool IdlSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlGetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -562,14 +562,14 @@ bool IdlSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & IdlSettings::setName() +const QByteArray & IdlSettings::setName() { read_if_needed_(); return _set_name; } -bool IdlSettings::set_SetName(Q3CString v) +bool IdlSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(idlSettingsCmd, setIdlSetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -602,60 +602,60 @@ bool IdlSettings::set_IsSetOneway(bool v) bool IdlSettings::_defined; -Q3CString IdlSettings::_root; +QByteArray IdlSettings::_root; -Q3CString IdlSettings::_interface_decl; +QByteArray IdlSettings::_interface_decl; -Q3CString IdlSettings::_valuetype_decl; +QByteArray IdlSettings::_valuetype_decl; -Q3CString IdlSettings::_struct_decl; +QByteArray IdlSettings::_struct_decl; -Q3CString IdlSettings::_typedef_decl; +QByteArray IdlSettings::_typedef_decl; -Q3CString IdlSettings::_exception_decl; +QByteArray IdlSettings::_exception_decl; -Q3CString IdlSettings::_union_decl; +QByteArray IdlSettings::_union_decl; -Q3CString IdlSettings::_enum_decl; +QByteArray IdlSettings::_enum_decl; -Q3CString IdlSettings::_external_class_decl; +QByteArray IdlSettings::_external_class_decl; -Q3CString IdlSettings::_attr_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_attr_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_valuetype_attr_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_valuetype_attr_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_union_item_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_union_item_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_enum_item_decl; +QByteArray IdlSettings::_enum_item_decl; -Q3CString IdlSettings::_const_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_const_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_valuetype_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_union_rel_decl[3/*multiplicity*/]; +QByteArray IdlSettings::_union_rel_decl[3/*multiplicity*/]; -Q3CString IdlSettings::_oper_decl; +QByteArray IdlSettings::_oper_decl; -Q3CString IdlSettings::_get_name; +QByteArray IdlSettings::_get_name; -Q3CString IdlSettings::_set_name; +QByteArray IdlSettings::_set_name; bool IdlSettings::_is_set_oneway; -Q3CString IdlSettings::_src_content; +QByteArray IdlSettings::_src_content; -Q3CString IdlSettings::_ext; +QByteArray IdlSettings::_ext; -Q3Dict IdlSettings::_map_includes; +QHash IdlSettings::_map_includes; void IdlSettings::read_() { _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -677,13 +677,13 @@ void IdlSettings::read_() _map_includes.clear(); if (n > _map_includes.size()) - _map_includes.resize(n); + _map_includes.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_includes.insert(t, new Q3CString(i)); + _map_includes.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/HtmlDoc/IdlSettings.h b/genplugouts/HtmlDoc/IdlSettings.h index f0cf0f823..a9e6fb492 100644 --- a/genplugouts/HtmlDoc/IdlSettings.h +++ b/genplugouts/HtmlDoc/IdlSettings.h @@ -4,9 +4,9 @@ #ifdef WITHIDL -#include + #include "UmlSettings.h" -#include + // This class manages settings concerning IDL, configured through // the 'Generation settings' dialog. @@ -31,244 +31,244 @@ class IdlSettings : public UmlSettings // returns the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(Q3CString s); + static QByteArray type(QByteArray s); // set the IDL type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the IDL type given in argument - static Q3CString umlType(Q3CString s); + static QByteArray umlType(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString relationAttributeUmlStereotype(Q3CString s); + static QByteArray relationAttributeUmlStereotype(QByteArray s); // returns the IDL stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(Q3CString s); + static QByteArray classStereotype(QByteArray s); // set the IDL stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the IDL one given in argument - static Q3CString classUmlStereotype(Q3CString s); + static QByteArray classUmlStereotype(QByteArray s); // returns the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. - static Q3CString include(Q3CString s); + static QByteArray include(QByteArray s); // set the #include or other form specified in the last // 'Generation settings' tab for the Idl type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Include(Q3CString s, Q3CString v); + static bool set_Include(QByteArray s, QByteArray v); // returns the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the files produced by the Idl code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the files produced by the Idl code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of a valuetype - static const Q3CString & valuetypeDecl(); + static const QByteArray & valuetypeDecl(); // set the default definition of a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeDecl(Q3CString v); + static bool set_ValuetypeDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of a struct - static const Q3CString & structDecl(); + static const QByteArray & structDecl(); // set the default definition of a struct // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_StructDecl(Q3CString v); + static bool set_StructDecl(QByteArray v); // returns the default definition of a typedef - static const Q3CString & typedefDecl(); + static const QByteArray & typedefDecl(); // set the default definition of a typedef // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_TypedefDecl(Q3CString v); + static bool set_TypedefDecl(QByteArray v); // returns the default definition of an exception - static const Q3CString & exceptionDecl(); + static const QByteArray & exceptionDecl(); // set the default definition of an exception // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExceptionDecl(Q3CString v); + static bool set_ExceptionDecl(QByteArray v); // returns the default definition of an union - static const Q3CString & unionDecl(); + static const QByteArray & unionDecl(); // set the default definition of an union // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionDecl(Q3CString v); + static bool set_UnionDecl(QByteArray v); // returns the default definition of an enum - static const Q3CString & enumDecl(); + static const QByteArray & enumDecl(); // set the default definition of an enum // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an attribute // placed in a valuetype depending on the multiplicity - static const Q3CString & valuetypeAttributeDecl(const char * multiplicity); + static const QByteArray & valuetypeAttributeDecl(const char * multiplicity); // set the default definition of an attribute // placed in a valuetype // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeAttributeDecl(const char * multiplicity, Q3CString v); + static bool set_ValuetypeAttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an union item depending on the multiplicity - static const Q3CString & unionItemDecl(const char * multiplicity); + static const QByteArray & unionItemDecl(const char * multiplicity); // set the default definition of an union item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionItemDecl(const char * multiplicity, Q3CString v); + static bool set_UnionItemDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumItemDecl(); + static const QByteArray & enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a constant attribute depending on the multiplicity - static const Q3CString & constDecl(const char * multiplicity); + static const QByteArray & constDecl(const char * multiplicity); // set the default definition of a constant attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ConstDecl(const char * multiplicity, Q3CString v); + static bool set_ConstDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in a valuetype // depending on the multiplicity given in argument. - static const Q3CString & valuetypeRelationDecl(const char * multiplicity); + static const QByteArray & valuetypeRelationDecl(const char * multiplicity); // set the default definition of a relation in a valuetype // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ValuetypeRelationDecl(const char * multiplicity, Q3CString v); + static bool set_ValuetypeRelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of a relation in an union // depending on the multiplicity given in argument. - static const Q3CString & unionRelationDecl(const char * multiplicity); + static const QByteArray & unionRelationDecl(const char * multiplicity); // set the default definition of a relation in an union // depending on the multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_UnionRelationDecl(const char * multiplicity, Q3CString v); + static bool set_UnionRelationDecl(const char * multiplicity, QByteArray v); // returns the default declaration of an operation - static const Q3CString & operationDecl(); + static const QByteArray & operationDecl(); // set the default declaration of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDecl(Q3CString v); + static bool set_OperationDecl(QByteArray v); // returns the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated through // the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // returns if a 'set' operation generated through the attribute // and relation 'add set operation' menu is oneway by default @@ -287,53 +287,53 @@ class IdlSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _valuetype_decl; + static QByteArray _valuetype_decl; - static Q3CString _struct_decl; + static QByteArray _struct_decl; - static Q3CString _typedef_decl; + static QByteArray _typedef_decl; - static Q3CString _exception_decl; + static QByteArray _exception_decl; - static Q3CString _union_decl; + static QByteArray _union_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _valuetype_attr_decl[3/*multiplicity*/]; + static QByteArray _valuetype_attr_decl[3/*multiplicity*/]; - static Q3CString _union_item_decl[3/*multiplicity*/]; + static QByteArray _union_item_decl[3/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _const_decl[3/*multiplicity*/]; + static QByteArray _const_decl[3/*multiplicity*/]; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _valuetype_rel_decl[3/*multiplicity*/]; + static QByteArray _valuetype_rel_decl[3/*multiplicity*/]; - static Q3CString _union_rel_decl[3/*multiplicity*/]; + static QByteArray _union_rel_decl[3/*multiplicity*/]; - static Q3CString _oper_decl; + static QByteArray _oper_decl; - static Q3CString _get_name; + static QByteArray _get_name; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_oneway; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_includes; + static QHash _map_includes; protected: diff --git a/genplugouts/HtmlDoc/JavaSettings.cpp b/genplugouts/HtmlDoc/JavaSettings.cpp index 0eef9d723..09abee7b1 100644 --- a/genplugouts/HtmlDoc/JavaSettings.cpp +++ b/genplugouts/HtmlDoc/JavaSettings.cpp @@ -9,7 +9,7 @@ #include "UmlBuiltin.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool JavaSettings::useDefaults() { UmlCom::send_cmd(javaSettingsCmd, getJavaUseDefaultsCmd); @@ -22,22 +22,22 @@ bool JavaSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString JavaSettings::type(const Q3CString & s) +QByteArray JavaSettings::type(const QByteArray & s) { read_if_needed_(); - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_Type(Q3CString s, Q3CString v) +bool JavaSettings::set_Type(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaTypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlBuiltin * b = UmlSettings::_map_builtins.find(s); + UmlBuiltin * b = UmlSettings::_map_builtins.value(s); if (b == 0) b = UmlSettings::add_type(s); @@ -50,29 +50,29 @@ bool JavaSettings::set_Type(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::umlType(const Q3CString & s) +QByteArray JavaSettings::umlType(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_type(s, &UmlBuiltin::java); } -Q3CString JavaSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray JavaSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -85,29 +85,29 @@ bool JavaSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::relationAttributeUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::relationAttributeUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::classStereotype(const Q3CString & s) +QByteArray JavaSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->java : s; } -bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool JavaSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaClassStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -120,32 +120,32 @@ bool JavaSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString JavaSettings::classUmlStereotype(const Q3CString & s) +QByteArray JavaSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::java); } -Q3CString JavaSettings::get_import(const Q3CString & s) +QByteArray JavaSettings::get_import(const QByteArray & s) { read_if_needed_(); - Q3CString * r = _map_imports[s]; + QByteArray * r = _map_imports[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool JavaSettings::set_Import(Q3CString s, Q3CString v) +bool JavaSettings::set_Import(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaImportCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - Q3CString * r = _map_imports.take(s); + QByteArray * r = _map_imports.take(s); if (!v.isEmpty()) - _map_imports.insert(s, new Q3CString(v)); + _map_imports.insert(s, new QByteArray(v)); if (r) delete r; @@ -156,14 +156,14 @@ bool JavaSettings::set_Import(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::rootDir() +const QByteArray & JavaSettings::rootDir() { read_if_needed_(); return _root; } -bool JavaSettings::set_RootDir(Q3CString v) +bool JavaSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaRootdirCmd, (const char *)v); //[rageek] Fix prototype @@ -175,14 +175,14 @@ bool JavaSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceContent() +const QByteArray & JavaSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool JavaSettings::set_SourceContent(Q3CString v) +bool JavaSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceContentCmd, (const char *)v); //[rageek] Fix prototype @@ -194,14 +194,14 @@ bool JavaSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::sourceExtension() +const QByteArray & JavaSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool JavaSettings::set_SourceExtension(Q3CString v) +bool JavaSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSourceExtensionCmd, (const char *)v); //[rageek] Fix prototype @@ -213,7 +213,7 @@ bool JavaSettings::set_SourceExtension(Q3CString v) return FALSE; } -Q3CString JavaSettings::reverseRoundtripDirRegExp() +QByteArray JavaSettings::reverseRoundtripDirRegExp() { read_if_needed_(); @@ -227,7 +227,7 @@ bool JavaSettings::isReverseRoundtripDirRegExpCaseSensitive() return _dir_regexp_case_sensitive; } -bool JavaSettings::set_ReverseRoundtripDirRegExp(Q3CString s, bool cs) +bool JavaSettings::set_ReverseRoundtripDirRegExp(QByteArray s, bool cs) { UmlCom::send_cmd(javaSettingsCmd, setJavaDirRevFilterCmd, s, cs); @@ -240,7 +240,7 @@ bool JavaSettings::set_ReverseRoundtripDirRegExp(Q3CString s, bool cs) return FALSE; } -Q3CString JavaSettings::reverseRoundtripFileRegExp() +QByteArray JavaSettings::reverseRoundtripFileRegExp() { read_if_needed_(); @@ -254,7 +254,7 @@ bool JavaSettings::isReverseRoundtripFileRegExpCaseSensitive() return _file_regexp_case_sensitive; } -bool JavaSettings::set_ReverseRoundtripFileRegExp(Q3CString s, bool cs) +bool JavaSettings::set_ReverseRoundtripFileRegExp(QByteArray s, bool cs) { UmlCom::send_cmd(javaSettingsCmd, setJavaFileRevFilterCmd, s, cs); @@ -305,14 +305,14 @@ bool JavaSettings::set_IsForcePackagePrefixGeneration(bool v) return FALSE; } -const Q3CString & JavaSettings::classDecl() +const QByteArray & JavaSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool JavaSettings::set_ClassDecl(Q3CString v) +bool JavaSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -324,14 +324,14 @@ bool JavaSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::externalClassDecl() +const QByteArray & JavaSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool JavaSettings::set_ExternalClassDecl(Q3CString v) +bool JavaSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaExternalClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -343,14 +343,14 @@ bool JavaSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternDecl() +const QByteArray & JavaSettings::enumPatternDecl() { read_if_needed_(); return _enum_pattern_decl; } -bool JavaSettings::set_EnumPatternDecl(Q3CString v) +bool JavaSettings::set_EnumPatternDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -362,14 +362,14 @@ bool JavaSettings::set_EnumPatternDecl(Q3CString v) return FALSE; } -Q3CString JavaSettings::enumDecl() +QByteArray JavaSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool JavaSettings::set_EnumDecl(Q3CString v) +bool JavaSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -381,14 +381,14 @@ bool JavaSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::interfaceDecl() +const QByteArray & JavaSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool JavaSettings::set_InterfaceDecl(Q3CString v) +bool JavaSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaInterfaceDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -400,14 +400,14 @@ bool JavaSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::attributeDecl(const char * multiplicity) +const QByteArray & JavaSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool JavaSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool JavaSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaAttributeDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -420,14 +420,14 @@ bool JavaSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternItemDecl() +const QByteArray & JavaSettings::enumPatternItemDecl() { read_if_needed_(); return _enum_pattern_item_decl; } -bool JavaSettings::set_EnumPatternItemDecl(Q3CString v) +bool JavaSettings::set_EnumPatternItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternItemDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -439,14 +439,14 @@ bool JavaSettings::set_EnumPatternItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::enumPatternItemCase() +const QByteArray & JavaSettings::enumPatternItemCase() { read_if_needed_(); return _enum_pattern_item_case; } -bool JavaSettings::set_EnumPatternItemCase(Q3CString v) +bool JavaSettings::set_EnumPatternItemCase(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumPatternItemCaseCmd, (const char *)v); //[rageek] Fix prototype @@ -458,14 +458,14 @@ bool JavaSettings::set_EnumPatternItemCase(Q3CString v) return FALSE; } -Q3CString JavaSettings::enumItemDecl() +QByteArray JavaSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool JavaSettings::set_EnumItemDecl(Q3CString v) +bool JavaSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaEnumItemDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -477,14 +477,14 @@ bool JavaSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::relationDecl(const char * multiplicity) +const QByteArray & JavaSettings::relationDecl(const char * multiplicity) { read_if_needed_(); return _rel_decl[UmlSettings::multiplicity_column(multiplicity)]; } -bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) +bool JavaSettings::set_RelationDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(javaSettingsCmd, setJavaRelationDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -497,14 +497,14 @@ bool JavaSettings::set_RelationDecl(const char * multiplicity, Q3CString v) return FALSE; } -const Q3CString & JavaSettings::operationDef() +const QByteArray & JavaSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool JavaSettings::set_OperationDef(Q3CString v) +bool JavaSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaOperationDefCmd, (const char *)v); //[rageek] Fix prototype @@ -535,14 +535,14 @@ bool JavaSettings::set_GetVisibility(aVisibility v) return FALSE; } -const Q3CString & JavaSettings::getName() +const QByteArray & JavaSettings::getName() { read_if_needed_(); return _get_name; } -bool JavaSettings::set_GetName(Q3CString v) +bool JavaSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaGetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -554,14 +554,14 @@ bool JavaSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & JavaSettings::setName() +const QByteArray & JavaSettings::setName() { read_if_needed_(); return _set_name; } -bool JavaSettings::set_SetName(Q3CString v) +bool JavaSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(javaSettingsCmd, setJavaSetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -651,53 +651,53 @@ bool JavaSettings::set_IsSetParamFinal(bool v) bool JavaSettings::_defined; -Q3CString JavaSettings::_root; +QByteArray JavaSettings::_root; -Q3CString JavaSettings::_class_decl; +QByteArray JavaSettings::_class_decl; -Q3CString JavaSettings::_external_class_decl; +QByteArray JavaSettings::_external_class_decl; -Q3CString JavaSettings::_enum_pattern_decl; +QByteArray JavaSettings::_enum_pattern_decl; -Q3CString JavaSettings::_enum_decl; +QByteArray JavaSettings::_enum_decl; -Q3CString JavaSettings::_interface_decl; +QByteArray JavaSettings::_interface_decl; -Q3CString JavaSettings::_attr_decl[3/*multiplicity*/]; +QByteArray JavaSettings::_attr_decl[3/*multiplicity*/]; -Q3CString JavaSettings::_enum_pattern_item_decl; +QByteArray JavaSettings::_enum_pattern_item_decl; -Q3CString JavaSettings::_enum_pattern_item_case; +QByteArray JavaSettings::_enum_pattern_item_case; -Q3CString JavaSettings::_enum_item_decl; +QByteArray JavaSettings::_enum_item_decl; -Q3CString JavaSettings::_rel_decl[3/*multiplicity*/]; +QByteArray JavaSettings::_rel_decl[3/*multiplicity*/]; -Q3CString JavaSettings::_oper_def; +QByteArray JavaSettings::_oper_def; aVisibility JavaSettings::_get_visibility; -Q3CString JavaSettings::_get_name; +QByteArray JavaSettings::_get_name; bool JavaSettings::_is_get_final; aVisibility JavaSettings::_set_visibility; -Q3CString JavaSettings::_set_name; +QByteArray JavaSettings::_set_name; bool JavaSettings::_is_set_final; bool JavaSettings::_is_set_param_final; -Q3CString JavaSettings::_src_content; +QByteArray JavaSettings::_src_content; -Q3CString JavaSettings::_ext; +QByteArray JavaSettings::_ext; -Q3CString JavaSettings::_dir_regexp; +QByteArray JavaSettings::_dir_regexp; bool JavaSettings::_dir_regexp_case_sensitive; -Q3CString JavaSettings::_file_regexp; +QByteArray JavaSettings::_file_regexp; bool JavaSettings::_file_regexp_case_sensitive; @@ -705,14 +705,14 @@ bool JavaSettings::_is_generate_javadoc_comment; bool JavaSettings::_is_force_package_gen; -Q3Dict JavaSettings::_map_imports; +QHash JavaSettings::_map_imports; void JavaSettings::read_() { _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -734,13 +734,13 @@ void JavaSettings::read_() _map_imports.clear(); if (n > _map_imports.size()) - _map_imports.resize(n); + _map_imports.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_imports.insert(t, new Q3CString(i)); + _map_imports.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/HtmlDoc/JavaSettings.h b/genplugouts/HtmlDoc/JavaSettings.h index 45b191f18..a34e9f831 100644 --- a/genplugouts/HtmlDoc/JavaSettings.h +++ b/genplugouts/HtmlDoc/JavaSettings.h @@ -4,10 +4,10 @@ #ifdef WITHJAVA -#include + #include "aVisibility.h" #include "UmlSettings.h" -#include + // This class manages settings concerning JAVA, configured through // the 'Generation settings' dialog. @@ -31,84 +31,84 @@ class JavaSettings : public UmlSettings // returns the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab - static Q3CString type(const Q3CString & s); + static QByteArray type(const QByteArray & s); // set the JAVA type corresponding to the 'UML' type given in // argument, as it is configured in the first 'Generation settings' // dialog's tab // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Type(Q3CString s, Q3CString v); + static bool set_Type(QByteArray s, QByteArray v); // reverse of the Type() operation, returns the 'UML' type corresponding // to the JAVA type given in argument - static Q3CString umlType(const Q3CString & s); + static QByteArray umlType(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString relationAttributeUmlStereotype(const Q3CString & s); + static QByteArray relationAttributeUmlStereotype(const QByteArray & s); // returns the JAVA stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the JAVA stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the JAVA one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); //returns the import or other form specified in the last //'Generation settings' tab for the Java type given in argument. - static Q3CString get_import(const Q3CString & s); + static QByteArray get_import(const QByteArray & s); // set the import or other form specified in the last // 'Generation settings' tab for the Java type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Import(Q3CString s, Q3CString v); + static bool set_Import(QByteArray s, QByteArray v); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the JAVA code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the JAVA code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // return the regular expression used to bypass // dir s on reverse/roundtrip - static Q3CString reverseRoundtripDirRegExp(); + static QByteArray reverseRoundtripDirRegExp(); // return if the regular expression used to bypass // dir s on reverse/roundtrip is case sensitive @@ -117,11 +117,11 @@ class JavaSettings : public UmlSettings // set the regular expression used to bypass // dir s on reverse/roundtrip // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ReverseRoundtripDirRegExp(Q3CString s, bool cs); + static bool set_ReverseRoundtripDirRegExp(QByteArray s, bool cs); // return the regular expression used to bypass // file s on reverse/roundtrip - static Q3CString reverseRoundtripFileRegExp(); + static QByteArray reverseRoundtripFileRegExp(); // return if the regular expression used to bypass // file s on reverse/roundtrip is case sensitive @@ -130,7 +130,7 @@ class JavaSettings : public UmlSettings // set the regular expression used to bypass // file s on reverse/roundtrip // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ReverseRoundtripFileRegExp(Q3CString s, bool cs); + static bool set_ReverseRoundtripFileRegExp(QByteArray s, bool cs); // return if generate Javadoc style comment static bool isGenerateJavadocStyleComment(); @@ -152,100 +152,100 @@ class JavaSettings : public UmlSettings static bool set_IsForcePackagePrefixGeneration(bool v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration implemented // through an abstract class having constant attributes - static const Q3CString & enumPatternDecl(); + static const QByteArray & enumPatternDecl(); // set the default definition of an enumeration implemented // through an abstract class having constant attributes // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternDecl(Q3CString v); + static bool set_EnumPatternDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static const Q3CString & enumPatternItemDecl(); + static const QByteArray & enumPatternItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternItemDecl(Q3CString v); + static bool set_EnumPatternItemDecl(QByteArray v); //Returns the 'case' form produced in the fromInt operation //for each enumeration item - static const Q3CString & enumPatternItemCase(); + static const QByteArray & enumPatternItemCase(); // set the 'case' form produced in the fromInt operation // for each enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumPatternItemCase(Q3CString v); + static bool set_EnumPatternItemCase(QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on the // multiplicity given in argument. - static const Q3CString & relationDecl(const char * multiplicity); + static const QByteArray & relationDecl(const char * multiplicity); // set the default definition of a relation depending on the // multiplicity given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(const char * multiplicity, Q3CString v); + static bool set_RelationDecl(const char * multiplicity, QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default visibility of a 'get' operation generated // through the attribute and relation 'add get operation' @@ -259,23 +259,23 @@ class JavaSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // return if a 'get' operation generated through the attribute // and relation 'add get operation' menu is final by default @@ -324,53 +324,53 @@ class JavaSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_pattern_decl; + static QByteArray _enum_pattern_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _attr_decl[3/*multiplicity*/]; + static QByteArray _attr_decl[3/*multiplicity*/]; - static Q3CString _enum_pattern_item_decl; + static QByteArray _enum_pattern_item_decl; - static Q3CString _enum_pattern_item_case; + static QByteArray _enum_pattern_item_case; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[3/*multiplicity*/]; + static QByteArray _rel_decl[3/*multiplicity*/]; - static Q3CString _oper_def; + static QByteArray _oper_def; static aVisibility _get_visibility; - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_final; static aVisibility _set_visibility; - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_final; static bool _is_set_param_final; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3CString _dir_regexp; + static QByteArray _dir_regexp; static bool _dir_regexp_case_sensitive; - static Q3CString _file_regexp; + static QByteArray _file_regexp; static bool _file_regexp_case_sensitive; @@ -378,7 +378,7 @@ class JavaSettings : public UmlSettings static bool _is_force_package_gen; - static Q3Dict _map_imports; + static QHash _map_imports; protected: diff --git a/genplugouts/HtmlDoc/Main.cpp b/genplugouts/HtmlDoc/Main.cpp index 00c1f44af..2fac37c32 100644 --- a/genplugouts/HtmlDoc/Main.cpp +++ b/genplugouts/HtmlDoc/Main.cpp @@ -1,6 +1,6 @@ #include //Added by qt3to4: -#include +#include #include "UmlCom.h" #include "UmlItem.h" @@ -11,25 +11,36 @@ int main(int argc, char ** argv) { +#define habip +#ifdef habip if (argc < 2) return 0; - +#endif QApplication a(argc, argv); - +#ifdef habip if (UmlCom::connect(QString(argv[argc - 1]).toUInt())) { +#else + if (UmlCom::connect(5000)) { +#endif try { UmlCom::trace("Html generator release 2.20 (C++ version)
"); UmlItem * target = UmlCom::targetItem(); - +#ifdef habip target->set_dir(argc - 2, argv + 1); +#else + char* args[]={ + "ghtml","1024" + }; + target->set_dir(0, args+1); +#endif UmlCom::message("Memorize references ..."); target->memo_ref(); UmlItem::frame(); UmlCom::message("Indexes ..."); UmlItem::generate_indexes(); UmlItem::start_file("index", target->name() + "\nDocumentation", FALSE); - target->html(Q3CString(""), 0u, 0u); + target->html(QByteArray(""), 0u, 0u); UmlItem::end_file(); UmlItem::start_file("navig", "", TRUE); UmlItem::end_file(); @@ -43,7 +54,9 @@ int main(int argc, char ** argv) // must be called to cleanly inform that all is done UmlCom::bye(0); } - +#ifdef habip +#undef habip +#endif UmlCom::close(); return 0; } diff --git a/genplugouts/HtmlDoc/PhpSettings.cpp b/genplugouts/HtmlDoc/PhpSettings.cpp index 80b7cb83e..dac254231 100644 --- a/genplugouts/HtmlDoc/PhpSettings.cpp +++ b/genplugouts/HtmlDoc/PhpSettings.cpp @@ -8,7 +8,7 @@ #include "Tools/ApiCmd.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include #ifdef WITHJAVA #include "JavaSettings.h" #endif @@ -24,22 +24,22 @@ bool PhpSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString PhpSettings::classStereotype(const Q3CString & s) +QByteArray PhpSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->php : s; } -bool PhpSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool PhpSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(phpSettingsCmd, setPhpClassStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -52,21 +52,21 @@ bool PhpSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PhpSettings::classUmlStereotype(const Q3CString & s) +QByteArray PhpSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::php); } -const Q3CString & PhpSettings::rootDir() +const QByteArray & PhpSettings::rootDir() { read_if_needed_(); return _root; } -bool PhpSettings::set_RootDir(Q3CString v) +bool PhpSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpRootdirCmd, (const char *)v); //[rageek] Fix prototype @@ -78,14 +78,14 @@ bool PhpSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::sourceContent() +const QByteArray & PhpSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool PhpSettings::set_SourceContent(Q3CString v) +bool PhpSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSourceContentCmd, (const char *)v); //[rageek] Fix prototype @@ -97,14 +97,14 @@ bool PhpSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::sourceExtension() +const QByteArray & PhpSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool PhpSettings::set_SourceExtension(Q3CString v) +bool PhpSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSourceExtensionCmd, (const char *)v); //[rageek] Fix prototype @@ -116,7 +116,7 @@ bool PhpSettings::set_SourceExtension(Q3CString v) return FALSE; } -Q3CString PhpSettings::reverseRoundtripDirRegExp() +QByteArray PhpSettings::reverseRoundtripDirRegExp() { read_if_needed_(); @@ -130,7 +130,7 @@ bool PhpSettings::isReverseRoundtripDirRegExpCaseSensitive() return _dir_regexp_case_sensitive; } -bool PhpSettings::set_ReverseRoundtripDirRegExp(Q3CString s, bool cs) +bool PhpSettings::set_ReverseRoundtripDirRegExp(QByteArray s, bool cs) { UmlCom::send_cmd(phpSettingsCmd, setPhpDirRevFilterCmd, s, cs); @@ -143,7 +143,7 @@ bool PhpSettings::set_ReverseRoundtripDirRegExp(Q3CString s, bool cs) return FALSE; } -Q3CString PhpSettings::reverseRoundtripFileRegExp() +QByteArray PhpSettings::reverseRoundtripFileRegExp() { read_if_needed_(); @@ -157,7 +157,7 @@ bool PhpSettings::isReverseRoundtripFileRegExpCaseSensitive() return _file_regexp_case_sensitive; } -bool PhpSettings::set_ReverseRoundtripFileRegExp(Q3CString s, bool cs) +bool PhpSettings::set_ReverseRoundtripFileRegExp(QByteArray s, bool cs) { UmlCom::send_cmd(phpSettingsCmd, setPhpFileRevFilterCmd, s, cs); @@ -271,14 +271,14 @@ bool PhpSettings::set_IsGenerateJavadocStyleComment(bool v) return FALSE; } -const Q3CString & PhpSettings::classDecl() +const QByteArray & PhpSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool PhpSettings::set_ClassDecl(Q3CString v) +bool PhpSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -290,14 +290,14 @@ bool PhpSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::externalClassDecl() +const QByteArray & PhpSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool PhpSettings::set_ExternalClassDecl(Q3CString v) +bool PhpSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpExternalClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -309,14 +309,14 @@ bool PhpSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -Q3CString PhpSettings::enumDecl() +QByteArray PhpSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool PhpSettings::set_EnumDecl(Q3CString v) +bool PhpSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpEnumDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -328,14 +328,14 @@ bool PhpSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::interfaceDecl() +const QByteArray & PhpSettings::interfaceDecl() { read_if_needed_(); return _interface_decl; } -bool PhpSettings::set_InterfaceDecl(Q3CString v) +bool PhpSettings::set_InterfaceDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpInterfaceDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -347,14 +347,14 @@ bool PhpSettings::set_InterfaceDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::attributeDecl() +const QByteArray & PhpSettings::attributeDecl() { read_if_needed_(); return _attr_decl; } -bool PhpSettings::set_AttributeDecl(Q3CString v) +bool PhpSettings::set_AttributeDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpAttributeDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -366,14 +366,14 @@ bool PhpSettings::set_AttributeDecl(Q3CString v) return FALSE; } -Q3CString PhpSettings::enumItemDecl() +QByteArray PhpSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool PhpSettings::set_EnumItemDecl(Q3CString v) +bool PhpSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpEnumItemDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -385,14 +385,14 @@ bool PhpSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::relationDecl() +const QByteArray & PhpSettings::relationDecl() { read_if_needed_(); return _rel_decl; } -bool PhpSettings::set_RelationDecl(Q3CString v) +bool PhpSettings::set_RelationDecl(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpRelationDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -404,14 +404,14 @@ bool PhpSettings::set_RelationDecl(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::operationDef() +const QByteArray & PhpSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool PhpSettings::set_OperationDef(Q3CString v) +bool PhpSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpOperationDefCmd, (const char *)v); //[rageek] Fix prototype @@ -451,14 +451,14 @@ bool PhpSettings::set_GetVisibility(aVisibility v) #endif } -const Q3CString & PhpSettings::getName() +const QByteArray & PhpSettings::getName() { read_if_needed_(); return _get_name; } -bool PhpSettings::set_GetName(Q3CString v) +bool PhpSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpGetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -470,14 +470,14 @@ bool PhpSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & PhpSettings::setName() +const QByteArray & PhpSettings::setName() { read_if_needed_(); return _set_name; } -bool PhpSettings::set_SetName(Q3CString v) +bool PhpSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(phpSettingsCmd, setPhpSetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -557,29 +557,29 @@ bool PhpSettings::set_SetVisibility(aVisibility v) bool PhpSettings::_defined; -Q3CString PhpSettings::_root; +QByteArray PhpSettings::_root; -Q3CString PhpSettings::_class_decl; +QByteArray PhpSettings::_class_decl; -Q3CString PhpSettings::_external_class_decl; +QByteArray PhpSettings::_external_class_decl; -Q3CString PhpSettings::_enum_decl; +QByteArray PhpSettings::_enum_decl; -Q3CString PhpSettings::_interface_decl; +QByteArray PhpSettings::_interface_decl; -Q3CString PhpSettings::_attr_decl; +QByteArray PhpSettings::_attr_decl; -Q3CString PhpSettings::_enum_item_decl; +QByteArray PhpSettings::_enum_item_decl; -Q3CString PhpSettings::_rel_decl; +QByteArray PhpSettings::_rel_decl; -Q3CString PhpSettings::_oper_def; +QByteArray PhpSettings::_oper_def; #ifndef WITHJAVA aVisibility PhpSettings::_get_visibility; #endif -Q3CString PhpSettings::_get_name; +QByteArray PhpSettings::_get_name; bool PhpSettings::_is_get_final; @@ -587,19 +587,19 @@ bool PhpSettings::_is_get_final; aVisibility PhpSettings::_set_visibility; #endif -Q3CString PhpSettings::_set_name; +QByteArray PhpSettings::_set_name; bool PhpSettings::_is_set_final; -Q3CString PhpSettings::_src_content; +QByteArray PhpSettings::_src_content; -Q3CString PhpSettings::_ext; +QByteArray PhpSettings::_ext; -Q3CString PhpSettings::_dir_regexp; +QByteArray PhpSettings::_dir_regexp; bool PhpSettings::_dir_regexp_case_sensitive; -Q3CString PhpSettings::_file_regexp; +QByteArray PhpSettings::_file_regexp; bool PhpSettings::_file_regexp_case_sensitive; @@ -637,15 +637,17 @@ void PhpSettings::read_() _rel_decl = UmlCom::read_string(); _oper_def = UmlCom::read_string(); #ifndef WITHJAVA - _get_visibility = + _get_visibility = (aVisibility) UmlCom::read_char(); +#else + UmlCom::read_char(); #endif - (aVisibility) UmlCom::read_char(); _get_name = UmlCom::read_string(); _is_get_final = UmlCom::read_bool(); #ifndef WITHJAVA - _set_visibility = + _set_visibility = (aVisibility) UmlCom::read_char(); +#else + UmlCom::read_char(); #endif - (aVisibility) UmlCom::read_char(); _set_name = UmlCom::read_string(); _is_set_final = UmlCom::read_bool(); _is_generate_javadoc_comment = UmlCom::read_bool(); diff --git a/genplugouts/HtmlDoc/PhpSettings.h b/genplugouts/HtmlDoc/PhpSettings.h index 98246bc67..b3d7b398d 100644 --- a/genplugouts/HtmlDoc/PhpSettings.h +++ b/genplugouts/HtmlDoc/PhpSettings.h @@ -4,7 +4,7 @@ #ifdef WITHPHP -#include + #include "aVisibility.h" #include "UmlSettings.h" @@ -29,45 +29,45 @@ class PhpSettings : public UmlSettings // returns the PHP stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the PHP stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the PHP one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the PHP code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the PHP code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // return the regular expression used to bypass // dir s on reverse/roundtrip - static Q3CString reverseRoundtripDirRegExp(); + static QByteArray reverseRoundtripDirRegExp(); // return if the regular expression used to bypass // dir s on reverse/roundtrip is case sensitive @@ -76,11 +76,11 @@ class PhpSettings : public UmlSettings // set the regular expression used to bypass // dir s on reverse/roundtrip // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ReverseRoundtripDirRegExp(Q3CString s, bool cs); + static bool set_ReverseRoundtripDirRegExp(QByteArray s, bool cs); // return the regular expression used to bypass // file s on reverse/roundtrip - static Q3CString reverseRoundtripFileRegExp(); + static QByteArray reverseRoundtripFileRegExp(); // return if the regular expression used to bypass // file s on reverse/roundtrip is case sensitive @@ -89,7 +89,7 @@ class PhpSettings : public UmlSettings // set the regular expression used to bypass // file s on reverse/roundtrip // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ReverseRoundtripFileRegExp(Q3CString s, bool cs); + static bool set_ReverseRoundtripFileRegExp(QByteArray s, bool cs); // indicates to the code generator if the require_once may specify // the path of just the file's name @@ -139,68 +139,68 @@ class PhpSettings : public UmlSettings static bool set_IsGenerateJavadocStyleComment(bool v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an interface - static const Q3CString & interfaceDecl(); + static const QByteArray & interfaceDecl(); // set the default definition of an interface // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InterfaceDecl(Q3CString v); + static bool set_InterfaceDecl(QByteArray v); // returns the default definition of an attribute - static const Q3CString & attributeDecl(); + static const QByteArray & attributeDecl(); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(Q3CString v); + static bool set_AttributeDecl(QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of an relation - static const Q3CString & relationDecl(); + static const QByteArray & relationDecl(); // set the default definition of an relation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationDecl(Q3CString v); + static bool set_RelationDecl(QByteArray v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default visibility of a 'get' operation generated // through the attribute and relation 'add get operation' @@ -218,23 +218,23 @@ class PhpSettings : public UmlSettings // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); // return if a 'get' operation generated through the attribute // and relation 'add get operation' menu is final by default @@ -277,29 +277,29 @@ class PhpSettings : public UmlSettings static bool _defined; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _interface_decl; + static QByteArray _interface_decl; - static Q3CString _attr_decl; + static QByteArray _attr_decl; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl; + static QByteArray _rel_decl; - static Q3CString _oper_def; + static QByteArray _oper_def; #ifndef WITHJAVA static aVisibility _get_visibility; #endif - static Q3CString _get_name; + static QByteArray _get_name; static bool _is_get_final; @@ -307,19 +307,19 @@ class PhpSettings : public UmlSettings static aVisibility _set_visibility; #endif - static Q3CString _set_name; + static QByteArray _set_name; static bool _is_set_final; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3CString _dir_regexp; + static QByteArray _dir_regexp; static bool _dir_regexp_case_sensitive; - static Q3CString _file_regexp; + static QByteArray _file_regexp; static bool _file_regexp_case_sensitive; diff --git a/genplugouts/HtmlDoc/PythonSettings.cpp b/genplugouts/HtmlDoc/PythonSettings.cpp index 9f5fddd90..9380d3264 100644 --- a/genplugouts/HtmlDoc/PythonSettings.cpp +++ b/genplugouts/HtmlDoc/PythonSettings.cpp @@ -7,7 +7,7 @@ #include "Tools/ApiCmd.h" #include "UmlStereotype.h" //Added by qt3to4: -#include +#include bool PythonSettings::isPython_2_2() { read_if_needed_(); @@ -45,7 +45,7 @@ bool PythonSettings::set_IsPython_3_operation(bool y) return FALSE; } -const Q3CString & PythonSettings::indentStep() +const QByteArray & PythonSettings::indentStep() { read_if_needed_(); return _indent_step; @@ -75,22 +75,22 @@ bool PythonSettings::set_UseDefaults(bool y) return UmlCom::read_bool(); } -Q3CString PythonSettings::relationAttributeStereotype(const Q3CString & s) +QByteArray PythonSettings::relationAttributeStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_relation_attribute_stereotypes.value(s); return (b) ? b->python : s; } -bool PythonSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) +bool PythonSettings::set_RelationAttributeStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonRelationAttributeStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_relation_attribute_stereotypes.value(s); if (st == 0) st = UmlSettings::add_rel_attr_stereotype(s); @@ -103,29 +103,29 @@ bool PythonSettings::set_RelationAttributeStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PythonSettings::relationAttributeUmlStereotype(const Q3CString & s) +QByteArray PythonSettings::relationAttributeUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_rel_attr_stereotype(s, &UmlStereotype::python); } -Q3CString PythonSettings::classStereotype(const Q3CString & s) +QByteArray PythonSettings::classStereotype(const QByteArray & s) { read_if_needed_(); - UmlStereotype * b = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * b = UmlSettings::_map_class_stereotypes.value(s); return (b) ? b->python : s; } -bool PythonSettings::set_ClassStereotype(Q3CString s, Q3CString v) +bool PythonSettings::set_ClassStereotype(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonClassStereotypeCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - UmlStereotype * st = UmlSettings::_map_class_stereotypes.find(s); + UmlStereotype * st = UmlSettings::_map_class_stereotypes.value(s); if (st == 0) st = UmlSettings::add_class_stereotype(s); @@ -138,32 +138,32 @@ bool PythonSettings::set_ClassStereotype(Q3CString s, Q3CString v) return FALSE; } -Q3CString PythonSettings::classUmlStereotype(const Q3CString & s) +QByteArray PythonSettings::classUmlStereotype(const QByteArray & s) { read_if_needed_(); return UmlSettings::uml_class_stereotype(s, &UmlStereotype::python); } -Q3CString PythonSettings::get_import(const Q3CString & s) +QByteArray PythonSettings::get_import(const QByteArray & s) { read_if_needed_(); - Q3CString * r = _map_imports[s]; + QByteArray * r = _map_imports[s]; - return (r) ? *r : Q3CString(0); + return (r) ? *r : QByteArray(0); } -bool PythonSettings::set_Import(Q3CString s, Q3CString v) +bool PythonSettings::set_Import(QByteArray s, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonImportCmd, (const char *)s, (const char *)v); //[rageek] Fix prototype if (UmlCom::read_bool()) { - Q3CString * r = _map_imports.take(s); + QByteArray * r = _map_imports.take(s); if (!v.isEmpty()) - _map_imports.insert(s, new Q3CString(v)); + _map_imports.insert(s, new QByteArray(v)); if (r) delete r; @@ -174,14 +174,14 @@ bool PythonSettings::set_Import(Q3CString s, Q3CString v) return FALSE; } -const Q3CString & PythonSettings::rootDir() +const QByteArray & PythonSettings::rootDir() { read_if_needed_(); return _root; } -bool PythonSettings::set_RootDir(Q3CString v) +bool PythonSettings::set_RootDir(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonRootdirCmd, (const char *)v); //[rageek] Fix prototype @@ -193,14 +193,14 @@ bool PythonSettings::set_RootDir(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::sourceContent() +const QByteArray & PythonSettings::sourceContent() { read_if_needed_(); return _src_content; } -bool PythonSettings::set_SourceContent(Q3CString v) +bool PythonSettings::set_SourceContent(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSourceContentCmd, (const char *)v); //[rageek] Fix prototype @@ -212,14 +212,14 @@ bool PythonSettings::set_SourceContent(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::sourceExtension() +const QByteArray & PythonSettings::sourceExtension() { read_if_needed_(); return _ext; } -bool PythonSettings::set_SourceExtension(Q3CString v) +bool PythonSettings::set_SourceExtension(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSourceExtensionCmd, (const char *)v); //[rageek] Fix prototype @@ -231,14 +231,14 @@ bool PythonSettings::set_SourceExtension(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::classDecl() +const QByteArray & PythonSettings::classDecl() { read_if_needed_(); return _class_decl; } -bool PythonSettings::set_ClassDecl(Q3CString v) +bool PythonSettings::set_ClassDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -250,14 +250,14 @@ bool PythonSettings::set_ClassDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::externalClassDecl() +const QByteArray & PythonSettings::externalClassDecl() { read_if_needed_(); return _external_class_decl; } -bool PythonSettings::set_ExternalClassDecl(Q3CString v) +bool PythonSettings::set_ExternalClassDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonExternalClassDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -269,14 +269,14 @@ bool PythonSettings::set_ExternalClassDecl(Q3CString v) return FALSE; } -Q3CString PythonSettings::enumDecl() +QByteArray PythonSettings::enumDecl() { read_if_needed_(); return _enum_decl; } -bool PythonSettings::set_EnumDecl(Q3CString v) +bool PythonSettings::set_EnumDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonEnumDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -288,14 +288,14 @@ bool PythonSettings::set_EnumDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::attributeDecl(const char * multiplicity) +const QByteArray & PythonSettings::attributeDecl(const char * multiplicity) { read_if_needed_(); return _attr_decl[mult_column(multiplicity)]; } -bool PythonSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) +bool PythonSettings::set_AttributeDecl(const char * multiplicity, QByteArray v) { read_if_needed_(); UmlCom::send_cmd(pythonSettingsCmd, setPythonAttributeDeclCmd, multiplicity, (const char *)v); //[rageek] Fix prototype @@ -308,14 +308,14 @@ bool PythonSettings::set_AttributeDecl(const char * multiplicity, Q3CString v) return FALSE; } -Q3CString PythonSettings::enumItemDecl() +QByteArray PythonSettings::enumItemDecl() { read_if_needed_(); return _enum_item_decl; } -bool PythonSettings::set_EnumItemDecl(Q3CString v) +bool PythonSettings::set_EnumItemDecl(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonEnumItemDeclCmd, (const char *)v); //[rageek] Fix prototype @@ -327,7 +327,7 @@ bool PythonSettings::set_EnumItemDecl(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::relationDecl(bool by_value, const char * multiplicity) +const QByteArray & PythonSettings::relationDecl(bool by_value, const char * multiplicity) { read_if_needed_(); @@ -347,14 +347,14 @@ bool PythonSettings::set_RelationDecl(bool by_value, const char * multiplicity, return FALSE; } -const Q3CString & PythonSettings::operationDef() +const QByteArray & PythonSettings::operationDef() { read_if_needed_(); return _oper_def; } -bool PythonSettings::set_OperationDef(Q3CString v) +bool PythonSettings::set_OperationDef(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonOperationDefCmd, (const char *)v); //[rageek] Fix prototype @@ -366,14 +366,14 @@ bool PythonSettings::set_OperationDef(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::initOperationDef() +const QByteArray & PythonSettings::initOperationDef() { read_if_needed_(); return _initoper_def; } -bool PythonSettings::set_InitOperationDef(Q3CString v) +bool PythonSettings::set_InitOperationDef(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonInitOperationDefCmd, (const char *)v); //[rageek] Fix prototype @@ -385,14 +385,14 @@ bool PythonSettings::set_InitOperationDef(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::getName() +const QByteArray & PythonSettings::getName() { read_if_needed_(); return _get_name; } -bool PythonSettings::set_GetName(Q3CString v) +bool PythonSettings::set_GetName(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonGetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -404,14 +404,14 @@ bool PythonSettings::set_GetName(Q3CString v) return FALSE; } -const Q3CString & PythonSettings::setName() +const QByteArray & PythonSettings::setName() { read_if_needed_(); return _set_name; } -bool PythonSettings::set_SetName(Q3CString v) +bool PythonSettings::set_SetName(QByteArray v) { UmlCom::send_cmd(pythonSettingsCmd, setPythonSetNameCmd, (const char *)v); //[rageek] Fix prototype @@ -423,7 +423,7 @@ bool PythonSettings::set_SetName(Q3CString v) return FALSE; } -unsigned PythonSettings::mult_column(const Q3CString & mult) +unsigned PythonSettings::mult_column(const QByteArray & mult) { return (mult.isEmpty() || (mult == "1")) ? 0 : 1; } @@ -434,35 +434,35 @@ bool PythonSettings::_2_2; bool PythonSettings::_operation_3; -Q3CString PythonSettings::_indent_step; +QByteArray PythonSettings::_indent_step; -Q3CString PythonSettings::_root; +QByteArray PythonSettings::_root; -Q3CString PythonSettings::_class_decl; +QByteArray PythonSettings::_class_decl; -Q3CString PythonSettings::_external_class_decl; +QByteArray PythonSettings::_external_class_decl; -Q3CString PythonSettings::_enum_decl; +QByteArray PythonSettings::_enum_decl; -Q3CString PythonSettings::_attr_decl[2/*multiplicity*/]; +QByteArray PythonSettings::_attr_decl[2/*multiplicity*/]; -Q3CString PythonSettings::_enum_item_decl; +QByteArray PythonSettings::_enum_item_decl; -Q3CString PythonSettings::_rel_decl[2/*relation kind*/][2/*multiplicity*/]; +QByteArray PythonSettings::_rel_decl[2/*relation kind*/][2/*multiplicity*/]; -Q3CString PythonSettings::_oper_def; +QByteArray PythonSettings::_oper_def; -Q3CString PythonSettings::_initoper_def; +QByteArray PythonSettings::_initoper_def; -Q3CString PythonSettings::_get_name; +QByteArray PythonSettings::_get_name; -Q3CString PythonSettings::_set_name; +QByteArray PythonSettings::_set_name; -Q3CString PythonSettings::_src_content; +QByteArray PythonSettings::_src_content; -Q3CString PythonSettings::_ext; +QByteArray PythonSettings::_ext; -Q3Dict PythonSettings::_map_imports; +QHash PythonSettings::_map_imports; void PythonSettings::read_() { @@ -472,8 +472,8 @@ void PythonSettings::read_() _root = UmlCom::read_string(); - unsigned n; - unsigned index; + int n; + int index; n = UmlCom::read_unsigned(); @@ -489,13 +489,13 @@ void PythonSettings::read_() _map_imports.clear(); if (n > _map_imports.size()) - _map_imports.resize(n); + _map_imports.reserve(n); for (index = 0; index != n; index += 1) { - Q3CString t = UmlCom::read_string(); - Q3CString i = UmlCom::read_string(); + QByteArray t = UmlCom::read_string(); + QByteArray i = UmlCom::read_string(); - _map_imports.insert(t, new Q3CString(i)); + _map_imports.insert(t, new QByteArray(i)); } _src_content = UmlCom::read_string(); diff --git a/genplugouts/HtmlDoc/PythonSettings.h b/genplugouts/HtmlDoc/PythonSettings.h index 825b1abc4..fd9f143b8 100644 --- a/genplugouts/HtmlDoc/PythonSettings.h +++ b/genplugouts/HtmlDoc/PythonSettings.h @@ -4,9 +4,9 @@ #ifdef WITHPYTHON -#include + #include "UmlSettings.h" -#include + // This class manages settings concerning PYTHON, configured through // the 'Generation settings' dialog. @@ -34,7 +34,7 @@ class PythonSettings : public UmlSettings static bool set_IsPython_3_operation(bool y); // return the default indent step - static const Q3CString & indentStep(); + static const QByteArray & indentStep(); // set default indent step // @@ -53,109 +53,109 @@ class PythonSettings : public UmlSettings // returns the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString relationAttributeStereotype(const Q3CString & s); + static QByteArray relationAttributeStereotype(const QByteArray & s); // set the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RelationAttributeStereotype(Q3CString s, Q3CString v); + static bool set_RelationAttributeStereotype(QByteArray s, QByteArray v); // reverse of the RelationAttributeStereotype() operation, returns the 'UML' // stereotype corresponding to the PYTHON one given in argument - static Q3CString relationAttributeUmlStereotype(const Q3CString & s); + static QByteArray relationAttributeUmlStereotype(const QByteArray & s); // returns the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument - static Q3CString classStereotype(const Q3CString & s); + static QByteArray classStereotype(const QByteArray & s); // set the PYTHON stereotype corresponding to the 'UML' stereotype given // in argument // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassStereotype(Q3CString s, Q3CString v); + static bool set_ClassStereotype(QByteArray s, QByteArray v); // reverse of the ClassStereotype() operation, returns the 'UML' // stereotype corresponding to the PYTHON one given in argument - static Q3CString classUmlStereotype(const Q3CString & s); + static QByteArray classUmlStereotype(const QByteArray & s); //returns the import or other form specified in the last //'Generation settings' tab for the Python type given in argument. - static Q3CString get_import(const Q3CString & s); + static QByteArray get_import(const QByteArray & s); // set the import or other form specified in the last // 'Generation settings' tab for the Python type given in argument. // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_Import(Q3CString s, Q3CString v); + static bool set_Import(QByteArray s, QByteArray v); // return the 'root' directory - static const Q3CString & rootDir(); + static const QByteArray & rootDir(); // set the 'root' directory // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_RootDir(Q3CString v); + static bool set_RootDir(QByteArray v); // returns the default source file content - static const Q3CString & sourceContent(); + static const QByteArray & sourceContent(); // set the default source file content // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceContent(Q3CString v); + static bool set_SourceContent(QByteArray v); // returns the extension of the file produced by the PYTHON code generator - static const Q3CString & sourceExtension(); + static const QByteArray & sourceExtension(); // set the extension of the file produced by the PYTHON code generator // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SourceExtension(Q3CString v); + static bool set_SourceExtension(QByteArray v); // returns the default definition of a class - static const Q3CString & classDecl(); + static const QByteArray & classDecl(); // set the default definition of a class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ClassDecl(Q3CString v); + static bool set_ClassDecl(QByteArray v); // returns the default specification for an 'external' class - static const Q3CString & externalClassDecl(); + static const QByteArray & externalClassDecl(); // set the default specification for an 'external' class // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_ExternalClassDecl(Q3CString v); + static bool set_ExternalClassDecl(QByteArray v); // returns the default definition of an enumeration - static Q3CString enumDecl(); + static QByteArray enumDecl(); // set the default definition of an enumeration // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumDecl(Q3CString v); + static bool set_EnumDecl(QByteArray v); // returns the default definition of an attribute depending on the multiplicity - static const Q3CString & attributeDecl(const char * multiplicity); + static const QByteArray & attributeDecl(const char * multiplicity); // set the default definition of an attribute // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_AttributeDecl(const char * multiplicity, Q3CString v); + static bool set_AttributeDecl(const char * multiplicity, QByteArray v); // returns the default definition of an enumeration item - static Q3CString enumItemDecl(); + static QByteArray enumItemDecl(); // set the default definition of an enumeration item // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_EnumItemDecl(Q3CString v); + static bool set_EnumItemDecl(QByteArray v); // returns the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. - static const Q3CString & relationDecl(bool by_value, const char * multiplicity); + static const QByteArray & relationDecl(bool by_value, const char * multiplicity); // set the default definition of a relation depending on it is an // aggregation by value or not and the multiplicity, given in argument. @@ -164,47 +164,47 @@ class PythonSettings : public UmlSettings static bool set_RelationDecl(bool by_value, const char * multiplicity, const char * v); // returns the default definition of an operation - static const Q3CString & operationDef(); + static const QByteArray & operationDef(); // set the default definition of an operation // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_OperationDef(Q3CString v); + static bool set_OperationDef(QByteArray v); // returns the default definition of __init__ - static const Q3CString & initOperationDef(); + static const QByteArray & initOperationDef(); // set the default definition of __init__ // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_InitOperationDef(Q3CString v); + static bool set_InitOperationDef(QByteArray v); // returns the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu - static const Q3CString & getName(); + static const QByteArray & getName(); // set the default name of a 'get' operation generated // through the attribute and relation 'add get operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_GetName(Q3CString v); + static bool set_GetName(QByteArray v); // returns the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu - static const Q3CString & setName(); + static const QByteArray & setName(); // set the default name of a 'set' operation generated // through the attribute and relation 'add set operation' menu // // On error : return FALSE in C++, produce a RuntimeException in Java - static bool set_SetName(Q3CString v); + static bool set_SetName(QByteArray v); private: // never called ! PythonSettings() {}; - static unsigned mult_column(const Q3CString & mult); + static unsigned mult_column(const QByteArray & mult); static bool _defined; @@ -216,39 +216,39 @@ class PythonSettings : public UmlSettings private: - static Q3CString _indent_step; + static QByteArray _indent_step; - static Q3CString _root; + static QByteArray _root; - static Q3CString _class_decl; + static QByteArray _class_decl; - static Q3CString _external_class_decl; + static QByteArray _external_class_decl; - static Q3CString _enum_decl; + static QByteArray _enum_decl; - static Q3CString _attr_decl[2/*multiplicity*/]; + static QByteArray _attr_decl[2/*multiplicity*/]; - static Q3CString _enum_item_decl; + static QByteArray _enum_item_decl; - static Q3CString _rel_decl[2/*relation kind*/][2/*multiplicity*/]; + static QByteArray _rel_decl[2/*relation kind*/][2/*multiplicity*/]; - static Q3CString _oper_def; + static QByteArray _oper_def; protected: - static Q3CString _initoper_def; + static QByteArray _initoper_def; private: - static Q3CString _get_name; + static QByteArray _get_name; - static Q3CString _set_name; + static QByteArray _set_name; - static Q3CString _src_content; + static QByteArray _src_content; - static Q3CString _ext; + static QByteArray _ext; - static Q3Dict _map_imports; + static QHash _map_imports; protected: diff --git a/genplugouts/HtmlDoc/SlotAttribute.h b/genplugouts/HtmlDoc/SlotAttribute.h index d1c59eabf..59399af64 100644 --- a/genplugouts/HtmlDoc/SlotAttribute.h +++ b/genplugouts/HtmlDoc/SlotAttribute.h @@ -1,21 +1,21 @@ #ifndef _SLOTATTRIBUTE_H #define _SLOTATTRIBUTE_H +#include -#include class UmlAttribute; struct SlotAttribute { UmlAttribute * attribute; - Q3CString value; + QByteArray value; // because of QValueList use SlotAttribute() : attribute(0) { } - SlotAttribute(UmlAttribute * a, Q3CString v) : attribute(a), value(v) { + SlotAttribute(UmlAttribute * a, QByteArray v) : attribute(a), value(v) { } }; diff --git a/genplugouts/HtmlDoc/StateBehavior.h b/genplugouts/HtmlDoc/StateBehavior.h index 91a42cb82..66ac09c00 100644 --- a/genplugouts/HtmlDoc/StateBehavior.h +++ b/genplugouts/HtmlDoc/StateBehavior.h @@ -2,16 +2,16 @@ #define _STATEBEHAVIOR_H -#include + class StateBehavior { public: - Q3CString on_entry; + QByteArray on_entry; - Q3CString on_exit; + QByteArray on_exit; - Q3CString do_activity; + QByteArray do_activity; void read(); diff --git a/genplugouts/HtmlDoc/TransitionBehavior.h b/genplugouts/HtmlDoc/TransitionBehavior.h index 856ede3c0..8714c541d 100644 --- a/genplugouts/HtmlDoc/TransitionBehavior.h +++ b/genplugouts/HtmlDoc/TransitionBehavior.h @@ -2,16 +2,16 @@ #define _TRANSITIONBEHAVIOR_H -#include + class TransitionBehavior { public: - Q3CString trigger; + QByteArray trigger; - Q3CString guard; + QByteArray guard; - Q3CString activity; + QByteArray activity; void read(); diff --git a/genplugouts/HtmlDoc/UmlAccessVariableValueAction.cpp b/genplugouts/HtmlDoc/UmlAccessVariableValueAction.cpp index 286f4a4af..81d6296fd 100644 --- a/genplugouts/HtmlDoc/UmlAccessVariableValueAction.cpp +++ b/genplugouts/HtmlDoc/UmlAccessVariableValueAction.cpp @@ -1,9 +1,9 @@ #include "UmlAccessVariableValueAction.h" //Added by qt3to4: -#include +#include -void UmlAccessVariableValueAction::html(Q3CString pfix, unsigned int rank, unsigned int level) +void UmlAccessVariableValueAction::html(QByteArray pfix, unsigned int rank, unsigned int level) { UmlActivityAction::html(); diff --git a/genplugouts/HtmlDoc/UmlAccessVariableValueAction.h b/genplugouts/HtmlDoc/UmlAccessVariableValueAction.h index 27cb78b7d..d12052d77 100644 --- a/genplugouts/HtmlDoc/UmlAccessVariableValueAction.h +++ b/genplugouts/HtmlDoc/UmlAccessVariableValueAction.h @@ -2,7 +2,7 @@ #define _UMLACCESSVARIABLEVALUEACTION_H -#include + #include "UmlBaseAccessVariableValueAction.h" class UmlAccessVariableValueAction : public UmlBaseAccessVariableValueAction @@ -10,12 +10,13 @@ class UmlAccessVariableValueAction : public UmlBaseAccessVariableValueAction public: //entry to produce the html code receiving chapter number //path, rank in the mother and level in the browser tree - virtual void html(Q3CString pfix, unsigned int rank, unsigned int level); + using UmlBaseAccessVariableValueAction::html; + virtual void html(QByteArray pfix, unsigned int rank, unsigned int level); protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlAccessVariableValueAction(void * id, const Q3CString & s) : UmlBaseAccessVariableValueAction(id, s) { + UmlAccessVariableValueAction(void * id, const QByteArray & s) : UmlBaseAccessVariableValueAction(id, s) { } }; diff --git a/genplugouts/HtmlDoc/UmlActivity.cpp b/genplugouts/HtmlDoc/UmlActivity.cpp index 147f033ed..fba425111 100644 --- a/genplugouts/HtmlDoc/UmlActivity.cpp +++ b/genplugouts/HtmlDoc/UmlActivity.cpp @@ -3,20 +3,20 @@ #include "UmlOperation.h" #include "UmlActivity.h" //Added by qt3to4: -#include +#include -Q3CString UmlActivity::sKind() +QByteArray UmlActivity::sKind() { return "activity"; } -void UmlActivity::html(Q3CString pfix, unsigned int rank, unsigned int level) +void UmlActivity::html(QByteArray pfix, unsigned int rank, unsigned int level) { define(); chapter("Activity", pfix, rank, "activity", level); - Q3CString s = description(); + QByteArray s = description(); if (!s.isEmpty()) { fw.write("

"); @@ -44,7 +44,7 @@ void UmlActivity::html(Q3CString pfix, unsigned int rank, unsigned int level) else if (isSingleExecution()) fw.write("

Single execution

"); - Q3CString scpp, sjava; + QByteArray scpp, sjava; s = preCondition(); scpp = cppPreCondition(); diff --git a/genplugouts/HtmlDoc/UmlActivity.h b/genplugouts/HtmlDoc/UmlActivity.h index 8afb60193..d4f3cdc93 100644 --- a/genplugouts/HtmlDoc/UmlActivity.h +++ b/genplugouts/HtmlDoc/UmlActivity.h @@ -3,22 +3,22 @@ #include "UmlBaseActivity.h" -#include + #include "Vector.h" class UmlActivity : public UmlBaseActivity { public: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivity(void * id, const Q3CString & s) : UmlBaseActivity(id, s) { + UmlActivity(void * id, const QByteArray & s) : UmlBaseActivity(id, s) { } //returns a string indicating the king of the element - virtual Q3CString sKind(); + virtual QByteArray sKind(); //entry to produce the html code receiving chapter number //path, rank in the mother and level in the browser tree - virtual void html(Q3CString pfix, unsigned int rank, unsigned int level); + virtual void html(QByteArray pfix, unsigned int rank, unsigned int level); //set the html ref //set the activity list diff --git a/genplugouts/HtmlDoc/UmlActivityAction.cpp b/genplugouts/HtmlDoc/UmlActivityAction.cpp index 474dea3bb..eab63387a 100644 --- a/genplugouts/HtmlDoc/UmlActivityAction.cpp +++ b/genplugouts/HtmlDoc/UmlActivityAction.cpp @@ -3,14 +3,14 @@ #include "UmlCom.h" //Added by qt3to4: -#include +#include void UmlActivityAction::html() { UmlCom::message(name()); - Q3CString s = sKind(); + QByteArray s = sKind(); - s.replace(0, 1, s.left(1).upper()); + s.replace(0, 1, s.left(1).toUpper()); UmlItem::html(s, (UmlDiagram *) associatedDiagram()); @@ -18,7 +18,7 @@ void UmlActivityAction::html() parent()->write(); fw.write("

"); - Q3CString scpp, sjava; + QByteArray scpp, sjava; s = preCondition(); scpp = cppPreCondition(); diff --git a/genplugouts/HtmlDoc/UmlActivityAction.h b/genplugouts/HtmlDoc/UmlActivityAction.h index b08586287..637ea343f 100644 --- a/genplugouts/HtmlDoc/UmlActivityAction.h +++ b/genplugouts/HtmlDoc/UmlActivityAction.h @@ -3,11 +3,13 @@ #include "UmlBaseActivityAction.h" -#include + class UmlActivityAction : public UmlBaseActivityAction { public: + using UmlBaseActivityAction::html; + //entry to produce the html code receiving chapter number //path, rank in the mother and level in the browser tree virtual void html(); @@ -15,7 +17,7 @@ class UmlActivityAction : public UmlBaseActivityAction protected: // the constructor, do not call it yourself !!!!!!!!!! - UmlActivityAction(void * id, const Q3CString & s) : UmlBaseActivityAction(id, s) { + UmlActivityAction(void * id, const QByteArray & s) : UmlBaseActivityAction(id, s) { } }; diff --git a/genplugouts/HtmlDoc/UmlActivityActionClasses.cpp b/genplugouts/HtmlDoc/UmlActivityActionClasses.cpp index de37bc336..6f745af32 100644 --- a/genplugouts/HtmlDoc/UmlActivityActionClasses.cpp +++ b/genplugouts/HtmlDoc/UmlActivityActionClasses.cpp @@ -3,13 +3,13 @@ #include "UmlOperation.h" //Added by qt3to4: -#include -Q3CString UmlSendObjectAction::sKind() +#include +QByteArray UmlSendObjectAction::sKind() { return "send object activity action"; } -void UmlSendObjectAction::html(Q3CString pfix, unsigned int rank, unsigned int level) +void UmlSendObjectAction::html(QByteArray pfix, unsigned int rank, unsigned int level) { UmlActivityAction::html(); @@ -18,12 +18,12 @@ void UmlSendObjectAction::html(Q3CString pfix, unsigned int rank, unsigned int l unload(FALSE, FALSE); } -Q3CString UmlUnmarshallAction::sKind() +QByteArray UmlUnmarshallAction::sKind() { return "unmarshall activity action"; } -void UmlUnmarshallAction::html(Q3CString pfix, unsigned int rank, unsigned int level) +void UmlUnmarshallAction::html(QByteArray pfix, unsigned int rank, unsigned int level) { UmlActivityAction::html(); @@ -32,28 +32,28 @@ void UmlUnmarshallAction::html(Q3CString pfix, unsigned int rank, unsigned int l unload(FALSE, FALSE); } -Q3CString UmlSendSignalAction::sKind() +QByteArray UmlSendSignalAction::sKind() { return "send signal activity action"; } -Q3CString UmlBroadcastSignalAction::sKind() +QByteArray UmlBroadcastSignalAction::sKind() { return "broadcast signal activity action"; } -Q3CString UmlValueSpecificationAction::sKind() +QByteArray UmlValueSpecificationAction::sKind() { return "value specification activity action"; } -void UmlValueSpecificationAction::html(Q3CString pfix, unsigned int rank, unsigned int level) +void UmlValueSpecificationAction::html(QByteArray pfix, unsigned int rank, unsigned int level) { UmlActivityAction::html(); - Q3CString s = value(); - Q3CString scpp = cppValue(); - Q3CString sjava = javaValue(); + QByteArray s = value(); + QByteArray scpp = cppValue(); + QByteArray sjava = javaValue(); if (!s.isEmpty() || !scpp.isEmpty() || !sjava.isEmpty()) { fw.write("

Value :