You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/18 12:31:13 UTC
[1/3] ignite git commit: IGNITE-1513: WIP.
Repository: ignite
Updated Branches:
refs/heads/ignite-1513 [created] 3a010d9e5
IGNITE-1513: WIP.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/30f3725c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/30f3725c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/30f3725c
Branch: refs/heads/ignite-1513
Commit: 30f3725ca5356f74988d460b7996cd364c7e4ab5
Parents: 8045c82
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Sep 18 13:16:28 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Sep 18 13:16:28 2015 +0300
----------------------------------------------------------------------
examples/config/platform/cpp/example-cache.xml | 77 ------------
examples/platform/cpp/Makefile.am | 39 ------
examples/platform/cpp/README.txt | 42 -------
examples/platform/cpp/configure.ac | 30 -----
examples/platform/cpp/include/Makefile.am | 21 ----
.../cpp/include/ignite/examples/address.h | 109 ----------------
.../cpp/include/ignite/examples/organization.h | 111 ----------------
.../platform/cpp/project/vs/ignite-examples.sln | 19 ---
.../cpp/project/vs/ignite-examples.vcxproj | 107 ----------------
.../project/vs/ignite-examples.vcxproj.filters | 30 -----
examples/platform/cpp/src/putgetexample.cpp | 126 -------------------
modules/platform/src/main/cpp/README.txt | 15 +--
.../platform/src/main/cpp/examples/Makefile.am | 39 ++++++
.../platform/src/main/cpp/examples/README.txt | 42 +++++++
.../main/cpp/examples/config/example-cache.xml | 77 ++++++++++++
.../platform/src/main/cpp/examples/configure.ac | 30 +++++
.../src/main/cpp/examples/include/Makefile.am | 21 ++++
.../examples/include/ignite/examples/address.h | 109 ++++++++++++++++
.../include/ignite/examples/organization.h | 111 ++++++++++++++++
.../cpp/examples/project/vs/ignite-examples.sln | 19 +++
.../examples/project/vs/ignite-examples.vcxproj | 107 ++++++++++++++++
.../project/vs/ignite-examples.vcxproj.filters | 30 +++++
.../src/main/cpp/examples/src/putgetexample.cpp | 126 +++++++++++++++++++
.../platform/src/main/cpp/project/vs/ignite.sln | 6 +-
.../src/main/cpp/project/vs/ignite.slnrel | 33 +++++
.../src/main/cpp/project/vs/ignite_x86.slnrel | 33 +++++
26 files changed, 787 insertions(+), 722 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/config/platform/cpp/example-cache.xml
----------------------------------------------------------------------
diff --git a/examples/config/platform/cpp/example-cache.xml b/examples/config/platform/cpp/example-cache.xml
deleted file mode 100644
index beed238..0000000
--- a/examples/config/platform/cpp/example-cache.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
- <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
- <!-- Set to true to enable distributed class loading for examples, default is false. -->
- <property name="peerClassLoadingEnabled" value="true"/>
-
- <property name="cacheConfiguration">
- <list>
- <!--
- Partitioned cache example configuration with portable objects enabled.
- Used in .NET example that is available only in enterprise edition.
- -->
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="atomicityMode" value="ATOMIC"/>
- <property name="backups" value="1"/>
- </bean>
-
- <!--
- Partitioned cache example configuration.
- Used in .NET cache store example that is available only in enterprise edition.
- -->
- <bean class="org.apache.ignite.configuration.CacheConfiguration">
- <property name="name" value="tx"/>
- <property name="atomicityMode" value="TRANSACTIONAL"/>
- <property name="backups" value="1"/>
- </bean>
- </list>
- </property>
-
- <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
- <property name="discoverySpi">
- <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
- <property name="ipFinder">
- <!--
- Ignite provides several options for automatic discovery that can be used
- instead os static IP based discovery.
- -->
- <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
- <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
- <property name="addresses">
- <list>
- <!-- In distributed environment, replace with actual host IP address. -->
- <value>127.0.0.1:47500..47501</value>
- </list>
- </property>
- </bean>
- </property>
- </bean>
- </property>
- </bean>
-</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/Makefile.am
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/Makefile.am b/examples/platform/cpp/Makefile.am
deleted file mode 100644
index 84fe957..0000000
--- a/examples/platform/cpp/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-##
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-##
-
-ACLOCAL_AMFLAGS = "-Im4"
-
-SUBDIRS = . include
-DIST_SUBDIRS = . include
-
-AM_CPPFLAGS = -I$(srcdir)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -DIGNITE_IMPL
-AM_CXXFLAGS = -Wall -std=c++0x
-
-noinst_PROGRAMS = ignite-putgetexample
-
-ignite_putgetexample_SOURCES = src/putgetexample.cpp
-
-ignite_putgetexample_LDFLAGS = -static-libtool-libs -L/usr/local/lib -lignite
-
-run-check: check
- ./ignite-putgetexample -p
-
-clean-local: clean-check
- $(RM) *.gcno *.gcda
-
-clean-check:
- $(RM) $(ignite_putgetexample_OBJECTS)
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/README.txt
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/README.txt b/examples/platform/cpp/README.txt
deleted file mode 100644
index c47f805..0000000
--- a/examples/platform/cpp/README.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Ignite C++ Examples
-==================================
-
-Common requirements
-----------------------------------
- * Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp
- * JAVA_HOME environment variable must be set pointing to Java installation directory.
- * IGNITE_HOME environment variable must be set to Ignite installation directory.
- * Ignite must be build and packaged using Maven. You can use the followin Maven command: mvn clean package -DskipTests
- * Ignite C++ must be built according to instructions for your platform.
-
-Running examples on Linux
-----------------------------------
-
-Prerequisites:
- * GCC, g++, autotools, automake, and libtool must be installed.
-
-To build examples execute the following commands one by one from $IGNITE_HOME/examples/platform/cpp directory:
- * libtoolize
- * aclocal
- * autoheader
- * automake --add-missing
- * autoreconf
- * ./configure
- * make
-
-As a result several executables will appear in example's directory.
-
-Before running examples ensure that:
- * LD_LIBRARY_PATH environment variable is set and pointing to a directory with "libjvm.so" library. Typically this
- library is located in $JAVA_HOME/jre/lib/amd64/server directory.
-
-
-Running examples on Windows
-----------------------------------
-
-Prerequisites:
- * Microsoft Visual Studio (tm) 2010 or higher must be installed.
- * Windows SDK 7.1 must be installed.
-
-Open Visual Studio solution %IGNITE_HOME%\examples\platform\cpp\project\vs\ignite-examples.sln and select proper
-platform (x64 or x86). Run the solution.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/configure.ac
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/configure.ac b/examples/platform/cpp/configure.ac
deleted file mode 100644
index a665d7b..0000000
--- a/examples/platform/cpp/configure.ac
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.68)
-AC_INIT([Ingnite C++ examples],[1.4.0],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
-AC_CONFIG_SRCDIR([src])
-AC_CONFIG_MACRO_DIR([m4])
-AC_LANG([C++])
-
-AC_CANONICAL_SYSTEM
-
-dnl Initialize automake
-AM_INIT_AUTOMAKE([-Wall foreign])
-AC_CONFIG_HEADER([config.h])
-
-GXX="-g -O2"
-
-AC_PROG_CXX
-
-AC_ARG_ENABLE([debug],
- [AS_HELP_STRING([--enable-debug],[enable debug build [default=no]])],
- [],[enable_debug=no])
-
-if test "x$enable_debug" = xyes; then
- CXXFLAGS="-g -O0"
-else
- CXXFLAGS="-g -O3"
-fi
-
-AC_CONFIG_FILES(Makefile)
-AC_OUTPUT
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/include/Makefile.am
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/include/Makefile.am b/examples/platform/cpp/include/Makefile.am
deleted file mode 100644
index 13a8816..0000000
--- a/examples/platform/cpp/include/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-##
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-##
-
-ACLOCAL_AMFLAGS = "-Im4"
-
-nobase_include_HEADERS = ignite/examples/address.h \
- ignite/examples/organization.h
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/include/ignite/examples/address.h
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/include/ignite/examples/address.h b/examples/platform/cpp/include/ignite/examples/address.h
deleted file mode 100644
index 29dbb0c..0000000
--- a/examples/platform/cpp/include/ignite/examples/address.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _IGNITE_EXAMPLES_ADDRESS
-#define _IGNITE_EXAMPLES_ADDRESS
-
-#include "ignite/portable/portable.h"
-
-namespace ignite
-{
- namespace examples
- {
- struct Address
- {
- Address()
- {
- street = "";
- zip = 0;
- }
-
- Address(std::string street, int zip) : street(street), zip(zip)
- {
- // No-op.
- }
-
- std::string ToString()
- {
- std::ostringstream oss;
-
- oss << "Address [street=" << street << ", zip=" << zip << "]";
-
- return oss.str();
- }
-
- std::string street;
- int zip;
- };
- }
-}
-
-namespace ignite
-{
- namespace portable
- {
- template<>
- struct PortableType<ignite::examples::Address>
- {
- int32_t GetTypeId()
- {
- return GetPortableStringHashCode("Address");
- }
-
- std::string GetTypeName()
- {
- return "Address";
- }
-
- int32_t GetFieldId(const char* name)
- {
- return GetPortableStringHashCode(name);
- }
-
- int32_t GetHashCode(ignite::examples::Address obj)
- {
- return 0;
- }
-
- bool IsNull(ignite::examples::Address obj)
- {
- return false;
- }
-
- ignite::examples::Address GetNull()
- {
- return ignite::examples::Address("", 0);
- }
-
- void Write(PortableWriter& writer, ignite::examples::Address obj)
- {
- writer.WriteString("street", obj.street);
- writer.WriteInt32("zip", obj.zip);
- }
-
- ignite::examples::Address Read(PortableReader& reader)
- {
- std::string street = reader.ReadString("street");
- int zip = reader.ReadInt32("zip");
-
- return ignite::examples::Address(street, zip);
- }
- };
- }
-}
-
-#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/include/ignite/examples/organization.h
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/include/ignite/examples/organization.h b/examples/platform/cpp/include/ignite/examples/organization.h
deleted file mode 100644
index c9137c9..0000000
--- a/examples/platform/cpp/include/ignite/examples/organization.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _IGNITE_EXAMPLES_ORGANIZATION
-#define _IGNITE_EXAMPLES_ORGANIZATION
-
-#include "ignite/portable/portable.h"
-
-#include "ignite/examples/address.h"
-
-namespace ignite
-{
- namespace examples
- {
- struct Organization
- {
- Organization()
- {
- name = "";
- addr = Address();
- }
-
- Organization(std::string name, Address addr) : name(name), addr(addr)
- {
- // No-op.
- }
-
- std::string ToString()
- {
- std::ostringstream oss;
-
- oss << "Organization [name=" << name << ", Address=" << addr.ToString() << "]";
-
- return oss.str();
- }
-
- std::string name;
- Address addr;
- };
- }
-}
-
-namespace ignite
-{
- namespace portable
- {
- template<>
- struct PortableType<ignite::examples::Organization>
- {
- int32_t GetTypeId()
- {
- return GetPortableStringHashCode("Organization");
- }
-
- std::string GetTypeName()
- {
- return "Organization";
- }
-
- int32_t GetFieldId(const char* name)
- {
- return GetPortableStringHashCode(name);
- }
-
- int32_t GetHashCode(ignite::examples::Organization obj)
- {
- return 0;
- }
-
- bool IsNull(ignite::examples::Organization obj)
- {
- return false;
- }
-
- ignite::examples::Organization GetNull()
- {
- return ignite::examples::Organization("", ignite::examples::Address());
- }
-
- void Write(PortableWriter& writer, ignite::examples::Organization obj)
- {
- writer.WriteString("name", obj.name);
- writer.WriteObject<ignite::examples::Address>("addr", obj.addr);
- }
-
- ignite::examples::Organization Read(PortableReader& reader)
- {
- std::string name = reader.ReadString("name");
- ignite::examples::Address addr = reader.ReadObject<ignite::examples::Address>("addr");
-
- return ignite::examples::Organization(name, addr);
- }
- };
- }
-}
-
-#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/project/vs/ignite-examples.sln
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/project/vs/ignite-examples.sln b/examples/platform/cpp/project/vs/ignite-examples.sln
deleted file mode 100644
index 4970654..0000000
--- a/examples/platform/cpp/project/vs/ignite-examples.sln
+++ /dev/null
@@ -1,19 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ignite-examples", "ignite-examples.vcxproj", "{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x64.ActiveCfg = Release|x64
- {34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x64.Build.0 = Release|x64
- {34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.ActiveCfg = Release|Win32
- {34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/project/vs/ignite-examples.vcxproj
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/project/vs/ignite-examples.vcxproj b/examples/platform/cpp/project/vs/ignite-examples.vcxproj
deleted file mode 100644
index 9331296..0000000
--- a/examples/platform/cpp/project/vs/ignite-examples.vcxproj
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>igniteexamples</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\..\..\modules\platform\src\main\cpp\common\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\common\include;..\..\..\..\..\modules\platform\src\main\cpp\core\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Link>
- <PostBuildEvent>
- <Command>copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
-copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\..\..\modules\platform\src\main\cpp\common\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\common\include;..\..\..\..\..\modules\platform\src\main\cpp\core\os\win\include;..\..\..\..\..\modules\platform\cpp\src\main\cpp\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Link>
- <PostBuildEvent>
- <Command>copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
-copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\putgetexample.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\include\ignite\examples\address.h" />
- <ClInclude Include="..\..\include\ignite\examples\organization.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/project/vs/ignite-examples.vcxproj.filters
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/project/vs/ignite-examples.vcxproj.filters b/examples/platform/cpp/project/vs/ignite-examples.vcxproj.filters
deleted file mode 100644
index ca62db7..0000000
--- a/examples/platform/cpp/project/vs/ignite-examples.vcxproj.filters
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\putgetexample.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\include\ignite\examples\address.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\ignite\examples\organization.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
-</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/examples/platform/cpp/src/putgetexample.cpp
----------------------------------------------------------------------
diff --git a/examples/platform/cpp/src/putgetexample.cpp b/examples/platform/cpp/src/putgetexample.cpp
deleted file mode 100644
index 2f82a7d..0000000
--- a/examples/platform/cpp/src/putgetexample.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <iostream>
-
-#include "ignite/ignite.h"
-#include "ignite/ignition.h"
-
-#include "ignite/examples/organization.h"
-
-using namespace ignite;
-using namespace cache;
-
-using namespace examples;
-
-/*
- * Execute individual Put and Get operations.
- *
- * @param cache Cache instance.
- */
-void PutGet(Cache<int, Organization>& cache)
-{
- // Create new Organization to store in cache.
- Organization org("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
-
- // Put organization to cache.
- cache.Put(1, org);
-
- // Get recently created employee as a strongly-typed fully de-serialized instance.
- Organization orgFromCache = cache.Get(1);
-
- std::cout << ">>> Retrieved organization instance from cache: " << std::endl;
- std::cout << orgFromCache.ToString() << std::endl;
- std::cout << std::endl;
-}
-
-/*
- * Execute bulk Put and Get operations.
- */
-void PutGetAll(Cache<int, Organization>& cache)
-{
- // Create new Organizations to store in cache.
- Organization org1("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
- Organization org2("Red Cross", Address("184 Fidler Drive, San Antonio, TX", 78205));
-
- // Put created data entries to cache.
- std::map<int, Organization> vals;
-
- vals[1] = org1;
- vals[2] = org2;
-
- cache.PutAll(vals);
-
- // Get recently created organizations as a strongly-typed fully de-serialized instances.
- std::set<int> keys;
-
- keys.insert(1);
- keys.insert(2);
-
- std::map<int, Organization> valsFromCache = cache.GetAll(keys);
-
- std::cout << ">>> Retrieved organization instances from cache: " << std::endl;
-
- for (std::map<int, Organization>::iterator it = valsFromCache.begin(); it != valsFromCache.end(); ++it)
- std::cout << it->second.ToString() << std::endl;
-
- std::cout << std::endl;
-}
-
-int main()
-{
- IgniteConfiguration cfg;
-
- cfg.jvmInitMem = 512;
- cfg.jvmMaxMem = 512;
-
- cfg.springCfgPath = "examples/config/platform/cpp/example-cache.xml";
-
- try
- {
- // Start a node.
- Ignite grid = Ignition::Start(cfg);
-
- std::cout << std::endl;
- std::cout << ">>> Cache put-get example started." << std::endl;
- std::cout << std::endl;
-
- // Get cache instance.
- Cache<int, Organization> cache = grid.GetCache<int, Organization>(NULL);
-
- // Clear cache.
- cache.Clear();
-
- PutGet(cache);
- PutGetAll(cache);
-
- // Stop node.
- Ignition::StopAll(false);
- }
- catch (IgniteError& err)
- {
- std::cout << "An error occurred: " << err.GetText() << std::endl;
- }
-
- std::cout << std::endl;
- std::cout << ">>> Example finished, press any key to exit ..." << std::endl;
- std::cout << std::endl;
-
- std::cin.get();
-
- return 0;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/README.txt
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/README.txt b/modules/platform/src/main/cpp/README.txt
index 378b982..773e0af 100644
--- a/modules/platform/src/main/cpp/README.txt
+++ b/modules/platform/src/main/cpp/README.txt
@@ -33,7 +33,7 @@ Common Requirements:
Building the library:
* Build Ignite C++ helper "common" library:
- * Navigate to the directory $IGNITE_HOME/modules/platform/src/main/cpp/common
+ * Navigate to the directory $IGNITE_HOME/platforms/cpp/src/common
* Execute the following commands one by one:
* libtoolize
* aclocal
@@ -44,7 +44,7 @@ Building the library:
* make
* make install
* Build Ignite C++ library:
- * Navigate to the directory $IGNITE_HOME/modules/platform/src/main/cpp/core
+ * Navigate to the directory $IGNITE_HOME/platforms/cpp/src/core
* Execute the following commands one by one:
* libtoolize
* aclocal
@@ -82,16 +82,17 @@ Common Requirements:
Building the library:
- * Open and build %IGNITE_HOME%\modules\platform\src\main\cpp\project\vs\ignite.sln (or ignite_86.sln if you are running 32-bit platform).
+ * Open and build %IGNITE_HOME%\platforms\cpp\src\project\vs\ignite.sln (or ignite_86.sln if you are running
+ 32-bit platform).
Development:
* IGNITE_HOME environment variable must be set to Ignite installation directory.
* Update Include Directories in Project Properties with paths to:
- * platforms\cpp\core\include
- * platforms\cpp\core\os\win\include
- * platforms\cpp\common\include
- * platforms\cpp\common\os\win\include
+ * $(IGNITE_HOME)\platforms\cpp\src\core\include
+ * $(IGNITE_HOME)\platforms\cpp\src\core\os\win\include
+ * $(IGNITE_HOME)\platforms\cpp\src\common\include
+ * $(IGNITE_HOME)\platforms\cpp\src\common\os\win\include
* $(JAVA_HOME)\include
* $(JAVA_HOME)\include\win32
* Update Library Directories with path to the built binaries
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/Makefile.am b/modules/platform/src/main/cpp/examples/Makefile.am
new file mode 100644
index 0000000..84fe957
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/Makefile.am
@@ -0,0 +1,39 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+##
+
+ACLOCAL_AMFLAGS = "-Im4"
+
+SUBDIRS = . include
+DIST_SUBDIRS = . include
+
+AM_CPPFLAGS = -I$(srcdir)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -DIGNITE_IMPL
+AM_CXXFLAGS = -Wall -std=c++0x
+
+noinst_PROGRAMS = ignite-putgetexample
+
+ignite_putgetexample_SOURCES = src/putgetexample.cpp
+
+ignite_putgetexample_LDFLAGS = -static-libtool-libs -L/usr/local/lib -lignite
+
+run-check: check
+ ./ignite-putgetexample -p
+
+clean-local: clean-check
+ $(RM) *.gcno *.gcda
+
+clean-check:
+ $(RM) $(ignite_putgetexample_OBJECTS)
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/README.txt
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/README.txt b/modules/platform/src/main/cpp/examples/README.txt
new file mode 100644
index 0000000..a00cb3b
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/README.txt
@@ -0,0 +1,42 @@
+Ignite C++ Examples
+==================================
+
+Common requirements
+----------------------------------
+ * Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp
+ * JAVA_HOME environment variable must be set pointing to Java installation directory.
+ * IGNITE_HOME environment variable must be set to Ignite installation directory.
+ * Ignite must be build and packaged using Maven. You can use the followin Maven command: mvn clean package -DskipTests
+ * Ignite C++ must be built according to instructions for your platform.
+
+Running examples on Linux
+----------------------------------
+
+Prerequisites:
+ * GCC, g++, autotools, automake, and libtool must be installed.
+
+To build examples execute the following commands one by one from $IGNITE_HOME/platforms/cpp/examples directory:
+ * libtoolize
+ * aclocal
+ * autoheader
+ * automake --add-missing
+ * autoreconf
+ * ./configure
+ * make
+
+As a result several executables will appear in example's directory.
+
+Before running examples ensure that:
+ * LD_LIBRARY_PATH environment variable is set and pointing to a directory with "libjvm.so" library. Typically this
+ library is located in $JAVA_HOME/jre/lib/amd64/server directory.
+
+
+Running examples on Windows
+----------------------------------
+
+Prerequisites:
+ * Microsoft Visual Studio (tm) 2010 or higher must be installed.
+ * Windows SDK 7.1 must be installed.
+
+Open Visual Studio solution %IGNITE_HOME%\platforms\cpp\examples\project\vs\ignite-examples.sln and select proper
+platform (x64 or x86). Run the solution.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/config/example-cache.xml b/modules/platform/src/main/cpp/examples/config/example-cache.xml
new file mode 100644
index 0000000..beed238
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/config/example-cache.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+ <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <!-- Set to true to enable distributed class loading for examples, default is false. -->
+ <property name="peerClassLoadingEnabled" value="true"/>
+
+ <property name="cacheConfiguration">
+ <list>
+ <!--
+ Partitioned cache example configuration with portable objects enabled.
+ Used in .NET example that is available only in enterprise edition.
+ -->
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <property name="atomicityMode" value="ATOMIC"/>
+ <property name="backups" value="1"/>
+ </bean>
+
+ <!--
+ Partitioned cache example configuration.
+ Used in .NET cache store example that is available only in enterprise edition.
+ -->
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <property name="name" value="tx"/>
+ <property name="atomicityMode" value="TRANSACTIONAL"/>
+ <property name="backups" value="1"/>
+ </bean>
+ </list>
+ </property>
+
+ <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <!--
+ Ignite provides several options for automatic discovery that can be used
+ instead os static IP based discovery.
+ -->
+ <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
+ <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+ <property name="addresses">
+ <list>
+ <!-- In distributed environment, replace with actual host IP address. -->
+ <value>127.0.0.1:47500..47501</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/configure.ac b/modules/platform/src/main/cpp/examples/configure.ac
new file mode 100644
index 0000000..a665d7b
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/configure.ac
@@ -0,0 +1,30 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.68)
+AC_INIT([Ingnite C++ examples],[1.4.0],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
+AC_CONFIG_SRCDIR([src])
+AC_CONFIG_MACRO_DIR([m4])
+AC_LANG([C++])
+
+AC_CANONICAL_SYSTEM
+
+dnl Initialize automake
+AM_INIT_AUTOMAKE([-Wall foreign])
+AC_CONFIG_HEADER([config.h])
+
+GXX="-g -O2"
+
+AC_PROG_CXX
+
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],[enable debug build [default=no]])],
+ [],[enable_debug=no])
+
+if test "x$enable_debug" = xyes; then
+ CXXFLAGS="-g -O0"
+else
+ CXXFLAGS="-g -O3"
+fi
+
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/include/Makefile.am b/modules/platform/src/main/cpp/examples/include/Makefile.am
new file mode 100644
index 0000000..13a8816
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/include/Makefile.am
@@ -0,0 +1,21 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+##
+
+ACLOCAL_AMFLAGS = "-Im4"
+
+nobase_include_HEADERS = ignite/examples/address.h \
+ ignite/examples/organization.h
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/include/ignite/examples/address.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/include/ignite/examples/address.h b/modules/platform/src/main/cpp/examples/include/ignite/examples/address.h
new file mode 100644
index 0000000..29dbb0c
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/include/ignite/examples/address.h
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _IGNITE_EXAMPLES_ADDRESS
+#define _IGNITE_EXAMPLES_ADDRESS
+
+#include "ignite/portable/portable.h"
+
+namespace ignite
+{
+ namespace examples
+ {
+ struct Address
+ {
+ Address()
+ {
+ street = "";
+ zip = 0;
+ }
+
+ Address(std::string street, int zip) : street(street), zip(zip)
+ {
+ // No-op.
+ }
+
+ std::string ToString()
+ {
+ std::ostringstream oss;
+
+ oss << "Address [street=" << street << ", zip=" << zip << "]";
+
+ return oss.str();
+ }
+
+ std::string street;
+ int zip;
+ };
+ }
+}
+
+namespace ignite
+{
+ namespace portable
+ {
+ template<>
+ struct PortableType<ignite::examples::Address>
+ {
+ int32_t GetTypeId()
+ {
+ return GetPortableStringHashCode("Address");
+ }
+
+ std::string GetTypeName()
+ {
+ return "Address";
+ }
+
+ int32_t GetFieldId(const char* name)
+ {
+ return GetPortableStringHashCode(name);
+ }
+
+ int32_t GetHashCode(ignite::examples::Address obj)
+ {
+ return 0;
+ }
+
+ bool IsNull(ignite::examples::Address obj)
+ {
+ return false;
+ }
+
+ ignite::examples::Address GetNull()
+ {
+ return ignite::examples::Address("", 0);
+ }
+
+ void Write(PortableWriter& writer, ignite::examples::Address obj)
+ {
+ writer.WriteString("street", obj.street);
+ writer.WriteInt32("zip", obj.zip);
+ }
+
+ ignite::examples::Address Read(PortableReader& reader)
+ {
+ std::string street = reader.ReadString("street");
+ int zip = reader.ReadInt32("zip");
+
+ return ignite::examples::Address(street, zip);
+ }
+ };
+ }
+}
+
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/include/ignite/examples/organization.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/include/ignite/examples/organization.h b/modules/platform/src/main/cpp/examples/include/ignite/examples/organization.h
new file mode 100644
index 0000000..c9137c9
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/include/ignite/examples/organization.h
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _IGNITE_EXAMPLES_ORGANIZATION
+#define _IGNITE_EXAMPLES_ORGANIZATION
+
+#include "ignite/portable/portable.h"
+
+#include "ignite/examples/address.h"
+
+namespace ignite
+{
+ namespace examples
+ {
+ struct Organization
+ {
+ Organization()
+ {
+ name = "";
+ addr = Address();
+ }
+
+ Organization(std::string name, Address addr) : name(name), addr(addr)
+ {
+ // No-op.
+ }
+
+ std::string ToString()
+ {
+ std::ostringstream oss;
+
+ oss << "Organization [name=" << name << ", Address=" << addr.ToString() << "]";
+
+ return oss.str();
+ }
+
+ std::string name;
+ Address addr;
+ };
+ }
+}
+
+namespace ignite
+{
+ namespace portable
+ {
+ template<>
+ struct PortableType<ignite::examples::Organization>
+ {
+ int32_t GetTypeId()
+ {
+ return GetPortableStringHashCode("Organization");
+ }
+
+ std::string GetTypeName()
+ {
+ return "Organization";
+ }
+
+ int32_t GetFieldId(const char* name)
+ {
+ return GetPortableStringHashCode(name);
+ }
+
+ int32_t GetHashCode(ignite::examples::Organization obj)
+ {
+ return 0;
+ }
+
+ bool IsNull(ignite::examples::Organization obj)
+ {
+ return false;
+ }
+
+ ignite::examples::Organization GetNull()
+ {
+ return ignite::examples::Organization("", ignite::examples::Address());
+ }
+
+ void Write(PortableWriter& writer, ignite::examples::Organization obj)
+ {
+ writer.WriteString("name", obj.name);
+ writer.WriteObject<ignite::examples::Address>("addr", obj.addr);
+ }
+
+ ignite::examples::Organization Read(PortableReader& reader)
+ {
+ std::string name = reader.ReadString("name");
+ ignite::examples::Address addr = reader.ReadObject<ignite::examples::Address>("addr");
+
+ return ignite::examples::Organization(name, addr);
+ }
+ };
+ }
+}
+
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.sln
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.sln b/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.sln
new file mode 100644
index 0000000..4970654
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.sln
@@ -0,0 +1,19 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ignite-examples", "ignite-examples.vcxproj", "{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x64.ActiveCfg = Release|x64
+ {34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x64.Build.0 = Release|x64
+ {34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.ActiveCfg = Release|Win32
+ {34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj b/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj
new file mode 100644
index 0000000..9331296
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>igniteexamples</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\..\..\modules\platform\src\main\cpp\common\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\common\include;..\..\..\..\..\modules\platform\src\main\cpp\core\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ <PostBuildEvent>
+ <Command>copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\..\..\modules\platform\src\main\cpp\common\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\common\include;..\..\..\..\..\modules\platform\src\main\cpp\core\os\win\include;..\..\..\..\..\modules\platform\cpp\src\main\cpp\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ <PostBuildEvent>
+ <Command>copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\putgetexample.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\ignite\examples\address.h" />
+ <ClInclude Include="..\..\include\ignite\examples\organization.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj.filters b/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj.filters
new file mode 100644
index 0000000..ca62db7
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj.filters
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\putgetexample.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\ignite\examples\address.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\ignite\examples\organization.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/examples/src/putgetexample.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/src/putgetexample.cpp b/modules/platform/src/main/cpp/examples/src/putgetexample.cpp
new file mode 100644
index 0000000..2f82a7d
--- /dev/null
+++ b/modules/platform/src/main/cpp/examples/src/putgetexample.cpp
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <iostream>
+
+#include "ignite/ignite.h"
+#include "ignite/ignition.h"
+
+#include "ignite/examples/organization.h"
+
+using namespace ignite;
+using namespace cache;
+
+using namespace examples;
+
+/*
+ * Execute individual Put and Get operations.
+ *
+ * @param cache Cache instance.
+ */
+void PutGet(Cache<int, Organization>& cache)
+{
+ // Create new Organization to store in cache.
+ Organization org("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
+
+ // Put organization to cache.
+ cache.Put(1, org);
+
+ // Get recently created employee as a strongly-typed fully de-serialized instance.
+ Organization orgFromCache = cache.Get(1);
+
+ std::cout << ">>> Retrieved organization instance from cache: " << std::endl;
+ std::cout << orgFromCache.ToString() << std::endl;
+ std::cout << std::endl;
+}
+
+/*
+ * Execute bulk Put and Get operations.
+ */
+void PutGetAll(Cache<int, Organization>& cache)
+{
+ // Create new Organizations to store in cache.
+ Organization org1("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
+ Organization org2("Red Cross", Address("184 Fidler Drive, San Antonio, TX", 78205));
+
+ // Put created data entries to cache.
+ std::map<int, Organization> vals;
+
+ vals[1] = org1;
+ vals[2] = org2;
+
+ cache.PutAll(vals);
+
+ // Get recently created organizations as a strongly-typed fully de-serialized instances.
+ std::set<int> keys;
+
+ keys.insert(1);
+ keys.insert(2);
+
+ std::map<int, Organization> valsFromCache = cache.GetAll(keys);
+
+ std::cout << ">>> Retrieved organization instances from cache: " << std::endl;
+
+ for (std::map<int, Organization>::iterator it = valsFromCache.begin(); it != valsFromCache.end(); ++it)
+ std::cout << it->second.ToString() << std::endl;
+
+ std::cout << std::endl;
+}
+
+int main()
+{
+ IgniteConfiguration cfg;
+
+ cfg.jvmInitMem = 512;
+ cfg.jvmMaxMem = 512;
+
+ cfg.springCfgPath = "examples/config/platform/cpp/example-cache.xml";
+
+ try
+ {
+ // Start a node.
+ Ignite grid = Ignition::Start(cfg);
+
+ std::cout << std::endl;
+ std::cout << ">>> Cache put-get example started." << std::endl;
+ std::cout << std::endl;
+
+ // Get cache instance.
+ Cache<int, Organization> cache = grid.GetCache<int, Organization>(NULL);
+
+ // Clear cache.
+ cache.Clear();
+
+ PutGet(cache);
+ PutGetAll(cache);
+
+ // Stop node.
+ Ignition::StopAll(false);
+ }
+ catch (IgniteError& err)
+ {
+ std::cout << "An error occurred: " << err.GetText() << std::endl;
+ }
+
+ std::cout << std::endl;
+ std::cout << ">>> Example finished, press any key to exit ..." << std::endl;
+ std::cout << std::endl;
+
+ std::cin.get();
+
+ return 0;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/project/vs/ignite.sln
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/project/vs/ignite.sln b/modules/platform/src/main/cpp/project/vs/ignite.sln
index 4a2ec29..f34d8e5 100644
--- a/modules/platform/src/main/cpp/project/vs/ignite.sln
+++ b/modules/platform/src/main/cpp/project/vs/ignite.sln
@@ -1,8 +1,6 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
-MinimumVisualStudioVersion = 10.0.40219.1
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "..\..\common\project\vs\common.vcxproj", "{4F7E4917-4612-4B96-9838-025711ADE391}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "..\..\core\project\vs\core.vcxproj", "{E2DEA693-F2EA-43C2-A813-053378F6E4DB}"
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/project/vs/ignite.slnrel
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/project/vs/ignite.slnrel b/modules/platform/src/main/cpp/project/vs/ignite.slnrel
new file mode 100644
index 0000000..7456097
--- /dev/null
+++ b/modules/platform/src/main/cpp/project/vs/ignite.slnrel
@@ -0,0 +1,33 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "..\..\common\project\vs\common.vcxproj", "{4F7E4917-4612-4B96-9838-025711ADE391}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "..\..\core\project\vs\core.vcxproj", "{E2DEA693-F2EA-43C2-A813-053378F6E4DB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Debug|Win32.Build.0 = Debug|Win32
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Debug|x64.ActiveCfg = Debug|x64
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Debug|x64.Build.0 = Debug|x64
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Release|Win32.ActiveCfg = Release|Win32
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Release|Win32.Build.0 = Release|Win32
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Release|x64.ActiveCfg = Release|x64
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Release|x64.Build.0 = Release|x64
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Debug|Win32.Build.0 = Debug|Win32
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Debug|x64.ActiveCfg = Debug|x64
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Debug|x64.Build.0 = Debug|x64
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Release|Win32.ActiveCfg = Release|Win32
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Release|Win32.Build.0 = Release|Win32
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Release|x64.ActiveCfg = Release|x64
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
http://git-wip-us.apache.org/repos/asf/ignite/blob/30f3725c/modules/platform/src/main/cpp/project/vs/ignite_x86.slnrel
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/project/vs/ignite_x86.slnrel b/modules/platform/src/main/cpp/project/vs/ignite_x86.slnrel
new file mode 100644
index 0000000..b716b49
--- /dev/null
+++ b/modules/platform/src/main/cpp/project/vs/ignite_x86.slnrel
@@ -0,0 +1,33 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "..\..\common\project\vs\common.vcxproj", "{4F7E4917-4612-4B96-9838-025711ADE391}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "..\..\core\project\vs\core.vcxproj", "{E2DEA693-F2EA-43C2-A813-053378F6E4DB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Debug|Win32.Build.0 = Debug|Win32
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Debug|x64.ActiveCfg = Debug|x64
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Debug|x64.Build.0 = Debug|x64
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Release|Win32.ActiveCfg = Release|Win32
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Release|Win32.Build.0 = Release|Win32
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Release|x64.ActiveCfg = Release|x64
+ {4F7E4917-4612-4B96-9838-025711ADE391}.Release|x64.Build.0 = Release|x64
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Debug|Win32.Build.0 = Debug|Win32
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Debug|x64.ActiveCfg = Debug|x64
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Debug|x64.Build.0 = Debug|x64
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Release|Win32.ActiveCfg = Release|Win32
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Release|Win32.Build.0 = Release|Win32
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Release|x64.ActiveCfg = Release|x64
+ {E2DEA693-F2EA-43C2-A813-053378F6E4DB}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
[2/3] ignite git commit: IGNITE-1513: Correct CPP placement.
Posted by vo...@apache.org.
IGNITE-1513: Correct CPP placement.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/732fa0a6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/732fa0a6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/732fa0a6
Branch: refs/heads/ignite-1513
Commit: 732fa0a669b7b68bb0e245bbdb6a5f2c34b0a2aa
Parents: 30f3725
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Sep 18 13:26:13 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Sep 18 13:26:13 2015 +0300
----------------------------------------------------------------------
.../platform/src/main/cpp/examples/Makefile.am | 2 +-
.../platform/src/main/cpp/examples/configure.ac | 22 +++++++++++++-------
.../examples/project/vs/ignite-examples.vcxproj | 16 +++++++-------
.../src/main/cpp/examples/src/putgetexample.cpp | 2 +-
4 files changed, 25 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/732fa0a6/modules/platform/src/main/cpp/examples/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/Makefile.am b/modules/platform/src/main/cpp/examples/Makefile.am
index 84fe957..d99cd82 100644
--- a/modules/platform/src/main/cpp/examples/Makefile.am
+++ b/modules/platform/src/main/cpp/examples/Makefile.am
@@ -17,7 +17,7 @@
ACLOCAL_AMFLAGS = "-Im4"
-SUBDIRS = . include
+SUBDIRS = .
DIST_SUBDIRS = . include
AM_CPPFLAGS = -I$(srcdir)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -DIGNITE_IMPL
http://git-wip-us.apache.org/repos/asf/ignite/blob/732fa0a6/modules/platform/src/main/cpp/examples/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/configure.ac b/modules/platform/src/main/cpp/examples/configure.ac
index a665d7b..a5e902d 100644
--- a/modules/platform/src/main/cpp/examples/configure.ac
+++ b/modules/platform/src/main/cpp/examples/configure.ac
@@ -1,21 +1,28 @@
-dnl Process this file with autoconf to produce a configure script.
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.68)
+AC_PREREQ([2.69])
AC_INIT([Ingnite C++ examples],[1.4.0],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
-AC_CONFIG_SRCDIR([src])
+AC_CONFIG_SRCDIR(src)
+
+AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([m4])
AC_LANG([C++])
-AC_CANONICAL_SYSTEM
+# Initialize automake
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+AC_CONFIG_HEADER(config.h)
-dnl Initialize automake
-AM_INIT_AUTOMAKE([-Wall foreign])
-AC_CONFIG_HEADER([config.h])
+AM_PROG_AR
+# Checks for programs.
GXX="-g -O2"
AC_PROG_CXX
+# Initialize Libtool
+LT_INIT
+
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],[enable debug build [default=no]])],
[],[enable_debug=no])
@@ -27,4 +34,5 @@ else
fi
AC_CONFIG_FILES(Makefile)
+
AC_OUTPUT
http://git-wip-us.apache.org/repos/asf/ignite/blob/732fa0a6/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj b/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj
index 9331296..13ec564 100644
--- a/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj
+++ b/modules/platform/src/main/cpp/examples/project/vs/ignite-examples.vcxproj
@@ -55,7 +55,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\..\..\modules\platform\src\main\cpp\common\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\common\include;..\..\..\..\..\modules\platform\src\main\cpp\core\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\src\common\os\win\include;..\..\..\src\common\include;..\..\..\src\core\os\win\include;..\..\..\src\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@@ -63,11 +63,11 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>..\..\..\src\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
- <Command>copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
-copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+ <Command>copy "$(ProjectDir)..\..\..\src\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\src\\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -79,7 +79,7 @@ copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Pla
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\..\..\modules\platform\src\main\cpp\common\os\win\include;..\..\..\..\..\modules\platform\src\main\cpp\common\include;..\..\..\..\..\modules\platform\src\main\cpp\core\os\win\include;..\..\..\..\..\modules\platform\cpp\src\main\cpp\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\src\common\os\win\include;..\..\..\src\common\include;..\..\..\src\core\os\win\include;..\..\..\src\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@@ -87,11 +87,11 @@ copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Pla
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>..\..\..\src\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
- <Command>copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
-copy "$(ProjectDir)..\..\..\..\..\modules\platform\src\main\cpp\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+ <Command>copy "$(ProjectDir)..\..\..\src\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\src\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
http://git-wip-us.apache.org/repos/asf/ignite/blob/732fa0a6/modules/platform/src/main/cpp/examples/src/putgetexample.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/examples/src/putgetexample.cpp b/modules/platform/src/main/cpp/examples/src/putgetexample.cpp
index 2f82a7d..206a2f4 100644
--- a/modules/platform/src/main/cpp/examples/src/putgetexample.cpp
+++ b/modules/platform/src/main/cpp/examples/src/putgetexample.cpp
@@ -88,7 +88,7 @@ int main()
cfg.jvmInitMem = 512;
cfg.jvmMaxMem = 512;
- cfg.springCfgPath = "examples/config/platform/cpp/example-cache.xml";
+ cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
try
{
[3/3] ignite git commit: IGNITE-1513: CPP build.
Posted by vo...@apache.org.
IGNITE-1513: CPP build.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3a010d9e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3a010d9e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3a010d9e
Branch: refs/heads/ignite-1513
Commit: 3a010d9e595bb499897313503c3f4ae220896232
Parents: 732fa0a
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Sep 18 13:31:38 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Sep 18 13:31:38 2015 +0300
----------------------------------------------------------------------
assembly/release-fabric.xml | 46 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/3a010d9e/assembly/release-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/release-fabric.xml b/assembly/release-fabric.xml
index a8c4541..1a3c7f9 100644
--- a/assembly/release-fabric.xml
+++ b/assembly/release-fabric.xml
@@ -34,6 +34,19 @@
</componentDescriptors>
<files>
+ <!-- Copy CPP files. -->
+ <file>
+ <source>modules/platform/src/main/cpp/project/vs/ignite.slnrel</source>
+ <outputDirectory>/platforms/cpp/src/project/vs</outputDirectory>
+ <destName>ignite.sln</destName>
+ </file>
+
+ <file>
+ <source>modules/platform/src/main/cpp/project/vs/ignite_x86.slnrel</source>
+ <outputDirectory>/platforms/cpp/src/project/vs</outputDirectory>
+ <destName>ignite_x86.sln</destName>
+ </file>
+
<file>
<source>assembly/LICENSE_FABRIC</source>
<destName>LICENSE</destName>
@@ -54,6 +67,39 @@
</files>
<fileSets>
+ <!-- Move CPP readme. -->
+ <fileSet>
+ <directory>modules/platform/src/main/cpp</directory>
+ <outputDirectory>/platforms/cpp</outputDirectory>
+ <includes>
+ <include>README.txt</include>
+ </includes>
+ </fileSet>
+
+ <!-- Move CPP "common" module. -->
+ <fileSet>
+ <directory>modules/platform/src/main/cpp/common</directory>
+ <outputDirectory>/platforms/cpp/src/common</outputDirectory>
+ </fileSet>
+
+ <!-- Move CPP "core" module. -->
+ <fileSet>
+ <directory>modules/platform/src/main/cpp/core</directory>
+ <outputDirectory>/platforms/cpp/src/core</outputDirectory>
+ </fileSet>
+
+ <!-- Move CPP examples. -->
+ <fileSet>
+ <directory>modules/platform/src/main/cpp/examples</directory>
+ <outputDirectory>/platform/cpp/examples</outputDirectory>
+ </fileSet>
+
+ <!-- Move CPP licenses. -->
+ <fileSet>
+ <directory>modules/platform/src/main/cpp/licenses</directory>
+ <outputDirectory>/platforms/cpp/licenses</outputDirectory>
+ </fileSet>
+
<fileSet>
<directory>bin</directory>
<outputDirectory>/bin</outputDirectory>