[xiph-commits] r10059 -
trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET
davidb at svn.xiph.org
davidb at svn.xiph.org
Sat Sep 24 15:02:44 PDT 2005
Author: davidb
Date: 2005-09-24 15:02:43 -0700 (Sat, 24 Sep 2005)
New Revision: 10059
Modified:
trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET/CMML_Parser.cpp
trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET/CMML_Parser.h
Log:
Pass some error information out
Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET/CMML_Parser.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET/CMML_Parser.cpp 2005-09-24 22:02:05 UTC (rev 10058)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET/CMML_Parser.cpp 2005-09-24 22:02:43 UTC (rev 10059)
@@ -16,12 +16,12 @@
mCMMLParser = NULL;
}
-bool CMML_Parser::parseDoc(String* inBuffer, CMMLDoc* outCMMLDoc)
+bool CMML_Parser::parseDoc(String* inBuffer, CMMLDoc* outCMMLDoc, CMMLError* outCMMLError)
{
wchar_t* locWS = Wrappers::netStrToWStr(inBuffer);
wstring locBuffer = locWS;
- bool retVal = mCMMLParser->parseDoc(locBuffer, outCMMLDoc->getMe());
+ bool retVal = mCMMLParser->parseDoc(locBuffer, outCMMLDoc->getMe(), outCMMLError->getMe());
Wrappers::releaseWStr(locWS);
Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET/CMML_Parser.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET/CMML_Parser.h 2005-09-24 22:02:05 UTC (rev 10058)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLParseDotNET/CMML_Parser.h 2005-09-24 22:02:43 UTC (rev 10059)
@@ -14,8 +14,37 @@
namespace illiminable {
namespace libCMMLParserDotNET {
-
+// DLB. 21/9/2005. Allow parse error information to be sent back to caller
+public __gc class CMMLError
+{
+public:
+ CMMLError()
+ {
+ mCMMLError = new C_CMMLError();
+ }
+
+ void SetLineNumber(int lLineNumber)
+ {
+ mCMMLError->SetLineNumber(lLineNumber);
+ }
+
+ int GetLineNumber()
+ {
+ return mCMMLError->GetLineNumber();
+ }
+
+ C_CMMLError* getMe()
+ {
+ return (C_CMMLError*)mCMMLError;
+ }
+
+
+private:
+ C_CMMLError* mCMMLError;
+};
+
+
//Original interface
//==============
//bool parseClipTag(wstring inClipText, C_ClipTag* outClip);
@@ -36,7 +65,8 @@
bool parseDocFromFile(String* inFileName, CMMLDoc* outCMMLDoc);
- bool parseDoc(String* inBuffer, CMMLDoc* outCMMLDoc);
+ // DLB. 20/9/2005. Parse the DOC using an already read-in file
+ bool parseDoc(String* inBuffer, CMMLDoc* outCMMLDoc, CMMLError* outCMMLError);
protected:
CMMLParser* mCMMLParser;
More information about the commits
mailing list