My Project
Loading...
Searching...
No Matches
Functions
pyobject_setup.h File Reference

Go to the source code of this file.

Functions

void pyobject_setup ()
 initialize blackbox support for pyobject; functionilty os autoloaded on demand More...
 
BOOLEAN pyobject_ensure ()
 force leading of pyobject functionality More...
 

Detailed Description

Author
Alexander Dreyer
Date
2010-12-15

This header file defines the blackbox setup interface for the pyobject

Copyright:
(c) 2010 by The Singular Team, see LICENSE file

Definition in file pyobject_setup.h.

Function Documentation

◆ pyobject_ensure()

BOOLEAN pyobject_ensure ( )

force leading of pyobject functionality

force leading of pyobject functionality

Definition at line 48 of file pyobject_setup.cc.

49{
50
51 int tok = -1;
52 blackbox* bbx = (blackboxIsCmd("pyobject", tok) == ROOT_DECL?
53 getBlackboxStuff(tok): (blackbox*)NULL);
54 if (bbx == NULL) return TRUE;
55 return (bbx->blackbox_Init == pyobject_autoload? pyobject_load(): FALSE);
56}
#define TRUE
Definition: auxiliary.h:100
#define FALSE
Definition: auxiliary.h:96
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
Definition: blackbox.cc:17
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
Definition: blackbox.cc:218
@ ROOT_DECL
Definition: grammar.cc:319
#define NULL
Definition: omList.c:12
static BOOLEAN pyobject_load()
void * pyobject_autoload(blackbox *bbx)
blackbox support - initialization via autoloading

◆ pyobject_setup()

void pyobject_setup ( )

initialize blackbox support for pyobject; functionilty os autoloaded on demand

Definition at line 39 of file pyobject_setup.cc.

40{
41 blackbox *bbx = (blackbox*)omAlloc0(sizeof(blackbox));
42 bbx->blackbox_Init = pyobject_autoload;
43 bbx->blackbox_destroy = pyobject_default_destroy;
44 setBlackboxStuff(bbx, "pyobject");
45}
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
Definition: blackbox.cc:142
#define omAlloc0(size)
Definition: omAllocDecl.h:211
void pyobject_default_destroy(blackbox *, void *)