This is Unofficial EPICS BASE Doxygen Site
epics::pvaClient::PvaClientGetCache Class Reference

Public Member Functions

 PvaClientGetCache ()
 
 ~PvaClientGetCache ()
 
PvaClientGetPtr getGet (string const &request)
 
void addGet (string const &request, PvaClientGetPtr const &pvaClientGet)
 
void showCache ()
 
size_t cacheSize ()
 

Detailed Description

Definition at line 28 of file pvaClientChannel.cpp.

Constructor & Destructor Documentation

epics::pvaClient::PvaClientGetCache::PvaClientGetCache ( )
inline

Definition at line 31 of file pvaClientChannel.cpp.

31 {}
epics::pvaClient::PvaClientGetCache::~PvaClientGetCache ( )
inline

Definition at line 32 of file pvaClientChannel.cpp.

33  {
34  if(PvaClient::getDebug()) cout << "PvaClientGetCache::~PvaClientGetCache\n";
35  }
static bool getDebug()
Is debug set?
Definition: pvaClient.cpp:97

Member Function Documentation

void epics::pvaClient::PvaClientGetCache::addGet ( string const &  request,
PvaClientGetPtr const &  pvaClientGet 
)

Definition at line 51 of file pvaClientChannel.cpp.

52 {
53  map<string,PvaClientGetPtr>::iterator iter = pvaClientGetMap.find(request);
54  if(iter!=pvaClientGetMap.end()) {
55  throw std::runtime_error("pvaClientGetCache::addGet pvaClientGet already cached");
56  }
57  pvaClientGetMap.insert(std::pair<string,PvaClientGetPtr>(request,pvaClientGet));
58 }
std::string request
size_t epics::pvaClient::PvaClientGetCache::cacheSize ( )

Definition at line 69 of file pvaClientChannel.cpp.

70 {
71  return pvaClientGetMap.size();
72 
73 }
PvaClientGetPtr epics::pvaClient::PvaClientGetCache::getGet ( string const &  request)

Definition at line 44 of file pvaClientChannel.cpp.

45 {
46  map<string,PvaClientGetPtr>::iterator iter = pvaClientGetMap.find(request);
47  if(iter!=pvaClientGetMap.end()) return iter->second;
48  return PvaClientGetPtr();
49 }
std::string request
std::tr1::shared_ptr< PvaClientGet > PvaClientGetPtr
Definition: pvaClient.h:71
void epics::pvaClient::PvaClientGetCache::showCache ( )

Definition at line 60 of file pvaClientChannel.cpp.

61 {
62  map<string,PvaClientGetPtr>::iterator iter;
63  for(iter = pvaClientGetMap.begin(); iter != pvaClientGetMap.end(); ++iter)
64  {
65  cout << " " << iter->first << endl;
66  }
67 }

The documentation for this class was generated from the following file: