http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/include/ignite/impl/interop/interop_stream_position_guard.h ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_stream_position_guard.h b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_stream_position_guard.h deleted file mode 100644 index 17ecf53..0000000 --- a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_stream_position_guard.h +++ /dev/null @@ -1,79 +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_IMPL_INTEROP_STREAM_POSITION_GUARD -#define _IGNITE_IMPL_INTEROP_OUTPUT_POSITION_GUARD - -#include "ignite/impl/interop/interop_memory.h" - -namespace ignite -{ - namespace impl - { - namespace interop - { - /** - * Interop stream position guard. - */ - template<typename T> - class IGNITE_IMPORT_EXPORT InteropStreamPositionGuard { - public: - /** - * Create new position guard and saves current stream position. - * - * @param stream Stream which position should be saved. - */ - InteropStreamPositionGuard(T& stream) : stream(&stream), pos(stream.Position()) - { - //No-op - } - - /** - * Destructor. - * - * Restores stream's position to a saved one on destruction. - */ - ~InteropStreamPositionGuard() - { - if (stream) - stream->Position(pos); - } - - /** - * Releases guard so it will not restore streams position on destruction. - * - * @param val Value. - */ - void Release() - { - stream = NULL; - } - - private: - /** Stream. */ - T* stream; - - /** Saved position. */ - int32_t pos; - - IGNITE_NO_COPY_ASSIGNMENT(InteropStreamPositionGuard) - }; - } - } -} - -#endif \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/include/ignite/impl/operations.h ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/include/ignite/impl/operations.h b/modules/platforms/cpp/core/include/ignite/impl/operations.h index 9f1f333..40dd123 100644 --- a/modules/platforms/cpp/core/include/ignite/impl/operations.h +++ b/modules/platforms/cpp/core/include/ignite/impl/operations.h @@ -15,8 +15,8 @@ * limitations under the License. */ -#ifndef _IGNITE_IMPL_OPERATION -#define _IGNITE_IMPL_OPERATION +#ifndef _IGNITE_IMPL_OPERATIONS +#define _IGNITE_IMPL_OPERATIONS #include <map> #include <set> @@ -449,4 +449,4 @@ namespace ignite } } -#endif \ No newline at end of file +#endif //_IGNITE_IMPL_OPERATIONS \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/os/linux/include/Makefile.am ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/os/linux/include/Makefile.am b/modules/platforms/cpp/core/os/linux/include/Makefile.am deleted file mode 100644 index 9fa5242..0000000 --- a/modules/platforms/cpp/core/os/linux/include/Makefile.am +++ /dev/null @@ -1,23 +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/impl/utils.h - -uninstall-hook: - find ${includedir}/ignite -type d -empty -delete http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/os/linux/include/ignite/impl/utils.h ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/os/linux/include/ignite/impl/utils.h b/modules/platforms/cpp/core/os/linux/include/ignite/impl/utils.h deleted file mode 100644 index 8bbd2f7..0000000 --- a/modules/platforms/cpp/core/os/linux/include/ignite/impl/utils.h +++ /dev/null @@ -1,155 +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_UTILS -#define _IGNITE_UTILS - -#include <cstring> -#include <string> - -#include <ignite/common/common.h> - -#ifdef IGNITE_FRIEND - #define IGNITE_FRIEND_EXPORT IGNITE_EXPORT -#else - #define IGNITE_FRIEND_EXPORT -#endif - -namespace ignite -{ - namespace impl - { - namespace utils - { - /** - * Copy characters. - * - * @param val Value. - * @return Result. - */ - IGNITE_FRIEND_EXPORT char* CopyChars(const char* val); - - /** - * Release characters. - * - * @param val Value. - */ - IGNITE_FRIEND_EXPORT void ReleaseChars(char* val); - - /** - * Read system environment variable taking thread-safety in count. - * - * @param name Environment variable name. - * @param found Whether environment variable with such name was found. - * @return Environment variable value. - */ - IGNITE_FRIEND_EXPORT std::string GetEnv(const std::string& name, bool* found); - - /** - * Ensure that file on the given path exists in the system. - * - * @param path Path. - * @return True if file exists, false otherwise. - */ - IGNITE_FRIEND_EXPORT bool FileExists(const std::string& path); - - /** - * Attempts to find JVM library to load it into the process later. - * First search is performed using the passed path argument (is not NULL). - * Then JRE_HOME is evaluated. Last, JAVA_HOME is evaluated. - * - * @param Explicitly defined path (optional). - * @param found Whether library was found. - * @return Path to the file. - */ - IGNITE_FRIEND_EXPORT std::string FindJvmLibrary(const std::string* path, bool* found); - - /** - * Load JVM library into the process. - * - * @param path Optional path to the library. - * @return Whether load was successful. - */ - IGNITE_FRIEND_EXPORT bool LoadJvmLibrary(const std::string& path); - - /** - * Resolve IGNITE_HOME directory. Resolution is performed in several - * steps: - * 1) Check for path provided as argument. - * 2) Check for environment variable. - * 3) Check for current working directory. - * Result of these 3 checks are evaluated based on existence of certain - * predefined folders inside possible GG home. If they are found, - * IGNITE_HOME is considered resolved. - * - * @param path Optional path to evaluate. - * @param found Whether IGNITE_HOME home was found. - * @return Resolved GG home. - */ - IGNITE_FRIEND_EXPORT std::string ResolveIgniteHome(const std::string* path, bool* found); - - /** - * Create Ignite classpath based on user input and home directory. - * - * @param usrCp User's classpath. - * @param home Ignite home directory. - * @return Classpath. - */ - IGNITE_FRIEND_EXPORT std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home); - - /** - * Create Ignite classpath based on user input and home directory. - * - * @param usrCp User's classpath. - * @param home Ignite home directory. - * @param test Whether test classpath must be used. - * @return Classpath. - */ - IGNITE_FRIEND_EXPORT std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool test); - - /** - * Safe array which automatically reclaims occupied memory when out of scope. - */ - template<typename T> - struct IGNITE_FRIEND_EXPORT SafeArray - { - /** - * Constructor. - */ - SafeArray(int cap) - { - target = new T[cap]; - } - - /** - * Destructor. - */ - ~SafeArray() - { - delete[] target; - } - - IGNITE_NO_COPY_ASSIGNMENT(SafeArray); - - /** Target array. */ - T* target; - }; - } - } -} - -#endif http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/os/linux/src/impl/utils.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/os/linux/src/impl/utils.cpp b/modules/platforms/cpp/core/os/linux/src/impl/utils.cpp deleted file mode 100644 index ec45eb6..0000000 --- a/modules/platforms/cpp/core/os/linux/src/impl/utils.cpp +++ /dev/null @@ -1,439 +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 <sys/stat.h> -#include <dirent.h> -#include <dlfcn.h> - -#include "ignite/impl/utils.h" - -namespace ignite -{ - namespace impl - { - namespace utils - { - const char* JAVA_HOME = "JAVA_HOME"; - const char* JAVA_DLL = "/jre/lib/amd64/server/libjvm.so"; - - const char* IGNITE_HOME = "IGNITE_HOME"; - - const char* PROBE_BIN = "/bin"; - const char* PROBE_EXAMPLES = "/examples"; - - const char* IGNITE_NATIVE_TEST_CLASSPATH = "IGNITE_NATIVE_TEST_CLASSPATH"; - - /** - * Helper method to set boolean result to reference with proper NULL-check. - * - * @param res Result. - * @param outRes Where to set the result. - */ - inline void SetBoolResult(bool res, bool* outRes) - { - if (outRes) - *outRes = res; - } - - /** - * Check if string ends with the given ending. - * - * @param str String to check. - * @param ending Ending. - * @return Result. - */ - inline bool StringEndsWith(const std::string& str, const std::string& ending) - { - if (str.length() > ending.length()) - return str.compare(str.length() - ending.length(), ending.length(), ending) == 0; - - return false; - } - - /** - * Helper function for GG home resolution. Checks whether certain folders - * exist in the path. Optionally goes upwards in directory hierarchy. - * - * @param path Path to evaluate. - * @param up Whether to go upwards. - * @res Resolution result. - * @return Resolved directory. - */ - std::string ResolveIgniteHome0(const std::string& path, bool up, bool* res) - { - struct stat pathStat; - - if (stat(path.c_str(), &pathStat) != -1 && S_ISDIR(pathStat.st_mode)) - { - // Remove trailing slashes, otherwise we will have an infinite loop. - std::string path0 = path; - - while (true) { - char lastChar = *path0.rbegin(); - - if (lastChar == '/' || lastChar == ' ') { - size_t off = path0.find_last_of(lastChar); - - path0.erase(off, 1); - } - else - break; - } - - std::string binStr = path0 + PROBE_BIN; - struct stat binStat; - - std::string examplesStr = path0 + PROBE_EXAMPLES; - struct stat examplesStat; - - if (stat(binStr.c_str(), &binStat) != -1 && S_ISDIR(binStat.st_mode) && - stat(examplesStr.c_str(), &examplesStat) != -1 && S_ISDIR(examplesStat.st_mode)) - { - SetBoolResult(true, res); - - return std::string(path0); - } - - if (up) - { - // Evaluate parent directory. - size_t slashPos = path0.find_last_of("/"); - - if (slashPos != std::string::npos) - { - std::string parent = path0.substr(0, slashPos); - - return ResolveIgniteHome0(parent, true, res); - } - } - - } - - SetBoolResult(false, res); - - return std::string(); - } - - /** - * Create classpath picking JARs from the given path. - * - * @path Path. - * @return Classpath; - */ - std::string ClasspathJars(const std::string& path) - { - std::string res = std::string(); - - DIR* dir = opendir(path.c_str()); - - if (dir) - { - struct dirent* entry; - - while ((entry = readdir(dir)) != NULL) - { - if (strstr(entry->d_name, ".jar")) - { - res.append(path); - res.append("/"); - res.append(entry->d_name); - res.append(":"); - } - } - - closedir(dir); - } - - return res; - } - - /** - * Create classpath picking compiled classes from the given path. - * - * @path Path. - * @return Classpath; - */ - std::string ClasspathExploded(const std::string& path, bool down) - { - std::string res = std::string(); - - if (FileExists(path)) - { - // 1. Append "target\classes". - std::string classesPath = path + "/target/classes"; - - if (FileExists(classesPath)) { - res += classesPath; - res += ":"; - } - - // 2. Append "target\test-classes" - std::string testClassesPath = path + "/target/test-classes"; - - if (FileExists(testClassesPath)) { - res += testClassesPath; - res += ":"; - } - - // 3. Append "target\libs" - std::string libsPath = path + "/target/libs"; - - if (FileExists(libsPath)) { - std::string libsCp = ClasspathJars(libsPath); - res += libsCp; - } - - // 4. Do the same for child if needed. - if (down) - { - DIR* dir = opendir(path.c_str()); - - if (dir) - { - struct dirent* entry; - - while ((entry = readdir(dir)) != NULL) - { - std::string entryPath = entry->d_name; - - if (entryPath.compare(".") != 0 && entryPath.compare("..") != 0) - { - std::string entryFullPath = path + "/" + entryPath; - - struct stat entryFullStat; - - if (stat(entryFullPath.c_str(), &entryFullStat) != -1 && S_ISDIR(entryFullStat.st_mode)) - { - std::string childCp = ClasspathExploded(entryFullPath, false); - - res += childCp; - } - } - } - - closedir(dir); - } - } - } - - return res; - } - - /** - * Helper function to create classpath based on Ignite home directory. - * - * @param home Home directory; expected to be valid. - * @param forceTest Force test classpath. - */ - std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest) - { - std::string res = std::string(); - - // 1. Add exploded test directories. - if (forceTest) - { - std::string examplesPath = home + "/examples"; - std::string examplesCp = ClasspathExploded(examplesPath, true); - res.append(examplesCp); - - std::string modulesPath = home + "/modules"; - std::string modulesCp = ClasspathExploded(modulesPath, true); - res.append(modulesCp); - } - - // 2. Add regular jars from "libs" folder excluding "optional". - std::string libsPath = home + "/libs"; - - if (FileExists(libsPath)) - { - res.append(ClasspathJars(libsPath)); - - // Append inner directories. - DIR* dir = opendir(libsPath.c_str()); - - if (dir) - { - struct dirent* entry; - - while ((entry = readdir(dir)) != NULL) - { - std::string entryPath = entry->d_name; - - if (entryPath.compare(".") != 0 && entryPath.compare("..") != 0 && - entryPath.compare("optional") != 0) - { - std::string entryFullPath = libsPath; - - entryFullPath.append("/"); - entryFullPath.append(entryPath); - - struct stat entryFullStat; - - if (stat(entryFullPath.c_str(), &entryFullStat) != -1 && - S_ISDIR(entryFullStat.st_mode)) - res.append(ClasspathJars(entryFullPath)); - } - } - - closedir(dir); - } - } - - // 3. Return. - return res; - } - - char* CopyChars(const char* val) - { - if (val) { - size_t len = strlen(val); - char* dest = new char[len + 1]; - strcpy(dest, val); - *(dest + len) = 0; - return dest; - } - else - return NULL; - } - - void ReleaseChars(char* val) - { - if (val) - delete[] val; - } - - std::string GetEnv(const std::string& name, bool* found) - { - char* val = std::getenv(name.c_str()); - - if (val) { - SetBoolResult(true, found); - - return std::string(val); - } - else { - SetBoolResult(false, found); - - return std::string(); - } - } - - bool FileExists(const std::string& path) - { - struct stat s; - - int res = stat(path.c_str(), &s); - - return res != -1; - } - - std::string FindJvmLibrary(const std::string* path, bool* found) - { - SetBoolResult(true, found); // Optimistically assume that we will find it. - - if (path) { - // If path is provided explicitly, then check only it. - if (FileExists(*path)) - return std::string(path->data()); - } - else - { - bool javaEnvFound; - std::string javaEnv = GetEnv(JAVA_HOME, &javaEnvFound); - - if (javaEnvFound) - { - std::string javaDll = javaEnv + JAVA_DLL; - - if (FileExists(javaDll)) - return std::string(javaDll); - } - } - - SetBoolResult(false, found); - - return std::string(); - } - - bool LoadJvmLibrary(const std::string& path) - { - void* hnd = dlopen(path.c_str(), RTLD_LAZY); - - return hnd != NULL; - } - - std::string ResolveIgniteHome(const std::string* path, bool* found) - { - if (path) - // 1. Check passed argument. - return ResolveIgniteHome0(*path, false, found); - else - { - // 2. Check environment variable. - bool envFound; - std::string env = GetEnv(IGNITE_HOME, &envFound); - - if (envFound) - return ResolveIgniteHome0(env, false, found); - } - - SetBoolResult(false, found); - - return std::string(); - } - - std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home) - { - bool forceTest = false; - - if (home) - { - bool envFound; - std::string env = GetEnv(IGNITE_NATIVE_TEST_CLASSPATH, &envFound); - - forceTest = envFound && env.compare("true") == 0; - } - - return CreateIgniteClasspath(usrCp, home, forceTest); - } - - std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool forceTest) - { - // 1. Append user classpath if it exists. - std::string cp = std::string(); - - if (usrCp) - { - cp.append(*usrCp); - - if (*cp.rbegin() != ':') - cp.append(":"); - } - - // 2. Append home classpath if home is defined. - if (home) - { - std::string homeCp = CreateIgniteHomeClasspath(*home, forceTest); - - cp.append(homeCp); - } - - // 3. Return. - return cp; - } - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/os/win/include/ignite/impl/utils.h ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/os/win/include/ignite/impl/utils.h b/modules/platforms/cpp/core/os/win/include/ignite/impl/utils.h deleted file mode 100644 index 08e76ee..0000000 --- a/modules/platforms/cpp/core/os/win/include/ignite/impl/utils.h +++ /dev/null @@ -1,155 +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_UTILS -#define _IGNITE_UTILS - -#include <cstring> -#include <string> - -#include <ignite/common/common.h> - -#ifdef IGNITE_FRIEND - #define IGNITE_FRIEND_EXPORT IGNITE_EXPORT -#else - #define IGNITE_FRIEND_EXPORT -#endif - -namespace ignite -{ - namespace impl - { - namespace utils - { - /** - * Copy characters. - * - * @param val Value. - * @return Result. - */ - IGNITE_FRIEND_EXPORT char* CopyChars(const char* val); - - /** - * Release characters. - * - * @param val Value. - */ - IGNITE_FRIEND_EXPORT void ReleaseChars(char* val); - - /** - * Read system environment variable taking thread-safety in count. - * - * @param name Environment variable name. - * @param found Whether environment variable with such name was found. - * @return Environment variable value. - */ - IGNITE_FRIEND_EXPORT std::string GetEnv(const std::string& name, bool* found); - - /** - * Ensure that file on the given path exists in the system. - * - * @param path Path. - * @return True if file exists, false otherwise. - */ - IGNITE_FRIEND_EXPORT bool FileExists(const std::string& path); - - /** - * Attempts to find JVM library to load it into the process later. - * First search is performed using the passed path argument (is not NULL). - * Then JRE_HOME is evaluated. Last, JAVA_HOME is evaluated. - * - * @param Explicitly defined path (optional). - * @param found Whether library was found. - * @return Path to the file. - */ - IGNITE_FRIEND_EXPORT std::string FindJvmLibrary(const std::string* path, bool* found); - - /** - * Load JVM library into the process. - * - * @param path Optional path to the library. - * @return Whether load was successful. - */ - IGNITE_FRIEND_EXPORT bool LoadJvmLibrary(const std::string& path); - - /** - * Resolve IGNITE_HOME directory. Resolution is performed in several - * steps: - * 1) Check for path provided as argument. - * 2) Check for environment variable. - * 3) Check for current working directory. - * Result of these 3 checks are evaluated based on existence of certain - * predefined folders inside possible GG home. If they are found, - * IGNITE_HOME is considered resolved. - * - * @param path Optional path to evaluate. - * @param found Whether IGNITE_HOME home was found. - * @return Resolved GG home. - */ - IGNITE_FRIEND_EXPORT std::string ResolveIgniteHome(const std::string* path, bool* found); - - /** - * Create Ignite classpath based on user input and home directory. - * - * @param usrCp User's classpath. - * @param home Ignite home directory. - * @return Classpath. - */ - IGNITE_FRIEND_EXPORT std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home); - - /** - * Create Ignite classpath based on user input and home directory. - * - * @param usrCp User's classpath. - * @param home Ignite home directory. - * @param test Whether test classpath must be used. - * @return Classpath. - */ - IGNITE_FRIEND_EXPORT std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool test); - - /** - * Safe array which automatically reclaims occupied memory when out of scope. - */ - template<typename T> - struct IGNITE_FRIEND_EXPORT SafeArray - { - /** Target array. */ - T* target; - - /** - * Constructor. - */ - SafeArray(int cap) - { - target = new T[cap]; - } - - /** - * Destructor. - */ - ~SafeArray() - { - delete[] target; - } - - IGNITE_NO_COPY_ASSIGNMENT(SafeArray); - }; - } - } -} - -#endif \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/os/win/src/impl/utils.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/os/win/src/impl/utils.cpp b/modules/platforms/cpp/core/os/win/src/impl/utils.cpp deleted file mode 100644 index 5a450c3..0000000 --- a/modules/platforms/cpp/core/os/win/src/impl/utils.cpp +++ /dev/null @@ -1,453 +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 <windows.h> - -#include "ignite/impl/utils.h" - -namespace ignite -{ - namespace impl - { - namespace utils - { - const char* JAVA_HOME = "JAVA_HOME"; - const char* JAVA_DLL = "\\jre\\bin\\server\\jvm.dll"; - - const char* IGNITE_HOME = "IGNITE_HOME"; - - const char* PROBE_BIN = "\\bin"; - const char* PROBE_EXAMPLES = "\\examples"; - - const char* IGNITE_NATIVE_TEST_CLASSPATH = "IGNITE_NATIVE_TEST_CLASSPATH"; - - /** - * Helper method to set boolean result to reference with proper NULL-check. - * - * @param res Result. - * @param outRes Where to set the result. - */ - inline void SetBoolResult(bool res, bool* outRes) - { - if (outRes) - *outRes = res; - } - - /** - * Check if string ends with the given ending. - * - * @param str String to check. - * @param ending Ending. - * @return Result. - */ - inline bool StringEndsWith(const std::string& str, const std::string& ending) - { - if (str.length() > ending.length()) - return str.compare(str.length() - ending.length(), ending.length(), ending) == 0; - - return false; - } - - /** - * Helper function for GG home resolution. Checks whether certain folders - * exist in the path. Optionally goes upwards in directory hierarchy. - * - * @param path Path to evaluate. - * @param up Whether to go upwards. - * @res Resolution result. - * @return Resolved directory. - */ - std::string ResolveIgniteHome0(const std::string& path, bool up, bool* res) - { - DWORD attrs = GetFileAttributesA(path.c_str()); - - if (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY)) - { - // Remove trailing slashes, otherwise we will have an infinite loop. - std::string path0 = path; - - while (true) { - char lastChar = *path0.rbegin(); - - if (lastChar == '/' || lastChar == '\\' || lastChar == ' ') { - size_t off = path0.find_last_of(lastChar); - - path0.erase(off, 1); - } - else - break; - } - - std::string binStr = path0 + PROBE_BIN; - DWORD binAttrs = GetFileAttributesA(binStr.c_str()); - - std::string examplesStr = path0 + PROBE_EXAMPLES; - DWORD examplesAttrs = GetFileAttributesA(examplesStr.c_str()); - - if (binAttrs != INVALID_FILE_ATTRIBUTES && (binAttrs & FILE_ATTRIBUTE_DIRECTORY) && - examplesAttrs != INVALID_FILE_ATTRIBUTES && (examplesAttrs & FILE_ATTRIBUTE_DIRECTORY)) - { - SetBoolResult(true, res); - return std::string(path0); - } - - if (up) - { - // Evaluate parent directory. - size_t slashPos = path0.find_last_of("/\\"); - - if (slashPos != std::string::npos) - { - std::string parent = path0.substr(0, slashPos); - - return ResolveIgniteHome0(parent, true, res); - } - } - } - - SetBoolResult(false, res); - - return std::string(); - } - - /** - * Create classpath picking JARs from the given path. - * - * @path Path. - * @return Classpath; - */ - std::string ClasspathJars(const std::string& path) - { - std::string searchPath = path + "\\*.jar"; - - std::string res = std::string(); - - WIN32_FIND_DATAA findData; - - HANDLE hnd = FindFirstFileA(searchPath.c_str(), &findData); - - if (hnd != INVALID_HANDLE_VALUE) - { - do - { - res.append(path); - res.append("\\"); - res.append(findData.cFileName); - res.append(";"); - } while (FindNextFileA(hnd, &findData) != 0); - - FindClose(hnd); - } - - return res; - } - - /** - * Create classpath picking compiled classes from the given path. - * - * @path Path. - * @return Classpath; - */ - std::string ClasspathExploded(const std::string& path, bool down) - { - std::string res = std::string(); - - if (FileExists(path)) - { - // 1. Append "target\classes". - std::string classesPath = path + "\\target\\classes"; - - if (FileExists(classesPath)) { - res.append(classesPath); - res.append(";"); - } - - // 2. Append "target\test-classes" - std::string testClassesPath = path + "\\target\\test-classes"; - - if (FileExists(testClassesPath)) { - res.append(testClassesPath); - res.append(";"); - } - - // 3. Append "target\libs" - std::string libsPath = path + "\\target\\libs"; - - if (FileExists(libsPath)) { - std::string libsCp = ClasspathJars(libsPath); - res.append(libsCp); - } - - // 4. Do the same for child if needed. - if (down) - { - std::string searchPath = path + "\\*"; - - WIN32_FIND_DATAA findData; - - HANDLE hnd = FindFirstFileA(searchPath.c_str(), &findData); - - if (hnd != INVALID_HANDLE_VALUE) - { - do - { - if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - { - std::string childPath = findData.cFileName; - - if (childPath.compare(".") != 0 && - childPath.compare("..") != 0) - { - std::string childCp = - ClasspathExploded(path + "\\" + childPath, false); - - res.append(childCp); - } - } - } while (FindNextFileA(hnd, &findData) != 0); - - FindClose(hnd); - } - } - } - - return res; - } - - /** - * Helper function to create classpath based on Ignite home directory. - * - * @param home Home directory; expected to be valid. - * @param forceTest Force test classpath. - */ - std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest) - { - std::string res = std::string(); - - // 1. Add exploded test directories. - if (forceTest) - { - std::string examplesPath = home + "\\examples"; - std::string examplesCp = ClasspathExploded(examplesPath, true); - res.append(examplesCp); - - std::string modulesPath = home + "\\modules"; - std::string modulesCp = ClasspathExploded(modulesPath, true); - res.append(modulesCp); - } - - // 2. Add regular jars from "libs" folder excluding "optional". - std::string libsPath = home + "\\libs"; - - if (FileExists(libsPath)) - { - res.append(ClasspathJars(libsPath)); - - // Append inner directories. - std::string libsSearchPath = libsPath + "\\*"; - - WIN32_FIND_DATAA libsFindData; - - HANDLE libsHnd = FindFirstFileA(libsSearchPath.c_str(), &libsFindData); - - if (libsHnd != INVALID_HANDLE_VALUE) - { - do - { - if (libsFindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - { - std::string libsChildPath = libsFindData.cFileName; - - if (libsChildPath.compare(".") != 0 && - libsChildPath.compare("..") != 0 && - libsChildPath.compare("optional") != 0) { - std::string libsFolder = libsPath + "\\" + libsChildPath; - - res.append(ClasspathJars(libsFolder)); - } - } - } while (FindNextFileA(libsHnd, &libsFindData) != 0); - - FindClose(libsHnd); - } - } - - // 3. Return. - return res; - } - - char* CopyChars(const char* val) - { - if (val) { - size_t len = strlen(val); - char* dest = new char[len + 1]; - strcpy(dest, val); - *(dest + len) = 0; - return dest; - } - else - return NULL; - } - - void ReleaseChars(char* val) - { - if (val) - delete[] val; - } - - std::string GetEnv(const std::string& name, bool* found) - { - char res0[32767]; - - DWORD envRes = GetEnvironmentVariableA(name.c_str(), res0, 32767); - - if (envRes != 0) - { - SetBoolResult(true, found); - - return std::string(res0); - } - else - { - SetBoolResult(false, found); - - return std::string(); - } - } - - bool FileExists(const std::string& path) - { - WIN32_FIND_DATAA findres; - - HANDLE hnd = FindFirstFileA(path.c_str(), &findres); - - if (hnd == INVALID_HANDLE_VALUE) - return false; - else - { - FindClose(hnd); - - return true; - } - } - - std::string FindJvmLibrary(const std::string* path, bool* found) - { - SetBoolResult(true, found); // Optimistically assume that we will find it. - - if (path) { - // If path is provided explicitly, then check only it. - if (FileExists(*path)) - return std::string(path->data()); - } - else - { - bool javaEnvFound; - std::string javaEnv = GetEnv(JAVA_HOME, &javaEnvFound); - - if (javaEnvFound) - { - std::string javaDll = javaEnv + JAVA_DLL; - - if (FileExists(javaDll)) - return std::string(javaDll); - } - } - - *found = false; - - return std::string(); - } - - bool LoadJvmLibrary(const std::string& path) - { - HMODULE mod = LoadLibraryA(path.c_str()); - - return mod != NULL; - } - - std::string ResolveIgniteHome(const std::string* path, bool* found) - { - if (path) - // 1. Check passed argument. - return ResolveIgniteHome0(*path, false, found); - else - { - // 2. Check environment variable. - bool envFound; - std::string env = GetEnv(IGNITE_HOME, &envFound); - - if (envFound) - return ResolveIgniteHome0(env, false, found); - - // 3. Check current work dir. - const DWORD curDirLen = GetCurrentDirectory(0, NULL); - - char* curDir = new char[curDirLen]; - - GetCurrentDirectoryA(curDirLen, curDir); - - std::string curDirStr = curDir; - - delete[] curDir; - - return ResolveIgniteHome0(curDirStr, true, found); - } - } - - std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home) - { - bool forceTest = false; - - if (home) - { - bool envFound; - std::string env = GetEnv(IGNITE_NATIVE_TEST_CLASSPATH, &envFound); - - forceTest = envFound && env.compare("true") == 0; - } - - return CreateIgniteClasspath(usrCp, home, forceTest); - } - - std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool forceTest) - { - // 1. Append user classpath if it exists. - std::string cp = std::string(); - - if (usrCp) - { - cp.append(*usrCp); - - if (*cp.rbegin() != ';') - cp.append(";"); - } - - // 2. Append home classpath if home is defined. - if (home) - { - std::string homeCp = CreateIgniteHomeClasspath(*home, forceTest); - - cp.append(homeCp); - } - - // 3. Return. - return cp; - } - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/project/vs/core.vcxproj ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/project/vs/core.vcxproj b/modules/platforms/cpp/core/project/vs/core.vcxproj index cb66d28..dccd33c 100644 --- a/modules/platforms/cpp/core/project/vs/core.vcxproj +++ b/modules/platforms/cpp/core/project/vs/core.vcxproj @@ -5,14 +5,14 @@ <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> @@ -69,6 +69,8 @@ <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>ignite.core</TargetName> + <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetName>ignite.core</TargetName> @@ -77,6 +79,8 @@ </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>ignite.core</TargetName> + <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <TargetName>ignite.core</TargetName> @@ -88,7 +92,7 @@ <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <SDLCheck>false</SDLCheck> - <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include</AdditionalIncludeDirectories> <InlineFunctionExpansion>Disabled</InlineFunctionExpansion> <IntrinsicFunctions>false</IntrinsicFunctions> <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> @@ -116,7 +120,7 @@ <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <SDLCheck>false</SDLCheck> - <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include</AdditionalIncludeDirectories> <InlineFunctionExpansion>Disabled</InlineFunctionExpansion> <IntrinsicFunctions>false</IntrinsicFunctions> <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> @@ -146,7 +150,7 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <SDLCheck>false</SDLCheck> - <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include</AdditionalIncludeDirectories> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <OmitFramePointers>true</OmitFramePointers> @@ -170,7 +174,7 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <SDLCheck>false</SDLCheck> - <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include</AdditionalIncludeDirectories> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <OmitFramePointers>true</OmitFramePointers> @@ -202,74 +206,36 @@ <ClInclude Include="..\..\include\ignite\cache\query\query_text.h" /> <ClInclude Include="..\..\include\ignite\ignite.h" /> <ClInclude Include="..\..\include\ignite\ignite_configuration.h" /> - <ClInclude Include="..\..\include\ignite\ignite_error.h" /> <ClInclude Include="..\..\include\ignite\ignition.h" /> - <ClInclude Include="..\..\include\ignite\guid.h" /> + <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_updater_impl.h" /> <ClInclude Include="..\..\include\ignite\impl\cache\cache_impl.h" /> <ClInclude Include="..\..\include\ignite\impl\cache\query\query_fields_row_impl.h" /> <ClInclude Include="..\..\include\ignite\impl\cache\query\query_impl.h" /> <ClInclude Include="..\..\include\ignite\impl\ignite_environment.h" /> <ClInclude Include="..\..\include\ignite\impl\ignite_impl.h" /> <ClInclude Include="..\..\include\ignite\impl\handle_registry.h" /> - <ClInclude Include="..\..\include\ignite\impl\interop\interop.h" /> - <ClInclude Include="..\..\include\ignite\impl\interop\interop_input_stream.h" /> - <ClInclude Include="..\..\include\ignite\impl\interop\interop_memory.h" /> - <ClInclude Include="..\..\include\ignite\impl\interop\interop_output_stream.h" /> - <ClInclude Include="..\..\include\ignite\impl\interop\interop_stream_position_guard.h" /> + <ClInclude Include="..\..\include\ignite\impl\interop\interop_external_memory.h" /> <ClInclude Include="..\..\include\ignite\impl\operations.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_common.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_id_resolver.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_handler.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_manager.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_snapshot.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_updater.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_updater_impl.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_reader_impl.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_schema.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_utils.h" /> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_writer_impl.h" /> - <ClInclude Include="..\..\include\ignite\binary\binary.h" /> - <ClInclude Include="..\..\include\ignite\binary\binary_consts.h" /> - <ClInclude Include="..\..\include\ignite\binary\binary_containers.h" /> - <ClInclude Include="..\..\include\ignite\binary\binary_type.h" /> - <ClInclude Include="..\..\include\ignite\binary\binary_raw_reader.h" /> - <ClInclude Include="..\..\include\ignite\binary\binary_raw_writer.h" /> - <ClInclude Include="..\..\include\ignite\binary\binary_reader.h" /> - <ClInclude Include="..\..\include\ignite\binary\binary_writer.h" /> - <ClInclude Include="..\..\os\win\include\ignite\impl\utils.h" /> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\os\win\src\impl\utils.cpp" /> <ClCompile Include="..\..\src\ignite.cpp" /> - <ClCompile Include="..\..\src\ignite_error.cpp" /> <ClCompile Include="..\..\src\ignition.cpp" /> - <ClCompile Include="..\..\src\guid.cpp" /> + <ClCompile Include="..\..\src\impl\binary\binary_type_updater_impl.cpp" /> <ClCompile Include="..\..\src\impl\cache\cache_impl.cpp" /> <ClCompile Include="..\..\src\impl\cache\query\query_impl.cpp" /> <ClCompile Include="..\..\src\impl\ignite_environment.cpp" /> <ClCompile Include="..\..\src\impl\ignite_impl.cpp" /> <ClCompile Include="..\..\src\impl\handle_registry.cpp" /> - <ClCompile Include="..\..\src\impl\interop\interop_input_stream.cpp" /> - <ClCompile Include="..\..\src\impl\interop\interop_memory.cpp" /> - <ClCompile Include="..\..\src\impl\interop\interop_output_stream.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_type_handler.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_type_manager.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_type_snapshot.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_type_updater.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_type_updater_impl.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_reader_impl.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_schema.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_utils.cpp" /> - <ClCompile Include="..\..\src\impl\binary\binary_writer_impl.cpp" /> - <ClCompile Include="..\..\src\binary\binary_containers.cpp" /> - <ClCompile Include="..\..\src\binary\binary_type.cpp" /> - <ClCompile Include="..\..\src\binary\binary_raw_reader.cpp" /> - <ClCompile Include="..\..\src\binary\binary_raw_writer.cpp" /> - <ClCompile Include="..\..\src\binary\binary_reader.cpp" /> - <ClCompile Include="..\..\src\binary\binary_writer.cpp" /> + <ClCompile Include="..\..\src\impl\interop\interop_external_memory.cpp" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\..\binary\project\vs\binary.vcxproj"> + <Project>{4f15669b-92eb-49f0-b774-8f19bae0b960}</Project> + </ProjectReference> <ProjectReference Include="..\..\..\common\project\vs\common.vcxproj"> + <Project>{b63f2e01-5157-4719-8491-0e1c7cd3b701}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\jni\project\vs\jni.vcxproj"> <Project>{4f7e4917-4612-4b96-9838-025711ade391}</Project> </ProjectReference> </ItemGroup> http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/project/vs/core.vcxproj.filters ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/project/vs/core.vcxproj.filters b/modules/platforms/cpp/core/project/vs/core.vcxproj.filters index 9bdece4..96893bc 100644 --- a/modules/platforms/cpp/core/project/vs/core.vcxproj.filters +++ b/modules/platforms/cpp/core/project/vs/core.vcxproj.filters @@ -4,87 +4,30 @@ <ClCompile Include="..\..\src\impl\cache\cache_impl.cpp"> <Filter>Code\impl\cache</Filter> </ClCompile> - <ClCompile Include="..\..\src\impl\interop\interop_input_stream.cpp"> - <Filter>Code\impl\interop</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\interop\interop_memory.cpp"> - <Filter>Code\impl\interop</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\interop\interop_output_stream.cpp"> - <Filter>Code\impl\interop</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\ignite_environment.cpp"> - <Filter>Code\impl</Filter> - </ClCompile> <ClCompile Include="..\..\src\impl\ignite_impl.cpp"> <Filter>Code\impl</Filter> </ClCompile> - <ClCompile Include="..\..\os\win\src\impl\utils.cpp"> - <Filter>Code\impl</Filter> - </ClCompile> <ClCompile Include="..\..\src\ignite.cpp"> <Filter>Code</Filter> </ClCompile> - <ClCompile Include="..\..\src\ignite_error.cpp"> - <Filter>Code</Filter> - </ClCompile> <ClCompile Include="..\..\src\ignition.cpp"> <Filter>Code</Filter> </ClCompile> - <ClCompile Include="..\..\src\guid.cpp"> - <Filter>Code</Filter> - </ClCompile> <ClCompile Include="..\..\src\impl\handle_registry.cpp"> <Filter>Code\impl</Filter> </ClCompile> <ClCompile Include="..\..\src\impl\cache\query\query_impl.cpp"> <Filter>Code\impl\cache\query</Filter> </ClCompile> - <ClCompile Include="..\..\src\impl\binary\binary_utils.cpp"> - <Filter>Code\impl\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\binary\binary_writer_impl.cpp"> - <Filter>Code\impl\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\binary\binary_schema.cpp"> - <Filter>Code\impl\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\binary\binary_reader_impl.cpp"> - <Filter>Code\impl\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\binary\binary_containers.cpp"> - <Filter>Code\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\binary\binary_raw_reader.cpp"> - <Filter>Code\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\binary\binary_raw_writer.cpp"> - <Filter>Code\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\binary\binary_reader.cpp"> - <Filter>Code\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\binary\binary_type.cpp"> - <Filter>Code\binary</Filter> + <ClCompile Include="..\..\src\impl\ignite_environment.cpp"> + <Filter>Code\impl</Filter> </ClCompile> - <ClCompile Include="..\..\src\binary\binary_writer.cpp"> - <Filter>Code\binary</Filter> + <ClCompile Include="..\..\src\impl\interop\interop_external_memory.cpp"> + <Filter>Code\impl\interop</Filter> </ClCompile> <ClCompile Include="..\..\src\impl\binary\binary_type_updater_impl.cpp"> <Filter>Code\impl\binary</Filter> </ClCompile> - <ClCompile Include="..\..\src\impl\binary\binary_type_updater.cpp"> - <Filter>Code\impl\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\binary\binary_type_snapshot.cpp"> - <Filter>Code\impl\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\binary\binary_type_manager.cpp"> - <Filter>Code\impl\binary</Filter> - </ClCompile> - <ClCompile Include="..\..\src\impl\binary\binary_type_handler.cpp"> - <Filter>Code\impl\binary</Filter> - </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\include\ignite\impl\cache\cache_impl.h"> @@ -96,45 +39,21 @@ <ClInclude Include="..\..\include\ignite\cache\cache_peek_mode.h"> <Filter>Code\cache</Filter> </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\interop\interop.h"> - <Filter>Code\impl\interop</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\interop\interop_input_stream.h"> - <Filter>Code\impl\interop</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\interop\interop_memory.h"> - <Filter>Code\impl\interop</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\interop\interop_output_stream.h"> - <Filter>Code\impl\interop</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\ignite_environment.h"> - <Filter>Code\impl</Filter> - </ClInclude> <ClInclude Include="..\..\include\ignite\impl\ignite_impl.h"> <Filter>Code\impl</Filter> </ClInclude> <ClInclude Include="..\..\include\ignite\impl\operations.h"> <Filter>Code\impl</Filter> </ClInclude> - <ClInclude Include="..\..\os\win\include\ignite\impl\utils.h"> - <Filter>Code\impl</Filter> - </ClInclude> <ClInclude Include="..\..\include\ignite\ignite.h"> <Filter>Code</Filter> </ClInclude> <ClInclude Include="..\..\include\ignite\ignite_configuration.h"> <Filter>Code</Filter> </ClInclude> - <ClInclude Include="..\..\include\ignite\ignite_error.h"> - <Filter>Code</Filter> - </ClInclude> <ClInclude Include="..\..\include\ignite\ignition.h"> <Filter>Code</Filter> </ClInclude> - <ClInclude Include="..\..\include\ignite\guid.h"> - <Filter>Code</Filter> - </ClInclude> <ClInclude Include="..\..\include\ignite\impl\handle_registry.h"> <Filter>Code\impl</Filter> </ClInclude> @@ -174,65 +93,14 @@ <ClInclude Include="..\..\include\ignite\impl\cache\query\query_fields_row_impl.h"> <Filter>Code\impl\cache\query</Filter> </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\interop\interop_stream_position_guard.h"> - <Filter>Code\impl\interop</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_common.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_id_resolver.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_utils.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_writer_impl.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_schema.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_reader_impl.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\binary\binary.h"> - <Filter>Code\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\binary\binary_consts.h"> - <Filter>Code\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\binary\binary_containers.h"> - <Filter>Code\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\binary\binary_raw_reader.h"> - <Filter>Code\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\binary\binary_raw_writer.h"> - <Filter>Code\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\binary\binary_reader.h"> - <Filter>Code\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\binary\binary_type.h"> - <Filter>Code\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\binary\binary_writer.h"> - <Filter>Code\binary</Filter> + <ClInclude Include="..\..\include\ignite\impl\ignite_environment.h"> + <Filter>Code\impl</Filter> </ClInclude> <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_updater_impl.h"> <Filter>Code\impl\binary</Filter> </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_updater.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_snapshot.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_manager.h"> - <Filter>Code\impl\binary</Filter> - </ClInclude> - <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_handler.h"> - <Filter>Code\impl\binary</Filter> + <ClInclude Include="..\..\include\ignite\impl\interop\interop_external_memory.h"> + <Filter>Code\impl\interop</Filter> </ClInclude> </ItemGroup> <ItemGroup> @@ -245,9 +113,6 @@ <Filter Include="Code\impl\cache"> <UniqueIdentifier>{b013b0f6-c4b8-4b88-89bc-8b394971788e}</UniqueIdentifier> </Filter> - <Filter Include="Code\impl\interop"> - <UniqueIdentifier>{d4cc8aeb-6e7b-47e6-9b83-cba925844d96}</UniqueIdentifier> - </Filter> <Filter Include="Code\cache"> <UniqueIdentifier>{8b7e32c0-e222-4f3a-af31-19df380c369f}</UniqueIdentifier> </Filter> @@ -257,11 +122,11 @@ <Filter Include="Code\impl\cache\query"> <UniqueIdentifier>{b6e57294-120a-46f2-b0ad-c3595e2cf789}</UniqueIdentifier> </Filter> - <Filter Include="Code\binary"> - <UniqueIdentifier>{24b7134c-9335-44e1-9604-4093d0e3bbf5}</UniqueIdentifier> + <Filter Include="Code\impl\interop"> + <UniqueIdentifier>{ef4515c8-aa3d-44d4-b53d-26d18f465903}</UniqueIdentifier> </Filter> <Filter Include="Code\impl\binary"> - <UniqueIdentifier>{883773bd-085d-4eb5-81ee-f11188134faf}</UniqueIdentifier> + <UniqueIdentifier>{25234d34-541b-4f6c-b42a-cc96ee33a928}</UniqueIdentifier> </Filter> </ItemGroup> </Project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/src/binary/binary_containers.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/src/binary/binary_containers.cpp b/modules/platforms/cpp/core/src/binary/binary_containers.cpp deleted file mode 100644 index 91645cc..0000000 --- a/modules/platforms/cpp/core/src/binary/binary_containers.cpp +++ /dev/null @@ -1,76 +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 "ignite/binary/binary_containers.h" - -using namespace ignite::impl::binary; - -namespace ignite -{ - namespace binary - { - BinaryStringArrayWriter::BinaryStringArrayWriter(BinaryWriterImpl* impl, int32_t id) : - impl(impl), id(id) - { - // No-op. - } - - void BinaryStringArrayWriter::Write(const char* val) - { - if (val) - Write(val, static_cast<int32_t>(strlen(val))); - else - Write(NULL, -1); - } - - void BinaryStringArrayWriter::Write(const char* val, int32_t len) - { - impl->WriteStringElement(id, val, len); - } - - void BinaryStringArrayWriter::Close() - { - impl->CommitContainer(id); - } - - BinaryStringArrayReader::BinaryStringArrayReader(impl::binary::BinaryReaderImpl* impl, - int32_t id, int32_t size) : impl(impl), id(id), size(size) - { - // No-op. - } - - bool BinaryStringArrayReader::HasNext() - { - return impl->HasNextElement(id); - } - - int32_t BinaryStringArrayReader::GetNext(char* res, int32_t len) - { - return impl->ReadStringElement(id, res, len); - } - - int32_t BinaryStringArrayReader::GetSize() const - { - return size; - } - - bool BinaryStringArrayReader::IsNull() const - { - return size == -1; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/src/binary/binary_raw_reader.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/src/binary/binary_raw_reader.cpp b/modules/platforms/cpp/core/src/binary/binary_raw_reader.cpp deleted file mode 100644 index 61105e0..0000000 --- a/modules/platforms/cpp/core/src/binary/binary_raw_reader.cpp +++ /dev/null @@ -1,145 +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 "ignite/impl/binary/binary_reader_impl.h" -#include "ignite/binary/binary_raw_reader.h" - -using namespace ignite::impl::binary; - -namespace ignite -{ - namespace binary - { - BinaryRawReader::BinaryRawReader(BinaryReaderImpl* impl) : impl(impl) - { - // No-op. - } - - int8_t BinaryRawReader::ReadInt8() - { - return impl->ReadInt8(); - } - - int32_t BinaryRawReader::ReadInt8Array(int8_t* res, const int32_t len) - { - return impl->ReadInt8Array(res, len); - } - - bool BinaryRawReader::ReadBool() - { - return impl->ReadBool(); - } - - int32_t BinaryRawReader::ReadBoolArray(bool* res, const int32_t len) - { - return impl->ReadBoolArray(res, len); - } - - int16_t BinaryRawReader::ReadInt16() - { - return impl->ReadInt16(); - } - - int32_t BinaryRawReader::ReadInt16Array(int16_t* res, const int32_t len) - { - return impl->ReadInt16Array(res, len); - } - - uint16_t BinaryRawReader::ReadUInt16() - { - return impl->ReadUInt16(); - } - - int32_t BinaryRawReader::ReadUInt16Array(uint16_t* res, const int32_t len) - { - return impl->ReadUInt16Array(res, len); - } - - int32_t BinaryRawReader::ReadInt32() - { - return impl->ReadInt32(); - } - - int32_t BinaryRawReader::ReadInt32Array(int32_t* res, const int32_t len) - { - return impl->ReadInt32Array(res, len); - } - - int64_t BinaryRawReader::ReadInt64() - { - return impl->ReadInt64(); - } - - int32_t BinaryRawReader::ReadInt64Array(int64_t* res, const int32_t len) - { - return impl->ReadInt64Array(res, len); - } - - float BinaryRawReader::ReadFloat() - { - return impl->ReadFloat(); - } - - int32_t BinaryRawReader::ReadFloatArray(float* res, const int32_t len) - { - return impl->ReadFloatArray(res, len); - } - - double BinaryRawReader::ReadDouble() - { - return impl->ReadDouble(); - } - - int32_t BinaryRawReader::ReadDoubleArray(double* res, const int32_t len) - { - return impl->ReadDoubleArray(res, len); - } - - Guid BinaryRawReader::ReadGuid() - { - return impl->ReadGuid(); - } - - int32_t BinaryRawReader::ReadGuidArray(Guid* res, const int32_t len) - { - return impl->ReadGuidArray(res, len); - } - - int32_t BinaryRawReader::ReadString(char* res, const int32_t len) - { - return impl->ReadString(res, len); - } - - BinaryStringArrayReader BinaryRawReader::ReadStringArray() - { - int32_t size; - - int32_t id = impl->ReadStringArray(&size); - - return BinaryStringArrayReader(impl, id, size); - } - - CollectionType BinaryRawReader::ReadCollectionType() - { - return impl->ReadCollectionType(); - } - - int32_t BinaryRawReader::ReadCollectionSize() - { - return impl->ReadCollectionSize(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/src/binary/binary_raw_writer.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/src/binary/binary_raw_writer.cpp b/modules/platforms/cpp/core/src/binary/binary_raw_writer.cpp deleted file mode 100644 index 31f29a9..0000000 --- a/modules/platforms/cpp/core/src/binary/binary_raw_writer.cpp +++ /dev/null @@ -1,147 +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 "ignite/impl/binary/binary_writer_impl.h" -#include "ignite/binary/binary_raw_writer.h" - -using namespace ignite::impl::binary; - -namespace ignite -{ - namespace binary - { - BinaryRawWriter::BinaryRawWriter(BinaryWriterImpl* impl) : impl(impl) - { - // No-op. - } - - void BinaryRawWriter::WriteInt8(int8_t val) - { - impl->WriteInt8(val); - } - - void BinaryRawWriter::WriteInt8Array(const int8_t* val, int32_t len) - { - impl->WriteInt8Array(val, len); - } - - void BinaryRawWriter::WriteBool(bool val) - { - impl->WriteBool(val); - } - - void BinaryRawWriter::WriteBoolArray(const bool* val, int32_t len) - { - impl->WriteBoolArray(val, len); - } - - void BinaryRawWriter::WriteInt16(int16_t val) - { - impl->WriteInt16(val); - } - - void BinaryRawWriter::WriteInt16Array(const int16_t* val, int32_t len) - { - impl->WriteInt16Array(val, len); - } - - void BinaryRawWriter::WriteUInt16(uint16_t val) - { - impl->WriteUInt16(val); - } - - void BinaryRawWriter::WriteUInt16Array(const uint16_t* val, int32_t len) - { - impl->WriteUInt16Array(val, len); - } - - void BinaryRawWriter::WriteInt32(int32_t val) - { - impl->WriteInt32(val); - } - - void BinaryRawWriter::WriteInt32Array(const int32_t* val, int32_t len) - { - impl->WriteInt32Array(val, len); - } - - void BinaryRawWriter::WriteInt64(int64_t val) - { - impl->WriteInt64(val); - } - - void BinaryRawWriter::WriteInt64Array(const int64_t* val, int32_t len) - { - impl->WriteInt64Array(val, len); - } - - void BinaryRawWriter::WriteFloat(float val) - { - impl->WriteFloat(val); - } - - void BinaryRawWriter::WriteFloatArray(const float* val, int32_t len) - { - impl->WriteFloatArray(val, len); - } - - void BinaryRawWriter::WriteDouble(double val) - { - impl->WriteDouble(val); - } - - void BinaryRawWriter::WriteDoubleArray(const double* val, int32_t len) - { - impl->WriteDoubleArray(val, len); - } - - void BinaryRawWriter::WriteGuid(const Guid& val) - { - impl->WriteGuid(val); - } - - void BinaryRawWriter::WriteGuidArray(const Guid* val, int32_t len) - { - impl->WriteGuidArray(val, len); - } - - void BinaryRawWriter::WriteString(const char* val) - { - if (val) - WriteString(val, static_cast<int32_t>(strlen(val))); - else - WriteNull(); - } - - void BinaryRawWriter::WriteString(const char* val, int32_t len) - { - impl->WriteString(val, len); - } - - BinaryStringArrayWriter BinaryRawWriter::WriteStringArray() - { - int32_t id = impl->WriteStringArray(); - - return BinaryStringArrayWriter(impl, id); - } - - void BinaryRawWriter::WriteNull() - { - impl->WriteNull(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/core/src/binary/binary_reader.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core/src/binary/binary_reader.cpp b/modules/platforms/cpp/core/src/binary/binary_reader.cpp deleted file mode 100644 index b3fe4ee..0000000 --- a/modules/platforms/cpp/core/src/binary/binary_reader.cpp +++ /dev/null @@ -1,152 +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 "ignite/impl/binary/binary_reader_impl.h" -#include "ignite/binary/binary_reader.h" - -using namespace ignite::impl::binary; - -namespace ignite -{ - namespace binary - { - BinaryReader::BinaryReader(BinaryReaderImpl* impl) : impl(impl) - { - // No-op. - } - - int8_t BinaryReader::ReadInt8(const char* fieldName) - { - return impl->ReadInt8(fieldName); - } - - int32_t BinaryReader::ReadInt8Array(const char* fieldName, int8_t* res, int32_t len) - { - return impl->ReadInt8Array(fieldName, res, len); - } - - bool BinaryReader::ReadBool(const char* fieldName) - { - return impl->ReadBool(fieldName); - } - - int32_t BinaryReader::ReadBoolArray(const char* fieldName, bool* res, int32_t len) - { - return impl->ReadBoolArray(fieldName, res, len); - } - - int16_t BinaryReader::ReadInt16(const char* fieldName) - { - return impl->ReadInt16(fieldName); - } - - int32_t BinaryReader::ReadInt16Array(const char* fieldName, int16_t* res, int32_t len) - { - return impl->ReadInt16Array(fieldName, res, len); - } - - uint16_t BinaryReader::ReadUInt16(const char* fieldName) - { - return impl->ReadUInt16(fieldName); - } - - int32_t BinaryReader::ReadUInt16Array(const char* fieldName, uint16_t* res, int32_t len) - { - return impl->ReadUInt16Array(fieldName, res, len); - } - - int32_t BinaryReader::ReadInt32(const char* fieldName) - { - return impl->ReadInt32(fieldName); - } - - int32_t BinaryReader::ReadInt32Array(const char* fieldName, int32_t* res, int32_t len) - { - return impl->ReadInt32Array(fieldName, res, len); - } - - int64_t BinaryReader::ReadInt64(const char* fieldName) - { - return impl->ReadInt64(fieldName); - } - - int32_t BinaryReader::ReadInt64Array(const char* fieldName, int64_t* res, int32_t len) - { - return impl->ReadInt64Array(fieldName, res, len); - } - - float BinaryReader::ReadFloat(const char* fieldName) - { - return impl->ReadFloat(fieldName); - } - - int32_t BinaryReader::ReadFloatArray(const char* fieldName, float* res, int32_t len) - { - return impl->ReadFloatArray(fieldName, res, len); - } - - double BinaryReader::ReadDouble(const char* fieldName) - { - return impl->ReadDouble(fieldName); - } - - int32_t BinaryReader::ReadDoubleArray(const char* fieldName, double* res, int32_t len) - { - return impl->ReadDoubleArray(fieldName, res, len); - } - - Guid BinaryReader::ReadGuid(const char* fieldName) - { - return impl->ReadGuid(fieldName); - } - - int32_t BinaryReader::ReadGuidArray(const char* fieldName, Guid* res, int32_t len) - { - return impl->ReadGuidArray(fieldName, res, len); - } - - int32_t BinaryReader::ReadString(const char* fieldName, char* res, int32_t len) - { - return impl->ReadString(fieldName, res, len); - } - - BinaryStringArrayReader BinaryReader::ReadStringArray(const char* fieldName) - { - int32_t size; - - int32_t id = impl->ReadStringArray(fieldName, &size); - - return BinaryStringArrayReader(impl, id, size); - } - - CollectionType BinaryReader::ReadCollectionType(const char* fieldName) - { - return impl->ReadCollectionType(fieldName); - } - - int32_t BinaryReader::ReadCollectionSize(const char* fieldName) - { - return impl->ReadCollectionSize(fieldName); - } - - BinaryRawReader BinaryReader::RawReader() - { - impl->SetRawMode(); - - return BinaryRawReader(impl); - } - } -} \ No newline at end of file
