pvAccessCPP
utils/pv/requester.h
00001 /* requester.h */
00002 /*
00003  * Copyright information and license terms for this software can be
00004  * found in the file LICENSE that is included with the distribution
00005  */
00009 #ifndef REQUESTER_H
00010 #define REQUESTER_H
00011 #include <string>
00012 
00013 #ifdef epicsExportSharedSymbols
00014 #   define requesterEpicsExportSharedSymbols
00015 #   undef epicsExportSharedSymbols
00016 #endif
00017 
00018 #include <pv/pvType.h>
00019 #include <pv/sharedPtr.h>
00020 
00021 #ifdef requesterEpicsExportSharedSymbols
00022 #   define epicsExportSharedSymbols
00023 #   undef requesterEpicsExportSharedSymbols
00024 #endif
00025 
00026 
00027 #include <shareLib.h>
00028 
00029 namespace epics { namespace pvAccess {
00030 
00031 class Requester;
00032 typedef std::tr1::shared_ptr<Requester> RequesterPtr;
00033 
00034 enum MessageType {
00035    infoMessage,warningMessage,errorMessage,fatalErrorMessage
00036 };
00037 #define MESSAGE_TYPE_COUNT 4
00038 
00039 epicsShareExtern std::string getMessageTypeName(MessageType messageType);
00040 
00043 class epicsShareClass Requester {
00044 public:
00045     POINTER_DEFINITIONS(Requester);
00046     virtual ~Requester(){}
00051     virtual std::string getRequesterName() = 0;
00054     virtual void message(std::string const & message,MessageType messageType = errorMessage);
00055 };
00056 
00057 }}
00058 namespace epics { namespace pvData {
00059 using ::epics::pvAccess::Requester;
00060 using ::epics::pvAccess::RequesterPtr;
00061 using ::epics::pvAccess::MessageType;
00062 using ::epics::pvAccess::getMessageTypeName;
00063 using ::epics::pvAccess::infoMessage;
00064 using ::epics::pvAccess::warningMessage;
00065 using ::epics::pvAccess::errorMessage;
00066 using ::epics::pvAccess::fatalErrorMessage;
00067 }}
00068 #endif  /* REQUESTER_H */
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator