gebr-validator

gebr-validator

Synopsis

GebrValidator *     gebr_validator_new                  (GebrGeoXmlDocument **flow,
                                                         GebrGeoXmlDocument **line,
                                                         GebrGeoXmlDocument **proj);
gboolean            gebr_validator_insert               (GebrValidator *self,
                                                         GebrGeoXmlParameter *param,
                                                         GList **affected,
                                                         GError **error);
gboolean            gebr_validator_remove               (GebrValidator *self,
                                                         GebrGeoXmlParameter *param,
                                                         GList **affected,
                                                         GError **error);
gboolean            gebr_validator_rename               (GebrValidator *self,
                                                         GebrGeoXmlParameter *param,
                                                         const gchar *new_name,
                                                         GList **affected,
                                                         GError **error);
gboolean            gebr_validator_change_value         (GebrValidator *self,
                                                         GebrGeoXmlParameter *param,
                                                         const gchar *new_value,
                                                         GList **affected,
                                                         GError **error);
gboolean            gebr_validator_move                 (GebrValidator *self,
                                                         GebrGeoXmlParameter *source,
                                                         GebrGeoXmlParameter *pivot,
                                                         GebrGeoXmlDocumentType pivot_scope,
                                                         GebrGeoXmlParameter **copy,
                                                         GList **affected,
                                                         GError **error);
gboolean            gebr_validator_validate_param       (GebrValidator *validator,
                                                         GebrGeoXmlParameter *parameter,
                                                         gchar **validated,
                                                         GError **error);
gboolean            gebr_validator_validate_expr_on_scope
                                                        (GebrValidator *self,
                                                         const gchar *str,
                                                         GebrGeoXmlParameterType type,
                                                         GebrGeoXmlDocumentType scope,
                                                         GError **err);
gboolean            gebr_validator_validate_expr        (GebrValidator *validator,
                                                         const gchar *expression,
                                                         GebrGeoXmlParameterType type,
                                                         GError **error);
void                gebr_validator_get_documents        (GebrValidator *validator,
                                                         GebrGeoXmlDocument **flow,
                                                         GebrGeoXmlDocument **line,
                                                         GebrGeoXmlDocument **proj);
void                gebr_validator_update               (GebrValidator *validator);
void                gebr_validator_force_update         (GebrValidator *validator);
void                gebr_validator_free                 (GebrValidator *validator);
gboolean            gebr_validator_evaluate_interval    (GebrValidator *self,
                                                         const gchar *expr,
                                                         GebrGeoXmlParameterType type,
                                                         GebrGeoXmlDocumentType scope,
                                                         gboolean show_interval,
                                                         gchar **value,
                                                         GError **error);
gboolean            gebr_validator_evaluate             (GebrValidator *self,
                                                         const gchar *expr,
                                                         GebrGeoXmlParameterType type,
                                                         GebrGeoXmlDocumentType scope,
                                                         gchar **value,
                                                         GError **error);
gboolean            gebr_validator_evaluate_param       (GebrValidator *self,
                                                         GebrGeoXmlParameter *myparam,
                                                         gchar **value,
                                                         GError **error);
gboolean            gebr_validator_is_var_in_scope      (GebrValidator *self,
                                                         const gchar *name,
                                                         GebrGeoXmlDocumentType scope);
void                gebr_validator_set_document         (GebrValidator *self,
                                                         GebrGeoXmlDocument **doc,
                                                         GebrGeoXmlDocumentType type,
                                                         gboolean force);
gboolean            gebr_validator_use_iter             (GebrValidator *self,
                                                         const gchar *expr,
                                                         GebrGeoXmlParameterType type,
                                                         GebrGeoXmlDocumentType scope);
gboolean            gebr_validator_validate_control_parameter
                                                        (GebrValidator *self,
                                                         const gchar *name,
                                                         const gchar *expression,
                                                         GError **error);
                    GebrValidator;

Description

Details

gebr_validator_new ()

GebrValidator *     gebr_validator_new                  (GebrGeoXmlDocument **flow,
                                                         GebrGeoXmlDocument **line,
                                                         GebrGeoXmlDocument **proj);

flow :

Reference to a flow

line :

Reference to a line

proj :

Reference to a project

Returns :

A GebrValidator to validate type parameters and/or expressions.

gebr_validator_insert ()

gboolean            gebr_validator_insert               (GebrValidator *self,
                                                         GebrGeoXmlParameter *param,
                                                         GList **affected,
                                                         GError **error);

gebr_validator_remove ()

gboolean            gebr_validator_remove               (GebrValidator *self,
                                                         GebrGeoXmlParameter *param,
                                                         GList **affected,
                                                         GError **error);

validator :

A GebrValidator

param :

The variable to be deleted

affected :

A list containing the GebrGeoXmlParameter's affected

Returns :

TRUE if the variable was removed, FALSE if variable is not defined

gebr_validator_rename ()

gboolean            gebr_validator_rename               (GebrValidator *self,
                                                         GebrGeoXmlParameter *param,
                                                         const gchar *new_name,
                                                         GList **affected,
                                                         GError **error);

If the param has not been inserted in validator, returns FALSE

validator :

A GebrValidator

param :

The variable to operate on

new_name :

The new name for param

affected :

The GebrGeoXmlParameter's affected by this operation

error :

Return location for error, or NULL

Returns :

TRUE if no error ocurred, FALSE otherwise

gebr_validator_change_value ()

