source: git/Singular/attrib.h @ 06c0b3

spielwiese
Last change on this file since 06c0b3 was 599813, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
minor changes/improvements add: default return value for a missing/wrong attribute of an idhdl object (atGet) chg: minor cleanup in p_Setm_General add: output of NegWeightL_* in rDebugPrint add: some doxygen docs to pGetCoeff add: more (internal) debug output on the ring/exponent structure: VarL_LowIndex, VarL_Offset add: doxygen description to id_Sort
  • Property mode set to 100644
File size: 1.6 KB
Line 
1#ifndef ATTRIB_H
2#define ATTRIB_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT: attributes to leftv and idhdl
9*/
10#include <string.h>
11#include <kernel/structs.h>
12
13class sattr;
14typedef sattr * attr;
15class sattr
16{
17  public:
18    inline void Init() { memset(this,0,sizeof(*this)); }
19    const char *  name;
20    void *  data;
21    attr    next;
22    int     atyp; /* the type of the attribut, describes the data field
23                  */
24
25    void Print();
26    attr Copy(); /* copy all arguments */
27    void * CopyA(); /* copy the data of this attribute */
28    attr set(const char * s, void * data, int t);
29    attr get(const char * s);
30    void kill(const ring r);
31    void killAll(const ring r);
32};
33
34void * atGet(idhdl root,const char * name);
35void * atGet(leftv root,const char * name);
36void * atGet(idhdl root,const char * name, int t, void *defaultReturnValue = NULL);
37void * atGet(leftv root,const char * name, int t);
38void atSet(idhdl root,const char * name,void * data,int typ);
39void atSet(leftv root,const char * name,void * data,int typ);
40void at_KillAll(idhdl root,const ring r);
41void at_KillAll(leftv root,const ring r);
42#define atKillAll(H) at_KillAll(H,currRing)
43void at_Kill(idhdl root,const char * name,const ring r);
44#define atKill(H,A) at_Kill(H,A,currRing)
45
46BOOLEAN atATTRIB1(leftv res,leftv a);
47BOOLEAN atATTRIB2(leftv res,leftv a,leftv b);
48BOOLEAN atATTRIB3(leftv res,leftv a,leftv b,leftv c);
49BOOLEAN atKILLATTR1(leftv res,leftv a);
50BOOLEAN atKILLATTR2(leftv res,leftv a,leftv b);
51#endif
Note: See TracBrowser for help on using the repository browser.