Esempio n. 1
0
 ForwardingCarrier(SharedLibraryClassFactory<Carrier> *factory,
                   Carrier *owner) :
     factory(factory),
     owner(owner)
 {
     factory->addRef();
     car.open(*factory);
 }
Esempio n. 2
0
 virtual ~ForwardingCarrier() {
     car.close();
     if (!factory) return;
     factory->removeRef();
     if (factory->getReferenceCount()<=0) {
         delete factory;
     }
     factory = YARP_NULLPTR;
 }
Esempio n. 3
0
 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());
     }
 }
Esempio n. 4
0
 void init() {
     YarpPluginSelector selector;
     selector.scan();
     settings.setSelector(selector);
     if (plugin.open(settings)) {
         dev.open(*plugin.getFactory());
         settings.setLibraryMethodName(plugin.getFactory()->getName(),
                                       settings.getMethodName());
     }
 }
Esempio n. 5
0
 bool isValid() {
     return car.isValid();
 }
Esempio n. 6
0
 virtual Carrier& getContent() {
     return car.getContent();
 }
Esempio n. 7
0
 DeviceDriver *getImplementation() override {
     return &dev.getContent();
 }
Esempio n. 8
0
 virtual bool close() override {
     if (!isValid()) return false;
     return dev.getContent().close();
 }
Esempio n. 9
0
 virtual bool open(yarp::os::Searchable& config) override {
     if (!isValid()) return false;
     return dev.getContent().open(config);
 }
Esempio n. 10
0
 bool isValid() const {
     return dev.isValid();
 }
Esempio n. 11
0
 bool isValid() {
     return dev.isValid();
 }