SqueezeBrains SDK 1.13
Solution

Solution management interface. More...

Collaboration diagram for Solution:

Data Structures

struct  sb_t_solution_info
 Solution info structure. More...
 

Macros

#define SB_SOLUTION_EXT   "rprj"
 Extension of the SqueezeBrains solution file.
 

Functions

sb_t_err sb_solution_get_info (const char *const solution_file, sb_t_solution_info **const solution)
 Returns the information contained in the solution_file. More...
 
sb_t_err sb_solution_destroy_info (sb_t_solution_info **const solution)
 Destroys the structure of the solution information. More...
 
sb_t_err sb_solution_set_current_project (const char *const solution_file, const char *const project_uuid)
 Set current project in the solution_file. More...
 
sb_t_err sb_solution_remove_project (const char *const solution_file, const char *const project_uuid)
 Delete the project with the specified uuid from file. More...
 
sb_t_err sb_solution_get_version (const char *const solution_file, sb_t_version *version, char *const version_str, int size_version_str)
 Gets the version of the solution file. More...
 

Detailed Description

Solution management interface.

See Solution and projects management for more information.

Function Documentation

◆ sb_solution_destroy_info()

sb_t_err sb_solution_destroy_info ( sb_t_solution_info **const  solution)

Destroys the structure of the solution information.

Parameters
[in,out]solutionPointer to the solution information structure.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_solution_get_info

◆ sb_solution_get_info()

sb_t_err sb_solution_get_info ( const char *const  solution_file,
sb_t_solution_info **const  solution 
)

Returns the information contained in the solution_file.

Since in an solution file there can be more than one project, the function allows to have the list of existing projects.

Parameters
[in]solution_fileSolution file name.
[out]solutionPointer to the structure of the solution Information contained in the solution_file.
The variable must be destroyed with the function sb_solution_destroy_info .
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_solution_destroy_info
sb_project_get_info

◆ sb_solution_get_version()

sb_t_err sb_solution_get_version ( const char *const  solution_file,
sb_t_version version,
char *const  version_str,
int  size_version_str 
)

Gets the version of the solution file.

Parameters
[in]solution_fileName with path of the solution file.
[out]versionPointer of the structure.
[out]version_strPointer of the string. This parameter can be left to NULL if not necessary.
[in]size_version_strSize of the version_str string.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_svl_version

◆ sb_solution_remove_project()

sb_t_err sb_solution_remove_project ( const char *const  solution_file,
const char *const  project_uuid 
)

Delete the project with the specified uuid from file.

Parameters
[in]solution_fileFilename of the solution.
[in]project_uuidProject uuid.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_create
sb_project_save
sb_solution_get_info

◆ sb_solution_set_current_project()

sb_t_err sb_solution_set_current_project ( const char *const  solution_file,
const char *const  project_uuid 
)

Set current project in the solution_file.

Parameters
[in]solution_fileSolution file name.
[in]project_uuidUUID of the project to be set as current.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_solution_get_info