Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
#include <Lasso.hpp>
Public Member Functions | |
Lasso () | |
virtual | ~Lasso () |
AssocPair * | 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 | |
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.
References lastErrorDescription.
: lastErrorType( iBase_SUCCESS ) { lastErrorDescription[0] = '\0'; }
Lasso::~Lasso | ( | ) | [virtual] |
Definition at line 4 of file Lasso.cpp.
References assocPairs.
{ for( std::set< AssocPair* >::iterator i = assocPairs.begin(); i != assocPairs.end(); ++i ) delete *i; }
int Lasso::erase_pair | ( | AssocPair * | this_pair | ) |
Definition at line 47 of file Lasso.cpp.
References assocPairs, iBase_FAILURE, and iBase_SUCCESS.
{ 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 12 of file Lasso.cpp.
References assocPairs.
{ 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 23 of file Lasso.cpp.
References assocPairs.
{ 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 33 of file Lasso.cpp.
References assocPairs.
{ 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 41 of file Lasso.cpp.
References assocPairs, and iBase_SUCCESS.
{ assocPairs.insert( this_pair ); return iBase_SUCCESS; }
int Lasso::set_last_error | ( | int | code, |
const char * | msg | ||
) | [inline] |
Definition at line 48 of file Lasso.hpp.
References lastErrorDescription, and lastErrorType.
{ std::strncpy( lastErrorDescription, msg, sizeof( lastErrorDescription ) ); lastErrorDescription[sizeof( lastErrorDescription ) - 1] = '\0'; return ( lastErrorType = static_cast< iBase_ErrorType >( code ) ); }
std::set< AssocPair* > Lasso::assocPairs [private] |
Definition at line 39 of file Lasso.hpp.
Referenced by erase_pair(), find_pair(), find_pairs(), insert_pair(), and ~Lasso().
char Lasso::lastErrorDescription[120] |
Definition at line 36 of file Lasso.hpp.
Referenced by Lasso(), and set_last_error().
Definition at line 35 of file Lasso.hpp.
Referenced by set_last_error().