Lomse library. API documentation
0.30.0
|
#include <lomse_ldp_exporter.h>
LdpExporter is responsible for generating the LDP source format for an score. Exporting a document is a simple operation. It is just instantiating the exporter object, specifying the desired generation options and request to generate the source code. Example:
Public Member Functions | |
LdpExporter () | |
virtual | ~LdpExporter () |
Main methods for generating the source code | |
std::string | get_source (ImoObj *pImo) |
Options for generating code | |
void | set_indent_spaces (int spaces) |
void | set_remove_newlines (bool value) |
void | set_add_id (bool value) |
Getters for current options | |
int | get_indent_spaces () |
bool | get_remove_newlines () |
bool | get_add_id () |
LdpExporter::LdpExporter | ( | ) |
Constructor
|
inlinevirtual |
Destructor
|
inline |
Returns current setting: true if Ids will be generated.
|
inline |
Returns current setting for the number of spaces that will be generated for each indentation step.
|
inline |
Returns current setting: true if neither newlines nor indentation spaces will be generated.
|
inline |
This method generates the source code for the object passed as argument. The method is oriented to generate the full source code for an score but also can be used to generate partial source code for an element. This can be useful for tests or other purposes. PLEASE take into account that not all objects can directly generate source code, and that for others the code can be incomplete.
pImo | The object whose source code is requested. |
|
inline |
This method controls generation of objects Id. When set to true the object Id will be added after each tag name, e.g "(clef#39 G)" instead of "(clef G)".
value | true for generating Ids. |
|
inline |
This method controls the number of spaces that will be generated for each indentation step. By default, the exporter uses three spaces per step. Indentation is supressed when remove newlines is set to true. See set_remove_newlines().
spaces | The number of spaces to use for each indentation step. |
|
inline |
This method controls generation of newlines. When set to true maximum compactness will be achieved: no newlines and no indentation spaces will be generated. Default value is false so newlines and indentation spaces will be generated. The number of indentation spaces can be controlled with method set_indent_spaces().
value | true for not generating neither newlines nor indent spaces. |