[BACK]Return to kclass.h CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Annotation of OpenXM/src/kan96xx/Kan/kclass.h, Revision 1.6

1.6     ! takayama    1: /* $OpenXM: OpenXM/src/kan96xx/Kan/kclass.h,v 1.5 2003/12/06 02:49:22 takayama Exp $ */
1.1       maekawa     2:
                      3: /* kclass.h  1997, 3/1
                      4:    This module handles class data base.
                      5:    Extended class names.
                      6: */
                      7:
                      8: /* Format of extended class
                      9:    Sclass
                     10:    ob.lc.ival :  extended tag
                     11:    ob.rc.voidp : body
                     12: */
                     13: /* The next macro  Extended Class tag returns -1 if the object
                     14:    is not in Sclass and returns extended class tags if the object
                     15:    is in Sclass.
                     16:    */
                     17: #define ectag(ob) ((ob).tag != Sclass? -1:(ob).lc.ival)
                     18: #define ecbody(ob) ((ob).rc.voidp)
                     19: /* Extended Class tags */
                     20: #define CLASSNAME_OPERANDSTACK 256
                     21: #define CLASSNAME_ERROR_PACKET 257
                     22: #define CLASSNAME_CONTEXT 258
                     23: #define CLASSNAME_GradedPolySet 259
                     24: #define CLASSNAME_mathcap  260
                     25: #define CLASSNAME_sampleClass   261
                     26:
                     27: #define CLASSNAME_CMO     CMO    /* 1024 defined in stackm.h and plugin.h */
                     28: #define CLASSNAME_indeterminate         262
                     29: #define CLASSNAME_tree                  263
                     30: #define CLASSNAME_recursivePolynomial   264
                     31: #define CLASSNAME_polynomialInOneVariable   265
                     32:
                     33:
                     34: /*    */
                     35: #define  CLASS_NOT_USED  0
                     36: #define  CLASS_INTERNAL  1
                     37: #define  CLASS_OBJ     2
                     38:
                     39: /* Conversion functions */
                     40: struct object KpoOperandStack(struct operandStack * op);
                     41: struct object KpoErrorPacket(struct object *op);
                     42: struct object KpoContext(struct context *ct);
                     43: struct object KpoGradedPolySet(struct gradedPolySet *grG);
                     44: struct object KpoMathCap(struct object *op);
                     45: struct object KpoCMOClass(struct object *op);
                     46: struct object KpoIndeterminate(struct object op);
                     47: struct object KpoTree(struct object op);
                     48: struct object KpoRecursivePolynomial(struct object op);
                     49: struct object KpoPolynomialInOneVariable(struct object op);
                     50: struct object KpoSampleClass(struct object *op);
                     51:
                     52: /* Other constructors */
                     53: struct object KnewIndeterminate(char *s);
                     54:
                     55: #define KopOperandStack(ob) ((struct operandStack *)(ob).rc.voidp)
                     56: #define KopErrorPacket(ob) ((struct object *)(ob).rc.voidp)
                     57: #define KopContext(ob) ((struct context *)(ob).rc.voidp)
                     58: #define KopGradedPolySet(ob) ((struct gradedPolySet *)(ob).rc.voidp)
                     59: #define KopMathCap(ob) ((struct object *)(ob).rc.voidp)
                     60: #define KopIndeterminate(ob) (*((struct object *)(ob).rc.voidp))
                     61: #define KopTree(ob) (*((struct object *)(ob).rc.voidp))
                     62: #define KopRecursivePolynomial(ob) (*((struct object *)(ob).rc.voidp))
                     63: #define KopPolynomialInOneVariable(ob) (*((struct object *)(ob).rc.voidp))
                     64: #define KopSampleClass(ob) ((struct object *)(ob).rc.voidp)
                     65:
                     66:
                     67: void fprintErrorPacket(FILE *fp, struct object *op);
                     68: void fprintMathCap(FILE *fp, struct object *op);
                     69:
                     70: /* Functions in Kclass/sample.c */
                     71: void fprintSampleClass(FILE *fp,struct object *op);
                     72: int eqSampleClass(struct object *ob1, struct object *ob2);
                     73:
                     74: /* Functions in Kclass/rawcmo.c */
                     75: void fprintCMOClass(FILE *fp,struct object op);
                     76:
                     77: /* Functions in Kclass/indeterminate.c */
                     78: void fprintInderminate(FILE *fp,struct object ob);
                     79: int eqIndetermiante(struct object *ob1, struct object *ob2);
                     80:
                     81: void fprintRecursivePolynomial(FILE *fp,struct object ob);
                     82: void fprintPolynomialInOneVariable(FILE *fp,struct object ob);
                     83: struct object polyToRecursivePoly(struct object p);
                     84: struct object polyToRecursivePoly2(struct object p,struct object vlist,int vn);
                     85: struct object recursivePolyToPoly(struct object rp);
                     86: struct object coeffToObject(struct coeff *cp);
                     87: int isRecursivePolynomial2(struct object ob);
                     88:
1.3       takayama   89: struct object KrvtReplace(struct object rp_o,struct object v_o, struct object t_o);
                     90: struct object KreplaceRecursivePolynomial(struct object of,struct object rule);
1.1       maekawa    91:
                     92:
                     93:
1.4       takayama   94: /* In Kclass/tree.c */
                     95: struct object addTree(struct object ob1,struct object ob2);
1.5       takayama   96: struct object minusTree(struct object ob1,struct object ob2);
                     97: struct object timesTree(struct object ob1,struct object ob2);
                     98: struct object divideTree(struct object ob1,struct object ob2);
                     99: struct object powerTree(struct object ob1,struct object ob2);
                    100: struct object unaryminusTree(struct object ob1);
1.4       takayama  101: void fprintTree(FILE *fp,struct object ob);
                    102: int isTreeAdd(struct object ob);
                    103: /* DOM-like API's for cmo tree */
                    104: struct object KtreeGetDocumentElement(struct object otree); /* string */
                    105: struct object KtreeCreateElement(struct object ostr);      /* string --> tree */
                    106:
                    107: struct object KtreeGetChildNodes(struct object otree);      /* array  */
                    108: struct object KtreeSetChildNodes(struct object otree,struct object oarray);
                    109:
                    110: struct object KtreeGetAttributes(struct object otree);      /* array  */
                    111: struct object KtreeSetAttributes(struct object otree,struct object oarray);
                    112: struct object KtreeGetAttributeValue(struct object otree,struct object okey);
                    113: struct object KtreeSetAttributeValue(struct object otree,struct object okey,struct object ovalue);
                    114: struct object KtreeRemoveAttribute(struct object otree,struct object okey);
                    115:
                    116: struct object KtreeAppendChild(struct object otree,struct object och);
                    117: struct object KtreeConsChild(struct object otree,struct object och);
                    118: struct object KtreeInsertBefore(struct object otree,struct object och,struct object before);
                    119: struct object KtreeReplaceChild(struct object otree,struct object onew,struct object oold);
                    120: struct object KtreeiReplaceChild(struct object otree,struct object onew,struct object index);
                    121: struct object KtreeRemoveChild(struct object otree,struct object oold);
                    122: struct object KtreeiRemoveChild(struct object otree,struct object index);
                    123:
                    124: struct object KtreeCopy(struct object otree);
                    125: struct object KtreeCopyCopy(struct object otree);  /* recursive copy */
1.6     ! takayama  126: void fprintIndeterminate(FILE *fp,struct object op);

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>