attrib.h
Go to the documentation of this file.
1 #ifndef ATTRIB_H
2 #define ATTRIB_H
3 /****************************************
4 * Computer Algebra System SINGULAR *
5 ****************************************/
6 /*
7 * ABSTRACT: attributes to leftv and idhdl
8 */
9 #include <string.h>
10 #include <kernel/structs.h>
11 #include <omalloc/omallocClass.h>
12 
13 class sattr;
14 typedef sattr * attr;
15 class sattr: public omallocClass
16 {
17  public:
18  inline void Init() { memset(this,0,sizeof(*this)); }
19  const char * name;
20  void * data;
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 
34 //void * atGet(idhdl root,const char * name);
35 //void * atGet(leftv root,const char * name);
36 void * atGet(idhdl root,const char * name, int t, void *defaultReturnValue = NULL);
37 void * atGet(leftv root,const char * name, int t);
38 void atSet(idhdl root,const char * name,void * data,int typ);
39 void atSet(leftv root,const char * name,void * data,int typ);
40 void at_KillAll(idhdl root,const ring r);
41 void at_KillAll(leftv root,const ring r);
42 #define atKillAll(H) at_KillAll(H,currRing)
43 void at_Kill(idhdl root,const char * name,const ring r);
44 #define atKill(H,A) at_Kill(H,A,currRing)
45 
51 #endif
const CanonicalForm int s
Definition: facAbsFact.cc:55
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
const poly a
Definition: syzextra.cc:212
void killAll(const ring r)
Definition: attrib.cc:196
Definition: attrib.h:15
void Print()
Definition: attrib.cc:34
void at_KillAll(idhdl root, const ring r)
Definition: attrib.cc:229
BOOLEAN atATTRIB1(leftv res, leftv a)
Definition: attrib.cc:241
void * data
Definition: attrib.h:20
BOOLEAN atKILLATTR2(leftv res, leftv a, leftv b)
Definition: attrib.cc:465
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue=NULL)
Definition: attrib.cc:135
void at_Kill(idhdl root, const char *name, const ring r)
Definition: attrib.cc:209
void kill(const ring r)
Definition: attrib.cc:188
Definition: idrec.h:34
poly res
Definition: myNF.cc:322
void * CopyA()
Definition: subexpr.cc:1938
sattr * attr
Definition: attrib.h:13
const ring r
Definition: syzextra.cc:208
BOOLEAN atATTRIB3(leftv res, leftv a, leftv b, leftv c)
Definition: attrib.cc:358
BOOLEAN atKILLATTR1(leftv res, leftv a)
Definition: attrib.cc:448
#define NULL
Definition: omList.c:10
attr next
Definition: attrib.h:21
attr Copy()
Definition: attrib.cc:41
const char * name
Definition: attrib.h:19
BOOLEAN atATTRIB2(leftv res, leftv a, leftv b)
Definition: attrib.cc:285
void atSet(idhdl root, const char *name, void *data, int typ)
Definition: attrib.cc:156
int BOOLEAN
Definition: auxiliary.h:131
const poly b
Definition: syzextra.cc:213
void Init()
Definition: attrib.h:18
int atyp
Definition: attrib.h:22