本文整理汇总了C++中SharedLibraryClass类的典型用法代码示例。如果您正苦于以下问题:C++ SharedLibraryClass类的具体用法?C++ SharedLibraryClass怎么用?C++ SharedLibraryClass使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SharedLibraryClass类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ForwardingCarrier
ForwardingCarrier(SharedLibraryClassFactory<Carrier> *factory,
Carrier *owner) :
factory(factory),
owner(owner)
{
factory->addRef();
car.open(*factory);
}
示例2:
virtual ~ForwardingCarrier() {
car.close();
if (!factory) return;
factory->removeRef();
if (factory->getReferenceCount()<=0) {
delete factory;
}
factory = YARP_NULLPTR;
}
示例3: init
void init() {
if (plugin.open(settings)) {
dev.open(*plugin.getFactory());
settings.setLibraryMethodName(plugin.getFactory()->getName(),
settings.getMethodName());
settings.setClassInfo(plugin.getFactory()->getClassName(),
plugin.getFactory()->getBaseClassName());
}
}
示例4: init
void init() {
YarpPluginSelector selector;
selector.scan();
settings.setSelector(selector);
if (plugin.open(settings)) {
dev.open(*plugin.getFactory());
settings.setLibraryMethodName(plugin.getFactory()->getName(),
settings.getMethodName());
}
}
示例5: isValid
bool isValid() {
return car.isValid();
}
示例6: getContent
virtual Carrier& getContent() {
return car.getContent();
}
示例7:
DeviceDriver *getImplementation() override {
return &dev.getContent();
}
示例8: close
virtual bool close() override {
if (!isValid()) return false;
return dev.getContent().close();
}
示例9: open
virtual bool open(yarp::os::Searchable& config) override {
if (!isValid()) return false;
return dev.getContent().open(config);
}
示例10: isValid
bool isValid() const {
return dev.isValid();
}
示例11: isValid
bool isValid() {
return dev.isValid();
}