[xiph-commits] r8334 - in trunk/oggdsf/src: lib/codecs/cmml/libCMMLTags lib/codecs/cmml/libCMMLTagsDotNET tools/DNPlay

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Mon Dec 6 00:04:47 PST 2004


Author: illiminable
Date: 2004-12-06 00:04:46 -0800 (Mon, 06 Dec 2004)
New Revision: 8334

Modified:
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLPreamble.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLPreamble.h
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLRootTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_ClipTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLDoc.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLDoc.h
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.h
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLRootTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLRootTag.h
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/libCMMLTagsDotNET.vcproj
   trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
   trunk/oggdsf/src/tools/DNPlay/frmDNPlay.resx
Log:
* Fixed some NULL pointers in the CMML classes

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLPreamble.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLPreamble.cpp	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLPreamble.cpp	2004-12-06 08:04:46 UTC (rev 8334)
@@ -68,8 +68,14 @@
 void C_CMMLPreamble::setXmlStandAlone(wstring inStandAlone) {
 }
 
+C_CMMLPreamble* C_CMMLPreamble::clone() {
+	C_CMMLPreamble* retPreamble = new C_CMMLPreamble();
+	retPreamble->mXmlEncoding = mXmlEncoding;
+	retPreamble->mXmlStandAlone = mXmlStandAlone;
+	retPreamble->mXmlVersion = mXmlVersion;
+	return retPreamble;
+}
 
-
 //Others
 wstring C_CMMLPreamble::toString() {
     wstring retStr;

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLPreamble.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLPreamble.h	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLPreamble.h	2004-12-06 08:04:46 UTC (rev 8334)
@@ -44,6 +44,8 @@
 	C_CMMLPreamble(void);
 	virtual ~C_CMMLPreamble(void);
 
+
+
 	//Accessors
 	wstring xmlVersion();
 	wstring xmlEncoding();
@@ -56,6 +58,7 @@
 
 	//Others
 	virtual wstring toString();
+	C_CMMLPreamble* clone();
 
 
 protected:

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLRootTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLRootTag.cpp	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLRootTag.cpp	2004-12-06 08:04:46 UTC (rev 8334)
@@ -79,7 +79,9 @@
 void C_CMMLRootTag::privateClone(C_CMMLTag* outTag) {
 	C_HumReadCMMLTag::privateClone(outTag);
 	C_CMMLRootTag* locTag = reinterpret_cast<C_CMMLRootTag*>(outTag);
-	locTag->setStream(mStream->clone());
+	if (mStream != NULL) {
+		locTag->setStream(mStream->clone());
+	}
 	locTag->setHead(mHead->clone());
 	locTag->setClipList(mClipList->clone());
 	

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_ClipTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_ClipTag.cpp	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_ClipTag.cpp	2004-12-06 08:04:46 UTC (rev 8334)
@@ -44,6 +44,7 @@
 	mImage = NULL;
 	mDesc = NULL;
 	mStart = L"0";
+
 }
 
 C_ClipTag::~C_ClipTag(void)

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLDoc.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLDoc.cpp	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLDoc.cpp	2004-12-06 08:04:46 UTC (rev 8334)
@@ -40,10 +40,39 @@
 
 CMMLDoc::CMMLDoc(void)
 {
+	mBaseClass = new C_CMMLDoc;
 }
 
 CMMLDoc::~CMMLDoc(void)
 {
+	delete mBaseClass;
 }
+
+
+CMMLPreamble* CMMLDoc::preamble() 
+{
+	return new CMMLPreamble(getMe()->preamble()->clone());
 }
+CMMLRootTag* CMMLDoc::root() 
+{
+	return new CMMLRootTag(getMe()->root()->clone());
 }
+
+void CMMLDoc::setRoot(CMMLRootTag* inRootTag) 
+{
+	getMe()->setRoot( inRootTag->getMe()->clone() );
+}
+
+String* CMMLDoc::toString()
+{
+	return Wrappers::WStrToNetStr( getMe()->toString().c_str() );
+
+}
+C_CMMLDoc* CMMLDoc::getMe()
+{
+	return (C_CMMLDoc*)mBaseClass;
+}
+
+
+}
+}

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLDoc.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLDoc.h	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLDoc.h	2004-12-06 08:04:46 UTC (rev 8334)
@@ -38,14 +38,17 @@
 #using "libiWrapper.dll"
 using namespace illiminable::libiWrapper;
 
-#include "StreamTag.h"
-#include "HeadTag.h"
-#include "ClipTagList.h"
-#include "CMMLTag.h"
+//#include "StreamTag.h"
+//#include "HeadTag.h"
+//#include "ClipTagList.h"
+//#include "CMMLTag.h"
 
