Ignore:
Timestamp:
May 23, 2012, 4:57:06 PM (9 years ago)
Author:
tbretz
Message:
Removed the target state; added fQoS; added time and QoS to copy constructor.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Event.cc

    r10183 r13831  
    1717
    1818using namespace std;
    19 
    20 // --------------------------------------------------------------------------
    21 //
    22 //! Propagate the targetstate to the base class EventImp and store the
    23 //! name in fName and the format in fFormat. Initializes fTime to
    24 //! an invalid time.
    25 //!
    26 //! @param targetstate
    27 //!    Target state to be propagated to the base class constructor
    28 //!
    29 //! @param name
    30 //!    Name given to the event
    31 //!
    32 //! @param fmt
    33 //!    If the event has data attached (like arguments of commands)
    34 //!    the format can be given here. How the format string is defined
    35 //!    is defined within the dim libarary. It is used in console
    36 //!    and shell access to properly format the data sent with the event
    37 //!
    38 //! <B>From the dim manual:</B>
    39 //!    The format parameter specifies the contents of the structure in
    40 //!    the form T:N[;T:N]*[;T] where T is the item type: (I)nteger,
    41 //!    (C)haracter, (L)ong, (S)hort, (F)loat, (D)ouble, and N is the
    42 //!    number of such items. The type alone at the end means all
    43 //!    following items are of the same type. Example: "I:3;F:2;C" means
    44 //!    3 Integers, 2 Floats and Characters until the end. The format
    45 //!    parameter is used for communicating between different platforms.
    46 //!
    47 //
    48 Event::Event(int targetstate, const char *name, const char *fmt) : EventImp(targetstate),
    49     fName(name), fFormat(fmt), fTime(Time::none)
    50 {
    51 }
    5219
    5320// --------------------------------------------------------------------------
     
    7643//
    7744Event::Event(const string &name, const char *fmt) :
    78     fName(name), fFormat(fmt), fTime(Time::none)
     45    fName(name), fFormat(fmt), fTime(Time::none), fQoS(0)
    7946{
    8047}
     
    9158Event::Event(const EventImp &evt) : EventImp(evt),
    9259fName(evt.GetName()), fFormat(evt.GetFormat()),
    93 fData(evt.GetText(), evt.GetText()+evt.GetSize()), fTime(evt.GetTime())
     60fData(evt.GetText(), evt.GetText()+evt.GetSize()), fTime(evt.GetTime()),
     61fQoS(evt.GetQoS())
    9462{
    9563    const size_t pos = fName.find_first_of('/');
     
    11583Event::Event(const EventImp &evt, const char *ptr, size_t siz) : EventImp(evt),
    11684fName(evt.GetName()), fFormat(evt.GetFormat()),
    117 fData(ptr, ptr+siz)
     85fData(ptr, ptr+siz), fTime(evt.GetTime()), fQoS(evt.GetQoS())
    11886{
    11987    const size_t pos = fName.find_first_of('/');
Note: See TracChangeset for help on using the changeset viewer.