cmeth objrtn UnsignedShortInteger_cm_gNewWithUnsigned(object self, unsigned val) { object obj = oSuper(UnsignedShortInteger_c, gNew, self)(self); ivType *iv = ivPtr(obj); iv->iVal = (unsigned short int) val; return(obj); }
imeth objrtn ObjectPool_im_gDispose(object self) { ObjectPool_iv_t *iv = GetIVs(ObjectPool, self); object ass; while (ass = gFirst(iv->iObjects)) gDisposeObject(self, (object) gPointerValue(gKey(ass))); gDeepDispose(iv->iObjects); return oSuper(ObjectPool_c, gDispose, self)(self); }
cmeth objrtn BTreeNode_cm_gNewNode(object self, object btree, int type) { object obj = oSuper(BTreeNode_c, gNew, self)(self); accessIVsOf(obj); iv->iBTree = btree; iv->iType = type; if (!BTreeNode_cv->cData) BTreeNode_cv->cData = gNew(Constant); return obj; }
cmeth objrtn ArgumentList_cm_gNewArglist(object self, int argc, char **argv) { int i; object obj = oSuper(ArgumentList_c, gNew, self)(self); for (i=0 ; i < argc ; i++) if (argv[i][0] == '@') process_file(obj, 1+argv[i]); else gAddLast(obj, gNewWithStr(String, argv[i])); return obj; }
imeth int UnsignedShortInteger_im_gCompare(object self, object obj) { UnsignedShortInteger_iv_t *iv = GetIVs(UnsignedShortInteger, self); unsigned short sv, ov; ChkArg(obj, 2); if (ClassOf(obj) != CLASS) return oSuper(UnsignedShortInteger_c, gCompare, self)(self, obj); if ((sv=iv->iVal) < (ov=ivPtr(obj)->iVal)) return -1; else if (sv == ov) return 0; else return 1; }
imeth objrtn BTreeNode_im_gDeepDispose(object self) { BTreeNode_iv_t *iv = GetIVs(BTreeNode, self); int i; object n; for (i=0 ; i < iv->iUsed ; ++i) { if (n = iv->iKeys[i]) gDeepDispose(n); if (n = iv->iObjects[i]) gDeepDispose(n); } if (iv->iType == 1 && (n = iv->iObjects[iv->iUsed])) gDeepDispose(n); return oSuper(BTreeNode_c, gDispose, self)(self); }
cmeth objrtn InputStream_cm_gNewWithStr(object self, char *file) { object s, obj; ivType *iv; s = open_file(file, RMODE, 0); if (!s) return NULL; obj = oSuper(InputStream_c, gNew, self)(self); iv = ivPtr(obj); iv->iStream = s; iv->iBuf = Tnalloc(char, MAXBUF); *iv->iBuf = '\0'; iv->iPtr = iv->iBuf; return obj; }
imeth objrtn BufferedTempFile_im_gGCDispose(object self) { BufferedTempFile_iv_t *iv = GetIVs(BufferedTempFile, self); free(iv->iBuffer); return oSuper(BufferedTempFile_c, gDispose, self)(self); }
cmeth objrtn BufferedTempFile_cm_gOpenTempFile(object self) { return BufferedTempFile_initVars(oSuper(BufferedTempFile_c, gNew, self)(self)); }
cmeth objrtn ObjectPool_cm_gNewWithInt(object self, int siz) { return init(oSuper(ObjectPool_c, gNew, self)(self), siz); }
cmeth objrtn ObjectPool_cm_gNew(object self) { return init(oSuper(ObjectPool_c, gNew, self)(self), DFLT_SIZE); }
imeth objrtn InputStream_im_gGCDispose(object self) { InputStream_iv_t *iv = GetIVs(InputStream, self); free(iv->iBuf); return oSuper(InputStream_c, gGCDispose, self)(self); }
template <typename _ArgT> _return_t<_ArgT> operator()(_ArgT&& oArgs){ _super_t & oSuper = static_cast<_super_t&>(*this); return oSuper(std::forward<_ArgT>(oArgs)); }
template <typename ... _ArgTs> typename std::result_of<_super_t(_ArgTs...)>::type operator()(_ArgTs...oArgs){ _super_t & oSuper = static_cast<_super_t&>(*this); return oSuper(std::forward<_ArgTs>(oArgs)...); }
template <typename _ArgT> _return_t<_ArgT> operator()(_ArgT&& oArg) const{ auto & oNext = static_cast<const _next_t&>(*this); auto & oSuper = static_cast<const _super_t&>(*this); return oSuper(oNext(std::forward<_ArgT>(oArg))); }