=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/kclass.h,v retrieving revision 1.2 retrieving revision 1.5 diff -u -p -r1.2 -r1.5 --- OpenXM/src/kan96xx/Kan/kclass.h 2000/01/16 07:55:39 1.2 +++ OpenXM/src/kan96xx/Kan/kclass.h 2003/12/06 02:49:22 1.5 @@ -1,4 +1,4 @@ -/* $OpenXM$ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/kclass.h,v 1.4 2003/11/21 02:39:10 takayama Exp $ */ /* kclass.h 1997, 3/1 This module handles class data base. @@ -77,9 +77,6 @@ void fprintCMOClass(FILE *fp,struct object op); /* Functions in Kclass/indeterminate.c */ void fprintInderminate(FILE *fp,struct object ob); int eqIndetermiante(struct object *ob1, struct object *ob2); -struct object addTree(struct object ob1,struct object ob2); -void fprintTree(FILE *fp,struct object ob); -int isTreeAdd(struct object ob); void fprintRecursivePolynomial(FILE *fp,struct object ob); void fprintPolynomialInOneVariable(FILE *fp,struct object ob); @@ -89,8 +86,41 @@ struct object recursivePolyToPoly(struct object rp); struct object coeffToObject(struct coeff *cp); int isRecursivePolynomial2(struct object ob); +struct object KrvtReplace(struct object rp_o,struct object v_o, struct object t_o); +struct object KreplaceRecursivePolynomial(struct object of,struct object rule); +/* In Kclass/tree.c */ +struct object addTree(struct object ob1,struct object ob2); +struct object minusTree(struct object ob1,struct object ob2); +struct object timesTree(struct object ob1,struct object ob2); +struct object divideTree(struct object ob1,struct object ob2); +struct object powerTree(struct object ob1,struct object ob2); +struct object unaryminusTree(struct object ob1); +void fprintTree(FILE *fp,struct object ob); +int isTreeAdd(struct object ob); +/* DOM-like API's for cmo tree */ +struct object KtreeGetDocumentElement(struct object otree); /* string */ +struct object KtreeCreateElement(struct object ostr); /* string --> tree */ +struct object KtreeGetChildNodes(struct object otree); /* array */ +struct object KtreeSetChildNodes(struct object otree,struct object oarray); + +struct object KtreeGetAttributes(struct object otree); /* array */ +struct object KtreeSetAttributes(struct object otree,struct object oarray); +struct object KtreeGetAttributeValue(struct object otree,struct object okey); +struct object KtreeSetAttributeValue(struct object otree,struct object okey,struct object ovalue); +struct object KtreeRemoveAttribute(struct object otree,struct object okey); + +struct object KtreeAppendChild(struct object otree,struct object och); +struct object KtreeConsChild(struct object otree,struct object och); +struct object KtreeInsertBefore(struct object otree,struct object och,struct object before); +struct object KtreeReplaceChild(struct object otree,struct object onew,struct object oold); +struct object KtreeiReplaceChild(struct object otree,struct object onew,struct object index); +struct object KtreeRemoveChild(struct object otree,struct object oold); +struct object KtreeiRemoveChild(struct object otree,struct object index); + +struct object KtreeCopy(struct object otree); +struct object KtreeCopyCopy(struct object otree); /* recursive copy */