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_STIMULUS_HPP 00026 #define UML_STIMULUS_HPP 00027 00028 #include <UML/ModelElement.hpp> 00029 00030 namespace UML 00031 { 00032 // forward declarations 00033 class Stimulus; 00034 class StimulusImpl; 00035 class Instance; 00036 class Instance; 00037 class Instance; 00038 class Link; 00039 class Action; 00040 00041 class Stimulus : virtual public UML::ModelElement 00042 { 00043 public: 00044 typedef OMF::BasicClass<StimulusImpl> Proxy; 00045 00046 Stimulus(); 00047 virtual ~Stimulus(); 00048 00049 const OMF::Set &argument(); 00050 void addArgument(Instance *value); 00051 void removeArgument(Instance *value); 00052 void clearArgument(); 00053 00054 Instance *sender(); 00055 void setSender(Instance *value); 00056 void clearSender(); 00057 00058 Instance *receiver(); 00059 void setReceiver(Instance *value); 00060 void clearReceiver(); 00061 00062 Link *communicationLink(); 00063 void setCommunicationLink(Link *value); 00064 void clearCommunicationLink(); 00065 00066 Action *dispatchAction(); 00067 void setDispatchAction(Action *value); 00068 void clearDispatchAction(); 00069 00070 private: 00071 OMF::Set _argument; 00072 Instance *_sender; 00073 Instance *_receiver; 00074 Link *_communicationLink; 00075 Action *_dispatchAction; 00076 }; 00077 00078 00079 struct StimulusImpl : virtual public UML::Stimulus 00080 { 00081 StimulusImpl() : 00082 OMF::ModelObject( 00083 "UML.Stimulus", 00084 &Stimulus::Proxy::instance(), 00085 &UMLPackage::instance()), 00086 Element(), 00087 ModelElement(), 00088 Stimulus() 00089 {} 00090 00091 virtual ~StimulusImpl() 00092 {} 00093 }; 00094 } 00095 00096 #endif