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_INSTANCE_HPP 00026 #define UML_INSTANCE_HPP 00027 00028 #include <UML/ModelElement.hpp> 00029 00030 namespace UML 00031 { 00032 // forward declarations 00033 class Instance; 00034 class Classifier; 00035 class LinkEnd; 00036 class AttributeLink; 00037 class ComponentInstance; 00038 class Instance; 00039 class Link; 00040 00041 class Instance : virtual public UML::ModelElement 00042 { 00043 public: 00044 typedef OMF::BasicClass<Instance, OMF::Abstract> Proxy; 00045 00046 Instance(); 00047 virtual ~Instance(); 00048 00049 const OMF::Set &classifier(); 00050 void addClassifier(Classifier *value); 00051 void removeClassifier(Classifier *value); 00052 void clearClassifier(); 00053 00054 const OMF::Set &linkEnd(); 00055 void addLinkEnd(LinkEnd *value); 00056 void removeLinkEnd(LinkEnd *value); 00057 void clearLinkEnd(); 00058 00059 const OMF::Set &slot(); 00060 void addSlot(AttributeLink *value); 00061 void removeSlot(AttributeLink *value); 00062 void clearSlot(); 00063 00064 ComponentInstance *componentInstance(); 00065 void setComponentInstance(ComponentInstance *value); 00066 void clearComponentInstance(); 00067 00068 const OMF::Set &ownedInstance(); 00069 void addOwnedInstance(Instance *value); 00070 void removeOwnedInstance(Instance *value); 00071 void clearOwnedInstance(); 00072 00073 const OMF::Set &ownedLink(); 00074 void addOwnedLink(Link *value); 00075 void removeOwnedLink(Link *value); 00076 void clearOwnedLink(); 00077 00078 private: 00079 OMF::Set _classifier; 00080 OMF::Set _linkEnd; 00081 OMF::Set _slot; 00082 ComponentInstance *_componentInstance; 00083 OMF::Set _ownedInstance; 00084 OMF::Set _ownedLink; 00085 }; 00086 00087 00088 } 00089 00090 #endif