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_LINKEND_HPP 00026 #define UML_LINKEND_HPP 00027 00028 #include <UML/ModelElement.hpp> 00029 00030 namespace UML 00031 { 00032 // forward declarations 00033 class LinkEnd; 00034 class LinkEndImpl; 00035 class Instance; 00036 class Link; 00037 class AssociationEnd; 00038 class AttributeLink; 00039 00040 class LinkEnd : virtual public UML::ModelElement 00041 { 00042 public: 00043 typedef OMF::BasicClass<LinkEndImpl> Proxy; 00044 00045 LinkEnd(); 00046 virtual ~LinkEnd(); 00047 00048 Instance *instance(); 00049 void setInstance(Instance *value); 00050 void clearInstance(); 00051 00052 Link *link(); 00053 void setLink(Link *value); 00054 void clearLink(); 00055 00056 AssociationEnd *associationEnd(); 00057 void setAssociationEnd(AssociationEnd *value); 00058 void clearAssociationEnd(); 00059 00060 const OMF::Set &qualifiedValue(); 00061 void addQualifiedValue(AttributeLink *value); 00062 void removeQualifiedValue(AttributeLink *value); 00063 void clearQualifiedValue(); 00064 00065 private: 00066 Instance *_instance; 00067 Link *_link; 00068 AssociationEnd *_associationEnd; 00069 OMF::Set _qualifiedValue; 00070 }; 00071 00072 00073 struct LinkEndImpl : virtual public UML::LinkEnd 00074 { 00075 LinkEndImpl() : 00076 OMF::ModelObject( 00077 "UML.LinkEnd", 00078 &LinkEnd::Proxy::instance(), 00079 &UMLPackage::instance()), 00080 Element(), 00081 ModelElement(), 00082 LinkEnd() 00083 {} 00084 00085 virtual ~LinkEndImpl() 00086 {} 00087 }; 00088 } 00089 00090 #endif