|
STK++ 1.0
|
00001 /*--------------------------------------------------------------------*/ 00002 /* Copyright (C) 2004-2007 Serge Iovleff 00003 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU Lesser General Public License as 00006 published by the Free Software Foundation; either version 2 of the 00007 License, or (at your option) any later version. 00008 00009 This program 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 00012 GNU 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 program; if not, write to the 00016 Free Software Foundation, Inc., 00017 59 Temple Place, 00018 Suite 330, 00019 Boston, MA 02111-1307 00020 USA 00021 00022 Contact : Serge.Iovleff@stkpp.org 00023 */ 00024 /*--------------------------------------------------------------------*/ 00025 /* $Id: STK_IStep.h,v 1.4 2009/10/26 22:08:01 siovleff Exp $ 00026 * 00027 * Project: stkpp::gui 00028 * created on: 5 oct. 2009 00029 * Purpose: Define the Interface class IStep. 00030 * Author: iovleff, serge.iovleff@stkpp.org 00031 * 00032 * $Log: STK_IStep.h,v $ 00033 * Revision 1.4 2009/10/26 22:08:01 siovleff 00034 * Creating GProgram class 00035 * 00036 * Revision 1.3 2009/10/21 14:15:50 siovleff 00037 * adding accessors 00038 * 00039 * Revision 1.2 2009/10/21 13:45:23 siovleff 00040 * removing height and width properties 00041 * 00042 * Revision 1.1 2009/10/13 20:50:57 siovleff 00043 * Initial import of the model project 00044 * 00045 **/ 00046 /*--------------------------------------------------------------------*/ 00051 #ifndef STK_ISTEP_H 00052 #define STK_ISTEP_H 00053 00054 #include <list> 00055 00056 #include "../../../projects/STKernel/include/STK_String.h" 00057 #include "../../../projects/STKernel/include/STK_Real.h" 00058 00059 #include "STK_IPropertySource.h" 00060 00061 namespace STK 00062 { 00063 00064 class Connection; 00065 00080 class IStep: public STK::IPropertySource 00081 { 00082 private: 00084 static const String ID_STEP_SOURCE_CONNECTIONS; 00085 00087 static const String ID_STEP_TARGET_CONNECTIONS; 00088 00090 static const String ID_STEP_XLOCATION; 00091 00093 static const String ID_STEP_YLOCATION; 00094 00096 static const PropertyDescriptor sourceConnectionsDescriptor_; 00097 00099 static const PropertyDescriptor targetConnectionsDescriptor_; 00100 00102 static const PropertyDescriptor heightDescriptor_; 00103 00105 static const PropertyDescriptor widthDescriptor_; 00106 00108 static const PropertyDescriptor xLocationDescriptor_; 00109 00111 static const PropertyDescriptor yLocationDescriptor_; 00112 00113 protected: 00115 String name_; 00116 00118 Real xLocation_; 00119 00121 Real yLocation_; 00122 00124 std::list<Connection*> incomingConnections_; 00125 00127 std::list<Connection*> outgoingConnections_; 00128 00129 public: 00130 00132 IStep(String const& name, Real const& x, Real const& y); 00133 00135 virtual ~IStep(); 00136 00140 inline String const& name() const 00141 { return name_;} 00142 00147 inline Real const& getXLocation() const 00148 { return xLocation_;} 00149 00154 inline Real const& getYLocation() const 00155 { return yLocation_;} 00156 00161 inline std::list<Connection*>& getIncomingConnections() 00162 { return incomingConnections_;} 00163 00168 inline std::list<Connection*>& getOutgoingConnections() 00169 { return outgoingConnections_;} 00170 00175 void removeConnection(Connection* connection); 00176 00181 void addConnection(Connection* connection); 00182 00190 virtual bool isPropertySet(String const& id) const; 00191 00199 virtual const String* getPropertyValue(String const& id) const; 00200 }; 00201 00202 } 00203 00204 #endif /* STK_ISTEP_H */