ownedhierarchicalcodeblock.h
00001 00002 /*************************************************************************** 00003 * * 00004 * This program is free software; you can redistribute it and/or modify * 00005 * it under the terms of the GNU General Public License as published by * 00006 * the Free Software Foundation; either version 2 of the License, or * 00007 * (at your option) any later version. * 00008 * * 00009 ***************************************************************************/ 00010 00011 /* This code generated by: 00012 * Author : thomas 00013 * Date : Fri Aug 07 2003 00014 */ 00015 00016 #ifndef OWNEDHIERARCHICALCODEBLOCK_H 00017 #define OWNEDHIERARCHICALCODEBLOCK_H 00018 00019 #include "hierarchicalcodeblock.h" 00020 00021 class UMLObject; 00022 class CodeDocument; 00023 00030 class OwnedHierarchicalCodeBlock : public HierarchicalCodeBlock, public OwnedCodeBlock 00031 { 00032 Q_OBJECT 00033 public: 00034 00035 // Constructors/Destructors 00036 // 00037 00041 OwnedHierarchicalCodeBlock ( UMLObject * parent, CodeDocument * parentDoc, const QString &start="", const QString &end="", const QString &comment="" ); 00042 00046 virtual ~OwnedHierarchicalCodeBlock ( ); 00047 00048 // Public attributes 00049 // 00050 00051 // Return the parent code document 00052 CodeDocument * getParentDocument(); 00053 00054 // these next 2 methods should be supplied by inheriting classes 00058 virtual void saveToXMI ( QDomDocument & doc, QDomElement & root ) = 0; 00059 00063 virtual void loadFromXMI ( QDomElement & root ) = 0; 00064 00065 protected: 00066 00071 virtual void release (); 00072 00076 virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement); 00077 00081 virtual void setAttributesFromNode ( QDomElement & element); 00082 00085 virtual void setAttributesFromObject (TextBlock * obj); 00086 00087 virtual void updateContent ( ) = 0; 00088 00089 private: 00090 00091 public slots: 00092 00093 void syncToParent ( ); 00094 00095 00096 }; 00097 00098 #endif // OWNEDHIERARCHICALCODEBLOCK_H
