MCPcopy Create free account
hub / github.com/audeering/opensmile / registerWriteRequest

Method registerWriteRequest

src/core/dataMemory.cpp:92–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void cDataMemory::registerWriteRequest(const char *lvl, const char *componentInstName)
93{
94 if (lvl == NULL) return;
95
96 // check if the same component attempts to register twice (which is ok), or if two components want to write to the same level!!
97 for (const auto &rq : wrq) {
98 if (!strcmp(lvl,rq.levelName)) {
99 if (!strcmp(rq.instanceName,componentInstName)) {
100 return; // ignore duplicate request from the same component
101 } else {
102 // it's likely another component wanting to write to the same level...
103 COMP_ERR("two components cannot write to the same level: '%s', component1='%s', component2='%s'",lvl,rq.instanceName,componentInstName);
104 }
105 }
106 }
107
108 // add request to list
109 wrq.emplace_back(componentInstName, lvl);
110
111 SMILE_DBG(2,"registerWriteRequest: registered write request for level '%s' by component instance '%s'",lvl,componentInstName);
112}
113
114/* add a new level with given _lcfg parameters */
115int cDataMemory::addLevel(sDmLevelConfig *_lcfg, const char *_name)

Callers 1

myRegisterInstanceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected