[xiph-commits] r8583 - in trunk/oggdsf: sln/oggdsf_all src/lib/core/ogg/libOOOggSeek src/lib/helper src/lib/helper/libTemporalURI src/lib/helper/libilliCore

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sun Jan 2 20:35:37 PST 2005


Author: illiminable
Date: 2005-01-02 20:35:37 -0800 (Sun, 02 Jan 2005)
New Revision: 8583

Added:
   trunk/oggdsf/src/lib/helper/libTemporalURI/
   trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp
   trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.h
   trunk/oggdsf/src/lib/helper/libTemporalURI/ReadMe.txt
   trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.cpp
   trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.h
   trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.vcproj
   trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.cpp
   trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.h
Modified:
   trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
   trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
   trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.cpp
   trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.h
Log:
* Temporal URI library almost done... needs testing.

Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2005-01-03 04:35:37 UTC (rev 8583)
@@ -1121,6 +1121,11 @@
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libTemporalURI", "..\..\src\lib\helper\libTemporalURI\libTemporalURI.vcproj", "{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		Debug = Debug
@@ -2450,6 +2455,26 @@
 		{A7E7277C-1F4A-4F43-97F7-ABD1C61FD6EB}.Release_SSE.Build.0 = Release|.NET
 		{A7E7277C-1F4A-4F43-97F7-ABD1C61FD6EB}.Release_SSE2.ActiveCfg = Release|.NET
 		{A7E7277C-1F4A-4F43-97F7-ABD1C61FD6EB}.Release_SSE2.Build.0 = Release|.NET
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Debug.ActiveCfg = Debug|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Debug.Build.0 = Debug|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Debug Unicode.ActiveCfg = Debug|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Debug Unicode.Build.0 = Debug|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Debug__cdecl.ActiveCfg = Debug|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Debug__cdecl.Build.0 = Debug|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.MakeFile.ActiveCfg = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.MakeFile.Build.0 = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release.ActiveCfg = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release.Build.0 = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release Unicode.ActiveCfg = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release Unicode.Build.0 = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release__cdecl.ActiveCfg = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release__cdecl.Build.0 = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release_NoDotNET.ActiveCfg = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release_NoDotNET.Build.0 = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release_SSE.ActiveCfg = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release_SSE.Build.0 = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release_SSE2.ActiveCfg = Release|Win32
+		{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}.Release_SSE2.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionItems) = postSolution
 	EndGlobalSection

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2005-01-03 04:35:37 UTC (rev 8583)
@@ -211,6 +211,7 @@
 		}
 		//stDebug<<endl;
 		mFileDuration = mLastSeekTime;
+		
 	}
 	mFilePos += inOggPage->pageSize();
 	//stDebug<<"File Pos : "<<mFilePos<<endl;

Added: trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp	2005-01-03 04:35:37 UTC (rev 8583)
@@ -0,0 +1,245 @@
+#include "StdAfx.h"
+#include "C_TimeStamp.h"
+
+C_TimeStamp::C_TimeStamp(void)
+	:	mSecs(0)
+	,	mHuns(0)
+	,	mStampType(TS_NONE)
+{
+}
+
+C_TimeStamp::~C_TimeStamp(void)
+{
+}
+
+bool C_TimeStamp::parseNPT(string inTimeStamp, sFourPartTime* inFPT) {
+
+	string locLeftOver = "";
+
+	bool locWasOK = parseThreePartTime(inTimeStamp, inFPT, &locLeftOver);
+
+	if (locWasOK) {
+		if ( (locLeftOver.find(".") == 0) || (locLeftOver == "")) {
+			locLeftOver = locLeftOver.substr(1);
+			if (locLeftOver == "") {
+				inFPT->partials = 0;
+				return true;
+			} else {
+				LOOG_UINT64 locSubSec = StringHelper::stringToFractNum(locLeftOver);
+				
+				if (locSubSec >= 0) {
+					inFPT->partials = locSubSec;
+				} else {
+					return false;
+				}
+			}
+		} else {
+			return false;
+		}
+	} else {
+		return false;
+	}
+}
+
+bool C_TimeStamp::parseSMPT(string inTimeStamp, sFourPartTime* inFPT) {
+	string locLeftOver = "";
+
+	bool locWasOK = parseThreePartTime(inTimeStamp, inFPT, &locLeftOver);
+
+	if (locWasOK) {
+		if ( (locLeftOver.find(":") == 0) || (locLeftOver == "")) {
+			locLeftOver = locLeftOver.substr(1);
+			if (locLeftOver == "") {
+				inFPT->partials = 0;
+				return true;
+			} else {
+				long locSubSec = StringHelper::stringToNum(locLeftOver);
+				
+				if (locSubSec >= 0) {
+					//TODO::: Verify frames < numframes for type.
+					inFPT->partials = locSubSec;
+				}
+			}
+		} else {
+			return false;
+		}
+	} else {
+		return false;
+	}
+}
+
+bool C_TimeStamp::parseThreePartTime(string inTimeStamp, sFourPartTime* inFPT, string* outLeftOver) {
+	//This is *H:MM:SS
+	size_t locColonPos = inTimeStamp.find(":");
+	
+	string locHours;
+	string locMins;
+	string locSecs;
+
+	long locHH = 0;
+	long locMM = 0;
+	long locSS = 0;
+
+	if (locColonPos != string::npos) {
+		locHours = inTimeStamp.substr(0, locColonPos);
+	} else {
+		return false;
+	}
+
+	inTimeStamp = inTimeStamp.substr(locColonPos + 1);
+	locColonPos = inTimeStamp.find(":");
+
+	if (locColonPos != string::npos) {
+		locMins = inTimeStamp.substr(0, locColonPos);	
+	} else {
+		return false;
+	}
+
+	inTimeStamp = inTimeStamp.substr(locColonPos + 1);
+	locColonPos = inTimeStamp.find(":");
+
+	if (locColonPos != string::npos) {
+		locSecs = inTimeStamp.substr(0, locColonPos);	
+	} else {
+		locColonPos = inTimeStamp.find(".");
+
+		if (locColonPos != string::npos) {
+			locSecs = inTimeStamp.substr(0, locColonPos);
+		} else {
+			locSecs = inTimeStamp.substr(0);
+		}
+	}
+
+	if (locColonPos == string::npos) {
+		inTimeStamp = "";
+	} else {
+		inTimeStamp = inTimeStamp.substr(locColonPos);
+	}
+
+	locHH = StringHelper::stringToNum(locHours);
+	locMM = StringHelper::stringToNum(locMins);
+	locSS = StringHelper::stringToNum(locSecs);
+
+	if (		(locHH >= 0) && (locMM >= 0) && (locSS >= 0) && (locMM <= 59) && (locSS <=59) ) {
+		//The upper bound on hh is not checked here... it's upto the smpt time parser to ensure it <= 99
+
+		//Other wise, everything is ok.
+		inFPT->hours = locHH;
+		inFPT->minutes = locMM;
+		inFPT->seconds = locSS;
+		inFPT->partials = 0;
+		*outLeftOver = inTimeStamp;
+		return true;
+
+	} else {
+		return false;
+	}
+
+
+	
+
+}
+
+bool C_TimeStamp::parseSecsOnly(string inTimeStamp) {
+	
+	string locSecs;
+	string locHuns;
+	LOOG_UINT64 locSS;
+	LOOG_UINT64 locNN;
+
+	size_t locDotPos = inTimeStamp.find(".");
+
+	if (locDotPos == string::npos) {
+		//No dot here
+		locSS = StringHelper::stringToNum(inTimeStamp);
+	} else {
+		//Dotted time
+
+		locSecs = inTimeStamp.substr(0, locDotPos);
+		locHuns = inTimeStamp.substr(locDotPos + 1);
+
+		locSS = StringHelper::stringToNum(locSecs);
+
+		if (locHuns == "") {
+			locNN = 0;
+		} else {
+			locNN = StringHelper::stringToFractNum(locHuns);
+		}
+
+		if (	(locSS >= 0) && (locNN >= 0) && (locSS <= 59) ) {
+			mSecs = locSS;
+			mHuns = locNN;
+			mStampType = TS_NPT_SECS;
+			return true;
+		} else {
+			return false;
+		}
+	}
+}
+
+LOOG_INT64 C_TimeStamp::toHunNanos() {
+	switch (mStampType) {
+		case TS_NPT_SECS:
+			return (mSecs * 10000000) + (mHuns);
+		default:
+			return  -1;
+
+	};
+}
+
+bool C_TimeStamp::parseTimeStamp(string inTimeStamp)
+{
+	if (inTimeStamp.find("npt:") == 0) {
+		//NPT time stamp
+		inTimeStamp = inTimeStamp.substr(4);
+
+		if (inTimeStamp.find(":") != string::npos) {
+			//We have four part time
+			sFourPartTime locFPT;
+			if ( parseNPT(inTimeStamp, &locFPT) ) {
+				mFPT = locFPT;
+				mStampType = TS_NPT_FULL;
+				return true;
+			} else {
+				return false;
+			}
+			
+		} else {
+			return parseSecsOnly(inTimeStamp);
+		}
+
+	} else if (inTimeStamp.find("smpte-" == 0)) {
+		//One of the smpt stamps
+		inTimeStamp = inTimeStamp.substr(6);
+
+		size_t locColonPos = inTimeStamp.find(":");
+
+		if (locColonPos != string::npos) {
+			string locFrameRate = inTimeStamp.substr(0, locColonPos);
+
+			//TODO::: Need to set the spec type here...
+			inTimeStamp = inTimeStamp.substr(locColonPos + 1);
+
+			sFourPartTime locFPT;
+			if ( parseSMPT(inTimeStamp, &locFPT) ) {
+				mFPT = locFPT;
+				mStampType = TS_SMPT;
+				return true;
+			} else {
+				return false;
+			}
+		} else {
+			return false;
+		}
+
+
+
+	} else {
+		//Assume it's default numeric npt
+		return parseSecsOnly(inTimeStamp);
+
+
+
+	}
+
+}
\ No newline at end of file

Added: trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.h	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.h	2005-01-03 04:35:37 UTC (rev 8583)
@@ -0,0 +1,54 @@
+#pragma once
+
+#include <string>
+using namespace std;
+
+#include "libilliCore/StringHelper.h"
+class C_TimeStamp
+{
+public:
+	C_TimeStamp(void);
+	C_TimeStamp(string inTimeStamp);
+	virtual ~C_TimeStamp(void);
+
+
+	enum eTimeStampType {
+		TS_NONE,
+		TS_NPT_SECS,
+		TS_NPT_FULL,
+		TS_SMPT
+	};
+
+	struct sFourPartTime {
+		LOOG_UINT64 hours;
+		short minutes;
+		short seconds;
+		LOOG_UINT64 partials;
+	};
+	bool parseTimeStamp(string inTimeStamp);
+
+	string toString();
+	LOOG_INT64 toHunNanos();
+	
+
+protected:
+	
+
+	bool parseNPT(string inTimeStamp, sFourPartTime* inFPT);
+	bool parseThreePartTime(string inTimeStamp, sFourPartTime* inFPT, string* outLeftOver);
+	bool parseSMPT(string inTimeStamp, sFourPartTime* inFPT);
+	bool parseSecsOnly(string inTimeStamp);
+
+	string mTimeStamp;
+
+	sFourPartTime mFPT;
+	eTimeStampType mStampType;
+
+	LOOG_UINT64 mSecs;
+	LOOG_UINT64 mHuns;
+
+
+
+
+
+};

Added: trunk/oggdsf/src/lib/helper/libTemporalURI/ReadMe.txt
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/ReadMe.txt	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/ReadMe.txt	2005-01-03 04:35:37 UTC (rev 8583)
@@ -0,0 +1,32 @@
+========================================================================
+    DYNAMIC LINK LIBRARY : libTemporalURI Project Overview
+========================================================================
+
+AppWizard has created this libTemporalURI DLL for you.  
+This file contains a summary of what you will find in each of the files that
+make up your libTemporalURI application.
+
+
+libTemporalURI.vcproj
+    This is the main project file for VC++ projects generated using an Application Wizard. 
+    It contains information about the version of Visual C++ that generated the file, and 
+    information about the platforms, configurations, and project features selected with the
+    Application Wizard.
+
+libTemporalURI.cpp
+    This is the main DLL source file.
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+    These files are used to build a precompiled header (PCH) file
+    named libTemporalURI.pch and a precompiled types file named StdAfx.obj.
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" comments to indicate parts of the source code you
+should add to or customize.
+
+/////////////////////////////////////////////////////////////////////////////

Added: trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.cpp	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.cpp	2005-01-03 04:35:37 UTC (rev 8583)
@@ -0,0 +1,36 @@
+// libTemporalURI.cpp : Defines the entry point for the DLL application.
+//
+
+#include "stdafx.h"
+#include "libTemporalURI.h"
+BOOL APIENTRY DllMain( HANDLE hModule, 
+                       DWORD  ul_reason_for_call, 
+                       LPVOID lpReserved
+					 )
+{
+	switch (ul_reason_for_call)
+	{
+	case DLL_PROCESS_ATTACH:
+	case DLL_THREAD_ATTACH:
+	case DLL_THREAD_DETACH:
+	case DLL_PROCESS_DETACH:
+		break;
+	}
+    return TRUE;
+}
+
+// This is an example of an exported variable
+LIBTEMPORALURI_API int nlibTemporalURI=0;
+
+// This is an example of an exported function.
+LIBTEMPORALURI_API int fnlibTemporalURI(void)
+{
+	return 42;
+}
+
+// This is the constructor of a class that has been exported.
+// see libTemporalURI.h for the class definition
+ClibTemporalURI::ClibTemporalURI()
+{ 
+	return; 
+}

