pvAccessCPP 7.1.8
Loading...
Searching...
No Matches
requester.h
1/* requester.h */
2/*
3 * Copyright information and license terms for this software can be
4 * found in the file LICENSE that is included with the distribution
5 */
9#ifndef REQUESTER_H
10#define REQUESTER_H
11#include <string>
12
13#ifdef epicsExportSharedSymbols
14# define requesterEpicsExportSharedSymbols
15# undef epicsExportSharedSymbols
16#endif
17
18#include <pv/pvType.h>
19#include <pv/sharedPtr.h>
20
21#ifdef requesterEpicsExportSharedSymbols
22# define epicsExportSharedSymbols
23# undef requesterEpicsExportSharedSymbols
24#endif
25
26
27#include <shareLib.h>
28
29namespace epics { namespace pvAccess {
30
31class Requester;
32typedef std::tr1::shared_ptr<Requester> RequesterPtr;
33
34enum MessageType {
35 infoMessage,warningMessage,errorMessage,fatalErrorMessage
36};
37#define MESSAGE_TYPE_COUNT 4
38
39epicsShareExtern std::string getMessageTypeName(MessageType messageType);
40
43class epicsShareClass Requester {
44public:
45 POINTER_DEFINITIONS(Requester);
46 virtual ~Requester(){}
51 virtual std::string getRequesterName() = 0;
54 virtual void message(std::string const & message,MessageType messageType = errorMessage);
55};
56
57}}
58namespace epics { namespace pvData {
59using ::epics::pvAccess::Requester;
60using ::epics::pvAccess::RequesterPtr;
61using ::epics::pvAccess::MessageType;
62using ::epics::pvAccess::getMessageTypeName;
63using ::epics::pvAccess::infoMessage;
64using ::epics::pvAccess::warningMessage;
65using ::epics::pvAccess::errorMessage;
66using ::epics::pvAccess::fatalErrorMessage;
67}}
68#endif /* REQUESTER_H */
Callback class for passing messages to a requester.
Definition requester.h:43
virtual void message(std::string const &message, MessageType messageType=errorMessage)
Push notification.
virtual std::string getRequesterName()=0
The requester must have a name.
Copyright - See the COPYRIGHT that is included with this distribution.