+#include "CMMLPreamble.h"
+#include "CMMLRootTag.h"
+
 #pragma unmanaged
 #include <config.h>
-#include <C_CMMLRootTag.h>
+#include <C_CMMLDoc.h>
 #pragma managed
 
 namespace illiminable {
@@ -56,6 +59,19 @@
 	public:
 		CMMLDoc(void);
 		~CMMLDoc(void);
+
+
+		CMMLPreamble* preamble();
+		CMMLRootTag* root();
+
+		void setRoot(CMMLRootTag* inRootTag);
+
+		virtual String* toString();
+
+		C_CMMLDoc* getMe();
+		//C_CMMLDoc* clone();
+	protected:
+		C_CMMLDoc* mBaseClass;
 	};
 }
 }

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.cpp	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.cpp	2004-12-06 08:04:46 UTC (rev 8334)
@@ -41,6 +41,10 @@
 	CMMLPreamble::CMMLPreamble(void)
 	{
 	}
+	CMMLPreamble::CMMLPreamble(C_CMMLPreamble* inPreamble)
+	{
+		mBaseClass = inPreamble;
+	}
 
 	CMMLPreamble::~CMMLPreamble(void)
 	{

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.h	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.h	2004-12-06 08:04:46 UTC (rev 8334)
@@ -64,6 +64,7 @@
 	{
 	public:
 		CMMLPreamble(void);
+		CMMLPreamble(C_CMMLPreamble* inPreamble);
 		~CMMLPreamble(void);
 
 

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLRootTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLRootTag.cpp	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLRootTag.cpp	2004-12-06 08:04:46 UTC (rev 8334)
@@ -43,6 +43,11 @@
 	mBaseClass = new C_CMMLRootTag;
 }
 
+CMMLRootTag::CMMLRootTag(C_CMMLRootTag* inRootTag)
+{
+	mBaseClass = inRootTag;
+}
+
 CMMLRootTag::~CMMLRootTag(void)
 
 {

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLRootTag.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLRootTag.h	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLRootTag.h	2004-12-06 08:04:46 UTC (rev 8334)
@@ -55,6 +55,7 @@
 	{
 	public:
 		CMMLRootTag(void);
+		CMMLRootTag(C_CMMLRootTag* inRootTag);
 		virtual ~CMMLRootTag(void);
 
 			//Accessors

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/libCMMLTagsDotNET.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/libCMMLTagsDotNET.vcproj	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/libCMMLTagsDotNET.vcproj	2004-12-06 08:04:46 UTC (rev 8334)
@@ -221,6 +221,9 @@
 		</Configuration>
 	</Configurations>
 	<References>
+		<ProjectReference
+			ReferencedProjectIdentifier="{FCFE729D-EADE-45BA-9506-7E82A46403F7}"
+			Name="libiWrapper"/>
 	</References>
 	<Files>
 		<Filter

Modified: trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
===================================================================
--- trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs	2004-12-06 08:04:46 UTC (rev 8334)
@@ -386,6 +386,7 @@
 			this.lblAnchorLink.Name = "lblAnchorLink";
 			this.lblAnchorLink.Size = new System.Drawing.Size(288, 24);
 			this.lblAnchorLink.TabIndex = 12;
+			this.lblAnchorLink.Click += new System.EventHandler(this.lblAnchorLink_Click);
 			// 
 			// lblTitle
 			// 
@@ -751,5 +752,10 @@
 			}
 		}
 
+		private void lblAnchorLink_Click(object sender, System.EventArgs e)
+		{
+		
+		}
+
 	}
 }

Modified: trunk/oggdsf/src/tools/DNPlay/frmDNPlay.resx
===================================================================
--- trunk/oggdsf/src/tools/DNPlay/frmDNPlay.resx	2004-12-06 06:05:57 UTC (rev 8333)
+++ trunk/oggdsf/src/tools/DNPlay/frmDNPlay.resx	2004-12-06 08:04:46 UTC (rev 8334)
@@ -178,10 +178,10 @@
   <data name="cmdStop.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
   </data>
-  <data name="cmdStop.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <data name="cmdStop.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>Private</value>
   </data>
-  <data name="cmdStop.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <data name="cmdStop.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>Private</value>
   </data>
   <data name="cmdPause.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -295,12 +295,12 @@
   <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>80</value>
   </data>
+  <data name="$this.Name">
+    <value>frmDNPlay</value>
+  </data>
   <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </data>
-  <data name="$this.Name">
-    <value>frmDNPlay</value>
-  </data>
   <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>Private</value>
   </data>



More information about the commits mailing list