Added: trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.h	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.h	2005-01-03 04:35:37 UTC (rev 8583)
@@ -0,0 +1,22 @@
+// The following ifdef block is the standard way of creating macros which make exporting 
+// from a DLL simpler. All files within this DLL are compiled with the LIBTEMPORALURI_EXPORTS
+// symbol defined on the command line. this symbol should not be defined on any project
+// that uses this DLL. This way any other project whose source files include this file see 
+// LIBTEMPORALURI_API functions as being imported from a DLL, whereas this DLL sees symbols
+// defined with this macro as being exported.
+#ifdef LIBTEMPORALURI_EXPORTS
+#define LIBTEMPORALURI_API __declspec(dllexport)
+#else
+#define LIBTEMPORALURI_API __declspec(dllimport)
+#endif
+
+// This class is exported from the libTemporalURI.dll
+class LIBTEMPORALURI_API ClibTemporalURI {
+public:
+	ClibTemporalURI(void);
+	// TODO: add your methods here.
+};
+
+extern LIBTEMPORALURI_API int nlibTemporalURI;
+
+LIBTEMPORALURI_API int fnlibTemporalURI(void);

Added: trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.vcproj
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.vcproj	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.vcproj	2005-01-03 04:35:37 UTC (rev 8583)
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="libTemporalURI"
+	ProjectGUID="{37CA269C-45DF-4DF7-9C12-3FE3B651D6FC}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".."
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTEMPORALURI_EXPORTS"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"
+				CallingConvention="2"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/libTemporalURI.dll"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/libTemporalURI.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/libTemporalURI.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".."
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTEMPORALURI_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"
+				CallingConvention="2"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/libTemporalURI.dll"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/libTemporalURI.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\C_TimeStamp.cpp">
+			</File>
+			<File
+				RelativePath=".\libTemporalURI.cpp">
+			</File>
+			<File
+				RelativePath=".\stdafx.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath=".\C_TimeStamp.h">
+			</File>
+			<File
+				RelativePath=".\libTemporalURI.h">
+			</File>
+			<File
+				RelativePath=".\stdafx.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+		<File
+			RelativePath=".\ReadMe.txt">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Added: trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.cpp	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.cpp	2005-01-03 04:35:37 UTC (rev 8583)
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// libTemporalURI.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file

Added: trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.h	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.h	2005-01-03 04:35:37 UTC (rev 8583)
@@ -0,0 +1,13 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+
+#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include <windows.h>
+
+// TODO: reference additional headers your program requires here

Modified: trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.cpp	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.cpp	2005-01-03 04:35:37 UTC (rev 8583)
@@ -83,6 +83,31 @@
 	return retStr;
 }
 
+//Returns a value between 0 and 9 999 999 to represent a fraction / 10 000 000
+LOOG_UINT64 StringHelper::stringToFractNum(string inString) {
+	int locDigit = 0;
+	LOOG_UINT64 retVal = 0;
+
+	LOOG_UINT64 locMult = 1000000;
+
+	size_t locStrLen = inString.length();
+
+	for (unsigned long i = 0; i < locStrLen; i++) {
+		locDigit = inString[i] - '0';
+		//If it's not in the range 0-9 we bail out
+		if ( !((locDigit >= 0) && (locDigit <=9)) ) {
+			//FIX::: throw exception
+			throw 0;
+		}
+		//retVal *= 10;
+		retVal += (locDigit * locMult);
+		locMult /= 10;
+
+	}
+	return retVal;
+
+}
+
 LOOG_UINT64 StringHelper::stringToNum(string inString) {
 	int locDigit = 0;
 	LOOG_UINT64 retVal = 0;

Modified: trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.h	2005-01-03 04:08:19 UTC (rev 8582)
+++ trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.h	2005-01-03 04:35:37 UTC (rev 8583)
@@ -50,8 +50,9 @@
 	
 	static string numToString(LOOG_UINT64 inNum);
 	static LOOG_UINT64 stringToNum(string inString);
-	static wstring StringHelper::toWStr(string inString);
-	static string StringHelper::toNarrowStr(wstring inString);
+	static LOOG_UINT64 stringToFractNum(string inString);
+	static wstring toWStr(string inString);
+	static string toNarrowStr(wstring inString);
 
 	//static string numToHexString(unsigned __int64 inNum, unsigned char inWidth);
 



More information about the commits mailing list