From: <br...@us...> - 2008-09-16 04:43:11
|
Revision: 3630 http://openvrml.svn.sourceforge.net/openvrml/?rev=3630&view=rev Author: braden Date: 2008-09-16 04:43:19 +0000 (Tue, 16 Sep 2008) Log Message: ----------- Moved X3D Core node implementations into a convenience library. Modified Paths: -------------- trunk/ChangeLog trunk/ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj trunk/src/Makefile.am trunk/src/libopenvrml/openvrml/x3d_core.cpp Added Paths: ----------- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj trunk/src/node/x3d-core/ trunk/src/node/x3d-core/metadata_double.cpp trunk/src/node/x3d-core/metadata_double.h trunk/src/node/x3d-core/metadata_float.cpp trunk/src/node/x3d-core/metadata_float.h trunk/src/node/x3d-core/metadata_integer.cpp trunk/src/node/x3d-core/metadata_integer.h trunk/src/node/x3d-core/metadata_set.cpp trunk/src/node/x3d-core/metadata_set.h trunk/src/node/x3d-core/metadata_string.cpp trunk/src/node/x3d-core/metadata_string.h Removed Paths: ------------- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj trunk/src/node/x3d-core/metadata_double.cpp trunk/src/node/x3d-core/metadata_double.h trunk/src/node/x3d-core/metadata_float.cpp trunk/src/node/x3d-core/metadata_float.h trunk/src/node/x3d-core/metadata_integer.cpp trunk/src/node/x3d-core/metadata_integer.h trunk/src/node/x3d-core/metadata_set.cpp trunk/src/node/x3d-core/metadata_set.h trunk/src/node/x3d-core/metadata_string.cpp trunk/src/node/x3d-core/metadata_string.h Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Added: svn:mergeinfo + /branches/node-modules:3622-3623 Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-09-16 04:26:43 UTC (rev 3629) +++ trunk/ChangeLog 2008-09-16 04:43:19 UTC (rev 3630) @@ -1,5 +1,28 @@ 2008-09-16 Braden McDaniel <br...@en...> + Moved X3D Core node implementations into a convenience library. + + * ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln: Added + x3d-core static library project. + * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj + * src/Makefile.am: Added convenience library + node/x3d-core/libx3d-core.la. + * src/libopenvrml/openvrml/x3d_core.cpp: Moved node + implementations to separate files. + * src/node/x3d-core/metadata_double.cpp + * src/node/x3d-core/metadata_double.h + * src/node/x3d-core/metadata_float.cpp + * src/node/x3d-core/metadata_float.h + * src/node/x3d-core/metadata_integer.cpp + * src/node/x3d-core/metadata_integer.h + * src/node/x3d-core/metadata_set.cpp + * src/node/x3d-core/metadata_set.h + * src/node/x3d-core/metadata_string.cpp + * src/node/x3d-core/metadata_string.h + +2008-09-16 Braden McDaniel <br...@en...> + Moved VRML97 node implementations to a static library in the Visual C++ solution. Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln =================================================================== --- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln 2008-09-16 04:26:43 UTC (rev 3629) +++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln 2008-09-16 04:43:19 UTC (rev 3630) @@ -3,6 +3,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml", "openvrml\openvrml.vcproj", "{E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}" ProjectSection(ProjectDependencies) = postProject {5ED398C0-0529-40D5-AB2C-C7EF0769002B} = {5ED398C0-0529-40D5-AB2C-C7EF0769002B} + {78133A10-3ADF-474C-B32A-74124A976482} = {78133A10-3ADF-474C-B32A-74124A976482} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml-gl", "openvrml-gl\openvrml-gl.vcproj", "{141F90C2-6630-4D7A-834F-D5D57C6CFC24}" @@ -39,6 +40,8 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vrml97", "vrml97\vrml97.vcproj", "{5ED398C0-0529-40D5-AB2C-C7EF0769002B}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-core", "x3d-core\x3d-core.vcproj", "{78133A10-3ADF-474C-B32A-74124A976482}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -77,6 +80,10 @@ {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Debug|Win32.Build.0 = Debug|Win32 {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Release|Win32.ActiveCfg = Release|Win32 {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Release|Win32.Build.0 = Release|Win32 + {78133A10-3ADF-474C-B32A-74124A976482}.Debug|Win32.ActiveCfg = Debug|Win32 + {78133A10-3ADF-474C-B32A-74124A976482}.Debug|Win32.Build.0 = Debug|Win32 + {78133A10-3ADF-474C-B32A-74124A976482}.Release|Win32.ActiveCfg = Release|Win32 + {78133A10-3ADF-474C-B32A-74124A976482}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj =================================================================== --- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2008-09-16 04:26:43 UTC (rev 3629) +++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2008-09-16 04:43:19 UTC (rev 3630) @@ -41,7 +41,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=".;..\..\..\..\..\src\libopenvrml" + AdditionalIncludeDirectories=".;..\..\..\..\..\src\libopenvrml;..\..\..\..\..\src\node" PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;PACKAGE_VERSION=\"0.17.8\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_BUILD_DLL;OPENVRML_PKGDATADIR_=\"\";OPENVRML_PKGLIBDIR_=\"\"" MinimalRebuild="false" BasicRuntimeChecks="0" @@ -126,7 +126,7 @@ Optimization="3" InlineFunctionExpansion="1" OmitFramePointers="true" - AdditionalIncludeDirectories=".;..\..\..\..\..\src\libopenvrml" + AdditionalIncludeDirectories=".;..\..\..\..\..\src\libopenvrml;..\..\..\..\..\src\node" PreprocessorDefinitions="NOMINMAX;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;PACKAGE_VERSION=\"0.17.8\";BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_BUILD_DLL;OPENVRML_PKGDATADIR_=\"\";OPENVRML_PKGLIBDIR_=\"\";NDEBUG" StringPooling="true" RuntimeLibrary="2" Property changes on: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core ___________________________________________________________________ Added: svn:ignore + Debug Release x3d-core.vcproj.*.user Deleted: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj =================================================================== --- branches/node-modules/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj 2008-09-15 14:56:33 UTC (rev 3623) +++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj 2008-09-16 04:43:19 UTC (rev 3630) @@ -1,212 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="x3d-core" - ProjectGUID="{78133A10-3ADF-474C-B32A-74124A976482}" - RootNamespace="x3dcore" - Keyword="Win32Proj" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="4" - CharacterSet="1" - WholeProgramOptimization="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\openvrml;..\..\..\..\..\src\libopenvrml" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;BOOST_SPIRIT_THREADSAFE;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;OPENVRML_BUILD_DLL" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="4" - DisableSpecificWarnings="4226;4250;4251;4275;4290;4355;4661;4800" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="4" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="..\openvrml;..\..\..\..\..\src\libopenvrml" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;BOOST_SPIRIT_THREADSAFE;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;OPENVRML_BUILD_DLL" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - DisableSpecificWarnings="4226;4250;4251;4275;4290;4355;4661;4800" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_double.cpp" - > - </File> - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_float.cpp" - > - </File> - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_integer.cpp" - > - </File> - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_set.cpp" - > - </File> - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_string.cpp" - > - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_double.h" - > - </File> - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_float.h" - > - </File> - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_integer.h" - > - </File> - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_set.h" - > - </File> - <File - RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_string.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> Copied: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj (from rev 3623, branches/node-modules/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj) =================================================================== --- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj (rev 0) +++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj 2008-09-16 04:43:19 UTC (rev 3630) @@ -0,0 +1,212 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="x3d-core" + ProjectGUID="{78133A10-3ADF-474C-B32A-74124A976482}" + RootNamespace="x3dcore" + Keyword="Win32Proj" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="1" + WholeProgramOptimization="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\openvrml;..\..\..\..\..\src\libopenvrml" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;BOOST_SPIRIT_THREADSAFE;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;OPENVRML_BUILD_DLL" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + DisableSpecificWarnings="4226;4250;4251;4275;4290;4355;4661;4800" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="..\openvrml;..\..\..\..\..\src\libopenvrml" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;BOOST_SPIRIT_THREADSAFE;BOOST_SPIRIT_CLOSURE_LIMIT=6;PHOENIX_LIMIT=6;OPENVRML_BUILD_DLL" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + DisableSpecificWarnings="4226;4250;4251;4275;4290;4355;4661;4800" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_double.cpp" + > + </File> + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_float.cpp" + > + </File> + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_integer.cpp" + > + </File> + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_set.cpp" + > + </File> + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_string.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_double.h" + > + </File> + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_float.h" + > + </File> + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_integer.h" + > + </File> + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_set.h" + > + </File> + <File + RelativePath="..\..\..\..\..\src\node\x3d-core\metadata_string.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2008-09-16 04:26:43 UTC (rev 3629) +++ trunk/src/Makefile.am 2008-09-16 04:43:19 UTC (rev 3630) @@ -3,7 +3,9 @@ BUILT_SOURCES = lib_LTLIBRARIES = libopenvrml/libopenvrml.la -noinst_LTLIBRARIES = node/vrml97/libvrml97.la +noinst_LTLIBRARIES = \ + node/vrml97/libvrml97.la \ + node/x3d-core/libx3d-core.la if ENABLE_GL_RENDERER lib_LTLIBRARIES += libopenvrml-gl/libopenvrml-gl.la endif @@ -136,6 +138,7 @@ libopenvrml_libopenvrml_la_LIBADD = \ node/vrml97/libvrml97.la \ + node/x3d-core/libx3d-core.la \ -lboost_thread$(BOOST_LIB_SUFFIX) \ -lboost_filesystem$(BOOST_LIB_SUFFIX) \ -lltdl @@ -312,13 +315,24 @@ $(FREETYPE_LIBS) \ $(PTHREAD_LIBS) -if ENABLE_XEMBED -libexec_PROGRAMS = openvrml-xembed/openvrml-xembed -session_bus_services_DATA = openvrml-xembed/org.openvrml.BrowserControl.service -BUILT_SOURCES += \ - openvrml-xembed/browser-server-glue.h \ - openvrml-xembed/browser-factory-server-glue.h -endif +node_x3d_core_libx3d_core_la_CPPFLAGS = \ + -I$(top_builddir)/src/libopenvrml \ + -I$(top_srcdir)/src/libopenvrml \ + -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS \ + -DBOOST_MPL_LIMIT_VECTOR_SIZE=30 +node_x3d_core_libx3d_core_la_CXXFLAGS = \ + $(PTHREAD_CFLAGS) +node_x3d_core_libx3d_core_la_SOURCES = \ + node/x3d-core/metadata_double.cpp \ + node/x3d-core/metadata_double.h \ + node/x3d-core/metadata_float.cpp \ + node/x3d-core/metadata_float.h \ + node/x3d-core/metadata_integer.cpp \ + node/x3d-core/metadata_integer.h \ + node/x3d-core/metadata_set.cpp \ + node/x3d-core/metadata_set.h \ + node/x3d-core/metadata_string.cpp \ + node/x3d-core/metadata_string.h libopenvrml_gl_libopenvrml_gl_la_CPPFLAGS = \ -I$(top_builddir)/src/libopenvrml \ @@ -333,6 +347,13 @@ $(GLU_LIBS) libopenvrml_gl_libopenvrml_gl_la_LIBADD = libopenvrml/libopenvrml.la +if ENABLE_XEMBED +libexec_PROGRAMS = openvrml-xembed/openvrml-xembed +session_bus_services_DATA = openvrml-xembed/org.openvrml.BrowserControl.service +BUILT_SOURCES += \ + openvrml-xembed/browser-server-glue.h \ + openvrml-xembed/browser-factory-server-glue.h +endif openvrml_xembed_openvrml_xembed_CPPFLAGS = \ -I$(top_builddir)/src/openvrml-xembed \ -I$(top_srcdir)/lib/gtkglext \ Modified: trunk/src/libopenvrml/openvrml/x3d_core.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/x3d_core.cpp 2008-09-16 04:26:43 UTC (rev 3629) +++ trunk/src/libopenvrml/openvrml/x3d_core.cpp 2008-09-16 04:43:19 UTC (rev 3630) @@ -2,7 +2,7 @@ // // OpenVRML // -// Copyright 2006, 2007 Braden McDaniel +// Copyright 2006, 2007, 2008 Braden McDaniel // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published by @@ -18,116 +18,23 @@ // along with this library; if not, see <http://www.gnu.org/licenses/>. // +# include "x3d_core.h" +# include <x3d-core/metadata_double.h> +# include <x3d-core/metadata_float.h> +# include <x3d-core/metadata_integer.h> +# include <x3d-core/metadata_set.h> +# include <x3d-core/metadata_string.h> +# include <openvrml/browser.h> + # ifdef HAVE_CONFIG_H # include <config.h> # endif -# include <boost/array.hpp> -# include "browser.h" -# include "node_impl_util.h" -# include "x3d_core.h" - -using namespace openvrml; -using namespace openvrml::node_impl_util; -using namespace std; - - -namespace { - - /** - * @brief Class object for MetadataDouble nodes. - */ - class OPENVRML_LOCAL metadata_double_metatype : public node_metatype { - public: - static const char * const id; - - explicit metadata_double_metatype(openvrml::browser & browser); - virtual ~metadata_double_metatype() OPENVRML_NOTHROW; - - private: - virtual const boost::shared_ptr<node_type> - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc); - }; - - - /** - * @brief Class object for MetadataFloat nodes. - */ - class OPENVRML_LOCAL metadata_float_metatype : public node_metatype { - public: - static const char * const id; - - explicit metadata_float_metatype(openvrml::browser & browser); - virtual ~metadata_float_metatype() OPENVRML_NOTHROW; - - private: - virtual const boost::shared_ptr<node_type> - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc); - }; - - - /** - * @brief Class object for MetadataInteger nodes. - */ - class OPENVRML_LOCAL metadata_integer_metatype : public node_metatype { - public: - static const char * const id; - - explicit metadata_integer_metatype(openvrml::browser & browser); - virtual ~metadata_integer_metatype() OPENVRML_NOTHROW; - - private: - virtual const boost::shared_ptr<node_type> - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc); - }; - - - /** - * @brief Class object for MetadataSet nodes. - */ - class OPENVRML_LOCAL metadata_set_metatype : public node_metatype { - public: - static const char * const id; - - explicit metadata_set_metatype(openvrml::browser & browser); - virtual ~metadata_set_metatype() OPENVRML_NOTHROW; - - private: - virtual const boost::shared_ptr<node_type> - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc); - }; - - - /** - * @brief Class object for MetadataString nodes. - */ - class OPENVRML_LOCAL metadata_string_metatype : public node_metatype { - public: - static const char * const id; - - explicit metadata_string_metatype(openvrml::browser & browser); - virtual ~metadata_string_metatype() OPENVRML_NOTHROW; - - private: - virtual const boost::shared_ptr<node_type> - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc); - }; -} - void register_core_node_metatypes(openvrml::browser & b) { using boost::shared_ptr; using openvrml::node_metatype; + using namespace openvrml_node_x3d_core; b.add_node_metatype(metadata_double_metatype::id, shared_ptr<node_metatype>( new metadata_double_metatype(b))); @@ -144,816 +51,3 @@ shared_ptr<node_metatype>( new metadata_string_metatype(b))); } - -namespace { - - class OPENVRML_LOCAL metadata_double_node : - public abstract_node<metadata_double_node> { - - friend class metadata_double_metatype; - - exposedfield<sfstring> name_; - exposedfield<sfstring> reference_; - exposedfield<mfdouble> value_; - - public: - metadata_double_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope); - virtual ~metadata_double_node() OPENVRML_NOTHROW; - }; - - class OPENVRML_LOCAL metadata_float_node : - public abstract_node<metadata_float_node> { - - friend class metadata_float_metatype; - - exposedfield<sfstring> name_; - exposedfield<sfstring> reference_; - exposedfield<mffloat> value_; - - public: - metadata_float_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope); - virtual ~metadata_float_node() OPENVRML_NOTHROW; - }; - - class OPENVRML_LOCAL metadata_integer_node : - public abstract_node<metadata_integer_node> { - - friend class metadata_integer_metatype; - - exposedfield<sfstring> name_; - exposedfield<sfstring> reference_; - exposedfield<mfint32> value_; - - public: - metadata_integer_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope); - virtual ~metadata_integer_node() OPENVRML_NOTHROW; - }; - - class OPENVRML_LOCAL metadata_set_node : - public abstract_node<metadata_set_node> { - - friend class metadata_set_metatype; - - exposedfield<sfstring> name_; - exposedfield<sfstring> reference_; - exposedfield<mfnode> value_; - - public: - metadata_set_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope); - virtual ~metadata_set_node() OPENVRML_NOTHROW; - }; - - class OPENVRML_LOCAL metadata_string_node : - public abstract_node<metadata_string_node> { - - friend class metadata_string_metatype; - - exposedfield<sfstring> name_; - exposedfield<sfstring> reference_; - exposedfield<mfstring> value_; - - public: - metadata_string_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope); - virtual ~metadata_string_node() OPENVRML_NOTHROW; - }; - - - /** - * @brief @c node_metatype identifier. - */ - const char * const metadata_double_metatype::id = - "urn:X-openvrml:node:MetadataDouble"; - - /** - * @brief Construct. - * - * @param browser the @c browser associated with this - * @c metadata_double_metatype. - */ - metadata_double_metatype::metadata_double_metatype(openvrml::browser & browser): - node_metatype(metadata_double_metatype::id, browser) - {} - - /** - * @brief Destroy. - */ - metadata_double_metatype::~metadata_double_metatype() OPENVRML_NOTHROW - {} - - /** - * @brief Create a @c node_type. - * - * @param id the name for the new @c node_type. - * @param interfaces the interfaces for the new @c node_type. - * - * @return a @c node_type capable of creating MetadataDouble nodes. - * - * @exception unsupported_interface if @p interfaces includes an interface - * not supported by - * @c metadata_double_metatype. - * @exception std::bad_alloc if memory allocation fails. - */ - const boost::shared_ptr<openvrml::node_type> - metadata_double_metatype:: - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc) - { - typedef boost::array<node_interface, 4> supported_interfaces_t; - static const supported_interfaces_t supported_interfaces = { - node_interface(node_interface::exposedfield_id, - field_value::sfnode_id, - "metadata"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "name"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "reference"), - node_interface(node_interface::exposedfield_id, - field_value::mfdouble_id, - "value") - }; - typedef node_type_impl<metadata_double_node> node_type_t; - - const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); - node_type_t & the_node_type = static_cast<node_type_t &>(*type); - - for (node_interface_set::const_iterator interface_(interfaces.begin()); - interface_ != interfaces.end(); - ++interface_) { - supported_interfaces_t::const_iterator supported_interface = - supported_interfaces.begin() - 1; - if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_double_node::metadata); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_double_node::name_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_double_node::reference_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_double_node::value_); - } else { - throw unsupported_interface(*interface_); - } - } - return type; - } - - - /** - * @brief @c node_metatype identifier. - */ - const char * const metadata_float_metatype::id = - "urn:X-openvrml:node:MetadataFloat"; - - /** - * @brief Construct. - * - * @param browser the @c browser associated with this - * @c metadata_float_metatype. - */ - metadata_float_metatype::metadata_float_metatype(openvrml::browser & browser): - node_metatype(metadata_float_metatype::id, browser) - {} - - /** - * @brief Destroy. - */ - metadata_float_metatype::~metadata_float_metatype() OPENVRML_NOTHROW - {} - - /** - * @brief Create a node_type. - * - * @param id the name for the new node_type. - * @param interfaces the interfaces for the new node_type. - * - * @return a node_type_ptr to a node_type capable of creating MetadataFloat nodes. - * - * @exception unsupported_interface if @p interfaces includes an interface - * not supported by metadata_float_metatype. - * @exception std::bad_alloc if memory allocation fails. - */ - const boost::shared_ptr<openvrml::node_type> - metadata_float_metatype::do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc) - { - typedef boost::array<node_interface, 4> supported_interfaces_t; - static const supported_interfaces_t supported_interfaces = { - node_interface(node_interface::exposedfield_id, - field_value::sfnode_id, - "metadata"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "name"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "reference"), - node_interface(node_interface::exposedfield_id, - field_value::mffloat_id, - "value") - }; - typedef node_type_impl<metadata_float_node> node_type_t; - - const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); - node_type_t & the_node_type = static_cast<node_type_t &>(*type); - - for (node_interface_set::const_iterator interface_(interfaces.begin()); - interface_ != interfaces.end(); - ++interface_) { - supported_interfaces_t::const_iterator supported_interface = - supported_interfaces.begin() - 1; - if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_float_node::metadata); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_float_node::name_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_float_node::reference_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_float_node::value_); - } else { - throw unsupported_interface(*interface_); - } - } - return type; - } - - - /** - * @brief @c node_metatype identifier. - */ - const char * const metadata_integer_metatype::id = - "urn:X-openvrml:node:MetadataInteger"; - - /** - * @brief Construct. - * - * @param browser the @c browser associated with this - * @c metadata_integer_metatype. - */ - metadata_integer_metatype:: - metadata_integer_metatype(openvrml::browser & browser): - node_metatype(metadata_integer_metatype::id, browser) - {} - - /** - * @brief Destroy. - */ - metadata_integer_metatype::~metadata_integer_metatype() OPENVRML_NOTHROW - {} - - /** - * @brief Create a node_type. - * - * @param id the name for the new node_type. - * @param interfaces the interfaces for the new node_type. - * - * @return a node_type_ptr to a node_type capable of creating MetadataInteger nodes. - * - * @exception unsupported_interface if @p interfaces includes an interface - * not supported by metadata_integer_metatype. - * @exception std::bad_alloc if memory allocation fails. - */ - const boost::shared_ptr<openvrml::node_type> - metadata_integer_metatype:: - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc) - { - typedef boost::array<node_interface, 4> supported_interfaces_t; - static const supported_interfaces_t supported_interfaces = { - node_interface(node_interface::exposedfield_id, - field_value::sfnode_id, - "metadata"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "name"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "reference"), - node_interface(node_interface::exposedfield_id, - field_value::mfint32_id, - "value") - }; - typedef node_type_impl<metadata_integer_node> node_type_t; - - const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); - node_type_t & the_node_type = static_cast<node_type_t &>(*type); - - for (node_interface_set::const_iterator interface_(interfaces.begin()); - interface_ != interfaces.end(); - ++interface_) { - supported_interfaces_t::const_iterator supported_interface = - supported_interfaces.begin() - 1; - if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_integer_node::metadata); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_integer_node::name_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_integer_node::reference_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_integer_node::value_); - } else { - throw unsupported_interface(*interface_); - } - } - return type; - } - - /** - * @brief @c node_metatype identifier. - */ - const char * const metadata_set_metatype::id = - "urn:X-openvrml:node:MetadataSet"; - - /** - * @brief Construct. - * - * @param browser the @c browser associated with this - * @c metadata_set_metatype. - */ - metadata_set_metatype::metadata_set_metatype(openvrml::browser & browser): - node_metatype(metadata_set_metatype::id, browser) - {} - - /** - * @brief Destroy. - */ - metadata_set_metatype::~metadata_set_metatype() OPENVRML_NOTHROW - {} - - /** - * @brief Create a node_type. - * - * @param id the name for the new node_type. - * @param interfaces the interfaces for the new node_type. - * - * @return a node_type_ptr to a node_type capable of creating MetadataSet nodes. - * - * @exception unsupported_interface if @p interfaces includes an interface - * not supported by metadata_set_metatype. - * @exception std::bad_alloc if memory allocation fails. - */ - const boost::shared_ptr<openvrml::node_type> - metadata_set_metatype:: - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc) - { - typedef boost::array<node_interface, 4> supported_interfaces_t; - static const supported_interfaces_t supported_interfaces = { - node_interface(node_interface::exposedfield_id, - field_value::sfnode_id, - "metadata"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "name"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "reference"), - node_interface(node_interface::exposedfield_id, - field_value::mfnode_id, - "value") - }; - typedef node_type_impl<metadata_set_node> node_type_t; - - const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); - node_type_t & the_node_type = static_cast<node_type_t &>(*type); - - for (node_interface_set::const_iterator interface_(interfaces.begin()); - interface_ != interfaces.end(); - ++interface_) { - supported_interfaces_t::const_iterator supported_interface = - supported_interfaces.begin() - 1; - if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_set_node::metadata); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_set_node::name_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_set_node::reference_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_set_node::value_); - } else { - throw unsupported_interface(*interface_); - } - } - return type; - } - - - /** - * @brief @c node_metatype identifier. - */ - const char * const metadata_string_metatype::id = - "urn:X-openvrml:node:MetadataString"; - - /** - * @brief Construct. - * - * @param browser the @c browser associated with this - * @c metadata_string_metatype. - */ - metadata_string_metatype::metadata_string_metatype(openvrml::browser & browser): - node_metatype(metadata_string_metatype::id, browser) - {} - - /** - * @brief Destroy. - */ - metadata_string_metatype::~metadata_string_metatype() OPENVRML_NOTHROW - {} - - /** - * @brief Create a node_type. - * - * @param id the name for the new node_type. - * @param interfaces the interfaces for the new node_type. - * - * @return a node_type_ptr to a node_type capable of creating MetadataString nodes. - * - * @exception unsupported_interface if @p interfaces includes an interface - * not supported by metadata_string_metatype. - * @exception std::bad_alloc if memory allocation fails. - */ - const boost::shared_ptr<openvrml::node_type> - metadata_string_metatype:: - do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc) - { - typedef boost::array<node_interface, 4> supported_interfaces_t; - static const supported_interfaces_t supported_interfaces = { - node_interface(node_interface::exposedfield_id, - field_value::sfnode_id, - "metadata"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "name"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "reference"), - node_interface(node_interface::exposedfield_id, - field_value::mfstring_id, - "value") - }; - typedef node_type_impl<metadata_string_node> node_type_t; - - const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); - node_type_t & the_node_type = static_cast<node_type_t &>(*type); - - for (node_interface_set::const_iterator interface_(interfaces.begin()); - interface_ != interfaces.end(); - ++interface_) { - supported_interfaces_t::const_iterator supported_interface = - supported_interfaces.begin() - 1; - if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_string_node::metadata); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_string_node::name_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_string_node::reference_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_string_node::value_); - } else { - throw unsupported_interface(*interface_); - } - } - return type; - } - - - /** - * @class metadata_double_node - * - * @brief Represents MetadataDouble node instances. - */ - - /** - * @var metadata_double_node::metadata_double_metatype - * - * @brief Class object for MetadataDouble nodes. - */ - - /** - * @var metadata_double_node::name_ - * - * @brief name exposedField - */ - - /** - * @var metadata_double_node::reference_ - * - * @brief reference exposedField - */ - - /** - * @var metadata_double_node::value_ - * - * @brief value exposedField - */ - - - /** - * @brief Construct. - * - * @param type the node_type associated with this node. - * @param scope the scope to which the node belongs. - */ - metadata_double_node:: - metadata_double_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope): - node(type, scope), - abstract_node<self_t>(type, scope), - name_(*this), - reference_(*this), - value_(*this) - {} - - /** - * @brief Destroy. - */ - metadata_double_node::~metadata_double_node() OPENVRML_NOTHROW - {} - - - /** - * @class metadata_float_node - * - * @brief Represents MetadataFloat node instances. - */ - - /** - * @var metadata_float_node::metadata_float_metatype - * - * @brief Class object for MetadataFloat nodes. - */ - - /** - * @var metadata_float_node::name_ - * - * @brief name exposedField - */ - - /** - * @var metadata_float_node::reference_ - * - * @brief reference exposedField - */ - - /** - * @var metadata_float_node::value_ - * - * @brief value exposedField - */ - - - /** - * @brief Construct. - * - * @param type the node_type associated with this node. - * @param scope the scope to which the node belongs. - */ - metadata_float_node:: - metadata_float_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope): - node(type, scope), - abstract_node<self_t>(type, scope), - name_(*this), - reference_(*this), - value_(*this) - {} - - /** - * @brief Destroy. - */ - metadata_float_node::~metadata_float_node() OPENVRML_NOTHROW - {} - - - /** - * @class metadata_integer_node - * - * @brief Represents MetadataInteger node instances. - */ - - /** - * @var metadata_integer_node::metadata_integer_metatype - * - * @brief Class object for MetadataInteger nodes. - */ - - /** - * @var metadata_integer_node::name_ - * - * @brief name exposedField - */ - - /** - * @var metadata_integer_node::reference_ - * - * @brief reference exposedField - */ - - /** - * @var metadata_integer_node::value_ - * - * @brief value exposedField - */ - - - /** - * @brief Construct. - * - * @param type the node_type associated with this node. - * @param scope the scope to which the node belongs. - */ - metadata_integer_node:: - metadata_integer_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope): - node(type, scope), - abstract_node<self_t>(type, scope), - name_(*this), - reference_(*this), - value_(*this) - {} - - /** - * @brief Destroy. - */ - metadata_integer_node::~metadata_integer_node() OPENVRML_NOTHROW - {} - - - /** - * @class metadata_set_node - * - * @brief Represents MetadataSet node instances. - */ - - /** - * @var metadata_set_node::metadata_set_metatype - * - * @brief Class object for MetadataSet nodes. - */ - - /** - * @var metadata_set_node::name_ - * - * @brief name exposedField - */ - - /** - * @var metadata_set_node::reference_ - * - * @brief reference exposedField - */ - - /** - * @var metadata_set_node::value_ - * - * @brief value exposedField - */ - - - /** - * @brief Construct. - * - * @param type the node_type associated with this node. - * @param scope the scope to which the node belongs. - */ - metadata_set_node:: - metadata_set_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope): - node(type, scope), - abstract_node<self_t>(type, scope), - name_(*this), - reference_(*this), - value_(*this) - {} - - /** - * @brief Destroy. - */ - metadata_set_node::~metadata_set_node() OPENVRML_NOTHROW - {} - - - /** - * @class metadata_string_node - * - * @brief Represents MetadataString node instances. - */ - - /** - * @var metadata_string_node::metadata_string_metatype - * - * @brief Class object for MetadataString nodes. - */ - - /** - * @var metadata_string_node::name_ - * - * @brief name exposedField - */ - - /** - * @var metadata_string_node::reference_ - * - * @brief reference exposedField - */ - - /** - * @var metadata_string_node::value_ - * - * @brief value exposedField - */ - - - /** - * @brief Construct. - * - * @param type the node_type associated with this node. - * @param scope the scope to which the node belongs. - */ - metadata_string_node:: - metadata_string_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope): - node(type, scope), - abstract_node<self_t>(type, scope), - name_(*this), - reference_(*this), - value_(*this) - {} - - /** - * @brief Destroy. - */ - metadata_string_node::~metadata_string_node() OPENVRML_NOTHROW - {} -} Deleted: trunk/src/node/x3d-core/metadata_double.cpp =================================================================== --- branches/node-modules/src/node/x3d-core/metadata_double.cpp 2008-09-15 14:56:33 UTC (rev 3623) +++ trunk/src/node/x3d-core/metadata_double.cpp 2008-09-16 04:43:19 UTC (rev 3630) @@ -1,197 +0,0 @@ -// -*- mode: c++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- -// -// OpenVRML -// -// Copyright 2006, 2007, 2008 Braden McDaniel -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation; either version 3 of the License, or (at your -// option) any later version. -// -// This library is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -// License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this library; if not, see <http://www.gnu.org/licenses/>. -// - -# include "metadata_double.h" -# include <openvrml/node_impl_util.h> -# include <boost/array.hpp> - -# ifdef HAVE_CONFIG_H -# include <config.h> -# endif - -using namespace openvrml; -using namespace openvrml::node_impl_util; -using namespace std; - - -namespace { - - /** - * @brief Represents MetadataDouble node instances. - */ - class OPENVRML_LOCAL metadata_double_node : - public abstract_node<metadata_double_node> { - - friend class openvrml_node_x3d_core::metadata_double_metatype; - - exposedfield<sfstring> name_; - exposedfield<sfstring> reference_; - exposedfield<mfdouble> value_; - - public: - metadata_double_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope); - virtual ~metadata_double_node() OPENVRML_NOTHROW; - }; - - - /** - * @var metadata_double_node::metadata_double_metatype - * - * @brief Class object for MetadataDouble nodes. - */ - - /** - * @var metadata_double_node::name_ - * - * @brief name exposedField - */ - - /** - * @var metadata_double_node::reference_ - * - * @brief reference exposedField - */ - - /** - * @var metadata_double_node::value_ - * - * @brief value exposedField - */ - - - /** - * @brief Construct. - * - * @param type the node_type associated with this node. - * @param scope the scope to which the node belongs. - */ - metadata_double_node:: - metadata_double_node(const node_type & type, - const boost::shared_ptr<openvrml::scope> & scope): - node(type, scope), - abstract_node<self_t>(type, scope), - name_(*this), - reference_(*this), - value_(*this) - {} - - /** - * @brief Destroy. - */ - metadata_double_node::~metadata_double_node() OPENVRML_NOTHROW - {} -} - - -/** - * @brief @c node_metatype identifier. - */ -const char * const openvrml_node_x3d_core::metadata_double_metatype::id = - "urn:X-openvrml:node:MetadataDouble"; - -/** - * @brief Construct. - * - * @param browser the @c browser associated with this - * @c metadata_double_metatype. - */ -openvrml_node_x3d_core::metadata_double_metatype:: -metadata_double_metatype(openvrml::browser & browser): - node_metatype(metadata_double_metatype::id, browser) -{} - -/** - * @brief Destroy. - */ -openvrml_node_x3d_core::metadata_double_metatype::~metadata_double_metatype() - OPENVRML_NOTHROW -{} - -/** - * @brief Create a @c node_type. - * - * @param id the name for the new @c node_type. - * @param interfaces the interfaces for the new @c node_type. - * - * @return a @c node_type capable of creating MetadataDouble nodes. - * - * @exception unsupported_interface if @p interfaces includes an interface - * not supported by - * @c metadata_double_metatype. - * @exception std::bad_alloc if memory allocation fails. - */ -const boost::shared_ptr<openvrml::node_type> -openvrml_node_x3d_core::metadata_double_metatype:: -do_create_type(const std::string & id, - const node_interface_set & interfaces) const - OPENVRML_THROW2(unsupported_interface, std::bad_alloc) -{ - typedef boost::array<node_interface, 4> supported_interfaces_t; - static const supported_interfaces_t supported_interfaces = { - node_interface(node_interface::exposedfield_id, - field_value::sfnode_id, - "metadata"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "name"), - node_interface(node_interface::exposedfield_id, - field_value::sfstring_id, - "reference"), - node_interface(node_interface::exposedfield_id, - field_value::mfdouble_id, - "value") - }; - typedef node_type_impl<metadata_double_node> node_type_t; - - const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); - node_type_t & the_node_type = static_cast<node_type_t &>(*type); - - for (node_interface_set::const_iterator interface_(interfaces.begin()); - interface_ != interfaces.end(); - ++interface_) { - supported_interfaces_t::const_iterator supported_interface = - supported_interfaces.begin() - 1; - if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_double_node::metadata); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_double_node::name_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_double_node::reference_); - } else if (*interface_ == *++supported_interface) { - the_node_type.add_exposedfield( - supported_interface->field_type, - supported_interface->id, - &metadata_double_node::value_); - } else { - throw unsupported_interface(*interface_); - } - } - return type; -} Copied: trunk/src/node/x3d-core/metadata_double.cpp (from rev 3623, branches/node-modules/src/node/x3d-core/metadata_double.cpp) =================================================================== --- trunk/src/node/x3d-core/metadata_double.cpp (rev 0) +++ trunk/src/node/x3d-core/metadata_double.cpp 2008-09-16 04:43:19 UTC (rev 3630) @@ -0,0 +1,197 @@ +// -*- mode: c++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- +// +// OpenVRML +// +// Copyright 2006, 2007, 2008 Braden McDaniel +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation; either version 3 of the License, or (at your +// option) any later version. +// +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied... [truncated message content] |