codeparameter.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) 2004-2006 * 00009 * Umbrello UML Modeller Authors <uml-devel@uml.sf.net> * 00010 ***************************************************************************/ 00011 00012 /* This code generated by: 00013 * Author : thomas 00014 * Date : Fri Jun 20 2003 00015 */ 00016 00017 00018 00019 #ifndef CODEPARAMETER_H 00020 #define CODEPARAMETER_H 00021 00022 00023 #include "umlnamespace.h" 00024 #include "codecomment.h" 00025 00031 class ClassifierCodeDocument; 00032 class UMLObject; 00033 00034 class CodeParameter : public QObject 00035 { 00036 Q_OBJECT 00037 public: 00038 00039 // Constructors/Destructors 00040 // 00041 00045 CodeParameter ( ClassifierCodeDocument * doc, UMLObject * parentObj ); 00046 00050 virtual ~CodeParameter ( ); 00051 00052 // Public attributes 00053 // 00054 00055 // Public attribute accessor methods 00056 // 00057 00061 ClassifierCodeDocument * getParentDocument ( ); 00062 00066 UMLObject * getParentObject ( ); 00067 00072 bool getAbstract ( ); 00073 00079 bool getStatic ( ); 00080 00085 QString getName ( ) const; 00086 00093 virtual QString getTypeName ( ); 00094 00100 Uml::Visibility getVisibility ( ) const; 00101 00107 virtual void setInitialValue ( const QString &new_var ); 00108 00114 virtual QString getInitialValue ( ); 00115 00119 void setComment ( CodeComment * comment ); 00120 00124 CodeComment * getComment ( ); 00125 00126 // the id of this parameter is the same as the parent UMLObject id. 00127 QString getID (); 00128 00129 protected: 00130 00131 virtual void updateContent() = 0; 00132 00136 virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement); 00137 00141 virtual void setAttributesFromNode ( QDomElement & element); 00142 00143 private: 00144 00145 ClassifierCodeDocument * m_parentDocument; 00146 UMLObject * m_parentObject; 00147 CodeComment * m_comment; 00148 00149 // The initial value of this code parameter 00150 QString m_initialValue; 00151 00152 void initFields ( ClassifierCodeDocument * doc, UMLObject * obj); 00153 00154 public slots: 00155 00156 void syncToParent (); 00157 00158 }; 00159 00160 #endif // CODEPARAMETER_H
