Changeset 4427439 in tol
- Timestamp:
- Jan 17, 2011, 8:52:00 AM (16 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 11e604b
- Parents:
- 6a96b5f
- Location:
- tol/btol
- Files:
-
- 4 edited
-
bgrammar/spfuninst.cpp (modified) (1 diff)
-
code_type/codgra.cpp (modified) (1 diff)
-
code_type/tol_bcodgra.h (modified) (1 diff)
-
set_type/setgra.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/spfuninst.cpp
r6a96b5f r4427439 1093 1093 { 1094 1094 static BText _name_ = "Copy"; 1095 BSyntaxObject* result = NIL; 1096 BInt nb = BSpecialFunction::NumBranches(tre); 1097 if(BSpecialFunction::TestNumArg(_name_, 1, nb, 1)) 1098 { 1099 BSyntaxObject* toCopy = gra->EvaluateTree(Branch(tre,1)); 1100 if(toCopy) 1101 { 1095 BSyntaxObject* result = NIL; 1096 BInt nb = BSpecialFunction::NumBranches(tre); 1097 if(BSpecialFunction::TestNumArg(_name_, 1, nb, 1)) 1098 { 1099 BGrammar::IncLevel(); 1100 int stackPos = BGrammar::StackSize(); 1101 BSyntaxObject* toCopy = gra->EvaluateTree(Branch(tre,1)); 1102 if(toCopy) 1103 { 1102 1104 result = toCopy->CopyContens(); 1103 if(result!=toCopy) 1104 { 1105 SAFE_DESTROY(toCopy,result); 1106 } 1107 } 1108 } 1109 result=BSpecialFunction::TestResult(_name_,result,tre,NIL,BTRUE); 1110 return(result); 1105 } 1106 BGrammar::DestroyStackUntil(stackPos, result); 1107 BGrammar::DecLevel(); 1108 } 1109 result=BSpecialFunction::TestResult(_name_,result,tre,NIL,BTRUE); 1110 return(result); 1111 1111 } 1112 1112 -
tol/btol/code_type/codgra.cpp
r6a96b5f r4427439 47 47 { 48 48 Contens(); 49 } 50 51 //-------------------------------------------------------------------- 52 BUserFunCode::BUserFunCode() 53 //-------------------------------------------------------------------- 54 : BContensCode() 55 { 49 56 } 50 57 -
tol/btol/code_type/tol_bcodgra.h
r6a96b5f r4427439 47 47 { 48 48 public: 49 BUserFunCode(); 49 50 BUserFunCode(const BText& name, const BCode& aCode, const BText& desc); 50 51 BUserFunCode(const BText& name, BStandardOperator* opr, const BText& desc); -
tol/btol/set_type/setgra.cpp
r6a96b5f r4427439 2265 2265 BSyntaxObject* CopyCode(BSyntaxObject* obj) 2266 2266 { 2267 BCode cod; 2268 cod.Replicate(Code(obj)); 2269 return(new BContensCode("",cod,"")); 2267 BCode& cod = Code(obj); 2268 BUserFunction* opr = (BUserFunction*)cod.Operator(); 2269 if(opr) 2270 { 2271 BUserFunction* usf = new BUserFunction("",opr->Grammar()); 2272 BUserFunCode* result = usf->GetCode(); 2273 usf->PutName(opr->Name()); 2274 usf->PutDescription(opr->Description()); 2275 usf->SetExpression(opr->Declaration(), opr->Definition()); 2276 result->PutName(opr->Name()); 2277 result->PutDescription(opr->Description()); 2278 return(result); 2279 } 2280 else 2281 { 2282 Error(BText("Cannot copy Code ")<<obj->Identify()); 2283 return(NULL); 2284 } 2270 2285 }; 2271 2286 /*
Note: See TracChangeset
for help on using the changeset viewer.
