diff --git a/src/cas/example/simple/Makefile.Host b/src/cas/example/simple/Makefile.Host index aed46bc9a..a2e79b646 100644 --- a/src/cas/example/simple/Makefile.Host +++ b/src/cas/example/simple/Makefile.Host @@ -15,7 +15,6 @@ SRCS += exVectorPV.cc SRCS += exScalarPV.cc SRCS += exAsyncPV.cc SRCS += exChannel.cc -SRCS += templInst.cc PROD := excas diff --git a/src/cas/example/simple/exServer.cc b/src/cas/example/simple/exServer.cc index 70de5e545..e6ba77c79 100644 --- a/src/cas/example/simple/exServer.cc +++ b/src/cas/example/simple/exServer.cc @@ -6,9 +6,24 @@ // // Example EPICS CA server // - #include "exServer.h" +// +// if the compiler supports explicit instantiation of +// template member functions +// +#if defined(EXPL_TEMPL) + // + // From Stroustrups's "The C++ Programming Language" + // Appendix A: r.14.9 + // + // This explicitly instantiates the template class's + // member functions into "templInst.o" + // + template class gddAppFuncTable ; + template class resTable ; +#endif + // // static data for exServer // @@ -48,22 +63,22 @@ exServer::exServer(const char * const pvPrefix, unsigned aliasCount) : const char * const pNameFmtStr = "%.100s%.20s"; const char * const pAliasFmtStr = "%.100s%.20s%u"; - ft.installReadFunc ("status", &exPV::getStatus); - ft.installReadFunc ("severity", &exPV::getSeverity); - ft.installReadFunc ("seconds", &exPV::getSeconds); - ft.installReadFunc ("nanoseconds", &exPV::getNanoseconds); - ft.installReadFunc ("precision", &exPV::getPrecision); - ft.installReadFunc ("graphicHigh", &exPV::getHighLimit); - ft.installReadFunc ("graphicLow", &exPV::getLowLimit); - ft.installReadFunc ("controlHigh", &exPV::getHighLimit); - ft.installReadFunc ("controlLow", &exPV::getLowLimit); - ft.installReadFunc ("alarmHigh", &exPV::getHighLimit); - ft.installReadFunc ("alarmLow", &exPV::getLowLimit); - ft.installReadFunc ("alarmHighWarning", &exPV::getHighLimit); - ft.installReadFunc ("alarmLowWarning", &exPV::getLowLimit); - ft.installReadFunc ("units", &exPV::getUnits); - ft.installReadFunc ("value", &exPV::getValue); - ft.installReadFunc ("enums", &exPV::getEnums); + exServer::ft.installReadFunc ("status", &exPV::getStatus); + exServer::ft.installReadFunc ("severity", &exPV::getSeverity); + exServer::ft.installReadFunc ("seconds", &exPV::getSeconds); + exServer::ft.installReadFunc ("nanoseconds", &exPV::getNanoseconds); + exServer::ft.installReadFunc ("precision", &exPV::getPrecision); + exServer::ft.installReadFunc ("graphicHigh", &exPV::getHighLimit); + exServer::ft.installReadFunc ("graphicLow", &exPV::getLowLimit); + exServer::ft.installReadFunc ("controlHigh", &exPV::getHighLimit); + exServer::ft.installReadFunc ("controlLow", &exPV::getLowLimit); + exServer::ft.installReadFunc ("alarmHigh", &exPV::getHighLimit); + exServer::ft.installReadFunc ("alarmLow", &exPV::getLowLimit); + exServer::ft.installReadFunc ("alarmHighWarning", &exPV::getHighLimit); + exServer::ft.installReadFunc ("alarmLowWarning", &exPV::getLowLimit); + exServer::ft.installReadFunc ("units", &exPV::getUnits); + exServer::ft.installReadFunc ("value", &exPV::getValue); + exServer::ft.installReadFunc ("enums", &exPV::getEnums); // // hash table size may need adjustment here? @@ -114,6 +129,13 @@ exServer::exServer(const char * const pvPrefix, unsigned aliasCount) : this->installAliasName(billy, pvAlias); } +// +// exServer::~exServer() +// +exServer::~exServer() +{ +} + // // exServer::installAliasName() // diff --git a/src/cas/example/simple/exServer.h b/src/cas/example/simple/exServer.h index 768fe2efc..84b6121b6 100644 --- a/src/cas/example/simple/exServer.h +++ b/src/cas/example/simple/exServer.h @@ -280,6 +280,7 @@ private: class exServer : public caServer { public: exServer(const char * const pvPrefix, unsigned aliasCount); + ~exServer(); void show (unsigned level) const; pvExistReturn pvExistTest (const casCtx&, const char *pPVName); pvCreateReturn createPV (const casCtx &ctx, const char *pPVName); diff --git a/src/cas/example/simple/exVectorPV.cc b/src/cas/example/simple/exVectorPV.cc index fae599277..907608819 100644 --- a/src/cas/example/simple/exVectorPV.cc +++ b/src/cas/example/simple/exVectorPV.cc @@ -216,7 +216,7 @@ caStatus exVectorPV::updateValue(gdd &valueIn) // pFE = &pF[this->info.getElementCount()]; while (pF