diff options
author | Mark Spruiell <mes@zeroc.com> | 2017-10-03 15:15:31 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2017-10-03 15:15:31 -0700 |
commit | 3c1ed6f3c56943fa7938042f72dc20dc79f6ae2a (patch) | |
tree | 5af66030548c3250946ee68f786e60fa5bfee9c7 /matlab/src/IceMatlab/Connection.cpp | |
parent | Adding inheritance test (diff) | |
download | ice-3c1ed6f3c56943fa7938042f72dc20dc79f6ae2a.tar.bz2 ice-3c1ed6f3c56943fa7938042f72dc20dc79f6ae2a.tar.xz ice-3c1ed6f3c56943fa7938042f72dc20dc79f6ae2a.zip |
Adding more tests; checksum support
Diffstat (limited to 'matlab/src/IceMatlab/Connection.cpp')
-rw-r--r-- | matlab/src/IceMatlab/Connection.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/matlab/src/IceMatlab/Connection.cpp b/matlab/src/IceMatlab/Connection.cpp index 5e4053b033f..4e06def390c 100644 --- a/matlab/src/IceMatlab/Connection.cpp +++ b/matlab/src/IceMatlab/Connection.cpp @@ -15,7 +15,8 @@ #include "Future.h" #include "Util.h" -#define SELF (*(reinterpret_cast<shared_ptr<Ice::Connection>*>(self))) +#define DEREF(x) (*(reinterpret_cast<shared_ptr<Ice::Connection>*>(x))) +#define SELF DEREF(self) using namespace std; using namespace IceMatlab; @@ -61,7 +62,7 @@ static const char* infoFields[] = }; mxArray* -createInfo(shared_ptr<Ice::ConnectionInfo> info) +createInfo(const shared_ptr<Ice::ConnectionInfo>& info) { // // Create and return a struct array containing the fields that describe the EndpointInfo object. @@ -142,6 +143,21 @@ Ice_Connection__release(void* self) } EXPORTED_FUNCTION mxArray* +Ice_Connection_equals(void* self, void* other) +{ + assert(other); // Wrapper only calls this function for non-nil arguments. + try + { + return createResultValue(createBool(SELF == DEREF(other))); + } + catch(const std::exception& ex) + { + return createResultException(convertException(ex)); + } + return 0; +} + +EXPORTED_FUNCTION mxArray* Ice_Connection_close(void* self, mxArray* m) { try |