00001 /* 00002 * Copyright (C) 2004 Andrew Sutton 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to: 00016 * 00017 * The Free Software Foundation, Inc. 00018 * 59 Temple Place, Suite 330 00019 * Boston, MA 02111-1307 USA 00020 * 00021 * Contact: 00022 * Andrew Sutton asutton@cs.kent.edu 00023 */ 00024 00025 #ifndef UML_COLLABORATION_HPP 00026 #define UML_COLLABORATION_HPP 00027 00028 #include <UML/GeneralizableElement.hpp> 00029 #include <UML/Namespace.hpp> 00030 00031 namespace UML 00032 { 00033 // forward declarations 00034 class Collaboration; 00035 class CollaborationImpl; 00036 class Interaction; 00037 class Classifier; 00038 class Operation; 00039 class ModelElement; 00040 class Collaboration; 00041 00042 class Collaboration : virtual public UML::GeneralizableElement, virtual public UML::Namespace 00043 { 00044 public: 00045 typedef OMF::BasicClass<CollaborationImpl> Proxy; 00046 00047 Collaboration(); 00048 virtual ~Collaboration(); 00049 00050 const OMF::Set &interaction(); 00051 void addInteraction(Interaction *value); 00052 void removeInteraction(Interaction *value); 00053 void clearInteraction(); 00054 00055 Classifier *representedClassifier(); 00056 void setRepresentedClassifier(Classifier *value); 00057 void clearRepresentedClassifier(); 00058 00059 Operation *representedOperation(); 00060 void setRepresentedOperation(Operation *value); 00061 void clearRepresentedOperation(); 00062 00063 const OMF::Set &constrainingElement(); 00064 void addConstrainingElement(ModelElement *value); 00065 void removeConstrainingElement(ModelElement *value); 00066 void clearConstrainingElement(); 00067 00068 const OMF::Set &usedCollaboration(); 00069 void addUsedCollaboration(Collaboration *value); 00070 void removeUsedCollaboration(Collaboration *value); 00071 void clearUsedCollaboration(); 00072 00073 private: 00074 OMF::Set _interaction; 00075 Classifier *_representedClassifier; 00076 Operation *_representedOperation; 00077 OMF::Set _constrainingElement; 00078 OMF::Set _usedCollaboration; 00079 }; 00080 00081 00082 struct CollaborationImpl : virtual public UML::Collaboration 00083 { 00084 CollaborationImpl() : 00085 OMF::ModelObject( 00086 "UML.Collaboration", 00087 &Collaboration::Proxy::instance(), 00088 &UMLPackage::instance()), 00089 Element(), 00090 ModelElement(), 00091 GeneralizableElement(), 00092 Namespace(), 00093 Collaboration() 00094 {} 00095 00096 virtual ~CollaborationImpl() 00097 {} 00098 }; 00099 } 00100 00101 #endif