File indexing completed on 2025-01-18 10:02:03
0001 #ifndef MAD_CMDPAR_H
0002 #define MAD_CMDPAR_H
0003
0004
0005
0006 struct command;
0007 struct element;
0008 struct expression;
0009 struct expr_list;
0010 struct double_array;
0011 struct char_p_array;
0012 struct el_list;
0013 struct var_list;
0014
0015 struct command_parameter
0016 {
0017 char name[NAME_L];
0018 int type;
0019
0020
0021
0022 int c_type;
0023
0024 double double_value;
0025 double c_min;
0026 double c_max;
0027 struct expression* expr;
0028 struct expression* min_expr;
0029 struct expression* max_expr;
0030 char* string;
0031 int stamp;
0032 struct double_array* double_array;
0033 struct expr_list* expr_list;
0034 struct char_p_array* m_string;
0035 struct command_parameter* call_def;
0036
0037 };
0038
0039 struct command_parameter_list
0040 {
0041 int stamp;
0042 char name[NAME_L];
0043 int max,
0044 curr;
0045 struct command_parameter** parameters;
0046 };
0047
0048
0049
0050 struct command_parameter* new_command_parameter(const char* name, int type);
0051 struct command_parameter_list* new_command_parameter_list(int length);
0052 struct command_parameter* clone_command_parameter(const struct command_parameter*);
0053 struct command_parameter* renew_command_parameter(struct command* cmd, const char* par);
0054 struct command_parameter* delete_command_parameter(struct command_parameter*);
0055 struct command_parameter_list* delete_command_parameter_list(struct command_parameter_list*);
0056 struct command_parameter* store_comm_par_def(char* toks[], int start, int end);
0057
0058 struct expression* command_par_expr(const char* parameter, struct command*);
0059 int command_par(const char* parameter, const struct command*, struct command_parameter**);
0060 double command_par_special(const char* parameter, const struct element*);
0061 char* command_par_string(const char* parameter, const struct command*);
0062 char* command_par_string_user(const char* parameter, const struct command*);
0063 int command_par_string_user2(const char* parameter, const struct command*, char**);
0064 int command_par_value_user2(const char* parameter, const struct command*, double* val);
0065 int command_par_string_or_calldef(const char* par, const struct command*, char**);
0066 double command_par_value(const char* parameter, const struct command*);
0067 int command_par_value2(const char* parameter, const struct command*, double* val);
0068 struct double_array* command_par_array(const char* parameter, struct command*);
0069 int command_par_vector(const char* parameter, struct command*, double* vector);
0070 void set_command_par_value(const char* parameter, struct command*, double val);
0071 void store_comm_par_value(const char* parameter, double val, struct command*);
0072 const char* alias(char* par_string);
0073 void fill_par_var_list(struct el_list*, struct command_parameter*, struct var_list*);
0074 int decode_par(struct in_cmd* cmd, int start, int number, int pos, int log);
0075 void store_set(struct command*, int flag);
0076 void dump_command_parameter(struct command_parameter*);
0077 void export_comm_par(struct command_parameter*, char* string, int noexpr);
0078 void grow_command_parameter_list(struct command_parameter_list*);
0079 void print_command_parameter(struct command_parameter*);
0080 int par_present(const char* par, struct command*);
0081 int par_present_list(const char* par, struct command_list*);
0082 void store_comm_par_vector(const char* parameter, double* val, struct command*);
0083 void add_cmd_parameter_clone(struct command*, const struct command_parameter*, const char* par_name, int inf);
0084 void add_cmd_parameter_new(struct command*,double par_value, const char* par_name, int inf);
0085 void comm_para(const char* name, int* n_int, int* n_double, int* n_string, int* int_array, double* double_array, char* strings, int* string_lengths);
0086 int log_val(const char* name, struct command*);
0087
0088
0089
0090
0091 double get_value (const char* name, const char* par);
0092 int get_string(const char* name, const char* par, char* string);
0093 int get_vector(const char* name, const char* par, double* vector);
0094 void set_value (const char* name, const char* par, double* value);
0095
0096 #endif
0097