summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/codeaccessormethod.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /umbrello/umbrello/codeaccessormethod.h
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/codeaccessormethod.h')
-rw-r--r--umbrello/umbrello/codeaccessormethod.h118
1 files changed, 118 insertions, 0 deletions
diff --git a/umbrello/umbrello/codeaccessormethod.h b/umbrello/umbrello/codeaccessormethod.h
new file mode 100644
index 00000000..03e8ff67
--- /dev/null
+++ b/umbrello/umbrello/codeaccessormethod.h
@@ -0,0 +1,118 @@
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/* This code generated by:
+ * Author : thomas
+ * Date : Tue Jul 1 2003
+ */
+
+
+
+#ifndef CODEACCESSORMETHOD_H
+#define CODEACCESSORMETHOD_H
+
+#include <qstring.h>
+#include "codemethodblock.h"
+
+class CodeClassField;
+
+class CodeAccessorMethod : public CodeMethodBlock
+{
+ friend class CodeClassField;
+ Q_OBJECT
+public:
+
+ // some types of accessor methods that are possible:
+ // "GET" is to retrieve single-valued (primative or Object) fields
+ // "SET" is to set single-valued (primative or Object) fields
+ // "ADD" is to add a value to a multiple-valued field of either primative or Object items
+ // "REMOVE" is to remove a value to a multiple-valued field of either primative or Object items
+ // "LIST" is to retrive the entire list of items in a multiple-valued field
+ enum AccessorType {GET=0, SET, ADD, REMOVE, LIST};
+
+ // Constructors/Destructors
+ //
+
+
+ /**
+ * Constructors
+ */
+ CodeAccessorMethod ( CodeClassField * field );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~CodeAccessorMethod ( );
+
+ /**
+ * Get the value of m_parentclassfield
+ * @return the value of m_parentclassfield
+ */
+ CodeClassField * getParentClassField ( );
+
+ /** return the type of accessor method this is
+ */
+ AccessorType getType( );
+
+ /** Set the type of accessor method this is
+ */
+ void setType ( AccessorType type);
+
+ /** Utility method to get the value of the parent object of the parent classifield.
+ */
+ // virtual UMLObject * getParentObject();
+
+ bool parentIsAttribute();
+
+ /**
+ * Save the XMI representation of this object
+ */
+ virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+
+ /**
+ * load params from the appropriate XMI element node.
+ */
+ virtual void loadFromXMI ( QDomElement & root );
+
+ /** set the class attributes from a passed object
+ */
+ virtual void setAttributesFromObject (TextBlock * obj);
+
+protected:
+
+ virtual void release ();
+
+ /** set attributes of the node that represents this class
+ * in the XMI document.
+ */
+ virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+
+ /** set the class attributes of this object from
+ * the passed element node.
+ */
+ virtual void setAttributesFromNode ( QDomElement & element);
+
+ virtual void updateMethodDeclaration() = 0;
+
+ virtual void updateContent() = 0;
+
+ // a method so the parent code classfield can force code block to release
+ void forceRelease ();
+
+private:
+
+ CodeClassField * m_parentclassfield;
+ AccessorType m_accessorType;
+
+ void initFields(CodeClassField * parentCF );
+
+};
+
+#endif // CODEACCESSORMETHOD_H