iCub-main
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DataBase Class Reference
+ Inheritance diagram for DataBase:

Classes

struct  Condition
 
struct  Item
 

Public Member Functions

 DataBase ()
 
 ~DataBase ()
 
void configure (ResourceFinder &rf)
 
void setBroadcastPort (BufferedPort< Bottle > &broadcastPort)
 
void load ()
 
void save ()
 
void dump ()
 
void broadcast (const string &type)
 
bool add (Bottle *content)
 
bool remove (Bottle *content)
 
bool get (Bottle *content, Bottle &response)
 
bool set (Bottle *content, const string &agent)
 
bool lock (Bottle *content, const string &agent)
 
bool unlock (Bottle *content, const string &agent)
 
bool owner (Bottle *content, Bottle &response)
 
bool time (Bottle *content, Bottle &response)
 
bool ask (Bottle *content, Bottle &response)
 
void periodicHandler (const double dt)
 
bool isQuitting () const
 
void respond (ConnectionReader &connection, const Bottle &command, Bottle &reply)
 
bool modify (const Bottle &content)
 

Protected Member Functions

void clear ()
 
void eraseItem (map< int, Item >::iterator &it)
 
void write (FILE *stream)
 
bool recursiveCheck (Property *item, deque< Condition > &condList, deque< string > &opList, const unsigned int i=0)
 
void run ()
 

Protected Attributes

ResourceFinder * rf
 
map< int, ItemitemsMap
 
mutex mtx
 
int idCnt
 
bool initialized
 
bool nosavedb
 
bool quitting
 
BufferedPort< Bottle > * pBroadcastPort
 
bool asyncBroadcast
 

Detailed Description

Definition at line 399 of file main.cpp.

Constructor & Destructor Documentation

◆ DataBase()

DataBase::DataBase ( )
inline

Definition at line 514 of file main.cpp.

◆ ~DataBase()

DataBase::~DataBase ( )
inline

Definition at line 525 of file main.cpp.

Member Function Documentation

◆ add()

bool DataBase::add ( Bottle *  content)
inline

Definition at line 687 of file main.cpp.

◆ ask()

bool DataBase::ask ( Bottle *  content,
Bottle &  response 
)
inline

Definition at line 965 of file main.cpp.

◆ broadcast()

void DataBase::broadcast ( const string &  type)
inline

Definition at line 658 of file main.cpp.

◆ clear()

void DataBase::clear ( )
inlineprotected

Definition at line 434 of file main.cpp.

◆ configure()

void DataBase::configure ( ResourceFinder &  rf)
inline

Definition at line 535 of file main.cpp.

◆ dump()

void DataBase::dump ( )
inline

Definition at line 646 of file main.cpp.

◆ eraseItem()

void DataBase::eraseItem ( map< int, Item >::iterator &  it)
inlineprotected

Definition at line 443 of file main.cpp.

◆ get()

bool DataBase::get ( Bottle *  content,
Bottle &  response 
)
inline

Definition at line 755 of file main.cpp.

◆ isQuitting()

bool DataBase::isQuitting ( ) const
inline

Definition at line 1107 of file main.cpp.

◆ load()

void DataBase::load ( )
inline

Definition at line 568 of file main.cpp.

◆ lock()

bool DataBase::lock ( Bottle *  content,
const string &  agent 
)
inline

Definition at line 848 of file main.cpp.

◆ modify()

bool DataBase::modify ( const Bottle &  content)
inline

Definition at line 1411 of file main.cpp.

◆ owner()

bool DataBase::owner ( Bottle *  content,
Bottle &  response 
)
inline

Definition at line 906 of file main.cpp.

◆ periodicHandler()

void DataBase::periodicHandler ( const double  dt)
inline

Definition at line 1077 of file main.cpp.

◆ recursiveCheck()

bool DataBase::recursiveCheck ( Property *  item,
deque< Condition > &  condList,
deque< string > &  opList,
const unsigned int  i = 0 
)
inlineprotected

Definition at line 459 of file main.cpp.

◆ remove()

bool DataBase::remove ( Bottle *  content)
inline

Definition at line 706 of file main.cpp.

◆ respond()

void DataBase::respond ( ConnectionReader &  connection,
const Bottle &  command,
Bottle &  reply 
)
inline

Definition at line 1113 of file main.cpp.

◆ run()

void DataBase::run ( void  )
inlineprotected

Definition at line 507 of file main.cpp.

◆ save()

void DataBase::save ( )
inline

Definition at line 627 of file main.cpp.

◆ set()

bool DataBase::set ( Bottle *  content,
const string &  agent 
)
inline

Definition at line 798 of file main.cpp.

◆ setBroadcastPort()

void DataBase::setBroadcastPort ( BufferedPort< Bottle > &  broadcastPort)
inline

Definition at line 562 of file main.cpp.

◆ time()

bool DataBase::time ( Bottle *  content,
Bottle &  response 
)
inline

Definition at line 933 of file main.cpp.

◆ unlock()

bool DataBase::unlock ( Bottle *  content,
const string &  agent 
)
inline

Definition at line 877 of file main.cpp.

◆ write()

void DataBase::write ( FILE *  stream)
inlineprotected

Definition at line 450 of file main.cpp.

Member Data Documentation

◆ asyncBroadcast

bool DataBase::asyncBroadcast
protected

Definition at line 431 of file main.cpp.

◆ idCnt

int DataBase::idCnt
protected

Definition at line 425 of file main.cpp.

◆ initialized

bool DataBase::initialized
protected

Definition at line 426 of file main.cpp.

◆ itemsMap

map<int,Item> DataBase::itemsMap
protected

Definition at line 423 of file main.cpp.

◆ mtx

mutex DataBase::mtx
protected

Definition at line 424 of file main.cpp.

◆ nosavedb

bool DataBase::nosavedb
protected

Definition at line 427 of file main.cpp.

◆ pBroadcastPort

BufferedPort<Bottle>* DataBase::pBroadcastPort
protected

Definition at line 430 of file main.cpp.

◆ quitting

bool DataBase::quitting
protected

Definition at line 428 of file main.cpp.

◆ rf

ResourceFinder* DataBase::rf
protected

Definition at line 422 of file main.cpp.


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