Go to the source code of this file.
| int newstruct_desc_size |
( |
| ) |
|
Definition at line 840 of file newstruct.cc.
846 Werror(
">>%s<< is not a newstruct type",bbname);
850 newstruct_desc desc=(newstruct_desc)bb->data;
851 newstruct_proc p=(newstruct_proc)
omAlloc(
sizeof(*p));
852 p->next=desc->procs; desc->procs=
p;
857 if(!
IsCmd(func,p->t))
860 if (func[1]==
'\0') p->t=func[0];
867 Werror(
">>%s<< is not a kernel command",func);
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
int iiOpsTwoChar(const char *s)
void Werror(const char *fmt,...)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
int IsCmd(const char *n, int &tok)
| void newstruct_setup |
( |
const char * |
name, |
|
|
newstruct_desc |
d |
|
) |
| |
Definition at line 683 of file newstruct.cc.
685 blackbox *
b=(blackbox*)
omAlloc0(
sizeof(blackbox));
BOOLEAN newstruct_deserialize(blackbox **b, void **d, si_link f)
BOOLEAN newstruct_Op1(int op, leftv res, leftv arg)
void newstruct_destroy(blackbox *, void *d)
BOOLEAN newstruct_OpM(int op, leftv res, leftv args)
const CanonicalForm CFMap CFMap int &both_non_zero int n
BOOLEAN newstruct_Op2(int op, leftv res, leftv a1, leftv a2)
void * newstruct_Init(blackbox *b)
BOOLEAN newstruct_serialize(blackbox *b, void *d, si_link f)
BOOLEAN newstruct_Assign(leftv l, leftv r)
char * newstruct_String(blackbox *b, void *d)
void * newstruct_Copy(blackbox *, void *d)
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
void newstruct_Print(blackbox *b, void *d)
BOOLEAN newstruct_CheckAssign(blackbox *, leftv L, leftv R)
| newstruct_desc newstructChildFromString |
( |
const char * |
p, |
|
|
const char * |
s |
|
) |
| |
Definition at line 793 of file newstruct.cc.
800 Werror(
">>%s< not found",parent);
807 Werror(
">>%s< is not a user defined type",parent);
811 newstruct_desc
res=(newstruct_desc)
omAlloc0(
sizeof(*res));
812 newstruct_desc parent_desc=(newstruct_desc)parent_bb->data;
813 res->size=parent_desc->size;
814 res->member=parent_desc->member;
815 res->parent=parent_desc;
const CanonicalForm int s
void newstruct_destroy(blackbox *, void *d)
static newstruct_desc scanNewstructFromString(const char *s, newstruct_desc res)
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
void Werror(const char *fmt,...)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
| newstruct_desc newstructFromString |
( |
const char * |
s | ) |
|
Definition at line 786 of file newstruct.cc.
788 newstruct_desc
res=(newstruct_desc)
omAlloc0(
sizeof(*res));
const CanonicalForm int s
static newstruct_desc scanNewstructFromString(const char *s, newstruct_desc res)
| void newstructShow |
( |
newstruct_desc |
d | ) |
|
Definition at line 820 of file newstruct.cc.
822 newstruct_member elem;
823 Print(
"id: %d\n",d->id);
827 Print(
">>%s<< at pos %d, type %d (%s)\n",elem->name,elem->pos,elem->typ,
Tok2Cmdname(elem->typ));
829 Print(
">>r_%s<< at pos %d, shadow ring\n",elem->name,elem->pos-1);
832 newstruct_proc
p=d->procs;
835 Print(
"op:%d(%s) with %d args -> %s\n",p->t,
iiTwoOps(p->t),p->args,p->p->procname);
const char * iiTwoOps(int t)
const char * Tok2Cmdname(int tok)