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 ()
 
NodegetNode (std::string appName)
 
const ModulePContainergetSelModules ()
 
const CnnContainergetSelConnection ()
 
const ResourcePContainergetSelResources ()
 
const ApplicaitonPContainergetSelApplications ()
 
const ApplicaitonPContainergetApplications (Application *parent=nullptr)
 
const ModulePContainergetModules (Application *parent=nullptr)
 
const ResourcePContainergetResources (Application *parent=nullptr)
 
const CnnContainergetConnections (Application *parent=nullptr)
 
const ArbContainergetArbitrators (Application *parent=nullptr)
 
const InputContainergetInputCandidates (OutputData *output)
 
const OutputContainergetOutputCandidates (InputData *input)
 
ModulegetModule (const char *szName)
 
ApplicationgetApplication ()
 
ApplicationgetApplication (const char *szName)
 
GenericResourcegetResource (const char *szName)
 
ModuleaddIModuleToApplication (Application *application, ModuleInterface &mod, bool isNew=false)
 
bool removeIModuleFromApplication (Application *application, const char *szTag)
 
ConnectionaddConnectionToApplication (Application *application, Connection &cnn)
 
bool removeConnectionFromApplication (Application *application, Connection &cnn)
 
bool updateConnectionOfApplication (Application *application, Connection &prev, Connection &con)
 
ApplicationaddIApplicationToApplication (Application *application, ApplicationInterface &app, bool isNew=false)
 
bool removeIApplicationFromApplication (Application *application, const char *szTag)
 
ArbitratoraddArbitratorToApplication (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 36 of file kbase.h.

Constructor & Destructor Documentation

◆ KnowledgeBase()

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

Definition at line 39 of file kbase.h.

◆ ~KnowledgeBase()

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

Definition at line 46 of file kbase.h.

Member Function Documentation

◆ addApplication()

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

Definition at line 77 of file kbase.cpp.

◆ addArbitratorToApplication()

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

Definition at line 563 of file kbase.cpp.

◆ addConnectionToApplication()

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

Definition at line 545 of file kbase.cpp.

◆ addIApplicationToApplication()

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

Definition at line 643 of file kbase.cpp.

◆ addIModuleToApplication()

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

Definition at line 700 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 1578 of file kbase.cpp.

◆ createFrom()

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

Clearing graph

Loading modules

Loading applications

Definition at line 23 of file kbase.cpp.

◆ exportAppGraph()

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

Definition at line 117 of file kbase.h.

◆ exportKbGraph()

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

Definition at line 120 of file kbase.h.

◆ getApplication() [1/2]

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

Definition at line 88 of file kbase.h.

◆ getApplication() [2/2]

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

Definition at line 90 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 296 of file kbase.cpp.

◆ getConnections()

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

Definition at line 242 of file kbase.cpp.

◆ getInputCandidates()

const InputContainer & KnowledgeBase::getInputCandidates ( OutputData output)

Definition at line 308 of file kbase.cpp.

◆ getModule()

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

Definition at line 85 of file kbase.h.

◆ getModules()

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

Definition at line 215 of file kbase.cpp.

◆ getNode()

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

Definition at line 1607 of file kbase.cpp.

◆ getOutputCandidates()

const OutputContainer & KnowledgeBase::getOutputCandidates ( InputData input)

Definition at line 320 of file kbase.cpp.

◆ getResource()

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

Definition at line 93 of file kbase.h.

◆ getResources()

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

Definition at line 256 of file kbase.cpp.

◆ getSelApplications()

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

Definition at line 74 of file kbase.h.

◆ getSelConnection()

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

Definition at line 72 of file kbase.h.

◆ getSelModules()

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

Definition at line 71 of file kbase.h.

◆ getSelResources()

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

Definition at line 73 of file kbase.h.

◆ getUniqueAppID()

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

Definition at line 633 of file kbase.cpp.

◆ reasolveDependency() [1/2]

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

Definition at line 885 of file kbase.cpp.

◆ reasolveDependency() [2/2]

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

Definition at line 868 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 609 of file kbase.cpp.

◆ removeConnectionFromApplication()

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

Definition at line 617 of file kbase.cpp.

◆ removeIApplicationFromApplication()

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

Definition at line 779 of file kbase.cpp.

◆ removeIModuleFromApplication()

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

Definition at line 759 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 1263 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 491 of file kbase.cpp.

◆ setModulePrefix()

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

Definition at line 452 of file kbase.cpp.

◆ updateConnectionOfApplication()

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

Definition at line 581 of file kbase.cpp.


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