virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,0); size_t sz=ewsl.ci1.nbp[StackState1::SBASE_THIS].ref<StringBuffer<T> >().size(); ewsl.ci0.nbx[1].reset((int64_t)sz); return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,0); ewsl.ci1.nbp[StackState1::SBASE_THIS].ref<StringBuffer<T> >().clear(); ewsl.ci0.nbx[1]=ewsl.ci1.nbp[StackState1::SBASE_THIS]; return 1; }
virtual int __fun_call(Executor& ewsl, int pm) { ewsl.check_pmc(this, pm, 1); bool f1 = variant_cast<bool>(ewsl.ci0.nbx[1]); ewsl.ci0.nbx[1].reset(!f1); return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,1); String fp=ewsl.ci0.nbx[1].get<String>(); ewsl.ci0.nbx[1].reset(ewsl.ci1.nbp[StackState1::SBASE_THIS].get<Stream>().send_all(fp.c_str(),fp.size())); return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,1,2); String fp=ewsl.ci0.nbx[1].get<String>(); int fg= pm>1 ? variant_cast<int>(ewsl.ci0.nbx[2]):0; ewsl.ci1.nbp[StackState1::SBASE_THIS].ref<Stream>().open(fp,fg); ewsl.ci0.nbx[1]=ewsl.ci1.nbp[StackState1::SBASE_THIS]; return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,1,2); String filename=ewsl.make_path(variant_cast<String>(ewsl.ci0.nbx[1])); int type=pm>1?variant_cast<int>(ewsl.ci0.nbx[2]):FILE_TYPE_BINARY; bool flag=ewsl.ci1.nbp[StackState1::SBASE_THIS].ref<StringBuffer<T> >().save(filename,type); ewsl.ci0.nbx[1].reset(flag); return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,2); String fp=ewsl.ci0.nbx[1].get<String>(); int fg= variant_cast<int>(ewsl.ci0.nbx[2]); bool flag=ewsl.ci1.nbp[StackState1::SBASE_THIS].ref<Stream>().connect(fp,fg); flag=flag; ewsl.ci0.nbx[1]=ewsl.ci1.nbp[StackState1::SBASE_THIS]; return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this,pm,1); CallableData* q=ewsl.ci1.nsp[0].kptr(); if(q && q->GetRef()>1) { ewsl.ci1.nsp[0].kptr(q->Clone(1)); } return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,1); String fp=ewsl.ci0.nbx[1].get<String>(); bool flag=ewsl.ci1.nbp[StackState1::SBASE_THIS].ref<Stream>().write_to_file(fp); flag=flag; ewsl.ci0.nbx[1].reset(flag); return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this,pm,1); String *p=ewsl.ci0.nbx[1].ptr<String>(); if(p) { } else { this_logger().LogTrace("not string"); } return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,0); CallableWrapT<Stream>* p=dynamic_cast<CallableWrapT<Stream>*>(ewsl.ci1.nbp[StackState1::SBASE_THIS].kptr()); if(!p) ewsl.kerror("invalid stream"); String val; if(p->getline(val)) { ewsl.ci0.nbx[1].reset(val); } else { ewsl.ci0.nbx[1].clear(); } return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this,pm,1,2); int type=Executor::INDIRECT_FILE; if(pm==2) { type=variant_cast<int>(ewsl.ci0.nbx[2]); } String p=ewsl.ci0.nbx[1].get<String>(); if (ewsl.prepare(p, type)) { ewsl.ci0.nbx[1] = *ewsl.ci1.nsp; return 1; } ewsl.kerror("load_ewsl error"); return 0; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this,pm,3); CallableCode* pInst=dynamic_cast<CallableCode*>(ewsl.ci1.nsp[-2].kptr()); if(!pInst) { ewsl.kerror("first param must be userfunction"); } size_t nLLvar=(size_t)ewsl.ci1.nsp[-1].ref<int64_t>(); if(nLLvar>=pInst->aLLVar.size()) { ewsl.kerror("invalid local param position"); } pInst->aLLVar[nLLvar]=ewsl.ci1.nsp[0]; return 1; }
virtual int __fun_call(Executor& ewsl, int pm) { ewsl.check_pmc(this, pm, 1,2); String *p = ewsl.ci0.nbx[1].ptr<String>(); if (p) { bool reload=false; if (pm == 2) reload = variant_cast<bool>(ewsl.ci0.nbx[2]); CG_GGVar::current().import(*p,reload); ewsl.ci0.nbx[1] = ewsl.tb0[*p]; } else { Exception::XError("invalid module name"); } return 1; }
int CallableFunctionReshape::__fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this,pm,2,7); return do_apply(ewsl,ewsl.ci0.nbx[1],ewsl.ci0.nbx+2,pm-1); }
virtual int __fun_call(Executor& ewsl, int pm) { ewsl.check_pmc(this, pm, 2); ewsl.ci0.nbx[1].reset<bool>(ewsl.ci0.nbx[1].kptr() == ewsl.ci0.nbx[2].kptr()); return 1; }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this,pm,1); ewsl.ci1.nsp[0].reset<int64_t>(ewsl.ci1.nsp[0].type()); return 1; }
int CallableFunctionArrayLength::__fun_call(Executor& ewsl, int pm) { ewsl.check_pmc(this, pm, 1); return do_apply(ewsl, ewsl.ci0.nbx[1]); }
int CallableFunctionReverse::__fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this,pm,1); return do_apply(ewsl,*ewsl.ci1.nsp); }
virtual int __fun_call(Executor& ewsl,int pm) { ewsl.check_pmc(this, pm,0); ewsl.ci1.nbp[StackState1::SBASE_THIS].ref<Stream>().writer().flush(); return 0; }