YARP
Yet Another Robot Platform
yarp::manager::KnowledgeBase Class Reference

Class KnowledgeBase. More...

#include <yarp/manager/kbase.h>

Public Member Functions

 KnowledgeBase ()
 
virtual ~KnowledgeBase ()
 
bool createFrom (ModuleLoader *_mloader, AppLoader *_apploader, ResourceLoader *_resloader)
 
bool addApplication (Application *application, char **szAppName_=nullptr, bool modifyName=false)
 
bool addModule (Module *module)
 
bool addResource (GenericResource *resource)
 
bool removeApplication (Application *application)
 
bool removeModule (Module *module)
 
bool removeResource (GenericResource *resource)
 
bool reasolveDependency (const char *szName, bool bAutoDependancy=false, bool bSilent=false)
 
bool reasolveDependency (Application *app, bool bAutoDependancy=false, bool bSilent=false)
 
bool checkConsistency ()
 
Node * getNode (std::string appName)
 
const ModulePContainer & getSelModules ()
 
const CnnContainer & getSelConnection ()
 
const ResourcePContainer & getSelResources ()
 
const ApplicaitonPContainer & getSelApplications ()
 
const ApplicaitonPContainer & getApplications (Application *parent=nullptr)
 
const ModulePContainer & getModules (Application *parent=nullptr)
 
const ResourcePContainer & getResources (Application *parent=nullptr)
 
const CnnContainer & getConnections (Application *parent=nullptr)
 
const ArbContainer & getArbitrators (Application *parent=nullptr)
 
const InputContainer & getInputCandidates (OutputData *output)
 
const OutputContainer & getOutputCandidates (InputData *input)
 
Module * getModule (const char *szName)
 
Application * getApplication ()
 
Application * getApplication (const char *szName)
 
GenericResource * getResource (const char *szName)
 
Module * addIModuleToApplication (Application *application, ModuleInterface &mod, bool isNew=false)
 
bool removeIModuleFromApplication (Application *application, const char *szTag)
 
Connection & addConnectionToApplication (Application *application, Connection &cnn)
 
bool removeConnectionFromApplication (Application *application, Connection &cnn)
 
bool updateConnectionOfApplication (Application *application, Connection &prev, Connection &con)
 
Application * addIApplicationToApplication (Application *application, ApplicationInterface &app, bool isNew=false)
 
bool removeIApplicationFromApplication (Application *application, const char *szTag)
 
Arbitrator & addArbitratorToApplication (Application *application, Arbitrator &arb)
 
bool removeArbitratorFromApplication (Application *application, Arbitrator &arb)
 
bool setModulePrefix (Module *module, const char *szPrefix, bool updateBasePrefix=true)
 
bool setApplicationPrefix (Application *app, const char *szPrefix, bool updateBasePref=true)
 
bool saveApplication (AppSaver *appSaver, Application *application)
 
const std::string getUniqueAppID (Application *parent, const char *szAppName)
 
bool exportAppGraph (const char *szFileName)
 
bool exportKbGraph (const char *szFileName)
 

Detailed Description

Class KnowledgeBase.

Definition at line 32 of file kbase.h.

Constructor & Destructor Documentation

◆ KnowledgeBase()

yarp::manager::KnowledgeBase::KnowledgeBase ( )
inline

Definition at line 35 of file kbase.h.

◆ ~KnowledgeBase()

virtual yarp::manager::KnowledgeBase::~KnowledgeBase ( )
inlinevirtual

Definition at line 42 of file kbase.h.

Member Function Documentation

◆ addApplication()

bool KnowledgeBase::addApplication ( Application *  application,
char **  szAppName_ = nullptr,
bool  modifyName = false 
)

Definition at line 76 of file kbase.cpp.

◆ addArbitratorToApplication()

Arbitrator & KnowledgeBase::addArbitratorToApplication ( Application *  application,
Arbitrator &  arb 
)

Definition at line 580 of file kbase.cpp.

◆ addConnectionToApplication()

Connection & KnowledgeBase::addConnectionToApplication ( Application *  application,
Connection &  cnn 
)

Definition at line 562 of file kbase.cpp.

◆ addIApplicationToApplication()

Application * KnowledgeBase::addIApplicationToApplication ( Application *  application,
ApplicationInterface &  app,
bool  isNew = false 
)

Definition at line 661 of file kbase.cpp.

◆ addIModuleToApplication()

Module * KnowledgeBase::addIModuleToApplication ( Application *  application,
ModuleInterface &  mod,
bool  isNew = false 
)

Definition at line 719 of file kbase.cpp.

◆ addModule()

bool KnowledgeBase::addModule ( Module *  module)

Definition at line 120 of file kbase.cpp.

◆ addResource()

bool KnowledgeBase::addResource ( GenericResource *  resource)

Definition at line 144 of file kbase.cpp.

◆ checkConsistency()

bool KnowledgeBase::checkConsistency ( )

check whether there is at least one application

check whether any modules are listed in the application any application should have at list one module

Definition at line 1635 of file kbase.cpp.

◆ createFrom()

bool KnowledgeBase::createFrom ( ModuleLoader *  _mloader,
AppLoader *  _apploader,
ResourceLoader *  _resloader 
)

Clearing graph

Loading modules

Loading applications

Definition at line 19 of file kbase.cpp.

◆ exportAppGraph()

bool yarp::manager::KnowledgeBase::exportAppGraph ( const char *  szFileName)
inline

Definition at line 113 of file kbase.h.

◆ exportKbGraph()

bool yarp::manager::KnowledgeBase::exportKbGraph ( const char *  szFileName)
inline

Definition at line 116 of file kbase.h.

◆ getApplication() [1/2]

Application * yarp::manager::KnowledgeBase::getApplication ( )
inline

Definition at line 84 of file kbase.h.

◆ getApplication() [2/2]

Application * yarp::manager::KnowledgeBase::getApplication ( const char *  szName)
inline

Definition at line 86 of file kbase.h.

◆ getApplications()

const ApplicaitonPContainer & KnowledgeBase::getApplications ( Application *  parent = nullptr)

Definition at line 188 of file kbase.cpp.

◆ getArbitrators()

const ArbContainer & KnowledgeBase::getArbitrators ( Application *  parent = nullptr)

Definition at line 305 of file kbase.cpp.

◆ getConnections()

const CnnContainer & KnowledgeBase::getConnections ( Application *  parent = nullptr)

Definition at line 246 of file kbase.cpp.

◆ getInputCandidates()

const InputContainer & KnowledgeBase::getInputCandidates ( OutputData *  output)

Definition at line 318 of file kbase.cpp.

◆ getModule()

Module * yarp::manager::KnowledgeBase::getModule ( const char *  szName)
inline

Definition at line 81 of file kbase.h.

◆ getModules()

const ModulePContainer & KnowledgeBase::getModules ( Application *  parent = nullptr)

Definition at line 217 of file kbase.cpp.

◆ getNode()

Node * KnowledgeBase::getNode ( std::string  appName)

Definition at line 1664 of file kbase.cpp.

◆ getOutputCandidates()

const OutputContainer & KnowledgeBase::getOutputCandidates ( InputData *  input)

Definition at line 331 of file kbase.cpp.

◆ getResource()

GenericResource * yarp::manager::KnowledgeBase::getResource ( const char *  szName)
inline

Definition at line 89 of file kbase.h.

◆ getResources()

const ResourcePContainer & KnowledgeBase::getResources ( Application *  parent = nullptr)

Definition at line 261 of file kbase.cpp.

◆ getSelApplications()

const ApplicaitonPContainer & yarp::manager::KnowledgeBase::getSelApplications ( )
inline

Definition at line 70 of file kbase.h.

◆ getSelConnection()

const CnnContainer & yarp::manager::KnowledgeBase::getSelConnection ( )
inline

Definition at line 68 of file kbase.h.

◆ getSelModules()

const ModulePContainer & yarp::manager::KnowledgeBase::getSelModules ( )
inline

Definition at line 67 of file kbase.h.

◆ getSelResources()

const ResourcePContainer & yarp::manager::KnowledgeBase::getSelResources ( )
inline

Definition at line 69 of file kbase.h.

◆ getUniqueAppID()

const std::string KnowledgeBase::getUniqueAppID ( Application *  parent,
const char *  szAppName 
)

Definition at line 650 of file kbase.cpp.

◆ reasolveDependency() [1/2]

bool KnowledgeBase::reasolveDependency ( Application *  app,
bool  bAutoDependancy = false,
bool  bSilent = false 
)

Definition at line 911 of file kbase.cpp.

◆ reasolveDependency() [2/2]

bool KnowledgeBase::reasolveDependency ( const char *  szName,
bool  bAutoDependancy = false,
bool  bSilent = false 
)

Definition at line 894 of file kbase.cpp.

◆ removeApplication()

bool KnowledgeBase::removeApplication ( Application *  application)

Definition at line 172 of file kbase.cpp.

◆ removeArbitratorFromApplication()

bool KnowledgeBase::removeArbitratorFromApplication ( Application *  application,
Arbitrator &  arb 
)

Definition at line 626 of file kbase.cpp.

◆ removeConnectionFromApplication()

bool KnowledgeBase::removeConnectionFromApplication ( Application *  application,
Connection &  cnn 
)

Definition at line 634 of file kbase.cpp.

◆ removeIApplicationFromApplication()

bool KnowledgeBase::removeIApplicationFromApplication ( Application *  application,
const char *  szTag 
)

Definition at line 800 of file kbase.cpp.

◆ removeIModuleFromApplication()

bool KnowledgeBase::removeIModuleFromApplication ( Application *  application,
const char *  szTag 
)

Definition at line 779 of file kbase.cpp.

◆ removeModule()

bool KnowledgeBase::removeModule ( Module *  module)

Definition at line 177 of file kbase.cpp.

◆ removeResource()

bool KnowledgeBase::removeResource ( GenericResource *  resource)

Definition at line 182 of file kbase.cpp.

◆ saveApplication()

bool KnowledgeBase::saveApplication ( AppSaver *  appSaver,
Application *  application 
)

Definition at line 1304 of file kbase.cpp.

◆ setApplicationPrefix()

bool KnowledgeBase::setApplicationPrefix ( Application *  app,
const char *  szPrefix,
bool  updateBasePref = true 
)

updating nested application's and module's prefixs

updating connections with application prefix

Definition at line 507 of file kbase.cpp.

◆ setModulePrefix()

bool KnowledgeBase::setModulePrefix ( Module *  module,
const char *  szPrefix,
bool  updateBasePrefix = true 
)

Definition at line 467 of file kbase.cpp.

◆ updateConnectionOfApplication()

bool KnowledgeBase::updateConnectionOfApplication ( Application *  application,
Connection &  prev,
Connection &  con 
)

Definition at line 598 of file kbase.cpp.


The documentation for this class was generated from the following files: