Added Boost Array point adapter created by Alfredo Correa

[SVN r66213]
This commit is contained in:
Barend Gehrels 2010-10-27 10:54:16 +00:00
parent 2a1244ddfb
commit 2c830be09a
4 changed files with 214 additions and 1 deletions

View File

@ -6,8 +6,9 @@
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
test-suite ggl-geometries
test-suite boost-geometry-geometries
:
[ run boost_array_as_point.cpp ]
[ run box.cpp ]
[ compile-fail custom_linestring.cpp
: # requirements

View File

@ -0,0 +1,32 @@
// Boost.Geometry (aka GGL, Generic Geometry Library) test file
//
// Copyright Alfredo Correa 2010
// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <geometry_test_common.hpp>
#include<boost/geometry/geometry.hpp>
#include<boost/geometry/geometries/cartesian3d.hpp>
#include<boost/geometry/geometries/adapted/boost_array_cartesian.hpp>
#include<boost/geometry/geometries/adapted/c_array_cartesian.hpp>
#include<boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include<iostream>
int test_main(int, char* [])
{
using namespace boost::geometry;
point<double, 3, cs::cartesian> p1(1,2,3);
double p2[3] = {4,5,6};
boost::tuple<double, double, double> p3(7,8,9);
boost::array<double, 3> p4={{10,11,12}};
std::clog << distance(p1,p2) << std::endl;
std::clog << distance(p2,p3) << std::endl;
std::clog << distance(p3,p4) << std::endl;
return 0;
}

View File

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="boost_array_as_point"
ProjectGUID="{77F84000-D088-46AD-A023-08552101B1C5}"
RootNamespace="boost_array_as_point"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\boost_array_as_point"
ConfigurationType="1"
InheritedPropertySheets="..\boost.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
ExceptionHandling="2"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
DebugInformationFormat="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\boost_array_as_point"
ConfigurationType="1"
InheritedPropertySheets="..\boost.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../..;.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
ExceptionHandling="2"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\boost_array_as_point.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -6,6 +6,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "custom_linestring", "custom
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "segment", "segment.vcproj", "{F995B070-62A2-46FE-A676-79AADB71DBD8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_array_as_point", "boost_array_as_point.vcproj", "{77F84000-D088-46AD-A023-08552101B1C5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -24,6 +26,10 @@ Global
{F995B070-62A2-46FE-A676-79AADB71DBD8}.Debug|Win32.Build.0 = Debug|Win32
{F995B070-62A2-46FE-A676-79AADB71DBD8}.Release|Win32.ActiveCfg = Release|Win32
{F995B070-62A2-46FE-A676-79AADB71DBD8}.Release|Win32.Build.0 = Release|Win32
{77F84000-D088-46AD-A023-08552101B1C5}.Debug|Win32.ActiveCfg = Debug|Win32
{77F84000-D088-46AD-A023-08552101B1C5}.Debug|Win32.Build.0 = Debug|Win32
{77F84000-D088-46AD-A023-08552101B1C5}.Release|Win32.ActiveCfg = Release|Win32
{77F84000-D088-46AD-A023-08552101B1C5}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE