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_MESSAGE_HPP 00026 #define UML_MESSAGE_HPP 00027 00028 #include <UML/ModelElement.hpp> 00029 00030 namespace UML 00031 { 00032 // forward declarations 00033 class Message; 00034 class MessageImpl; 00035 class Interaction; 00036 class Message; 00037 class ClassifierRole; 00038 class ClassifierRole; 00039 class Message; 00040 class AssociationRole; 00041 class Action; 00042 class Stimulus; 00043 00044 class Message : virtual public UML::ModelElement 00045 { 00046 public: 00047 typedef OMF::BasicClass<MessageImpl> Proxy; 00048 00049 Message(); 00050 virtual ~Message(); 00051 00052 Interaction *interaction(); 00053 void setInteraction(Interaction *value); 00054 void clearInteraction(); 00055 00056 Message *activator(); 00057 void setActivator(Message *value); 00058 void clearActivator(); 00059 00060 ClassifierRole *sender(); 00061 void setSender(ClassifierRole *value); 00062 void clearSender(); 00063 00064 ClassifierRole *receiver(); 00065 void setReceiver(ClassifierRole *value); 00066 void clearReceiver(); 00067 00068 const OMF::Set &predecessor(); 00069 void addPredecessor(Message *value); 00070 void removePredecessor(Message *value); 00071 void clearPredecessor(); 00072 00073 AssociationRole *communicationConnection(); 00074 void setCommunicationConnection(AssociationRole *value); 00075 void clearCommunicationConnection(); 00076 00077 Action *action(); 00078 void setAction(Action *value); 00079 void clearAction(); 00080 00081 const OMF::Set &conformingStimulus(); 00082 void addConformingStimulus(Stimulus *value); 00083 void removeConformingStimulus(Stimulus *value); 00084 void clearConformingStimulus(); 00085 00086 private: 00087 Interaction *_interaction; 00088 Message *_activator; 00089 ClassifierRole *_sender; 00090 ClassifierRole *_receiver; 00091 OMF::Set _predecessor; 00092 AssociationRole *_communicationConnection; 00093 Action *_action; 00094 OMF::Set _conformingStimulus; 00095 }; 00096 00097 00098 struct MessageImpl : virtual public UML::Message 00099 { 00100 MessageImpl() : 00101 OMF::ModelObject( 00102 "UML.Message", 00103 &Message::Proxy::instance(), 00104 &UMLPackage::instance()), 00105 Element(), 00106 ModelElement(), 00107 Message() 00108 {} 00109 00110 virtual ~MessageImpl() 00111 {} 00112 }; 00113 } 00114 00115 #endif