Go to the source code of this file.
Macros | |
#define | LOADER_PRE_1 ">> LOAD>> " |
#define | LOADER_PRE_N " >> " |
Functions | |
MbsData * | mbs_new_data () |
Allocate an MbsData structure with default field values (NULL, 0). More... | |
MbsData * | mbs_load (const char *mbs_filename) |
Load the data from the given multibody file. More... | |
MbsData * | mbs_load_with_config_name (const char *mbs_filename, const char *config_name) |
Load the data from the given multibody file and configuration filename. More... | |
MbsData * | mbs_load_with_config_filepath (const char *mbs_filename, const char *config_filepath) |
Load the data from the given multibody file and configuration filename. More... | |
MbsData * | mbs_load_with_loader (const char *mbs_filename, MbsLoader *mbs_loader) |
Load the data from the given multibody file using the provided MbsLoader. More... | |
MbsData * | mbs_load_with_exec (const char *mbs_filename, const char *exe_filepath) |
Load the multibody file using executable filepath to find project path. More... | |
MbsData * | mbs_load_from_path (const char *mbs_filename, const char *prj_path) |
Load the multibody file considering the provided project path. More... | |
MbsData * | mbs_full_loader (const char *mbs_filename, const char *prj_path, const char *exe_path, const char *config_path, const char *config_name, const char *symbolicLib_name, const char *symbolicLib_path, const char *userfctLib_name, const char *userfctLib_path, int load_symb_user, int verbose, MbsLoader *loader) |
Fully configurable loading function. More... | |
MbsData * | mbs_loader_load (const char *mbs_filepath, MbsLoader *mbs_loader) |
Load the data with the specified loader. More... | |
MbsLoadOptions * | mbs_new_load_options () |
Create a new structure with options for the loading. More... | |
int | mbs_print_load_options (MbsLoadOptions *opts, const char *indentation) |
Print the provided loader options. More... | |
void | mbs_delete_load_options (MbsLoadOptions *opts) |
Free the memory associated to the given MbsLoadOptions. More... | |
MbsLoader * | mbs_new_loader () |
Create a new structure loader used for the loading with options. More... | |
int | mbs_print_loader (MbsLoader *loader, const char *indentation) |
Print the provided loader. More... | |
void | mbs_delete_loader (MbsLoader *loader) |
Free the memory associated to the given MbsLoader. More... | |
void | mbs_set_symb_fun_null (MbsData *s) |
Set the pointer to project symbolic functions to NULL. More... | |
void | mbs_set_user_fun_null (MbsData *s) |
Set the pointer to project user functions to NULL. More... | |
MbsDp * | mbs_new_dp (MbsData *mbs_data) |
Allocate and initialize a MbsDp structure in MbsData::mbs_dp. More... | |
void | mbs_delete_dp (MbsDp *mbs_dp) |
free a MbsDp structure. More... | |
void | mbs_delete_data (MbsData *s) |
Free the memory used by the given MbsData structure. More... | |
void | mbs_load_user_model (MbsInfos *mbs_infos, UserModel *ums) |
Load the user model data. More... | |
void | mbs_bind_user_model (MbsInfos *mbs_infos, UserModel *ums) |
Bind the user model data to the MbsInfos memory pointers. More... | |
MbsData * | mbs_info_to_data (MbsLoader *mbs_loader, MbsData *s) |
Retrieve a MbsData structure from the given MbsInfos. More... | |
int | mbs_info_structurer (MbsInfos *mbs_infos) |
mbs_info_structurer More... | |
#define LOADER_PRE_1 ">> LOAD>> " |
#define LOADER_PRE_N " >> " |
Bind the user model data to the MbsInfos memory pointers.
void mbs_delete_data | ( | MbsData * | s | ) |
Free the memory used by the given MbsData structure.
s | the structure to be freed. |
void mbs_delete_dp | ( | MbsDp * | mbs_dp | ) |
void mbs_delete_load_options | ( | MbsLoadOptions * | opts | ) |
Free the memory associated to the given MbsLoadOptions.
! For the moment, does not free the char* fields !
opts | the MbsLoadOptions to delete |
void mbs_delete_loader | ( | MbsLoader * | loader | ) |
MbsData* mbs_full_loader | ( | const char * | mbs_filename, |
const char * | prj_path, | ||
const char * | exe_path, | ||
const char * | config_path, | ||
const char * | config_name, | ||
const char * | symbolicLib_name, | ||
const char * | symbolicLib_path, | ||
const char * | userfctLib_name, | ||
const char * | userfctLib_path, | ||
int | load_symb_user, | ||
int | verbose, | ||
MbsLoader * | loader | ||
) |
Fully configurable loading function.
This function is for advanced usage, allowing to pass multiple, or partial datas.
Globally this function is called by all simple loading function providing the unique parameter set by the user and setting other to NULL/default values.
All, except prj_path and exe_path, paths will be cleaned. It means they can start with "PRJPATH" to refer the project path. This project path is either:
prj_path
;loader
;exe_path
;Set pointers to NULL to use default behavior.
Set negative integers values to use default behavior.
A path/name cannot be specified in the provided loader and in the arguments.
[in] | mbs_filename | The name of the mbs file to be loaded WITH EXTENSION. Specifying "dataR" folder is no more required (but still accepted). |
[in] | prj_path | The project path (contains the dataR folder) or NULL. |
[in] | exe_path | The executable filepath or NULL. |
[in] | config_path | The path to the directory of the configuration file. If NULL is provided the configuration file is supposed to be next to the mbs file. It cannot be NON-NULL if config_name is NULL. |
[in] | config_name | The name of the configuration file WITH EXTENSION or NULL. It must be defined if config_path is specified. |
[in] | symbolicLib_name | The base name of the symbolic library to load or NULL. The prefix/suffix/extension related to the operating system will be added automatically. |
[in] | symbolicLib_path | The directory containing the symbolic library or NULL. |
[in] | userfctLib_name | The base name of the user function library to load or NULL. The prefix/suffix/extension related to the operating system will be added automatically. |
[in] | userfctLib_path | The directory containing the user function library or NULL. |
[in] | load_symb_user | Any of the valid enumeration to specify which project function libraries to be loaded (invalid value will result in default behavior). |
[in] | verbose | Verbosity of the loading procedure. |
[in,out] | loader | The pointer to a specified loader, or NULL. IT will be completed with the value provided in the other arguments. |
int mbs_info_structurer | ( | MbsInfos * | mbs_infos | ) |
mbs_info_structurer
[in,out] | mbs_infos |
Retrieve a MbsData structure from the given MbsInfos.
[in] | mbs_loader | The loader structure. It contains the MbsInfos structure already filled to be used to fill the MbsData structure and the content of the optional json configuration file. |
[in,out] | s | the MbsData structure that will be completed according to the MbsInfos structure. |
s
in case of success. MbsData* mbs_load | ( | const char * | mbs_filename | ) |
Load the data from the given multibody file.
The memory of a new MbsData is allocated.
Use default behavior to determine project path, libraries...
[in] | mbs_filename | path to the file to load including filename and extension. |
MbsData* mbs_load_from_path | ( | const char * | mbs_filename, |
const char * | prj_path | ||
) |
Load the multibody file considering the provided project path.
[in] | mbs_filename | path to the file to load including filename and extension. |
[in] | prj_path | Path to the project folder. |
MbsData* mbs_load_with_config_filepath | ( | const char * | mbs_filename, |
const char * | config_filepath | ||
) |
Load the data from the given multibody file and configuration filename.
[in] | mbs_filename | Path to the file to load including filename and extension. |
[in] | config_filepath | Path and filename of the configuration file to consider (with extension). |
MbsData* mbs_load_with_config_name | ( | const char * | mbs_filename, |
const char * | config_name | ||
) |
Load the data from the given multibody file and configuration filename.
The configuration file must be located next to the multibody file.
[in] | mbs_filename | Path to the file to load including filename and extension. |
[in] | config_filename | Name of the configuration file (with extension). |
MbsData* mbs_load_with_exec | ( | const char * | mbs_filename, |
const char * | exe_filepath | ||
) |
Load the multibody file using executable filepath to find project path.
[in] | mbs_filename | path to the file to load including filename and extension. |
[in] | exe_filepath | Executable path used to determine project path. |
Load the data from the given multibody file using the provided MbsLoader.
[in] | mbs_filename | path to the file to load including filename and extension. |
[in,out] | mbs_loader | options for loading. The non-assigned fields will be filled. |
MbsData* mbs_new_data | ( | ) |
Allocate an MbsData structure with default field values (NULL, 0).
Allocate and initialize a MbsDp structure in MbsData::mbs_dp.
[in] | mbs_data | the MbsData instance. |
MbsLoadOptions* mbs_new_load_options | ( | ) |
Create a new structure with options for the loading.
The memory of a new MbsLoadOptions is allocated. The options mainly consist in char variables that can contain name and path for separate libraries.
MbsLoader* mbs_new_loader | ( | ) |
Create a new structure loader used for the loading with options.
The memory of a new MbsLoader and its options is allocated. The memory for the "mds" field is not allocated (left to the user if needed)
int mbs_print_load_options | ( | MbsLoadOptions * | opts, |
const char * | indentation | ||
) |
Print the provided loader options.
[in] | opts | The pointer to the options. |
[in] | indentation | The indentation of all prints, except pointer adress. |
int mbs_print_loader | ( | MbsLoader * | loader, |
const char * | indentation | ||
) |
Print the provided loader.
[in] | loader | The pointer to the MbsLoader. |
[in] | indentation | The indentation of all prints, except pointer adress. |
void mbs_set_symb_fun_null | ( | MbsData * | s | ) |
Set the pointer to project symbolic functions to NULL.
[in,out] | fct | the MbsData instance containing the pointer of functions |