GUIDOLib  1.7.7
A Music Score Rendering Engine
GUIDOParse.h
Go to the documentation of this file.
1 #ifndef GUIDOParse_H
2 #define GUIDOParse_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2014 Grame
7 
8  This Source Code Form is subject to the terms of the Mozilla Public
9  License, v. 2.0. If a copy of the MPL was not distributed with this
10  file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 
12  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
13  research@grame.fr
14 
15 */
16 
17 #include "GUIDOEngine.h"
18 #include "GUIDOExport.h"
19 
20 class GuidoParser;
21 class GuidoStream;
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
34  //---------------------------------------------------------------------------
35  // the new API
36  //---------------------------------------------------------------------------
37 
42  GUIDOAPI GuidoParser* GuidoOpenParser ();
43 
49  GUIDOAPI GuidoErrCode GuidoCloseParser (GuidoParser *p);
50 
56  GUIDOAPI const char* GuidoGetStream (const GuidoStream * gStream);
57 
62  GUIDOAPI void GuidoFreeStreamString(const char * str);
63 
70  GUIDOAPI ARHandler GuidoFile2AR (GuidoParser *p, const char* file);
71 
78  GUIDOAPI ARHandler GuidoString2AR (GuidoParser *p, const char* str);
79 
87  GUIDOAPI ARHandler GuidoStream2AR (GuidoParser *p, GuidoStream* stream);
88 
95  GUIDOAPI const char* GuidoStream2GuidoString(GuidoStream* stream);
96 
105  GUIDOAPI GuidoErrCode GuidoParserGetErrorCode (GuidoParser *p, int& line, int& col, const char ** msg );
106 
114  GUIDOAPI GuidoStream* GuidoOpenStream ();
115 
121  GUIDOAPI GuidoErrCode GuidoCloseStream (GuidoStream *s);
122 
145  GUIDOAPI GuidoErrCode GuidoWriteStream (GuidoStream *s, const char* str);
146 
153  GUIDOAPI GuidoErrCode GuidoResetStream (GuidoStream *s);
154 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif /* GUIDOParse_H */
GUIDOEngine.h
GuidoOpenParser
GuidoParser * GuidoOpenParser()
Creates a new parser.
GUIDOAPI
#define GUIDOAPI
Definition: GUIDOExport.h:39
GuidoCloseStream
GuidoErrCode GuidoCloseStream(GuidoStream *s)
Close a guido stream.
GuidoErrCode
GuidoErrCode
The guido error codes list.
Definition: GUIDOEngine.h:211
GuidoParserGetErrorCode
GuidoErrCode GuidoParserGetErrorCode(GuidoParser *p, int &line, int &col, const char **msg)
Get the error syntax line/column.
GuidoGetStream
const char * GuidoGetStream(const GuidoStream *gStream)
returns the string of the GuidoStream
GUIDOExport.h
GuidoOpenStream
GuidoStream * GuidoOpenStream()
Open a guido stream.
GuidoFreeStreamString
void GuidoFreeStreamString(const char *str)
free a string previously returned by GuidoGetStream
GuidoString2AR
ARHandler GuidoString2AR(GuidoParser *p, const char *str)
Parse a string and create the corresponding AR.
GuidoCloseParser
GuidoErrCode GuidoCloseParser(GuidoParser *p)
Close a guido parser and releases all the associated ressources.
GuidoStream2GuidoString
const char * GuidoStream2GuidoString(GuidoStream *stream)
Finalize a GuidoStream and create the corresponding clean GuidoString.
GuidoResetStream
GuidoErrCode GuidoResetStream(GuidoStream *s)
Erase all stream content in order to reuse it.
GuidoFile2AR
ARHandler GuidoFile2AR(GuidoParser *p, const char *file)
Parse a file and create the corresponding AR.
ARHandler
struct NodeAR * ARHandler
Definition: GUIDOEngine.h:36
GuidoStream2AR
ARHandler GuidoStream2AR(GuidoParser *p, GuidoStream *stream)
Parse a GuidoStream and create the corresponding AR.
GuidoWriteStream
GuidoErrCode GuidoWriteStream(GuidoStream *s, const char *str)
Write data to the stream.

Guido Project Copyright © 2019 Grame-CNCM