|
gimme-alpha 0.1
|
Include dependency graph for nanostructures.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | doping_region_1d |
| struct | region_1d |
| struct | nanostructure |
| struct | nanostructure_1d |
Enumerations | |
| enum | doping_type { NONE, CONST, LAST_TYPE } |
| enum | nanostructure_type { NS_D1 } |
Functions | |
| struct nanostructure * | nanostructure_new (enum nanostructure_type type) |
| void | structure_free (struct nanostructure *s) |
| struct doping_region_1d * | doping_region_1d_new (enum doping_type dt) |
| struct region_1d * | region_1d_new () |
| enum doping_type |
Definition at line 33 of file nanostructures.h.
| enum nanostructure_type |
| struct doping_region_1d* doping_region_1d_new | ( | enum doping_type | dt | ) | [read] |
Definition at line 76 of file nanostructures.c.
References unlikely.
{
struct doping_region_1d *dr;
if(unlikely((dr = malloc(sizeof(struct doping_region_1d))) == NULL)) return NULL;
return dr;
}
| struct nanostructure* nanostructure_new | ( | enum nanostructure_type | type | ) | [read] |
Definition at line 95 of file nanostructures.c.
References nanostructure_1d_new(), nanostructure_free(), NS_D1, nanostructure::storage, nanostructure::type, and unlikely.
Referenced by get_nanostructure().
{
struct nanostructure *s;
if(unlikely((s = malloc(sizeof(struct nanostructure))) == NULL)) return NULL;
switch(type) {
case NS_D1:
s->type = type;
s->storage = nanostructure_1d_new();
break;
default:
s->storage = NULL;
}
/*Catch allocation errors and de-allocate if we errored*/
if(unlikely((s->storage) == NULL)) {
nanostructure_free(s);
}
return s;
}
Here is the call graph for this function:
Here is the caller graph for this function:| struct region_1d* region_1d_new | ( | ) | [read] |
| void structure_free | ( | struct nanostructure * | s | ) |