src/fvm/fvm_selector_postfix.c File Reference

| programmer's documentation

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
fvm_selector_postfix.c File Reference
`#include "cs_defs.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <assert.h>`
`#include <math.h>`
`#include "bft_mem.h"`
`#include "bft_error.h"`
`#include "bft_printf.h"`
`#include "fvm_defs.h"`
`#include "fvm_selector_postfix.h"`
Include dependency graph for fvm_selector_postfix.c:

## Macros
#define | _OPERAND_INT (1 << 0)
#define | _OPERAND_DOUBLE (1 << 1)
#define | _OPERAND_STRING (1 << 2)
#define | _OPERAND_GEOMETRIC (1 << 3)
#define | BASE_STACK_SIZE 32
#define | _DOT_PRODUCT(v1, v2) (v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2])
#define | _MODULE(v) sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2])

## Enumerations
enum | _operator_type_t { OT_L_PAREN, OT_R_PAREN, OT_UNARY, OT_BINARY, OT_FUNCTION, OT_COORD_CONDITION, OT_DEFINITION, OT_MATH_FUNCTION, OT_NONE }
enum | _operator_code_t { OC_L_PAREN, OC_R_PAREN, OC_NOT, OC_AND, OC_OR, OC_XOR, OC_ALL, OC_NO_GROUP, OC_RANGE, OC_NORMAL, OC_PLANE, OC_BOX, OC_CYLINDER, OC_SPHERE, OC_GT, OC_LT, OC_GE, OC_LE, OC_NONE }
enum | _postfix_type_t { PF_OPCODE, PF_GROUP_ID, PF_ATTRIBUTE_ID, PF_INT, PF_FLOAT }

## Functions
fvm_selector_postfix_t * | fvm_selector_postfix_create (const char *infix, int n_groups, int n_attributes, const char *group_name[], const int attribute[])
void | fvm_selector_postfix_destroy (fvm_selector_postfix_t **postfix)
const char * | fvm_selector_postfix_get_infix (const fvm_selector_postfix_t *pf)
_Bool | fvm_selector_postfix_coords_dep (const fvm_selector_postfix_t *pf)
_Bool | fvm_selector_postfix_normals_dep (const fvm_selector_postfix_t *pf)
int | fvm_selector_postfix_n_missing (const fvm_selector_postfix_t *pf)
const char * | fvm_selector_postfix_get_missing (const fvm_selector_postfix_t *pf, int id)
_Bool | fvm_selector_postfix_eval (const fvm_selector_postfix_t *pf, int n_groups, int n_attributes, const int group_id[], const int attribute_id[], const double coords[], const double normal[])
void | fvm_selector_postfix_dump (const fvm_selector_postfix_t *pf, int n_groups, int n_attributes, const char *group_name[], const int attribute[])

## Macro Definition Documentation

#define _DOT_PRODUCT | ( |  | v1,
|  |  | v2
| ) |  | (v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2])

#define _MODULE | ( |  | v | ) | sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2])

#define _OPERAND_DOUBLE (1 << 1)

#define _OPERAND_GEOMETRIC (1 << 3)

#define _OPERAND_INT (1 << 0)

#define _OPERAND_STRING (1 << 2)

#define BASE_STACK_SIZE 32

## Enumeration Type Documentation

enum _operator_code_t

Enumerator
OC_L_PAREN |
OC_R_PAREN |
OC_NOT |
OC_AND |
OC_OR |
OC_XOR |
OC_ALL |
OC_NO_GROUP |
OC_RANGE |
OC_NORMAL |
OC_PLANE |
OC_BOX |
OC_CYLINDER |
OC_SPHERE |
OC_GT |
OC_LT |
OC_GE |
OC_LE |
OC_NONE |

enum _operator_type_t

Enumerator
OT_L_PAREN |
OT_R_PAREN |
OT_UNARY |
OT_BINARY |
OT_FUNCTION |
OT_COORD_CONDITION |
OT_DEFINITION |
OT_MATH_FUNCTION |
OT_NONE |

enum _postfix_type_t

Enumerator
PF_OPCODE |
PF_GROUP_ID |
PF_ATTRIBUTE_ID |
PF_INT |
PF_FLOAT |

## Function Documentation

_Bool fvm_selector_postfix_coords_dep | ( | const fvm_selector_postfix_t * | pf | ) |

fvm_selector_postfix_t* fvm_selector_postfix_create | ( | const char * | infix,
|  | int | n_groups,
|  | int | n_attributes,
|  | const char * | group_name[],
|  | const int | attribute[]
| ) |  |

void fvm_selector_postfix_destroy | ( | fvm_selector_postfix_t ** | postfix | ) |

void fvm_selector_postfix_dump | ( | const fvm_selector_postfix_t * | pf,
|  | int | n_groups,
|  | int | n_attributes,
|  | const char * | group_name[],
|  | const int | attribute[]
| ) |  |

_Bool fvm_selector_postfix_eval | ( | const fvm_selector_postfix_t * | pf,
|  | int | n_groups,
|  | int | n_attributes,
|  | const int | group_id[],
|  | const int | attribute_id[],
|  | const double | coords[],
|  | const double | normal[]
| ) |  |

const char* fvm_selector_postfix_get_infix | ( | const fvm_selector_postfix_t * | pf | ) |

const char* fvm_selector_postfix_get_missing | ( | const fvm_selector_postfix_t * | pf,
|  | int | id
| ) |  |

int fvm_selector_postfix_n_missing | ( | const fvm_selector_postfix_t * | pf | ) |

_Bool fvm_selector_postfix_normals_dep | ( | const fvm_selector_postfix_t * | pf | ) |