From: <sv...@ww...> - 2005-04-02 16:52:13
|
Author: mkrose Date: 2005-04-02 08:52:06 -0800 (Sat, 02 Apr 2005) New Revision: 1501 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Bus.h Log: Add a DataChannel constructor that can be used for channel data types that don't have public copy constructors. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1501 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-02 16:43:03 UTC (rev 1500) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-02 16:52:06 UTC (rev 1501) @@ -1,12 +1,16 @@ Version 0.4.0 (in progress) =========================== +2005-04-02: onsight + * Add a DataChannel constructor that can be used for channel data types + that don't have public copy constructors. + 2005-03-12: delta * Reformated GearAnimation and related classes as Systems. Adjusted xml files consequently. Cleaned up GearDynamics. - + * Updated .vcproj for the next check in of OS relative to fcs. - + ==> ALL USERS: RebuildData.py 2005-03-11: onsight Modified: trunk/CSP/CSPSim/Include/Bus.h =================================================================== --- trunk/CSP/CSPSim/Include/Bus.h 2005-04-02 16:43:03 UTC (rev 1500) +++ trunk/CSP/CSPSim/Include/Bus.h 2005-04-02 16:52:06 UTC (rev 1501) @@ -424,9 +424,20 @@ * @param name The string indetifier of the channel. * @param val The initial value of the channel data. * @param shared Create a shared (or non-shared) channel. + * @param signal_ The signaling mechanism of the channel (push/pull/none). */ DataChannel(std::string const &name, T const &val, AccessType access_=ACCESS_LOCAL, SignalType signal_=NO_SIGNAL): DataChannelBase(name, access_, signal_), m_Value(val) {} + /** Construct and initialize a new channel. The initial value is + * determined by the default constructor for the channel data type. + * This is useful for types that do not have public copy constructors. + * + * @param name The string indetifier of the channel. + * @param shared_ Create a shared (or non-shared) channel. + * @param signal_ The signaling mechanism of the channel (push/pull/none). + */ + DataChannel(std::string const &name, AccessType access_=ACCESS_LOCAL, SignalType signal_=NO_SIGNAL): DataChannelBase(name, access_, signal_), m_Value() {} + static DataChannel<T> *newLocal(std::string const &name, T const &val) { return new DataChannel(name, val, ACCESS_LOCAL, NO_SIGNAL); } |