Go to the source code of this file.
|
static Attr_Man_t * | Attr_ManAlloc (int nAttrSize, int fManMem) |
| MACRO DEFINITIONS ///. More...
|
|
static Attr_Man_t * | Attr_ManStartInt (int nAttrs) |
|
static Attr_Man_t * | Attr_ManStartPtr (int nAttrs) |
|
static Attr_Man_t * | Attr_ManStartPtrMem (int nAttrs, int nAttrSize) |
|
static void | Attr_ManStop (Attr_Man_t *p) |
|
static int | Attr_ManReadAttrInt (Attr_Man_t *p, int Id) |
|
static void * | Attr_ManReadAttrPtr (Attr_Man_t *p, int Id) |
|
static void | Attr_ManWriteAttrInt (Attr_Man_t *p, int Id, int Attr) |
|
static void | Attr_ManWriteAttrPtr (Attr_Man_t *p, int Id, void *pAttr) |
|
static int * | Attr_ManFetchSpotInt (Attr_Man_t *p, int Id) |
|
static void ** | Attr_ManFetchSpotPtr (Attr_Man_t *p, int Id) |
|
static int | Attr_ManFetchAttrInt (Attr_Man_t *p, int Id) |
|
static void * | Attr_ManFetchAttrPtr (Attr_Man_t *p, int Id) |
|
static void | Attr_ManSetAttrInt (Attr_Man_t *p, int Id, int Attr) |
|
static void | Attr_ManSetAttrPtr (Attr_Man_t *p, int Id, void *pAttr) |
|
INCLUDES ///.
CFile****************************************************************
FileName [attr.h]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Network attributes.]
Synopsis [External declarations.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
- Id:
- attr.h,v 1.00 2005/06/20 00:00:00 alanmi Exp
]PARAMETERS ///BASIC TYPES ///
Definition at line 44 of file attr.h.
static Attr_Man_t* Attr_ManAlloc |
( |
int |
nAttrSize, |
|
|
int |
fManMem |
|
) |
| |
|
inlinestatic |
MACRO DEFINITIONS ///.
FUNCTION DECLARATIONS /// Function*************************************************************
Synopsis [Allocates the attribute manager.]
Description [The manager is simple if it does not need memory manager.]
SideEffects []
SeeAlso []
Definition at line 83 of file attr.h.
88 p->nAttrSize = nAttrSize;
typedefABC_NAMESPACE_HEADER_START struct Attr_ManStruct_t_ Attr_Man_t
INCLUDES ///.
static int Attr_ManFetchAttrInt |
( |
Attr_Man_t * |
p, |
|
|
int |
Id |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Returns or creates the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 351 of file attr.h.
static int * Attr_ManFetchSpotInt(Attr_Man_t *p, int Id)
static void* Attr_ManFetchAttrPtr |
( |
Attr_Man_t * |
p, |
|
|
int |
Id |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Returns or creates the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 367 of file attr.h.
static void ** Attr_ManFetchSpotPtr(Attr_Man_t *p, int Id)
static int* Attr_ManFetchSpotInt |
( |
Attr_Man_t * |
p, |
|
|
int |
Id |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Returns or creates the pointer to the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 288 of file attr.h.
291 if ( Id >=
p->nAttrs )
294 int i, nAttrsOld =
p->nAttrs;
296 p->nAttrs =
p->nAttrs? 2*
p->nAttrs : 1024;
297 p->pAttrs =
realloc(
p->pAttrs,
sizeof(
int) *
p->nAttrs );
299 for ( i = nAttrsOld; i <
p->nAttrs; i++ )
300 ((
int *)
p->pAttrs)[Id] = 0;
302 return ((
int *)
p->pAttrs) + Id;
static void** Attr_ManFetchSpotPtr |
( |
Attr_Man_t * |
p, |
|
|
int |
Id |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Returns or creates the pointer to the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 316 of file attr.h.
319 if ( Id >=
p->nAttrs )
322 int i, nAttrsOld =
p->nAttrs;
324 p->nAttrs =
p->nAttrs? 2*
p->nAttrs : 1024;
325 p->pAttrs =
realloc(
p->pAttrs,
sizeof(
void *) *
p->nAttrs );
327 for ( i = nAttrsOld; i <
p->nAttrs; i++ )
328 p->pAttrs[Id] = NULL;
331 if (
p->pManMem &&
p->pAttrs[Id] != NULL )
334 memset(
p->pAttrs[Id], 0,
p->nAttrSize );
336 return p->pAttrs + Id;
static int Attr_ManReadAttrInt |
( |
Attr_Man_t * |
p, |
|
|
int |
Id |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Reads the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 215 of file attr.h.
218 if ( Id >=
p->nAttrs )
220 return ((
int *)
p->pAttrs)[Id];
static void* Attr_ManReadAttrPtr |
( |
Attr_Man_t * |
p, |
|
|
int |
Id |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Reads the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 234 of file attr.h.
237 if ( Id >=
p->nAttrs )
239 return p->pAttrs[Id];
static void Attr_ManSetAttrInt |
( |
Attr_Man_t * |
p, |
|
|
int |
Id, |
|
|
int |
Attr |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Sets the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 383 of file attr.h.
static int * Attr_ManFetchSpotInt(Attr_Man_t *p, int Id)
static void Attr_ManSetAttrPtr |
( |
Attr_Man_t * |
p, |
|
|
int |
Id, |
|
|
void * |
pAttr |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Sets the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 399 of file attr.h.
static void ** Attr_ManFetchSpotPtr(Attr_Man_t *p, int Id)
Function*************************************************************
Synopsis [Start the attribute manager for integers.]
Description []
SideEffects []
SeeAlso []
Definition at line 105 of file attr.h.
110 p->pAttrs = (
void **)
ALLOC(
int, nAttrs );
111 memset( (
int *)p->pAttrs, 0,
sizeof(
int) * nAttrs );
static Attr_Man_t * Attr_ManAlloc(int nAttrSize, int fManMem)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Attr_ManStruct_t_ Attr_Man_t
INCLUDES ///.
Function*************************************************************
Synopsis [Start the attribute manager for pointers.]
Description []
SideEffects []
SeeAlso []
Definition at line 127 of file attr.h.
132 p->pAttrs =
ALLOC(
void *, nAttrs );
133 memset( p->pAttrs, 0,
sizeof(
void *) * nAttrs );
static Attr_Man_t * Attr_ManAlloc(int nAttrSize, int fManMem)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Attr_ManStruct_t_ Attr_Man_t
INCLUDES ///.
static Attr_Man_t* Attr_ManStartPtrMem |
( |
int |
nAttrs, |
|
|
int |
nAttrSize |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Start the attribute manager for the fixed entry size.]
Description []
SideEffects []
SeeAlso []
Definition at line 148 of file attr.h.
154 p->pAttrs =
ALLOC(
void *, nAttrs );
155 for ( i = 0; i < p->nAttrs; i++ )
158 memset( p->pAttrs[i], 0, nAttrSize );
static Attr_Man_t * Attr_ManAlloc(int nAttrSize, int fManMem)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Attr_ManStruct_t_ Attr_Man_t
INCLUDES ///.
Function*************************************************************
Synopsis [Stop the attribute manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 174 of file attr.h.
177 if (
p->pFuncFreeObj )
182 for ( i = 0; i <
p->nAttrs; i++ )
183 if ( ((
int *)
p->pAttrs)[i] )
184 p->pFuncFreeObj(
p->pManAttr, (
void *)((
int *)
p->pAttrs)[i] );
188 for ( i = 0; i <
p->nAttrs; i++ )
190 p->pFuncFreeObj(
p->pManAttr,
p->pAttrs[i] );
194 if (
p->pManAttr &&
p->pFuncFreeMan )
195 p->pFuncFreeMan(
p->pManAttr );
static void Attr_ManWriteAttrInt |
( |
Attr_Man_t * |
p, |
|
|
int |
Id, |
|
|
int |
Attr |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Writes the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 253 of file attr.h.
256 ((
int *)
p->pAttrs)[Id] = Attr;
static void Attr_ManWriteAttrPtr |
( |
Attr_Man_t * |
p, |
|
|
int |
Id, |
|
|
void * |
pAttr |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [Writes the attribute of the given object.]
Description []
SideEffects []
SeeAlso []
Definition at line 270 of file attr.h.
274 p->pAttrs[Id] = pAttr;