umbrello API Documentation

cppcodegenerationpolicy.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   copyright (C) 2003-2006                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 /*  This code generated by:
00013  *      Author : thomas
00014  *      Date   : Mon Jun 23 2003
00015  */
00016 
00017 #ifndef CPPCODEGENERATIONPOLICY_H
00018 #define CPPCODEGENERATIONPOLICY_H
00019 
00020 #include <qstring.h>
00021 #include "codegenpolicyext.h"
00022 #include "../codegenerationpolicy.h"
00023 
00024 class KConfig;
00025 class CodeGenerationPolicyPage;
00026 
00027 class CPPCodeGenerationPolicy : public CodeGenPolicyExt
00028 {
00029     Q_OBJECT
00030 public:
00031 
00032     static const bool DEFAULT_AUTO_GEN_EMPTY_CONSTRUCTORS;
00033     static const bool DEFAULT_AUTO_GEN_ACCESSORS;
00034     static const bool DEFAULT_INLINE_ACCESSORS;
00035     static const bool DEFAULT_INLINE_OPERATIONS;
00036     static const bool DEFAULT_VIRTUAL_DESTRUCTORS;
00037     static const bool DEFAULT_PACKAGE_IS_NAMESPACE;
00038     static const bool DEFAULT_PUBLIC_ACCESSORS;
00039 
00040     static const bool DEFAULT_STRING_INCLUDE_GLOBAL;
00041     static const bool DEFAULT_VECTOR_INCLUDE_GLOBAL;
00042 
00043     static const char * DEFAULT_STRING_CLASS_NAME;
00044     static const char * DEFAULT_STRING_CLASS_INCLUDE;
00045     static const char * DEFAULT_VECTOR_CLASS_NAME;
00046     static const char * DEFAULT_VECTOR_CLASS_INCLUDE;
00047     static const char * DEFAULT_VECTOR_METHOD_APPEND;
00048     static const char * DEFAULT_VECTOR_METHOD_REMOVE;
00049     static const char * DEFAULT_VECTOR_METHOD_INIT;
00050     static const char * DEFAULT_OBJECT_METHOD_INIT;
00051 
00052     // Constructors/Destructors
00053     //
00054 
00058     CPPCodeGenerationPolicy ( KConfig * config = 0 );
00059 
00063     virtual ~CPPCodeGenerationPolicy ( );
00064 
00065     // Public attribute accessor methods
00066     //
00067 
00072     void setAccessorsAreInline ( bool var );
00073 
00078     bool getAccessorsAreInline( );
00079 
00084     void setOperationsAreInline ( bool var );
00085 
00090     bool getOperationsAreInline( );
00091 
00096     void setDestructorsAreVirtual ( bool var );
00097 
00102     bool getDestructorsAreVirtual( );
00103 
00108     void setPackageIsNamespace ( bool var );
00109 
00114     bool getPackageIsNamespace( );
00115 
00116 
00121     void setAutoGenerateAccessors ( bool var );
00122 
00127     bool getAutoGenerateAccessors( );
00128 
00133     void setAccessorsArePublic ( bool var );
00134 
00139     bool getAccessorsArePublic( );
00140 
00145     QString getStringClassName();
00146     QString getStringClassNameInclude();
00147     QString getVectorClassName();
00148     QString getVectorClassNameInclude();
00149 
00151     bool stringIncludeIsGlobal ();
00152     bool vectorIncludeIsGlobal ();
00153 
00155     void setStringClassName(const QString &value);
00156     void setStringClassNameInclude(const QString &value);
00157     void setVectorClassName(const QString &value);
00158     void setVectorClassNameInclude(const QString &value);
00159 
00161     void setStringIncludeIsGlobal (bool value);
00162     void setVectorIncludeIsGlobal (bool value);
00163 
00167     QString getVectorMethodAppend(const QString & variableName ="", const QString & itemClassName = "");
00168     QString getVectorMethodRemove(const QString & variableName ="", const QString & itemClassName = "");
00169     QString getVectorMethodInit(const QString & variableName ="", const QString & itemClassName = "");
00170 
00174     QString getObjectMethodInit(const QString & variableName ="", const QString & itemClassName = "");
00175 
00179     virtual void setDefaults (CPPCodeGenerationPolicy * defaults, bool emitUpdateSignal = true);
00180 
00184     virtual void setDefaults(KConfig * config, bool emitUpdateSignal = true);
00185 
00189     virtual void writeConfig (KConfig * config);
00190 
00195     CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
00196 
00197 protected:
00198 
00201     void init ( );
00202 
00203 private:
00204 
00205     bool m_autoGenerateAccessors;
00206 
00207     bool m_inlineAccessors;
00208     bool m_inlineOperations;
00209     bool m_virtualDestructors;
00210     bool m_packageIsNamespace;
00211     bool m_publicAccessors;
00212 
00213     bool m_stringIncludeIsGlobal;
00214     bool m_vectorIncludeIsGlobal;
00215 
00216     QString m_stringClassName;
00217     QString m_stringClassNameInclude;
00218     QString m_vectorClassName;
00219     QString m_vectorClassNameInclude;
00220     QString m_vectorMethodAppendBase;
00221     QString m_vectorMethodRemoveBase;
00222     QString m_vectorMethodInitBase;
00223     QString m_objectMethodInitBase;
00224 
00225 };
00226 
00227 #endif // CPPCODEGENERATIONPOLICY_H
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:55 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003