gboolean            gebr_validator_change_value         (GebrValidator *self,
                                                         GebrGeoXmlParameter *param,
                                                         const gchar *new_value,
                                                         GList **affected,
                                                         GError **error);

Find variable on the correct scope, and changes the param value to new_value.

validator :

A GebrValidator

param :

The variable to operate on

new_value :

The new value for param

affected :

The GebrGeoXmlParameter's affected by this operation

error :

Return location for error, or NULL

Returns :

TRUE if no error ocurred, FALSE otherwise

gebr_validator_move ()

gboolean            gebr_validator_move                 (GebrValidator *self,
                                                         GebrGeoXmlParameter *source,
                                                         GebrGeoXmlParameter *pivot,
                                                         GebrGeoXmlDocumentType pivot_scope,
                                                         GebrGeoXmlParameter **copy,
                                                         GList **affected,
                                                         GError **error);

validator :

A GebrValidator

source :

The variable to operate on

pivot :

The pivot for the operation, or NULL to append

pivot_scope :

The scope of the pivot

copy :

The return location for the new parameter

affected :

The GebrGeoXmlParameter's affected by this operation

error :

Return location for error

Returns :

TRUE if the move was successfull, FALSE otherwise.

gebr_validator_validate_param ()

gboolean            gebr_validator_validate_param       (GebrValidator *validator,
                                                         GebrGeoXmlParameter *parameter,
                                                         gchar **validated,
                                                         GError **error);

Validates parameter's values and returns the validated string. If parameter is not valid, then error is filled with the appropriate message and NULL is returned.

validator :

A GebrValidator

parameter :

The GebrGeoXmlParameter to be validated

validated :

Return location for the validated string, free with g_free()

error :

Return location for the error, or NULL

Returns :

TRUE if param is valid, FALSE otherwise.

gebr_validator_validate_expr_on_scope ()

gboolean            gebr_validator_validate_expr_on_scope
                                                        (GebrValidator *self,
                                                         const gchar *str,
                                                         GebrGeoXmlParameterType type,
                                                         GebrGeoXmlDocumentType scope,
                                                         GError **err);

gebr_validator_validate_expr ()

gboolean            gebr_validator_validate_expr        (GebrValidator *validator,
                                                         const gchar *expression,
                                                         GebrGeoXmlParameterType type,
                                                         GError **error);

validator :

A GebrValidator

expression :

The expression to be validated

type :

The type of the expression

error :

Returns location for the error, or NULL

Returns :

TRUE if expression is valid, FALSE otherwise.

gebr_validator_get_documents ()

void                gebr_validator_get_documents        (GebrValidator *validator,
                                                         GebrGeoXmlDocument **flow,
                                                         GebrGeoXmlDocument **line,
                                                         GebrGeoXmlDocument **proj);

validator :

A GebrValidator

flow :

Return location for the flow

line :

Return location for the line

proj :

Return location for the proj

gebr_validator_update ()

void                gebr_validator_update               (GebrValidator *validator);

Updates of all variables of the changed documents.

validator :

The GebrValidator to be updated

gebr_validator_force_update ()

void                gebr_validator_force_update         (GebrValidator *validator);

Forces update of all variables, ignoring document cache.


gebr_validator_free ()

void                gebr_validator_free                 (GebrValidator *validator);

validator :

The GebrValidator to be freed

gebr_validator_evaluate_interval ()

gboolean            gebr_validator_evaluate_interval    (GebrValidator *self,
                                                         const gchar *expr,
                                                         GebrGeoXmlParameterType type,
                                                         GebrGeoXmlDocumentType scope,
                                                         gboolean show_interval,
                                                         gchar **value,
                                                         GError **error);

gebr_validator_evaluate ()

gboolean            gebr_validator_evaluate             (GebrValidator *self,
                                                         const gchar *expr,
                                                         GebrGeoXmlParameterType type,
                                                         GebrGeoXmlDocumentType scope,
                                                         gchar **value,
                                                         GError **error);

gebr_validator_evaluate_param ()

gboolean            gebr_validator_evaluate_param       (GebrValidator *self,
                                                         GebrGeoXmlParameter *myparam,
                                                         gchar **value,
                                                         GError **error);

Calculate the value of expr and return it at value.

validator :

The GebrValidator to be used

myparam :

The parameter to evaluate

value :

Returns the value of the expression.

error :

Returns the error, if any.

Returns :

TRUE if expr could be evaluated. FALSE otherwise.

gebr_validator_is_var_in_scope ()

gboolean            gebr_validator_is_var_in_scope      (GebrValidator *self,
                                                         const gchar *name,
                                                         GebrGeoXmlDocumentType scope);

Returns :

TRUE if name exists in scope, FALSE otherwise

gebr_validator_set_document ()

void                gebr_validator_set_document         (GebrValidator *self,
                                                         GebrGeoXmlDocument **doc,
                                                         GebrGeoXmlDocumentType type,
                                                         gboolean force);

Set on validator, a new doc


gebr_validator_use_iter ()

gboolean            gebr_validator_use_iter             (GebrValidator *self,
                                                         const gchar *expr,
                                                         GebrGeoXmlParameterType type,
                                                         GebrGeoXmlDocumentType scope);

gebr_validator_validate_control_parameter ()

gboolean            gebr_validator_validate_control_parameter
                                                        (GebrValidator *self,
                                                         const gchar *name,
                                                         const gchar *expression,
                                                         GError **error);

Return FALSE if parameter have error, FALSE otherwise

self :

GebrValidator to validate parameter

error :

GError to set if has error

GebrValidator

typedef struct _GebrValidator GebrValidator;