convenience macros for checking amarg type

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@421 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 19 years ago
parent 8699b62748
commit 494641793c

@ -120,6 +120,23 @@ class AmArg
#define isArgCStr(a) (AmArg::CStr == a.getType())
#define isArgAObject(a) (AmArg::AObject == a.getType())
#define assertArgArray(a) \
if (!isArgArray(a)) \
throw AmArg::TypeMismatchException();
#define assertArgDouble(a) \
if (!isArgDouble(a)) \
throw AmArg::TypeMismatchException();
#define assertArgInt(a) \
if (!isArgInt(a)) \
throw AmArg::TypeMismatchException();
#define assertArgCStr(a) \
if (!isArgCStr(a)) \
throw AmArg::TypeMismatchException();
#define assertArgAObject(a) \
if (!isArgAObject(a)) \
throw AmArg::TypeMismatchException();
void setBorrowedPointer(ArgObject* v) {
type = AObject;
v_obj = v;

Loading…
Cancel
Save