103 if (0 == strcmp(s,h->
name))
137 void *
atGet(
idhdl root,
const char * name,
int t,
void *defaultReturnValue)
140 if ((temp!=
NULL) && (temp->
atyp==t))
143 return defaultReturnValue;
152 if ((temp!=
NULL) && (temp->
atyp==t))
164 WerrorS(
"cannot set ring-dependend objects at this type");
177 WerrorS(
"cannot set attributes of this object");
180 WerrorS(
"cannot set ring-dependend objects at this type");
183 *a=(*a)->
set(name,data,typ);
196 attr temp =
this,temp1;
220 while (temp1->
next!=temp) temp1 = temp1->
next;
244 WerrorS(
"this object cannot have attributes");
253 PrintS(
"attr:isSB, type int\n");
254 haveNoAttribute=
FALSE;
258 PrintS(
"attr:qringNF, type int\n");
259 haveNoAttribute=
FALSE;
263 PrintS(
"attr:cf_class, type int\n");
264 PrintS(
"attr:global, type int\n");
265 PrintS(
"attr:maxExp, type int\n");
266 PrintS(
"attr:ring_cf, type int\n");
268 PrintS(
"attr:isLPring, type int\n");
271 haveNoAttribute=
FALSE;
280 else if(haveNoAttribute)
PrintS(
"no attributes\n");
285 char *name=(
char *)b->
Data();
290 if (strcmp(name,
"isSB")==0)
296 else if ((strcmp(name,
"rank")==0)&&(t==
MODUL_CMD))
299 res->
data=(
void *)(((ideal)v->
Data())->rank);
301 else if ((strcmp(name,
"global")==0)
305 res->
data=(
void *)(((ring)v->
Data())->OrdSgn==1);
307 else if ((strcmp(name,
"maxExp")==0)
311 res->
data=(
void *)(
long)(((ring)v->
Data())->bitmask/2);
313 else if ((strcmp(name,
"ring_cf")==0)
319 else if ((strcmp(name,
"cf_class")==0)
326 res->
data=(
void *)(
long)(cf->type);
328 else if (strcmp(name,
"qringNF")==0)
335 else if ((strcmp(name,
"isLPring")==0)
339 res->
data=(
void *)(
long)(((ring)v->
Data())->isLPring);
347 WerrorS(
"this object cannot have attributes");
377 char *name=(
char *)b->
Data();
378 if (strcmp(name,
"isSB")==0)
382 WerrorS(
"attribute isSB must be int");
385 if (((
long)c->
Data())!=0L)
396 else if (strcmp(name,
"qringNF")==0)
400 WerrorS(
"attribute qringNF must be int");
403 if (((
long)c->
Data())!=0L)
414 else if ((strcmp(name,
"rank")==0)&&(t==
MODUL_CMD))
418 WerrorS(
"attribute `rank` must be int");
421 ideal I=(ideal)v->
Data();
425 else if (((strcmp(name,
"global")==0)
426 || (strcmp(name,
"cf_class")==0)
427 || (strcmp(name,
"ring_cf")==0)
428 || (strcmp(name,
"maxExp")==0))
431 Werror(
"can not set attribute `%s`",name);
435 else if ((strcmp(name,
"isLPring")==0)
439 ((ring)v->
Data())->isLPring=(
int)(long)c->
Data();
442 WerrorS(
"attribute `isLPring` must be int");
477 WerrorS(
"object must have a name");
480 char *name=(
char *)b->
Data();
481 if (strcmp(name,
"isSB")==0)
486 else if (strcmp(name,
"global")==0)
488 WerrorS(
"can not set attribut `global`");
const CanonicalForm int s
#define omCheckAddrSize(addr, size)
Class used for (list of) interpreter objects.
void killAll(const ring r)
Compatiblity layer for legacy polynomial operations (over currRing)
attr set(char *s, void *data, int t)
void at_KillAll(idhdl root, const ring r)
void WerrorS(const char *s)
BOOLEAN atKILLATTR2(leftv, leftv a, leftv b)
BOOLEAN atKILLATTR1(leftv, leftv a)
BOOLEAN atATTRIB2(leftv res, leftv v, leftv b)
void at_Kill(idhdl root, const char *name, const ring r)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
const CanonicalForm CFMap CFMap & N
BOOLEAN atATTRIB3(leftv, leftv v, leftv b, leftv c)
The main handler for Singular numbers which are suitable for Singular polynomials.
void s_internalDelete(const int t, void *d, const ring r)
void atSet(idhdl root, char *name, void *data, int typ)
static int si_max(const int a, const int b)
void PrintS(const char *s)
BOOLEAN atATTRIB1(leftv res, leftv v)
#define omGetSpecBin(size)
const Variable & v
< [in] a sqrfree bivariate poly
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
static BOOLEAN rField_is_Ring(const ring r)
const char * Tok2Cmdname(int tok)
#define omCheckAddr(addr)
static void attr_free(attr h, const ring r=currRing)
#define omFreeBin(addr, bin)
void Werror(const char *fmt,...)