added methods to show cache; tests moved to pvaClientTestCPP; doxygen changes
This commit is contained in:
@@ -36,6 +36,8 @@ public:
|
||||
}
|
||||
PvaClientGetPtr getGet(string const & request);
|
||||
void addGet(string const & request,PvaClientGetPtr const & pvaClientGet);
|
||||
void showCache();
|
||||
size_t cacheSize();
|
||||
private:
|
||||
map<string,PvaClientGetPtr> pvaClientGetMap;
|
||||
};
|
||||
@@ -58,6 +60,20 @@ void PvaClientGetCache::addGet(string const & request,PvaClientGetPtr const & pv
|
||||
request,pvaClientGet));
|
||||
}
|
||||
|
||||
void PvaClientGetCache::showCache()
|
||||
{
|
||||
map<string,PvaClientGetPtr>::iterator iter;
|
||||
for(iter = pvaClientGetMap.begin(); iter != pvaClientGetMap.end(); ++iter)
|
||||
{
|
||||
cout << " " << iter->first << endl;
|
||||
}
|
||||
}
|
||||
|
||||
size_t PvaClientGetCache::cacheSize()
|
||||
{
|
||||
return pvaClientGetMap.size();
|
||||
|
||||
}
|
||||
|
||||
class PvaClientPutCache
|
||||
{
|
||||
@@ -69,6 +85,8 @@ public:
|
||||
}
|
||||
PvaClientPutPtr getPut(string const & request);
|
||||
void addPut(string const & request,PvaClientPutPtr const & pvaClientPut);
|
||||
void showCache();
|
||||
size_t cacheSize();
|
||||
private:
|
||||
map<string,PvaClientPutPtr> pvaClientPutMap;
|
||||
};
|
||||
@@ -91,6 +109,21 @@ void PvaClientPutCache::addPut(string const & request,PvaClientPutPtr const & pv
|
||||
request,pvaClientPut));
|
||||
}
|
||||
|
||||
void PvaClientPutCache::showCache()
|
||||
{
|
||||
map<string,PvaClientPutPtr>::iterator iter;
|
||||
for(iter = pvaClientPutMap.begin(); iter != pvaClientPutMap.end(); ++iter)
|
||||
{
|
||||
cout << " " << iter->first << endl;
|
||||
}
|
||||
}
|
||||
|
||||
size_t PvaClientPutCache::cacheSize()
|
||||
{
|
||||
return pvaClientPutMap.size();
|
||||
|
||||
}
|
||||
|
||||
class ChannelRequesterImpl : public ChannelRequester
|
||||
{
|
||||
PvaClientChannel *pvaClientChannel;
|
||||
@@ -482,6 +515,19 @@ PvaClientMonitorPtr PvaClientChannel::createMonitor(PVStructurePtr const & pvR
|
||||
return PvaClientMonitor::create(yyy,getPtrSelf(),channel,pvRequest);
|
||||
}
|
||||
|
||||
void PvaClientChannel::showCache()
|
||||
{
|
||||
cout << " pvaClientGet" << endl;
|
||||
pvaClientGetCache->showCache();
|
||||
cout << " pvaClientPut" << endl;
|
||||
pvaClientPutCache->showCache();
|
||||
}
|
||||
|
||||
size_t PvaClientChannel::cacheSize()
|
||||
{
|
||||
return pvaClientGetCache->cacheSize() + pvaClientPutCache->cacheSize();
|
||||
}
|
||||
|
||||
|
||||
PvaClientChannelPtr PvaClientChannel::create(
|
||||
PvaClientPtr const &pvaClient,
|
||||
|
||||
Reference in New Issue
Block a user