Skip to content
Snippets Groups Projects
Commit f27d8e8c authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

several fixes for Void data type

parent ab345855
No related branches found
No related tags found
No related merge requests found
......@@ -186,7 +186,7 @@ namespace ChimeraTK {
using MapOfVar = std::unordered_map<std::string, Var<T>>;
/** Type-depending map of vectors of variables */
ChimeraTK::TemplateUserTypeMap<MapOfVar> variableMap;
ChimeraTK::TemplateUserTypeMapNoVoid<MapOfVar> variableMap;
/** Define type for map of std::string to Array, so we can put it into the
* TemplateUserTypeMap */
......@@ -194,11 +194,11 @@ namespace ChimeraTK {
using MapOfArray = std::unordered_map<std::string, Array<T>>;
/** Type-depending map of vectors of arrays */
ChimeraTK::TemplateUserTypeMap<MapOfArray> arrayMap;
ChimeraTK::TemplateUserTypeMapNoVoid<MapOfArray> arrayMap;
/** Map assigning string type identifyers to C++ types */
ChimeraTK::SingleTypeUserTypeMap<const char*> typeMap{"int8", "uint8", "int16", "uint16", "int32", "uint32",
"int64", "uint64", "float", "double", "string", "boolean", "void"};
ChimeraTK::SingleTypeUserTypeMapNoVoid<const char*> typeMap{"int8", "uint8", "int16", "uint16", "int32", "uint32",
"int64", "uint64", "float", "double", "string", "boolean"};
/** Implementation of get() which can be overloaded for scalars and vectors.
* The second argument is a dummy only to distinguish the two overloaded
......
......@@ -165,7 +165,7 @@ namespace ChimeraTK { namespace history {
* created by the AccessorAttacher. */
template<typename UserType>
using AccessorList = std::list<std::pair<ArrayPushInput<UserType>, HistoryEntry<UserType>>>;
TemplateUserTypeMap<AccessorList> _accessorListMap;
TemplateUserTypeMapNoVoid<AccessorList> _accessorListMap;
/** boost::fusion::map of UserTypes to std::lists containing the names of the
* accessors. Technically there would be no need to use TemplateUserTypeMap
......@@ -174,7 +174,7 @@ namespace ChimeraTK { namespace history {
* is used here. */
template<typename UserType>
using NameList = std::list<std::string>;
TemplateUserTypeMap<NameList> _nameListMap;
TemplateUserTypeMapNoVoid<NameList> _nameListMap;
/** Overall variable name list, used to detect name collisions */
std::list<std::string> _overallVariableList;
......
......@@ -40,7 +40,7 @@ namespace ChimeraTK {
Application::getInstance().testFacilityRunApplicationCalled = true;
// send default values for all control system variables
for(auto& pv : pvManager->getAllProcessVariables()) {
callForType(pv->getValueType(), [&pv, this](auto arg) {
callForTypeNoVoid(pv->getValueType(), [&pv, this](auto arg) {
// Applies only to writeable variables. @todo FIXME It should also NOT apply for application-to-controlsystem
// variables with a return channel, despite being writeable here!
if(!pv->isWriteable()) return;
......@@ -92,7 +92,7 @@ namespace ChimeraTK {
if(Application::getInstance().isTestableModeEnabled()) {
for(auto& pv : pvManager->getAllProcessVariables()) {
if(!pv->isReadable()) continue;
callForType(pv->getValueType(), [&](auto t) {
callForTypeNoVoid(pv->getValueType(), [&](auto t) {
typedef decltype(t) UserType;
this->getArray<UserType>(pv->getName()).readNonBlocking();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment