|
lasso
|
#include <Lasso.hpp>
Public Member Functions | |
| Lasso () | |
| virtual | ~Lasso () |
| AssocPair * | find_pair (void *iface0, void *iface1, bool *switched=NULL) |
| AssocPair * | find_pair (iRel_IfaceType type1, iRel_IfaceType type2, bool *switched=NULL) |
| find a pair with the right types | |
| void | find_pairs (void *iface, std::vector< AssocPair * > &iface_pairs) |
| int | insert_pair (AssocPair *this_pair) |
| int | erase_pair (AssocPair *this_pair) |
| int | set_last_error (int, const char *) |
Public Attributes | |
| int | lastErrorType |
| char | lastErrorDescription [120] |
Private Attributes | |
| std::set< AssocPair * > | assocPairs |
| Lasso::Lasso | ( | ) | [inline] |
Definition at line 15 of file Lasso.hpp.
: lastErrorType(iBase_SUCCESS) { lastErrorDescription[0] = '\0'; }
| Lasso::~Lasso | ( | ) | [virtual] |
Definition at line 4 of file Lasso.cpp.
{
for (std::set<AssocPair*>::iterator i = assocPairs.begin();
i != assocPairs.end(); ++i)
delete *i;
}
| int Lasso::erase_pair | ( | AssocPair * | this_pair | ) |
Definition at line 49 of file Lasso.cpp.
{
if (assocPairs.erase(this_pair) == 0)
return iBase_FAILURE;
// If the pair was removed, then delete it too
delete this_pair;
return iBase_SUCCESS;
}
| AssocPair * Lasso::find_pair | ( | void * | iface0, |
| void * | iface1, | ||
| bool * | switched = NULL |
||
| ) |
find a pair equivalent to these ifaces, passed as pointer to SIDL interface or interface instance
Definition at line 13 of file Lasso.cpp.
{
for (std::set<AssocPair*>::iterator i = assocPairs.begin();
i != assocPairs.end(); ++i) {
if ((*i)->equivalent(iface0, iface1, switched)) return *i;
}
return NULL;
}
| AssocPair * Lasso::find_pair | ( | iRel_IfaceType | type1, |
| iRel_IfaceType | type2, | ||
| bool * | switched = NULL |
||
| ) |
find a pair with the right types
Definition at line 24 of file Lasso.cpp.
{
for (std::set<AssocPair*>::iterator i = assocPairs.begin();
i != assocPairs.end(); ++i) {
if ((*i)->equivalent(type1, type2, switched)) return *i;
}
return NULL;
}
| void Lasso::find_pairs | ( | void * | iface, |
| std::vector< AssocPair * > & | iface_pairs | ||
| ) |
Definition at line 35 of file Lasso.cpp.
{
for (std::set<AssocPair*>::iterator i = assocPairs.begin();
i != assocPairs.end(); ++i) {
if ((*i)->contains(iface)) iface_pairs.push_back(*i);
}
}
| int Lasso::insert_pair | ( | AssocPair * | this_pair | ) |
Definition at line 43 of file Lasso.cpp.
{
assocPairs.insert(this_pair);
return iBase_SUCCESS;
}
| int Lasso::set_last_error | ( | int | code, |
| const char * | msg | ||
| ) | [inline] |
Definition at line 49 of file Lasso.hpp.
{
std::strncpy( lastErrorDescription, msg, sizeof(lastErrorDescription) );
lastErrorDescription[sizeof(lastErrorDescription)-1] = '\0';
return (lastErrorType = static_cast<iBase_ErrorType>(code));
}
std::set<AssocPair*> Lasso::assocPairs [private] |
| char Lasso::lastErrorDescription[120] |