X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEvents%2FEvents_Message.h;h=40027344a7231cef442347b7cbfbb69c940f04b1;hb=aeca03e919a402327655e3f9c133985d9223b873;hp=1d5a57d41e235d678320130a0ba6db57c9b885b6;hpb=8272f8013305da9dd2b1e4fadb5aa7327f63d8e3;p=modules%2Fshaper.git diff --git a/src/Events/Events_Message.h b/src/Events/Events_Message.h index 1d5a57d41..40027344a 100644 --- a/src/Events/Events_Message.h +++ b/src/Events/Events_Message.h @@ -1,9 +1,11 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: Events_Message.hxx // Created: Thu Mar 13 2014 // Author: Mikhail PONIKAROV -#ifndef Events_Message_HeaderFile -#define Events_Message_HeaderFile +#ifndef Events_Message_H_ +#define Events_Message_H_ #include @@ -17,17 +19,27 @@ * used as an identifier (this is usefull for debugging of the events * with log files and in debugger). */ -class EVENTS_EXPORT Events_ID { - char* myID; ///< pointer to the text-identifier of the event, unique pointer for all events of such type +class EVENTS_EXPORT Events_ID +{ + char* myID; ///< pointer to the text-identifier of the event, unique pointer for all events of such type - Events_ID(char* theID) {myID = theID;} + Events_ID(char* theID) + { + myID = theID; + } friend class Events_Loop; -public: + public: /// Returns the text-identifier of the event (for debugging reasons) - char* eventText() const {return myID;} + char* eventText() const + { + return myID; + } /// Allows to compare identifiers - bool operator==(const Events_ID& theID) const {return myID == theID.myID;} + bool operator==(const Events_ID& theID) const + { + return myID == theID.myID; + } }; /**\class Events_Message @@ -35,23 +47,35 @@ public: * \brief Message for communication between sender and listener of event. * Normally it is inherited by the higher-level */ -class EVENTS_EXPORT Events_Message { - Events_ID myEventsId; ///< identifier of the event - void* mySender; ///< the sender object +class EVENTS_EXPORT Events_Message +{ + Events_ID myEventsId; ///< identifier of the event + void* mySender; ///< the sender object -public: + public: //! Creates the message Events_Message(const Events_ID theID, const void* theSender = 0) - : myEventsId(theID), mySender((void*) theSender) {} + : myEventsId(theID), + mySender((void*) theSender) + { + } //! do nothing in the destructor yet - virtual ~Events_Message() {} + virtual ~Events_Message() + { + } //! Returns identifier of the message - const Events_ID& eventID() const {return myEventsId;} + const Events_ID& eventID() const + { + return myEventsId; + } //! Returns sender of the message or NULL if it is anonymous message - void* sender() const {return mySender;} + void* sender() const + { + return mySender; + } }; #endif