GUIDOLib
1.7.7
A Music Score Rendering Engine
|
Functions | |
GuidoParser * | openParser () |
Creates a new parser. More... | |
GuidoErrCode | closeParser (GuidoParser *p) |
Close a guido parser and releases all the associated ressources. More... | |
ARHandler | file2AR (GuidoParser *parser, const std::string &file) |
Parse a file and create the corresponding AR. More... | |
ARHandler | string2AR (GuidoParser *parser, const std::string &gmnCode) |
Parse a string and create the corresponding AR. More... | |
std::string | getStream (const GuidoStream *gStream) const |
returns the string of the stream More... | |
ARHandler | stream2AR (GuidoParser *p, GuidoStream *stream) |
Parse a stream and create the corresponding AR. More... | |
ParserError | parserGetErrorCode (GuidoParser *p) |
Get the error syntax line/column/message. More... | |
GuidoStream * | openStream () |
Open a guido stream. More... | |
GuidoErrCode | closeStream (GuidoStream *s) |
Close a guido stream. More... | |
GuidoErrCode | writeStream (GuidoStream *s, const std::string &str) |
Write data to the stream. More... | |
GuidoErrCode | resetStream (GuidoStream *s) |
Erase all stream content in order to reuse it. More... | |
GuidoErrCode closeParser | ( | GuidoParser * | p | ) |
Close a guido parser and releases all the associated ressources.
p | a parser previously opened with openParser |
GuidoErrCode closeStream | ( | GuidoStream * | s | ) |
Close a guido stream.
s | a stream |
ARHandler file2AR | ( | GuidoParser * | parser, |
const std::string & | file | ||
) |
Parse a file and create the corresponding AR.
parser | a parser previously opened with openParser |
file | the file to parse. |
std::string getStream | ( | const GuidoStream * | gStream | ) | const |
returns the string of the stream
gStream | a stream |
GuidoParser* openParser | ( | ) |
Creates a new parser.
GuidoStream* openStream | ( | ) |
Open a guido stream.
Guido streams are intended to implement real-time input to the parser. In particular, streams allow to retrieve an AR in while the stream is still opened.
ParserError parserGetErrorCode | ( | GuidoParser * | p | ) |
Get the error syntax line/column/message.
p | a parser previously opened with openParser |
GuidoErrCode resetStream | ( | GuidoStream * | s | ) |
Erase all stream content in order to reuse it.
s | a stream previoulsy opened with openStream |
ARHandler stream2AR | ( | GuidoParser * | p, |
GuidoStream * | stream | ||
) |
Parse a stream and create the corresponding AR.
p | a parser previously opened with openParser |
stream | the stream to parse. |
ARHandler string2AR | ( | GuidoParser * | parser, |
const std::string & | gmnCode | ||
) |
Parse a string and create the corresponding AR.
parser | a parser previously opened with openParser |
gmnCode | the string to parse. |
GuidoErrCode writeStream | ( | GuidoStream * | s, |
const std::string & | str | ||
) |
Write data to the stream.
Writing data to a stream may be viewed as writing gmn code by portion. Syntax errors concerning music/voice/tag/event/parameter non-closure won't be declared as such (GuidoWriteStream uses an automatic-closure mechanism). When a syntax error (other than a non-closure) occurs when writting data to the stream, the stream becomes invalid and should be closed. Further attempts to write data will always result in a syntax error.
Regarding syntax errors, allowed incomplete constructs are :
s | a stream previoulsy opened with openStream |
str | a string containing a portion of gmn code |