source: git/Singular/attrib.h @ 5476e83

spielwiese
Last change on this file since 5476e83 was 117e00, checked in by Hans Schoenemann <hannes@…>, 6 years ago
removed unused system includes, math.h ->cmath for .cc files
  • Property mode set to 100644
File size: 1.7 KB
Line 
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 "kernel/structs.h"
10#include "omalloc/omalloc.h"
11#ifndef XMEMORY_H
12#include "omalloc/omallocClass.h"
13#endif
14
15class sattr;
16typedef sattr * attr;
17class sattr
18#ifndef XMEMORY_H
19            : public omallocClass
20#endif
21{
22  public:
23    inline void Init() { memset(this,0,sizeof(*this)); }
24    char *  name;
25    void *  data;
26    attr    next;
27    int     atyp; /* the type of the attribut, describes the data field
28                  */
29
30    void Print();
31    attr Copy(); /* copy all arguments */
32    void * CopyA(); /* copy the data of this attribute */
33    attr set(char * s, void * data, int t); /* eats s, data */
34    attr get(const char * s);
35    void kill(const ring r);
36    void killAll(const ring r);
37};
38
39//void * atGet(idhdl root,const char * name);
40//void * atGet(leftv root,const char * name);
41void * atGet(idhdl root,const char * name, int t, void *defaultReturnValue = NULL);
42void * atGet(leftv root,const char * name, int t);
43void atSet(idhdl root,char * name,void * data,int typ);
44void atSet(leftv root,char * name,void * data,int typ);
45void at_KillAll(idhdl root,const ring r);
46void at_KillAll(leftv root,const ring r);
47#define atKillAll(H) at_KillAll(H,currRing)
48void at_Kill(idhdl root,const char * name,const ring r);
49#define atKill(H,A) at_Kill(H,A,currRing)
50
51BOOLEAN atATTRIB1(leftv res,leftv a);
52BOOLEAN atATTRIB2(leftv res,leftv a,leftv b);
53BOOLEAN atATTRIB3(leftv res,leftv a,leftv b,leftv c);
54BOOLEAN atKILLATTR1(leftv res,leftv a);
55BOOLEAN atKILLATTR2(leftv res,leftv a,leftv b);
56#endif
Note: See TracBrowser for help on using the repository browser.