本文整理汇总了C++中PortWriter::onCompletion方法的典型用法代码示例。如果您正苦于以下问题:C++ PortWriter::onCompletion方法的具体用法?C++ PortWriter::onCompletion怎么用?C++ PortWriter::onCompletion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PortWriter
的用法示例。
在下文中一共展示了PortWriter::onCompletion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetExternal
void resetExternal() {
if (writer!=NULL) {
writer->onCompletion();
writer = NULL;
}
external = NULL;
}
示例2: resetExternal
void resetExternal()
{
if (writer!=nullptr) {
writer->onCompletion();
writer = nullptr;
}
external = nullptr;
}
示例3: release
bool release() {
stateSema.wait();
PortWriter *cback = callback;
current = YARP_NULLPTR;
callback = YARP_NULLPTR;
stateSema.post();
if (cback!=YARP_NULLPTR) {
stateSema.wait();
outCt++;
stateSema.post();
cback->onCompletion();
}
return cback!=YARP_NULLPTR;
}
示例4: write
/**
* write something to the port
*/
bool Port::write(PortWriter& writer, PortReader& reader,
PortWriter *callback) const {
PortCoreAdapter& core = HELPER(implementation);
if (core.isInterrupted()) return false;
bool result = false;
result = core.send(writer,&reader,callback);
if (!result) {
//YARP_DEBUG(Logger::get(), e.toString() + " <<<< Port::write saw this");
if (callback!=NULL) {
callback->onCompletion();
} else {
writer.onCompletion();
}
// leave result false
}
return result;
}
示例5: write
bool Port::write(const PortWriter& writer, const PortWriter *callback) const
{
PortCoreAdapter& core = IMPL();
if (core.isInterrupted()) return false;
core.alertOnWrite();
bool result = false;
//WritableAdapter adapter(writer);
result = core.send(writer, nullptr, callback);
//writer.onCompletion();
if (!result) {
//YARP_DEBUG(Logger::get(), e.toString() + " <<<< Port::write saw this");
if (callback!=nullptr) {
callback->onCompletion();
} else {
writer.onCompletion();
}
// leave result false
}
return result;
}