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_EXTEND_HPP 00026 #define UML_EXTEND_HPP 00027 00028 #include <UML/Relationship.hpp> 00029 00030 namespace UML 00031 { 00032 // forward declarations 00033 class Extend; 00034 class ExtendImpl; 00035 class BooleanExpression; 00036 class UseCase; 00037 class UseCase; 00038 class ExtensionPoint; 00039 00040 class Extend : virtual public UML::Relationship 00041 { 00042 public: 00043 typedef OMF::BasicClass<ExtendImpl> Proxy; 00044 00045 Extend(); 00046 virtual ~Extend(); 00047 00048 BooleanExpression *condition(); 00049 void setCondition(BooleanExpression *value); 00050 void clearCondition(); 00051 00052 UseCase *base(); 00053 void setBase(UseCase *value); 00054 void clearBase(); 00055 00056 UseCase *extension(); 00057 void setExtension(UseCase *value); 00058 void clearExtension(); 00059 00060 const OMF::Set &extensionPoint(); 00061 void addExtensionPoint(ExtensionPoint *value); 00062 void removeExtensionPoint(ExtensionPoint *value); 00063 void clearExtensionPoint(); 00064 00065 private: 00066 BooleanExpression *_condition; 00067 UseCase *_base; 00068 UseCase *_extension; 00069 OMF::Set _extensionPoint; 00070 }; 00071 00072 00073 struct ExtendImpl : virtual public UML::Extend 00074 { 00075 ExtendImpl() : 00076 OMF::ModelObject( 00077 "UML.Extend", 00078 &Extend::Proxy::instance(), 00079 &UMLPackage::instance()), 00080 Element(), 00081 ModelElement(), 00082 Relationship(), 00083 Extend() 00084 {} 00085 00086 virtual ~ExtendImpl() 00087 {} 00088 }; 00089 } 00090 00091 #endif