diff --git a/CMakeLists.txt b/CMakeLists.txt index 2aed622a..556c362f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,20 +43,6 @@ endif() set(CMAKE_CXX_STANDARD 11) -# Apple crosscompiling rpath patch -# macro(apple_rpath_patch _T) - # if (APPLE AND CMAKE_CROSSCOMPILING AND CMAKE_MACOSX_RPATH) - # foreach(_RP ${CMAKE_INSTALL_RPATH}) - # add_custom_command(TARGET ${_T} POST_BUILD - # COMMAND "${CMAKE_INSTALL_NAME_TOOL}" - # "-add_rpath" "${_RP}" - # "$/$" - # COMMENT "Add to ${_T} rpath \"${_RP}\"") - # endforeach() - # endif() -# endmacro() - - # Basic macro(gather_src DIR CPP H H_P) set(CS) @@ -175,7 +161,6 @@ endif() # Compiler get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME) -#link_directories(${CMAKE_CURRENT_BINARY_DIR}) #message("${C_COMPILER}") @@ -183,10 +168,6 @@ get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME) # Main lib set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "concurrent" "cloud") -if(PIP_FREERTOS) - #list(REMOVE_ITEM PIP_FOLDERS "console") - #include_directories("${PIP_SRC_MAIN}/console") -endif() include_directories("${PIP_SRC_MAIN}") set(PIP_MAIN_FOLDERS) foreach(F ${PIP_FOLDERS}) @@ -350,7 +331,6 @@ if(APPLE) endif() if ((NOT DEFINED LIBPROJECT) AND (DEFINED ANDROID_PLATFORM)) include_directories(${ANDROID_SYSTEM_LIBRARY_PATH}/usr/include) - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${ANDROID_NDK}/sysroot/usr/include") #message("${ANDROID_SYSTEM_LIBRARY_PATH}/usr/include") #message("${ANDROID_NDK}/sysroot/usr/include") endif() @@ -679,9 +659,6 @@ if(LIB) install(TARGETS ${PIP_LIBS_TARGETS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) endif() message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"") - # Precompiled header - #add_custom_target(pip_pch ALL COMMAND ${CMAKE_CXX_COMPILER} -O2 -fPIC -g3 ${CMAKE_INSTALL_PREFIX}/include/pip/pip.h DEPENDS pip SOURCES ${HDRS}) - #list(APPEND HDRS "pip.h.gch") file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in" "cmake/android_debug.keystore") install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules) else() @@ -697,10 +674,6 @@ else() endif() endif() -# foreach(_T ${PIP_LIBS_TARGETS}) - # apple_rpath_patch(${_T}) -# endforeach() - if(NOT PIP_FREERTOS) # Auxiliary @@ -745,27 +718,6 @@ endif() # # Build Documentation # - -# find_package(Doxygen QUIET) -# if(Doxygen_FOUND) - # message(STATUS "Building PIP with documentation via Doxygen") - - # #set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in) - # set(DOXYFILE ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile) - # #configure_file(${DOXYFILE_IN} ${DOXYFILE} @ONLY) - - # add_custom_target(DOC - # COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE} - # WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - # COMMENT "Generating API documentation with Doxygen" - # VERBATIM) - - # add_custom_command(TARGET DOC - # POST_BUILD - # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/source/doc/Documentation.html ${CMAKE_SOURCE_DIR}/doc - # ) - # install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc) -# endif() if ((NOT PIP_FREERTOS) AND (NOT CROSSTOOLS)) include(PIPDocumentation) find_package(Doxygen) diff --git a/cmake/DeployMacros.cmake b/cmake/DeployMacros.cmake index 0878a5a8..d223abeb 100644 --- a/cmake/DeployMacros.cmake +++ b/cmake/DeployMacros.cmake @@ -388,16 +388,14 @@ macro(__add_file_or_dir _DIR_VAR _FILE_VAR _PATH _RELPATH) else() set(_p "${_RELPATH}/${_PATH}") endif() - #if (EXISTS "${_p}") - if ("${_p}" MATCHES ".*/$") - string(LENGTH "${_p}" __sl) - math(EXPR __sl ${__sl}-1) - string(SUBSTRING "${_p}" 0 ${__sl} _p) - list(APPEND ${_DIR_VAR} "${_p}") - else() - list(APPEND ${_FILE_VAR} "${_p}") - endif() - #endif() + if ("${_p}" MATCHES ".*/$") + string(LENGTH "${_p}" __sl) + math(EXPR __sl ${__sl}-1) + string(SUBSTRING "${_p}" 0 ${__sl} _p) + list(APPEND ${_DIR_VAR} "${_p}") + else() + list(APPEND ${_FILE_VAR} "${_p}") + endif() endmacro() set(__win_host 0) @@ -617,7 +615,6 @@ macro(deploy_target _T) foreach (_L ${DEPLOY_ADD_LIBPATH}) set(_add_search_path "${_add_search_path}${_dt_delim}${_L}") endforeach() - #set(_add_search_path "${_add_search_path}") #message("app depend ${_T} libpath ${_add_search_path}") set(_CMD_) set(_deployed) @@ -643,8 +640,6 @@ macro(deploy_target _T) endif() endforeach() endif() - #execute_process(COMMAND "lsb_release -si" OUTPUT_VARIABLE _os_id) - #execute_process(COMMAND "lsb_release -sr" OUTPUT_VARIABLE _os_ver) set(_build "${${_T}_VERSION_BUILD}") if (NOT "x${_build}" STREQUAL "x") set(_build "-${_build}") @@ -770,7 +765,6 @@ macro(deploy_target _T) COMMAND mkdir ${_VERB} -p "${_AGD}/DEBIAN" ${_CMD_} - #COMMAND -l "${CMAKE_LDD}" -P xcb -q ${Qt5_ROOT} -s "\"${CMAKE_PREFIX_PATH}/lib;${_add_search_path}\"" -o ${_AGD}/usr/lib -p ${_AGD}/usr/ ${_AGD}/Contents/MacOS/${_T} # generate deb COMMAND cd ${_AGD} "&&" md5deep -rl opt usr ">" DEBIAN/md5sums COMMAND mkdir ${_VERB} -p ${_DESTINATION} @@ -826,7 +820,6 @@ macro(deploy_target _T) ${_CMD_} # generate deb - #COMMAND cd ${_AGD} "&&" md5deep -rl * ">" DEBIAN/md5sums COMMAND mkdir ${_VERB} -p ${_DESTINATION} COMMAND dpkg-deb -Z gzip -b ${_AGD} ${_DESTINATION}/${_deb_name} VERBATIM @@ -893,13 +886,8 @@ macro(deploy_target _T) endif() set(_dmg_name "${_TV}_macosx_x64.dmg") set(_cmd_gen_dmg COMMAND genisoimage -quiet -V "${MACOSX_BUNDLE_BUNDLE_NAME}" -D -R -apple -no-pad -o ${_DESTINATION}/${_dmg_name} ${_DMG}) - #set(_cmd_int) if (__mac_host) set(_cmd_gen_dmg COMMAND hdiutil create ${_DESTINATION}/${_dmg_name} -ov -volname "${MACOSX_BUNDLE_BUNDLE_NAME}" -fs HFS+ -srcfolder ${_DMG}) - #set(_rpathes "@executable_path/../Frameworks" "@executable_path/lib" "@loader_path/../lib") - #foreach (_r ${_rpathes}) - # set(_cmd_int ${_cmd_int} COMMAND install_name_tool -add_rpath "${_r}" \"${_AGD}/Contents/MacOS/${_T}\") - #endforeach() endif() if (_ZIP_DMG) set(_cmd_gen_dmg ${_cmd_gen_dmg} COMMAND zip -q -r "\"${_DESTINATION}/${_dmg_name}.zip\"" "\"${_DESTINATION}/${_dmg_name}\"") @@ -915,10 +903,7 @@ macro(deploy_target _T) COMMAND mkdir ${_VERB} -p ${_AGD}/Contents/Frameworks COMMAND mkdir ${_VERB} -p ${_DESTINATION} ${_CMD_} - #COMMAND cp ${_ICON_FN} ${_AGD}/Contents/Resources - #COMMAND cp -r ${_DEPLOY_DIR}/lang ${_AGD}/Contents/Resources COMMAND ${PIP_DEPLOY_TOOL} ${_VERB} ${_OPTIONS} -M "${CMAKE_OTOOL}" -P cocoa,minimal -S mac -q ${Qt5_ROOT} -s "\"${CMAKE_PREFIX_PATH}/lib${_add_search_path}\"" -o ${_AGD}/Contents/Frameworks -p ${_AGD}/Contents/PlugIns ${_AGD}/Contents/MacOS/${_T} ${_ADD_DEPS} - #${_cmd_int} # prepare dmg dir COMMAND rm -rf ${_DMG} COMMAND mkdir ${_VERB} -p ${_DMG} @@ -949,8 +934,6 @@ macro(deploy_target _T) endforeach() set(_res_qrc "${CMAKE_CURRENT_BINARY_DIR}/android_res.qrc") file(WRITE "${_res_qrc}" "${_res_files}\n") - #__make_copy(_CMD_ _RES_DIRS _RES_FILES "${_AGD}/res") - #__make_copy(_CMD_ _FILE_DIRS _FILE_FILES "${_AGD}/Contents/MacOS") set(_AT ${_T}_lib) set(_ATA ${_AT}_${ANDROID_ABI}) get_target_property(_sources ${_T} SOURCES) @@ -976,9 +959,7 @@ macro(deploy_target _T) set(_file "${Qt5_ROOT}/src/3rdparty/gradle/gradlew" "${Qt5_ROOT}/src/3rdparty/gradle/gradlew.bat") __make_copy(_CMD_ _dir _file "${_AGD}") - #__make_copy(_CMD_ _PLUG_DIRS _PLUG_FILES "${_AGD}/") #message("bindir = ${CMAKE_CURRENT_SOURCE_DIR}") - #get_target_property(_LL ${_T} ) set(SDK_ROOT "$ENV{ANDROID_SDK_ROOT}") if("x${SDK_ROOT}" STREQUAL "x") set(SDK_ROOT "$ENV{ANDROID_HOME}") @@ -1059,7 +1040,6 @@ macro(deploy_target _T) if (NOT __win_host) set(_gradle_home "-g" "${CMAKE_BINARY_DIR}") endif() - #set(_CMD_ ${_CMD_} COMMAND "${SDK_ROOT}/tools/android" update project --path "\"${_AGD}\"" --target android-${ANDROID_TARGET_SDK} --name QtApp) set(_CMD_ ${_CMD_} COMMAND "${Qt5_BIN}/androiddeployqt" --aux-mode --android-platform ${ANDROID_PLATFORM} --output "\"${_AGD}\"" --input "\"${_out_json}\"") set(_CMD_ ${_CMD_} COMMAND "${_AGD}/gradlew" ${_gradle_home} --no-daemon -p "\"${_AGD}\"" assembleDebug) set(_CMD_ ${_CMD_} COMMAND "${_AGD}/gradlew" ${_gradle_home} --no-daemon -p "\"${_AGD}\"" bundleRelease) diff --git a/cmake/DownloadGTest.cmake b/cmake/DownloadGTest.cmake index b6b9e5a5..97deba94 100644 --- a/cmake/DownloadGTest.cmake +++ b/cmake/DownloadGTest.cmake @@ -1,16 +1,16 @@ # Download and unpack googletest at configure time configure_file(GTestCMakeLists.txt.in googletest-download/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . - RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) if(result) - message(FATAL_ERROR "CMake step for googletest failed: ${result}") + message(FATAL_ERROR "CMake step for googletest failed: ${result}") endif() execute_process(COMMAND ${CMAKE_COMMAND} --build . - RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) if(result) - message(FATAL_ERROR "Build step for googletest failed: ${result}") + message(FATAL_ERROR "Build step for googletest failed: ${result}") endif() # Prevent overriding the parent project's compiler/linker @@ -20,12 +20,12 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) # Add googletest directly to our build. This defines # the gtest and gtest_main targets. add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src - ${CMAKE_CURRENT_BINARY_DIR}/googletest-build - EXCLUDE_FROM_ALL) + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) # The gtest/gtest_main targets carry header search path # dependencies automatically when using CMake 2.8.11 or # later. Otherwise we have to add them here ourselves. if (CMAKE_VERSION VERSION_LESS 2.8.11) - include_directories("${gtest_SOURCE_DIR}/include") -endif() \ No newline at end of file + include_directories("${gtest_SOURCE_DIR}/include") +endif() diff --git a/cmake/FindMinGW.cmake b/cmake/FindMinGW.cmake index 023de891..3f43ba42 100644 --- a/cmake/FindMinGW.cmake +++ b/cmake/FindMinGW.cmake @@ -12,7 +12,6 @@ if(${MINGW}) PATH_SUFFIXES include) #message(STATUS "Find MinGW = ${MINGW_INCLUDE}") - #if(NOT ${MINGW_INCLUDE}) MINGW_INCLUDE = ${MINGW_DIR}/include find_library(MINGW_LIB m HINTS ${MINGW_BIN}/../lib ${MINGW_INCLUDE}/../lib) get_filename_component(MINGW_LIB ${MINGW_LIB} PATH) if (NOT _MGW_MSG) diff --git a/cmake/FindPIP.cmake b/cmake/FindPIP.cmake index ec6a0ed6..57eaa4fc 100644 --- a/cmake/FindPIP.cmake +++ b/cmake/FindPIP.cmake @@ -16,7 +16,6 @@ main library ]] cmake_policy(SET CMP0011 NEW) # don`t affect includer policies -#set(_PIP_MODULES pip pip_usb pip_crypt pip_fftw) if(WIN32) find_package(MinGW REQUIRED) endif() @@ -33,10 +32,6 @@ endif() if(CMAKE_CROSSCOMPILING) list(APPEND _PIP_INCDIR "${CMAKE_PREFIX_PATH}/include/pip") list(APPEND _PIP_LIBDIR "${CMAKE_PREFIX_PATH}/lib") - #if (DEFINED ANDROID_PLATFORM) - # list(APPEND _PIP_INCDIR ${CMAKE_PREFIX_PATH}/include/pip) - # list(APPEND _PIP_LIBDIR ${CMAKE_PREFIX_PATH}/lib) - #endif() else() if(NOT WIN32) list(APPEND _PIP_INCDIR "/usr/include/pip" "/usr/local/include/pip") @@ -60,9 +55,6 @@ else() endif() list(APPEND _PIP_BINDIR "${PIP_DIR}/bin") set(_pip_suffix "") -#if(DEFINED ANDROID_PLATFORM) -# set(_pip_suffix "_${ANDROID_ABI}") -#endif() find_library(PIP_LIBRARY pip${_pip_suffix} HINTS ${_PIP_LIBDIR}) find_library(PIP_USB_LIBRARY pip_usb${_pip_suffix} HINTS ${_PIP_LIBDIR}) @@ -73,11 +65,7 @@ find_library(PIP_IO_UTILS_LIBRARY pip_io_utils${_pip_suffix} HINTS ${_PIP_LIBDIR find_library(PIP_CONCURRENT_LIBRARY pip_concurrent${_pip_suffix} HINTS ${_PIP_LIBDIR}) find_library(PIP_CLOUD_LIBRARY pip_cloud HINTS${_pip_suffix} ${_PIP_LIBDIR}) find_file(PIP_H_INCLUDE "pip.h" HINTS ${_PIP_INCDIR} $ENV{SMSDK_DIR}/include/pip) -#if (DEFINED ANDROID_PLATFORM) -# set(PIP_INCLUDES ${ANDROID_SYSTEM_LIBRARY_PATH}/usr/include/pip) -#else() - get_filename_component(PIP_INCLUDES ${PIP_H_INCLUDE} PATH) -#endif() +get_filename_component(PIP_INCLUDES ${PIP_H_INCLUDE} PATH) set(__ext "") if ("x${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "xWindows") set(__ext ".exe") diff --git a/cmake/PIPMacros.cmake b/cmake/PIPMacros.cmake index 5cc6c69a..e58729a1 100644 --- a/cmake/PIPMacros.cmake +++ b/cmake/PIPMacros.cmake @@ -86,17 +86,11 @@ macro(pip_resources RESULT INPUT) set(RC_OUT ${CMAKE_CURRENT_BINARY_DIR}/${RC_FILE}) set(${RESULT} ${${RESULT}} ${RC_OUT}) set(CCM_FILES) - #if (ABS) if(IS_ABSOLUTE "${INPUT}") set(RC_FILES "${INPUT}") else() set(RC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT}") endif() - #else() - # foreach(csrc ${CCM_SRC}) - # list(APPEND CCM_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${csrc}") - # endforeach() - #endif() #message(STATUS "CCM = ${RESULT}") if(NOT DEFINED PIP_DLL_DIR) set(PIP_DLL_DIR ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/esp32_component/esp-idf/components/pip/CMakeLists.txt b/esp32_component/esp-idf/components/pip/CMakeLists.txt index b32e9908..a1cb3f95 100644 --- a/esp32_component/esp-idf/components/pip/CMakeLists.txt +++ b/esp32_component/esp-idf/components/pip/CMakeLists.txt @@ -16,7 +16,6 @@ list(APPEND COMPONENT_ADD_INCLUDEDIRS "pip/src_main/system") list(APPEND COMPONENT_ADD_INCLUDEDIRS "pip/src_main/thread") list(APPEND COMPONENT_ADD_INCLUDEDIRS "pip/src_main/introspection") set(COMPONENT_PRIV_REQUIRES pthread lwip freertos vfs spiffs) -#set(COMPONENT_ADD_LDFRAGMENTS linker.lf) register_component() set(PIP_FREERTOS ON) set(LIB OFF) diff --git a/src_cloud/piccloudclient.cpp b/src_cloud/piccloudclient.cpp index 78d999fb..6b7507ab 100644 --- a/src_cloud/piccloudclient.cpp +++ b/src_cloud/piccloudclient.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives PICloud Client - Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_cloud/piccloudserver.cpp b/src_cloud/piccloudserver.cpp index 583c38a6..45f98ed3 100644 --- a/src_cloud/piccloudserver.cpp +++ b/src_cloud/piccloudserver.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives PICloud Server - Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_cloud/piccloudtcp.cpp b/src_cloud/piccloudtcp.cpp index ef49a55f..a977288e 100644 --- a/src_cloud/piccloudtcp.cpp +++ b/src_cloud/piccloudtcp.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives PICloud TCP transport - Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_compress/picompress.cpp b/src_compress/picompress.cpp index 87717102..16c0dcaa 100644 --- a/src_compress/picompress.cpp +++ b/src_compress/picompress.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Cryptographic class using lib Sodium - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + PIP - Platform Independent Primitives + Compress class using zlib + Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "picompress.h" diff --git a/src_concurrent/executor.cpp b/src_concurrent/executor.cpp index dbd489b1..c82bdeb6 100644 --- a/src_concurrent/executor.cpp +++ b/src_concurrent/executor.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + + Stephan Fomenko + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "executor.h" diff --git a/src_concurrent/piconditionlock.cpp b/src_concurrent/piconditionlock.cpp index 668326f9..74ff0243 100644 --- a/src_concurrent/piconditionlock.cpp +++ b/src_concurrent/piconditionlock.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + + Stephan Fomenko + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "piconditionlock.h" #ifdef WINDOWS #include "synchapi.h" diff --git a/src_concurrent/piconditionvar.cpp b/src_concurrent/piconditionvar.cpp index be9caa4a..5b005056 100644 --- a/src_concurrent/piconditionvar.cpp +++ b/src_concurrent/piconditionvar.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + + Stephan Fomenko + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "piplatform.h" #include "piconditionvar.h" #include "pithread.h" diff --git a/src_crypt/piauth.cpp b/src_crypt/piauth.cpp index 8d58574e..23e64f57 100644 --- a/src_crypt/piauth.cpp +++ b/src_crypt/piauth.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives PIP Authentication API - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_crypt/picrypt.cpp b/src_crypt/picrypt.cpp index 20c82db4..742e6147 100644 --- a/src_crypt/picrypt.cpp +++ b/src_crypt/picrypt.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Cryptographic class using lib Sodium - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/_unsused/pivariable.cpp b/src_main/_unsused/pivariable.cpp deleted file mode 100755 index f39d806a..00000000 --- a/src_main/_unsused/pivariable.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/* - PIP - Platform Independent Primitives - Variable, Struct (simple serialization) - Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include "pivariable.h" - - -bool PIVariant::operator ==(const PIVariant & v) const { - if (type != v.type) return false; - switch (type) { - case PIVariant::Bool: return vBool == v.vBool; - case PIVariant::Char: return vChar == v.vChar; - case PIVariant::Short: return vShort == v.vShort; - case PIVariant::Int: return vInt == v.vInt; - case PIVariant::Long: return vLong == v.vLong; - case PIVariant::LLong: return vLLong == v.vLLong; - case PIVariant::UChar: return vUChar == v.vUChar; - case PIVariant::UShort: return vUShort == v.vUShort; - case PIVariant::UInt: return vUInt == v.vUInt; - case PIVariant::ULong: return vULong == v.vULong; - case PIVariant::ULLong: return vULLong == v.vULLong; - case PIVariant::Float: return vFloat == v.vFloat; - case PIVariant::Double: return vDouble == v.vDouble; - case PIVariant::LDouble: return vLDouble == v.vLDouble; - case PIVariant::String: return vString == v.vString; - case PIVariant::StringList: return vStringList == v.vStringList; - }; - return false; -} - - -void PIVariant::setValueOnly(const PIString & s) { - switch (type) { - case PIVariant::Bool: vBool = s.toBool(); break; - case PIVariant::Char: vChar = s.toChar(); break; - case PIVariant::Short: vShort = s.toShort(); break; - case PIVariant::Int: vInt = s.toInt(); break; - case PIVariant::Long: vLong = s.toLong(); break; - case PIVariant::LLong: vLLong = s.toLLong(); break; - case PIVariant::UChar: vUChar = s.toChar(); break; - case PIVariant::UShort: vUShort = s.toShort(); break; - case PIVariant::UInt: vUInt = s.toInt(); break; - case PIVariant::ULong: vULong = s.toLong(); break; - case PIVariant::ULLong: vULLong = s.toLLong(); break; - case PIVariant::Float: vFloat = s.toFloat(); break; - case PIVariant::Double: vDouble = s.toDouble(); break; - case PIVariant::LDouble: vLDouble = s.toLDouble(); break; - case PIVariant::String: vString = s; break; - case PIVariant::StringList: vStringList = s.split("%|%"); break; - }; -} - - -PIString PIVariant::stringValue() const { - switch (type) { - case PIVariant::Bool: return (vBool ? "true" : "false"); - case PIVariant::Char: return PIString::fromNumber(vChar); - case PIVariant::Short: return PIString::fromNumber(vShort); - case PIVariant::Int: return PIString::fromNumber(vInt); - case PIVariant::Long: return PIString::fromNumber(vLong); - case PIVariant::LLong: return PIString::fromNumber(static_cast(vLLong)); - case PIVariant::UChar: return PIString::fromNumber(vUChar); - case PIVariant::UShort: return PIString::fromNumber(vUShort); - case PIVariant::UInt: return PIString::fromNumber(vUInt); - case PIVariant::ULong: return PIString::fromNumber(static_cast(vULong)); - case PIVariant::ULLong: return PIString::fromNumber(static_cast(vULLong)); - case PIVariant::Float: return PIString::fromNumber(vFloat); - case PIVariant::Double: return PIString::fromNumber(vDouble); - case PIVariant::LDouble: return PIString::fromNumber(vLDouble); - case PIVariant::String: return vString; - case PIVariant::StringList: return vStringList.join("%|%"); - }; - return vString; -} - - -PIVariant PIVariant::readFromString(const PIString & s) { - int i = s.find(':'); - if (i < 0 || s.length() < 2) return PIVariant(s); - PIVariant ret; - ret.type = PIVariant::fromString(s.left(i)); - ret.setValueOnly(s.right(s.length() - i - 1)); - return ret; -} - - -PIVariant::Type PIVariant::fromString(const PIString & str) { - PIString s = str.trimmed().toLowerCase().replace(" ", ""); - if (s == "bool") return PIVariant::Bool; - if (s == "char" || s == "sbyte") return PIVariant::Char; - if (s == "short" || s == "short int" || s == "signed short" || s == "signed short int" || s == "sword") return PIVariant::Short; - if (s == "int" || s == "signed" || s == "signed int") return PIVariant::Int; - if (s == "long" || s == "long int" || s == "signed long" || s == "signed long int" || s == "sdword") return PIVariant::Long; - if (s == "llong" || s == "long long" || s == "long long int" || s == "signed long long" || s == "signed long long int" || s == "sqword") return PIVariant::LLong; - if (s == "uchar" || s == "byte") return PIVariant::UChar; - if (s == "ushort" || s == "unsigned short" || s == "unsigned short int" || s == "word") return PIVariant::UShort; - if (s == "uint" || s == "unsigned" || s == "unsigned int") return PIVariant::UInt; - if (s == "ulong" || s == "unsigned long" || s == "unsigned long int" || s == "dword") return PIVariant::ULong; - if (s == "ullong" || s == "unsigned long long" || s == "unsigned long long int" || s == "qword") return PIVariant::ULLong; - if (s == "float") return PIVariant::Float; - if (s == "double" || s == "real") return PIVariant::Double; - if (s == "ldouble" || s == "long double") return PIVariant::LDouble; - if (s == "pistring" || s == "string") return PIVariant::String; - if (s == "pistringlist" || s == "vector" || s == "vector" || s == "pivector" || s == "pivector") return PIVariant::StringList; - return PIVariant::Double; -} - - -PIString PIVariant::toString(const PIVariant::Type & var) { - switch (var) { - case PIVariant::Bool: return "bool"; - case PIVariant::Char: return "char"; - case PIVariant::Short: return "short"; - case PIVariant::Int: return "int"; - case PIVariant::Long: return "long"; - case PIVariant::LLong: return "llong"; - case PIVariant::UChar: return "uchar"; - case PIVariant::UShort: return "ushort"; - case PIVariant::UInt: return "uint"; - case PIVariant::ULong: return "ulong"; - case PIVariant::ULLong: return "ullong"; - case PIVariant::Float: return "float"; - case PIVariant::Double: return "double"; - case PIVariant::LDouble: return "ldouble"; - case PIVariant::String: return "string"; - case PIVariant::StringList: return "stringlist"; - } - return "double"; -} - - -uint PIVariant::variableSize(const PIVariant::Type & var) { - switch (var) { - case PIVariant::Bool: return sizeof(bool); - case PIVariant::Char: return sizeof(char); - case PIVariant::Short: return sizeof(short); - case PIVariant::Int: return sizeof(int); - case PIVariant::Long: return sizeof(long); - case PIVariant::LLong: return sizeof(llong); - case PIVariant::UChar: return sizeof(uchar); - case PIVariant::UShort: return sizeof(ushort); - case PIVariant::UInt: return sizeof(uint); - case PIVariant::ULong: return sizeof(ulong); - case PIVariant::ULLong: return sizeof(ullong); - case PIVariant::Float: return sizeof(float); - case PIVariant::Double: return sizeof(double); - case PIVariant::LDouble: return sizeof(ldouble); - default: break; - } - return 0; -} - - -double PIVariant::variableValue(const void * var_ptr, const PIVariant::Type & var) { - switch (var) { - case PIVariant::Bool: return (double)(*((bool * )var_ptr)); - case PIVariant::Char: return (double)(*((char * )var_ptr)); - case PIVariant::Short: return (double)(*((short * )var_ptr)); - case PIVariant::Int: return (double)(*((int * )var_ptr)); - case PIVariant::Long: return (double)(*((long * )var_ptr)); - case PIVariant::LLong: return (double)(*((llong * )var_ptr)); - case PIVariant::UChar: return (double)(*((uchar * )var_ptr)); - case PIVariant::UShort: return (double)(*((ushort * )var_ptr)); - case PIVariant::UInt: return (double)(*((uint * )var_ptr)); - case PIVariant::ULong: return (double)(*((ulong * )var_ptr)); - case PIVariant::ULLong: return (double)(*((ullong * )var_ptr)); - case PIVariant::Float: return (double)(*((float * )var_ptr)); - case PIVariant::Double: return (double)(*((double * )var_ptr)); - case PIVariant::LDouble: return (ldouble)(*((ldouble * )var_ptr)); - default: break; - } - return 0.; -} - - -void PIVariable::setVariable(const PIString & str) { - type_ = PIVariant::fromString(str); - size_ = PIVariant::variableSize(type_); -} - - -void PIVariable::writeVariable(void * dest) { - switch (type_) { - case PIVariant::Bool: *((bool * )((ullong)dest + offset)) = value_ > 0.; return; - case PIVariant::Char: *((char * )((ullong)dest + offset)) = char(value_); return; - case PIVariant::Short: *((short * )((ullong)dest + offset)) = short(value_); return; - case PIVariant::Int: *((int * )((ullong)dest + offset)) = int(value_); return; - case PIVariant::Long: *((long * )((ullong)dest + offset)) = long(value_); return; - case PIVariant::LLong: *((llong * )((ullong)dest + offset)) = llong(value_); return; - case PIVariant::UChar: *((uchar * )((ullong)dest + offset)) = uchar(value_); return; - case PIVariant::UShort: *((ushort * )((ullong)dest + offset)) = ushort(value_); return; - case PIVariant::UInt: *((uint * )((ullong)dest + offset)) = uint(value_); return; - case PIVariant::ULong: *((ulong * )((ullong)dest + offset)) = ulong(value_); return; - case PIVariant::ULLong: *((ullong * )((ullong)dest + offset)) = ullong(value_); return; - case PIVariant::Float: *((float * )((ullong)dest + offset)) = float(value_); return; - case PIVariant::Double: *((double * )((ullong)dest + offset)) = value_; return; - case PIVariant::LDouble: *((ldouble * )((ullong)dest + offset)) = ldouble(value_); return; - default: break; - } -} - - -void PIStruct::parseFile(const PIString & file) { - PIConfig conf(file, PIIODevice::ReadOnly); - PIVariable var; - PIString ts; - uint sz = 0; - vars.clear(); - for (int i = 0; i < conf.entriesCount(); ++i) { - var.setVariable(conf.getValue(i)); - var.setName(conf.getName(i)); - var.offset = sz; - sz += var.size(); - ts = conf.getComment(i); - if (ts.length() > 0) - var.setValue(ts.toDouble()); - else var.setValue(0.); - vars.push_back(var); - } - size_ = sz; -} - - -void PIStruct::readData(const void * data) { - for (uint i = 0; i < vars.size(); ++i) - vars[i].readVariable(data); -} - - -void PIStruct::writeData(void * data) { - for (uint i = 0; i < vars.size(); ++i) - vars[i].writeVariable(data); -} - diff --git a/src_main/_unsused/pivariable.cpp_ b/src_main/_unsused/pivariable.cpp_ deleted file mode 100644 index 4f3ea8d1..00000000 --- a/src_main/_unsused/pivariable.cpp_ +++ /dev/null @@ -1,249 +0,0 @@ -/* - PIP - Platform Independent Primitives - Variable, Struct (simple serialization) - Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#include "pivariable.h" - - -bool PIVariant::operator ==(const PIVariant & v) const { - if (type != v.type) return false; - switch (type) { - case PIVariant::Bool: return vBool == v.vBool; - case PIVariant::Char: return vChar == v.vChar; - case PIVariant::Short: return vShort == v.vShort; - case PIVariant::Int: return vInt == v.vInt; - case PIVariant::Long: return vLong == v.vLong; - case PIVariant::LLong: return vLLong == v.vLLong; - case PIVariant::UChar: return vUChar == v.vUChar; - case PIVariant::UShort: return vUShort == v.vUShort; - case PIVariant::UInt: return vUInt == v.vUInt; - case PIVariant::ULong: return vULong == v.vULong; - case PIVariant::ULLong: return vULLong == v.vULLong; - case PIVariant::Float: return vFloat == v.vFloat; - case PIVariant::Double: return vDouble == v.vDouble; - case PIVariant::LDouble: return vLDouble == v.vLDouble; - case PIVariant::String: return vString == v.vString; - case PIVariant::StringList: return vStringList == v.vStringList; - }; - return false; -} - - -void PIVariant::setValueOnly(const PIString & s) { - switch (type) { - case PIVariant::Bool: vBool = s.toBool(); break; - case PIVariant::Char: vChar = s.toChar(); break; - case PIVariant::Short: vShort = s.toShort(); break; - case PIVariant::Int: vInt = s.toInt(); break; - case PIVariant::Long: vLong = s.toLong(); break; - case PIVariant::LLong: vLLong = s.toLLong(); break; - case PIVariant::UChar: vUChar = s.toChar(); break; - case PIVariant::UShort: vUShort = s.toShort(); break; - case PIVariant::UInt: vUInt = s.toInt(); break; - case PIVariant::ULong: vULong = s.toLong(); break; - case PIVariant::ULLong: vULLong = s.toLLong(); break; - case PIVariant::Float: vFloat = s.toFloat(); break; - case PIVariant::Double: vDouble = s.toDouble(); break; - case PIVariant::LDouble: vLDouble = s.toLDouble(); break; - case PIVariant::String: vString = s; break; - case PIVariant::StringList: vStringList = s.split("%|%"); break; - }; -} - - -PIString PIVariant::stringValue() const { - switch (type) { - case PIVariant::Bool: return (vBool ? "true" : "false"); - case PIVariant::Char: return PIString::fromNumber(vChar); - case PIVariant::Short: return PIString::fromNumber(vShort); - case PIVariant::Int: return PIString::fromNumber(vInt); - case PIVariant::Long: return PIString::fromNumber(vLong); - case PIVariant::LLong: return PIString::fromNumber(static_cast(vLLong)); - case PIVariant::UChar: return PIString::fromNumber(vUChar); - case PIVariant::UShort: return PIString::fromNumber(vUShort); - case PIVariant::UInt: return PIString::fromNumber(vUInt); - case PIVariant::ULong: return PIString::fromNumber(static_cast(vULong)); - case PIVariant::ULLong: return PIString::fromNumber(static_cast(vULLong)); - case PIVariant::Float: return PIString::fromNumber(vFloat); - case PIVariant::Double: return PIString::fromNumber(vDouble); - case PIVariant::LDouble: return PIString::fromNumber(vLDouble); - case PIVariant::String: return vString; - case PIVariant::StringList: return vStringList.join("%|%"); - }; - return vString; -} - - -PIVariant PIVariant::readFromString(const PIString & s) { - int i = s.find(':'); - if (i < 0 || s.length() < 2) return PIVariant(s); - PIVariant ret; - ret.type = PIVariant::fromString(s.left(i)); - ret.setValueOnly(s.right(s.length() - i - 1)); - return ret; -} - - -PIVariant::Type PIVariant::fromString(const PIString & str) { - PIString s = str.trimmed().toLowerCase().replace(" ", ""); - if (s == "bool") return PIVariant::Bool; - if (s == "char" || s == "sbyte") return PIVariant::Char; - if (s == "short" || s == "short int" || s == "signed short" || s == "signed short int" || s == "sword") return PIVariant::Short; - if (s == "int" || s == "signed" || s == "signed int") return PIVariant::Int; - if (s == "long" || s == "long int" || s == "signed long" || s == "signed long int" || s == "sdword") return PIVariant::Long; - if (s == "llong" || s == "long long" || s == "long long int" || s == "signed long long" || s == "signed long long int" || s == "sqword") return PIVariant::LLong; - if (s == "uchar" || s == "byte") return PIVariant::UChar; - if (s == "ushort" || s == "unsigned short" || s == "unsigned short int" || s == "word") return PIVariant::UShort; - if (s == "uint" || s == "unsigned" || s == "unsigned int") return PIVariant::UInt; - if (s == "ulong" || s == "unsigned long" || s == "unsigned long int" || s == "dword") return PIVariant::ULong; - if (s == "ullong" || s == "unsigned long long" || s == "unsigned long long int" || s == "qword") return PIVariant::ULLong; - if (s == "float") return PIVariant::Float; - if (s == "double" || s == "real") return PIVariant::Double; - if (s == "ldouble" || s == "long double") return PIVariant::LDouble; - if (s == "pistring" || s == "string") return PIVariant::String; - if (s == "pistringlist" || s == "vector" || s == "vector" || s == "pivector" || s == "pivector") return PIVariant::StringList; - return PIVariant::Double; -} - - -PIString PIVariant::toString(const PIVariant::Type & var) { - switch (var) { - case PIVariant::Bool: return "bool"; - case PIVariant::Char: return "char"; - case PIVariant::Short: return "short"; - case PIVariant::Int: return "int"; - case PIVariant::Long: return "long"; - case PIVariant::LLong: return "llong"; - case PIVariant::UChar: return "uchar"; - case PIVariant::UShort: return "ushort"; - case PIVariant::UInt: return "uint"; - case PIVariant::ULong: return "ulong"; - case PIVariant::ULLong: return "ullong"; - case PIVariant::Float: return "float"; - case PIVariant::Double: return "double"; - case PIVariant::LDouble: return "ldouble"; - case PIVariant::String: return "string"; - case PIVariant::StringList: return "stringlist"; - } - return "double"; -} - - -uint PIVariant::variableSize(const PIVariant::Type & var) { - switch (var) { - case PIVariant::Bool: return sizeof(bool); - case PIVariant::Char: return sizeof(char); - case PIVariant::Short: return sizeof(short); - case PIVariant::Int: return sizeof(int); - case PIVariant::Long: return sizeof(long); - case PIVariant::LLong: return sizeof(llong); - case PIVariant::UChar: return sizeof(uchar); - case PIVariant::UShort: return sizeof(ushort); - case PIVariant::UInt: return sizeof(uint); - case PIVariant::ULong: return sizeof(ulong); - case PIVariant::ULLong: return sizeof(ullong); - case PIVariant::Float: return sizeof(float); - case PIVariant::Double: return sizeof(double); - case PIVariant::LDouble: return sizeof(ldouble); - default: break; - } - return 0; -} - - -double PIVariant::variableValue(const void * var_ptr, const PIVariant::Type & var) { - switch (var) { - case PIVariant::Bool: return (double)(*((bool * )var_ptr)); - case PIVariant::Char: return (double)(*((char * )var_ptr)); - case PIVariant::Short: return (double)(*((short * )var_ptr)); - case PIVariant::Int: return (double)(*((int * )var_ptr)); - case PIVariant::Long: return (double)(*((long * )var_ptr)); - case PIVariant::LLong: return (double)(*((llong * )var_ptr)); - case PIVariant::UChar: return (double)(*((uchar * )var_ptr)); - case PIVariant::UShort: return (double)(*((ushort * )var_ptr)); - case PIVariant::UInt: return (double)(*((uint * )var_ptr)); - case PIVariant::ULong: return (double)(*((ulong * )var_ptr)); - case PIVariant::ULLong: return (double)(*((ullong * )var_ptr)); - case PIVariant::Float: return (double)(*((float * )var_ptr)); - case PIVariant::Double: return (double)(*((double * )var_ptr)); - case PIVariant::LDouble: return (ldouble)(*((ldouble * )var_ptr)); - default: break; - } - return 0.; -} - - -void PIVariable::setVariable(const PIString & str) { - type_ = PIVariant::fromString(str); - size_ = PIVariant::variableSize(type_); -} - - -void PIVariable::writeVariable(void * dest) { - switch (type_) { - case PIVariant::Bool: *((bool * )((ullong)dest + offset)) = value_ > 0.; return; - case PIVariant::Char: *((char * )((ullong)dest + offset)) = char(value_); return; - case PIVariant::Short: *((short * )((ullong)dest + offset)) = short(value_); return; - case PIVariant::Int: *((int * )((ullong)dest + offset)) = int(value_); return; - case PIVariant::Long: *((long * )((ullong)dest + offset)) = long(value_); return; - case PIVariant::LLong: *((llong * )((ullong)dest + offset)) = llong(value_); return; - case PIVariant::UChar: *((uchar * )((ullong)dest + offset)) = uchar(value_); return; - case PIVariant::UShort: *((ushort * )((ullong)dest + offset)) = ushort(value_); return; - case PIVariant::UInt: *((uint * )((ullong)dest + offset)) = uint(value_); return; - case PIVariant::ULong: *((ulong * )((ullong)dest + offset)) = ulong(value_); return; - case PIVariant::ULLong: *((ullong * )((ullong)dest + offset)) = ullong(value_); return; - case PIVariant::Float: *((float * )((ullong)dest + offset)) = float(value_); return; - case PIVariant::Double: *((double * )((ullong)dest + offset)) = value_; return; - case PIVariant::LDouble: *((ldouble * )((ullong)dest + offset)) = ldouble(value_); return; - default: break; - } -} - - -void PIStruct::parseFile(const PIString & file) { - PIConfig conf(file, PIIODevice::ReadOnly); - PIVariable var; - PIString ts; - uint sz = 0; - vars.clear(); - for (int i = 0; i < conf.entriesCount(); ++i) { - var.setVariable(conf.getValue(i)); - var.setName(conf.getName(i)); - var.offset = sz; - sz += var.size(); - ts = conf.getComment(i); - if (ts.length() > 0) - var.setValue(ts.toDouble()); - else var.setValue(0.); - vars.push_back(var); - } - size_ = sz; -} - - -void PIStruct::readData(const void * data) { - for (uint i = 0; i < vars.size(); ++i) - vars[i].readVariable(data); -} - - -void PIStruct::writeData(void * data) { - for (uint i = 0; i < vars.size(); ++i) - vars[i].writeVariable(data); -} - diff --git a/src_main/_unsused/pivariable.h b/src_main/_unsused/pivariable.h deleted file mode 100755 index 9038e877..00000000 --- a/src_main/_unsused/pivariable.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - PIP - Platform Independent Primitives - Variable, Struct (simple serialization) - Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#ifndef PIVARIABLE_H -#define PIVARIABLE_H - -#include "piconfig.h" - -class PIP_EXPORT PIVariant { - friend class PIVariable; -public: - enum Type {Bool, Char, Short, Int, Long, LLong, UChar, UShort, UInt, ULong, ULLong, Float, Double, LDouble, String, StringList}; - - PIVariant() {setValue(0.);} - PIVariant(const char * v) {setValue(v);} - PIVariant(const bool & v) {setValue(v);} - PIVariant(const char & v) {setValue(v);} - PIVariant(const short & v) {setValue(v);} - PIVariant(const int & v) {setValue(v);} - PIVariant(const long & v) {setValue(v);} - PIVariant(const llong & v) {setValue(v);} - PIVariant(const uchar & v) {setValue(v);} - PIVariant(const ushort & v) {setValue(v);} - PIVariant(const uint & v) {setValue(v);} - PIVariant(const ulong & v) {setValue(v);} - PIVariant(const ullong & v) {setValue(v);} - PIVariant(const float & v) {setValue(v);} - PIVariant(const double & v) {setValue(v);} - PIVariant(const ldouble & v) {setValue(v);} - PIVariant(const PIString & v) {setValue(v);} - PIVariant(const PIStringList & v) {setValue(v);} - - void setValue(const char * v) {setValue(PIString(v));} - void setValue(const bool & v) {type = PIVariant::Bool; vBool = v;} - void setValue(const char & v) {type = PIVariant::Char; vChar = v;} - void setValue(const short & v) {type = PIVariant::Short; vShort = v;} - void setValue(const int & v) {type = PIVariant::Int; vInt = v;} - void setValue(const long & v) {type = PIVariant::Long; vLong = v;} - void setValue(const llong & v) {type = PIVariant::LLong; vLLong = v;} - void setValue(const uchar & v) {type = PIVariant::UChar; vUChar = v;} - void setValue(const ushort & v) {type = PIVariant::UShort; vUShort = v;} - void setValue(const uint & v) {type = PIVariant::UInt; vUInt = v;} - void setValue(const ulong & v) {type = PIVariant::ULong; vULong = v;} - void setValue(const ullong & v) {type = PIVariant::ULLong; vULLong = v;} - void setValue(const float & v) {type = PIVariant::Float; vFloat = v;} - void setValue(const double & v) {type = PIVariant::Double; vDouble = v;} - void setValue(const ldouble & v) {type = PIVariant::LDouble; vLDouble = v;} - void setValue(const PIString & v) {type = PIVariant::String; vString = v;} - void setValue(const PIStringList & v) {type = PIVariant::StringList; vStringList = v;} - void setValueOnly(const PIString & v); - PIString typeName() const {return PIVariant::toString(type);} - double doubleValue() const {return PIVariant::variableValue(&vChar, type);} - PIString stringValue() const; - void typeFromString(const PIString & str) {type = PIVariant::fromString(str);} - PIString typeToString() const {return PIVariant::toString(type);} - uint size() {if (type != PIVariant::String && type != PIVariant::StringList) return PIVariant::variableSize(type); if (type == PIVariant::String) return vString.size(); else return vStringList.contentSize();} - PIString writeToString() const {return typeName() + ":" + stringValue();} - -#ifdef QNX - void operator =(const PIVariant & v) {type = v.type; vLDouble = v.vLDouble; vString = v.vString; vStringList = v.vStringList;} -#endif - void operator =(const char * v) {setValue(PIString(v));} - void operator =(const bool & v) {type = PIVariant::Bool; vBool = v;} - void operator =(const char & v) {type = PIVariant::Char; vChar = v;} - void operator =(const short & v) {type = PIVariant::Short; vShort = v;} - void operator =(const int & v) {type = PIVariant::Int; vInt = v;} - void operator =(const long & v) {type = PIVariant::Long; vLong = v;} - void operator =(const llong & v) {type = PIVariant::LLong; vLLong = v;} - void operator =(const uchar & v) {type = PIVariant::UChar; vUChar = v;} - void operator =(const ushort & v) {type = PIVariant::UShort; vUShort = v;} - void operator =(const uint & v) {type = PIVariant::UInt; vUInt = v;} - void operator =(const ulong & v) {type = PIVariant::ULong; vULong = v;} - void operator =(const ullong & v) {type = PIVariant::ULLong; vULLong = v;} - void operator =(const float & v) {type = PIVariant::Float; vFloat = v;} - void operator =(const double & v) {type = PIVariant::Double; vDouble = v;} - void operator =(const ldouble & v) {type = PIVariant::LDouble; vLDouble = v;} - void operator =(const PIString & v) {type = PIVariant::String; vString = v;} - void operator =(const PIStringList & v) {type = PIVariant::StringList; vStringList = v;} - - bool operator ==(const PIVariant & v) const; - bool operator !=(const PIVariant & v) const {return !(*this == v);} - - PIVariant::Type type; - union { - bool vBool; - char vChar; - short vShort; - int vInt; - long vLong; - llong vLLong; - uchar vUChar; - ushort vUShort; - uint vUInt; - ulong vULong; - ullong vULLong; - float vFloat; - double vDouble; - ldouble vLDouble; - }; - PIString vString; - PIStringList vStringList; - - static PIVariant readFromString(const PIString & s); - -private: - static PIVariant::Type fromString(const PIString & str); - static PIString toString(const PIVariant::Type & var); - static uint variableSize(const PIVariant::Type & var); - static double variableValue(const void * var_ptr, const PIVariant::Type & var); - -}; - -inline std::ostream & operator <<(std::ostream & s, const PIVariant & v) {s << v.typeName() << ": " << v.stringValue(); return s;} - -class PIP_EXPORT PIVariable { -public: - PIVariable() {;} - PIVariable(const PIString & str) {setVariable(str);} - ~PIVariable() {;} - - void setVariable(const PIString & str); - void writeVariable(void * dest); - void readVariable(const void * var_ptr) {value_ = PIVariant::variableValue((char * )((long)var_ptr + offset), type_);} - PIVariant::Type type() const {return type_;} - uint size() const {return size_;} - const PIString & name() {return name_;} - void setName(const PIString & str) {name_ = str;} - double value() const {return value_;} - void setValue(const double & val) {value_ = val;} - - int offset; - -private: - PIVariant::Type type_; - uint size_; - PIString name_; - double value_; - -}; - - -/* - * PIStruct is abstract structure, described by *.conf file with format of each line: - * " = # ". - * e.g. "pi = double #f 3.1418" - * - * You can write or read binary content of this struct - * by functions "writeData" and "readData", e.g. - * "char * data = new char[struct.size()]; - * struct.writeData(data);" - * - * Access to each variable in struct is looks like - * "double value = struct["pi"].value();" -*/ - -class PIP_EXPORT PIStruct { -public: - PIStruct() {;} - PIStruct(const PIString & str) {parseFile(str);} - - void parseFile(const PIString & file); - void readData(const void * data); - void writeData(void * data); - void clear() {vars.clear(); size_ = 0;} - uint count() const {return vars.size();} - uint size() const {return size_;} - const PIString & name() {return name_;} - void setName(const PIString & str) {name_ = str;} - PIVariable & operator[](const uint & index) {return vars[index];} - PIVariable & operator[](const PIString & name) {for (uint i = 0; i < vars.size(); ++i) if (vars[i].name() == name) return vars[i]; return def;} - -private: - uint size_; - PIString name_; - PIVariable def; - PIVector vars; - -}; - -#endif // PIVARIABLE_H diff --git a/src_main/_unsused/pivariable.h_ b/src_main/_unsused/pivariable.h_ deleted file mode 100644 index 9038e877..00000000 --- a/src_main/_unsused/pivariable.h_ +++ /dev/null @@ -1,196 +0,0 @@ -/* - PIP - Platform Independent Primitives - Variable, Struct (simple serialization) - Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#ifndef PIVARIABLE_H -#define PIVARIABLE_H - -#include "piconfig.h" - -class PIP_EXPORT PIVariant { - friend class PIVariable; -public: - enum Type {Bool, Char, Short, Int, Long, LLong, UChar, UShort, UInt, ULong, ULLong, Float, Double, LDouble, String, StringList}; - - PIVariant() {setValue(0.);} - PIVariant(const char * v) {setValue(v);} - PIVariant(const bool & v) {setValue(v);} - PIVariant(const char & v) {setValue(v);} - PIVariant(const short & v) {setValue(v);} - PIVariant(const int & v) {setValue(v);} - PIVariant(const long & v) {setValue(v);} - PIVariant(const llong & v) {setValue(v);} - PIVariant(const uchar & v) {setValue(v);} - PIVariant(const ushort & v) {setValue(v);} - PIVariant(const uint & v) {setValue(v);} - PIVariant(const ulong & v) {setValue(v);} - PIVariant(const ullong & v) {setValue(v);} - PIVariant(const float & v) {setValue(v);} - PIVariant(const double & v) {setValue(v);} - PIVariant(const ldouble & v) {setValue(v);} - PIVariant(const PIString & v) {setValue(v);} - PIVariant(const PIStringList & v) {setValue(v);} - - void setValue(const char * v) {setValue(PIString(v));} - void setValue(const bool & v) {type = PIVariant::Bool; vBool = v;} - void setValue(const char & v) {type = PIVariant::Char; vChar = v;} - void setValue(const short & v) {type = PIVariant::Short; vShort = v;} - void setValue(const int & v) {type = PIVariant::Int; vInt = v;} - void setValue(const long & v) {type = PIVariant::Long; vLong = v;} - void setValue(const llong & v) {type = PIVariant::LLong; vLLong = v;} - void setValue(const uchar & v) {type = PIVariant::UChar; vUChar = v;} - void setValue(const ushort & v) {type = PIVariant::UShort; vUShort = v;} - void setValue(const uint & v) {type = PIVariant::UInt; vUInt = v;} - void setValue(const ulong & v) {type = PIVariant::ULong; vULong = v;} - void setValue(const ullong & v) {type = PIVariant::ULLong; vULLong = v;} - void setValue(const float & v) {type = PIVariant::Float; vFloat = v;} - void setValue(const double & v) {type = PIVariant::Double; vDouble = v;} - void setValue(const ldouble & v) {type = PIVariant::LDouble; vLDouble = v;} - void setValue(const PIString & v) {type = PIVariant::String; vString = v;} - void setValue(const PIStringList & v) {type = PIVariant::StringList; vStringList = v;} - void setValueOnly(const PIString & v); - PIString typeName() const {return PIVariant::toString(type);} - double doubleValue() const {return PIVariant::variableValue(&vChar, type);} - PIString stringValue() const; - void typeFromString(const PIString & str) {type = PIVariant::fromString(str);} - PIString typeToString() const {return PIVariant::toString(type);} - uint size() {if (type != PIVariant::String && type != PIVariant::StringList) return PIVariant::variableSize(type); if (type == PIVariant::String) return vString.size(); else return vStringList.contentSize();} - PIString writeToString() const {return typeName() + ":" + stringValue();} - -#ifdef QNX - void operator =(const PIVariant & v) {type = v.type; vLDouble = v.vLDouble; vString = v.vString; vStringList = v.vStringList;} -#endif - void operator =(const char * v) {setValue(PIString(v));} - void operator =(const bool & v) {type = PIVariant::Bool; vBool = v;} - void operator =(const char & v) {type = PIVariant::Char; vChar = v;} - void operator =(const short & v) {type = PIVariant::Short; vShort = v;} - void operator =(const int & v) {type = PIVariant::Int; vInt = v;} - void operator =(const long & v) {type = PIVariant::Long; vLong = v;} - void operator =(const llong & v) {type = PIVariant::LLong; vLLong = v;} - void operator =(const uchar & v) {type = PIVariant::UChar; vUChar = v;} - void operator =(const ushort & v) {type = PIVariant::UShort; vUShort = v;} - void operator =(const uint & v) {type = PIVariant::UInt; vUInt = v;} - void operator =(const ulong & v) {type = PIVariant::ULong; vULong = v;} - void operator =(const ullong & v) {type = PIVariant::ULLong; vULLong = v;} - void operator =(const float & v) {type = PIVariant::Float; vFloat = v;} - void operator =(const double & v) {type = PIVariant::Double; vDouble = v;} - void operator =(const ldouble & v) {type = PIVariant::LDouble; vLDouble = v;} - void operator =(const PIString & v) {type = PIVariant::String; vString = v;} - void operator =(const PIStringList & v) {type = PIVariant::StringList; vStringList = v;} - - bool operator ==(const PIVariant & v) const; - bool operator !=(const PIVariant & v) const {return !(*this == v);} - - PIVariant::Type type; - union { - bool vBool; - char vChar; - short vShort; - int vInt; - long vLong; - llong vLLong; - uchar vUChar; - ushort vUShort; - uint vUInt; - ulong vULong; - ullong vULLong; - float vFloat; - double vDouble; - ldouble vLDouble; - }; - PIString vString; - PIStringList vStringList; - - static PIVariant readFromString(const PIString & s); - -private: - static PIVariant::Type fromString(const PIString & str); - static PIString toString(const PIVariant::Type & var); - static uint variableSize(const PIVariant::Type & var); - static double variableValue(const void * var_ptr, const PIVariant::Type & var); - -}; - -inline std::ostream & operator <<(std::ostream & s, const PIVariant & v) {s << v.typeName() << ": " << v.stringValue(); return s;} - -class PIP_EXPORT PIVariable { -public: - PIVariable() {;} - PIVariable(const PIString & str) {setVariable(str);} - ~PIVariable() {;} - - void setVariable(const PIString & str); - void writeVariable(void * dest); - void readVariable(const void * var_ptr) {value_ = PIVariant::variableValue((char * )((long)var_ptr + offset), type_);} - PIVariant::Type type() const {return type_;} - uint size() const {return size_;} - const PIString & name() {return name_;} - void setName(const PIString & str) {name_ = str;} - double value() const {return value_;} - void setValue(const double & val) {value_ = val;} - - int offset; - -private: - PIVariant::Type type_; - uint size_; - PIString name_; - double value_; - -}; - - -/* - * PIStruct is abstract structure, described by *.conf file with format of each line: - * " = # ". - * e.g. "pi = double #f 3.1418" - * - * You can write or read binary content of this struct - * by functions "writeData" and "readData", e.g. - * "char * data = new char[struct.size()]; - * struct.writeData(data);" - * - * Access to each variable in struct is looks like - * "double value = struct["pi"].value();" -*/ - -class PIP_EXPORT PIStruct { -public: - PIStruct() {;} - PIStruct(const PIString & str) {parseFile(str);} - - void parseFile(const PIString & file); - void readData(const void * data); - void writeData(void * data); - void clear() {vars.clear(); size_ = 0;} - uint count() const {return vars.size();} - uint size() const {return size_;} - const PIString & name() {return name_;} - void setName(const PIString & str) {name_ = str;} - PIVariable & operator[](const uint & index) {return vars[index];} - PIVariable & operator[](const PIString & name) {for (uint i = 0; i < vars.size(); ++i) if (vars[i].name() == name) return vars[i]; return def;} - -private: - uint size_; - PIString name_; - PIVariable def; - PIVector vars; - -}; - -#endif // PIVARIABLE_H diff --git a/src_main/auxiliary/piterminal/main.cpp b/src_main/auxiliary/piterminal/main.cpp index 98e2e772..51ee6735 100644 --- a/src_main/auxiliary/piterminal/main.cpp +++ b/src_main/auxiliary/piterminal/main.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Terminal client for windows, used by PITerminal and pisd + Ivan Pelipenko peri4ko@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "piincludes_p.h" #ifndef WINDOWS int main (int argc, char * argv[]) { diff --git a/src_main/cloud/piccloudclient.h b/src_main/cloud/piccloudclient.h index a82e6f43..131555dd 100644 --- a/src_main/cloud/piccloudclient.h +++ b/src_main/cloud/piccloudclient.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PICloud Client - Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -23,13 +23,13 @@ #ifndef PICCLOUDCLIENT_H #define PICCLOUDCLIENT_H -#include "pistring.h" +#include "piiodevice.h" + class PIP_EXPORT PICloudClient { public: //! - PICloudClient(); - + explicit PICloudClient(); private: diff --git a/src_main/cloud/piccloudmodule.h b/src_main/cloud/piccloudmodule.h index a9404b5f..2c37522e 100644 --- a/src_main/cloud/piccloudmodule.h +++ b/src_main/cloud/piccloudmodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/cloud/piccloudserver.h b/src_main/cloud/piccloudserver.h index 8bfbb08e..2461ad31 100644 --- a/src_main/cloud/piccloudserver.h +++ b/src_main/cloud/piccloudserver.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PICloud Server - Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -23,12 +23,13 @@ #ifndef PICCLOUDSERVER_H #define PICCLOUDSERVER_H -#include "pistring.h" +#include "piiodevice.h" + class PIP_EXPORT PICloudServer { public: //! - PICloudServer(); + explicit PICloudServer(); private: diff --git a/src_main/cloud/piccloudtcp.h b/src_main/cloud/piccloudtcp.h index da4a0766..a78154af 100644 --- a/src_main/cloud/piccloudtcp.h +++ b/src_main/cloud/piccloudtcp.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PICloud TCP transport - Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/code/picodeinfo.cpp b/src_main/code/picodeinfo.cpp index 81c1e76a..0495751b 100755 --- a/src_main/code/picodeinfo.cpp +++ b/src_main/code/picodeinfo.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - C++ code info structs + PIP - Platform Independent Primitives + C++ code info structs Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "picodeinfo.h" diff --git a/src_main/code/picodeinfo.h b/src_main/code/picodeinfo.h index 83af0157..5b182fc5 100755 --- a/src_main/code/picodeinfo.h +++ b/src_main/code/picodeinfo.h @@ -2,29 +2,29 @@ * \brief C++ code info structs */ /* - PIP - Platform Independent Primitives - C++ code info structs + PIP - Platform Independent Primitives + C++ code info structs Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICODEINFO_H #define PICODEINFO_H -#include "pistring.h" +#include "pistringlist.h" class PIVariant; diff --git a/src_main/code/picodemodule.h b/src_main/code/picodemodule.h index 4c05529c..9a58c46a 100644 --- a/src_main/code/picodemodule.h +++ b/src_main/code/picodemodule.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Module includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Module includes + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICODEMODULE_H diff --git a/src_main/code/picodeparser.cpp b/src_main/code/picodeparser.cpp index 13a4122f..8d26d1fe 100755 --- a/src_main/code/picodeparser.cpp +++ b/src_main/code/picodeparser.cpp @@ -207,13 +207,6 @@ bool PICodeParser::parseFileContent(PIString & fc, bool main) { if (c == '"' && !mlc && pc != '\'') { if (i > 0) if (fc[i - 1] == '\\') continue; cc = !cc; - /*if (cc) ccs = i; - if (!cc) { - ccmn = "$" + PIString::fromNumber(cchars.size()); - cchars[ccmn] = fc.mid(ccs, i - ccs + 1); - fc.replace(ccs, i - ccs + 1, ccmn); - i = ccs - 1 + ccmn.size_s(); - }*/ continue; } if (i > 0) @@ -227,7 +220,6 @@ bool PICodeParser::parseFileContent(PIString & fc, bool main) { if (fc.mid(i, 2) == "*/" && mlc) {mlc = false; fc.cutMid(mls, i - mls + 2); i = mls - 1; continue;} if (fc.mid(i, 2) == "//" && !mlc) {ole = fc.find('\n', i); fc.cutMid(i, ole < 0 ? -1 : ole - i); --i; continue;} } - //PICout(PICoutManipulators::DefaultControls) << fc; pfc = procMacros(fc); replaceMeta(pfc); @@ -374,7 +366,7 @@ PICodeParser::Entity * PICodeParser::parseClassDeclaration(const PIString & fc) Entity * e = new Entity(); e->meta = meta; e->name = cur_namespace + cn; - e->type = typename_;//(is_class ? "class" : "struct"); + e->type = typename_; e->has_name = has_name; e->parents = parents; e->file = cur_file; @@ -444,7 +436,7 @@ PIString PICodeParser::parseClass(Entity * parent, PIString & fc) { parseMember(ce, tmp); if (def) fc.takeRange("{", "}"); else fc.takeSymbol(); - if (ps == fc.size_s()) {/*cur_namespace = prev_namespace;*/ fc.cutLeft(1);/*return false*/;} + if (ps == fc.size_s()) {fc.cutLeft(1);} ps = fc.size_s(); } cur_def_vis = prev_vis; @@ -948,8 +940,8 @@ PIString PICodeParser::procMacros(PIString fc) { ifcnt = 0; nfc.clear(); } else { - /*if (!*/parseDirective(line.cutLeft(1).trim())/*)*/ - ;//return false; /// WARNING: now skip errors + parseDirective(line.cutLeft(1).trim()); + //return false; /// WARNING: now skip errors } } else { if (grab) nfc << line << "\n"; @@ -982,7 +974,6 @@ bool PICodeParser::parseDirective(PIString d) { macros << Macro(mname, d.trim(), args); } else { // define d.trim(); - //if (mname == d) d.clear(); defines << Define(mname, d); evaluator.setVariable(mname, complexd_1); } diff --git a/src_main/code/picodeparser.h b/src_main/code/picodeparser.h index a937fe33..9eaf2821 100755 --- a/src_main/code/picodeparser.h +++ b/src_main/code/picodeparser.h @@ -170,7 +170,6 @@ private: int macros_iter, anon_num; bool with_includes; PIEvaluator evaluator; - //PIVector tree; PISet proc_files; PIString cur_file, main_file; PIStringList includes; diff --git a/src_main/console/piconsole.cpp b/src_main/console/piconsole.cpp index 1f442bf9..02742fad 100644 --- a/src_main/console/piconsole.cpp +++ b/src_main/console/piconsole.cpp @@ -731,14 +731,11 @@ void PIConsole::fillLabels() { newLine(); } status(); - //couts(fstr(Normal)); - //fflush(0); } void PIConsole::status() { Tab * ctab; - //clearLine(); for (uint i = 0; i < tabsCount(); ++i) { ctab = &tabs[i]; if (ctab->key == 0) continue; diff --git a/src_main/console/piconsole.h b/src_main/console/piconsole.h index 3c867801..11784834 100644 --- a/src_main/console/piconsole.h +++ b/src_main/console/piconsole.h @@ -436,19 +436,6 @@ public: bool server_mode, pause_; ConnectedState state; - /*struct RemoteData { - RemoteData() {msg_count = msg_rec = msg_send = 0;} - void clear() {msg_count = msg_rec = msg_send = 0; data.clear();} - bool isEmpty() const {return msg_count == 0;} - bool isReadyRec() const {return msg_count == msg_rec;} - bool isReadySend() const {return msg_count == msg_send;} - void setData(const PIByteArray & ba) {data = ba; msg_rec = msg_send = 0; msg_count = (data.size_s() - 1) / 4096 + 1;} - PIByteArray data; - int msg_count; - int msg_rec; - int msg_send; - };*/ - struct RemoteClient { RemoteClient(const PIString & n = "") {name = n; state = Disconnected;} PIString name; diff --git a/src_main/console/piconsolemodule.h b/src_main/console/piconsolemodule.h index 11d5a2cd..d6f24eab 100644 --- a/src_main/console/piconsolemodule.h +++ b/src_main/console/piconsolemodule.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Module includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Module includes + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICONSOLEMODULE_H diff --git a/src_main/console/pikbdlistener.cpp b/src_main/console/pikbdlistener.cpp index 5bac6b23..f3a26b61 100644 --- a/src_main/console/pikbdlistener.cpp +++ b/src_main/console/pikbdlistener.cpp @@ -267,10 +267,8 @@ void PIKbdListener::readKeyboard() { case MOUSE_EVENT: { MOUSE_EVENT_RECORD mer = ir.Event.MouseEvent; GetConsoleScreenBufferInfo(PRIVATE->hOut, &PRIVATE->sbi); - //height = PRIVATE->sbi.srWindow.Bottom - ; me.modifiers = getModifiers(mer.dwControlKeyState); MouseButtons mb = getButtons(mer.dwButtonState); - //me.action = getButtons(mer.dwButtonState); if (mer.dwEventFlags & MOUSE_WHEELED) { memcpy((void*)(&we), (const void*)(&me), sizeof(me)); we.action = MouseWheel; @@ -317,16 +315,6 @@ void PIKbdListener::readKeyboard() { piMSleep(10); return; } - /*if (lc == 0) { - ReadConsole(hIn, &rc, 1, &(PRIVATE->ret), 0); - //cout << "read console" << endl; - lc = char(rc); - }*/ - /*if (PRIVATE->ret < 0 || PRIVATE->ret > 3) return; - lc = char(((uchar * )&rc)[PRIVATE->ret - 1]); - for (int i = 0; i < PRIVATE->ret; ++i) - cout << std::hex << int(((uchar * )&rc)[i]) << ' '; - cout << endl << std::hex << rc << endl;*/ #else tcsetattr(0, TCSANOW, &PRIVATE->tterm); PRIVATE->ret = read(0, rc, 8); diff --git a/src_main/console/piscreen.cpp b/src_main/console/piscreen.cpp index 135abb68..db1c2c83 100644 --- a/src_main/console/piscreen.cpp +++ b/src_main/console/piscreen.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Console output/input + PIP - Platform Independent Primitives + Console output/input Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piscreen.h" #include "piincludes_p.h" @@ -162,7 +162,6 @@ void PIScreen::SystemConsole::print() { ///cells[mouse_y][mouse_x].format.flags ^= Inverse; } #ifdef WINDOWS - //static int cnt = 0; PRIVATE->srect = PRIVATE->sbi.srWindow; int dx0 = -1, dx1 = -1, dy0 = -1, dy1 = -1; for (int j = 0; j < height; ++j) { @@ -189,11 +188,8 @@ void PIScreen::SystemConsole::print() { Cell & c(cells[j + dy0][i + dx0]); PRIVATE->chars[k].Char.UnicodeChar = 0; PRIVATE->chars[k].Char.AsciiChar = c.symbol.toConsole1Byte(); - //PRIVATE->chars[k].Char.UnicodeChar = c.symbol.toInt(); PRIVATE->chars[k].Attributes = attributes(c); } - //PRIVATE->bc.X = dx0; - //PRIVATE->bc.Y = dy0; //piCout << "draw" << dw << dh; PRIVATE->bs.X = dw; PRIVATE->bs.Y = dh; @@ -235,10 +231,6 @@ void PIScreen::SystemConsole::print() { printf("%s", s.data()); s.clear(); } - /*for (int i = 0; i < width; ++i) { - moveTo(i, j); - printf("%s", (formatString(cells[j][i]) + cells[j][i].symbol).data()); - }*/ } printf("\e[0m"); fflush(0); @@ -420,9 +412,7 @@ PIScreen::~PIScreen() { void PIScreen::setMouseEnabled(bool on) { mouse_ = on; - //lock(); console.mouse_x = console.mouse_y = -1; - //unlock(); } diff --git a/src_main/console/piscreen.h b/src_main/console/piscreen.h index 6c56991c..de1ce8f4 100644 --- a/src_main/console/piscreen.h +++ b/src_main/console/piscreen.h @@ -2,22 +2,22 @@ * \brief Console GUI class */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Console GUI - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISCREEN_H diff --git a/src_main/console/piscreenconsole.cpp b/src_main/console/piscreenconsole.cpp index c0bf9440..6ec563b4 100644 --- a/src_main/console/piscreenconsole.cpp +++ b/src_main/console/piscreenconsole.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Tile for PIScreen with PIConsole API + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "piscreenconsole.h" using namespace PIScreenTypes; diff --git a/src_main/console/piscreendrawer.cpp b/src_main/console/piscreendrawer.cpp index d34feb3b..56d97726 100644 --- a/src_main/console/piscreendrawer.cpp +++ b/src_main/console/piscreendrawer.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Console output/input - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Console output/input + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piscreendrawer.h" diff --git a/src_main/console/piscreendrawer.h b/src_main/console/piscreendrawer.h index a75dba86..08767b19 100644 --- a/src_main/console/piscreendrawer.h +++ b/src_main/console/piscreendrawer.h @@ -2,22 +2,22 @@ * \brief Drawer for PIScreen */ /* - PIP - Platform Independent Primitives - Drawer for PIScreen - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Drawer for PIScreen + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISCREENDRAWER_H diff --git a/src_main/console/piscreentile.cpp b/src_main/console/piscreentile.cpp index 659480bf..e4f1ff07 100644 --- a/src_main/console/piscreentile.cpp +++ b/src_main/console/piscreentile.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Basic PIScreen tile - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Basic PIScreen tile + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piscreentile.h" @@ -111,10 +111,7 @@ void PIScreenTile::setScreen(PIScreenBase * s) { void PIScreenTile::deleteChildren() { - //piCout << this << "deleteChildren"; piForeach (PIScreenTile * t, tiles) { - //piCout << this << " child" << t; - //t->deleteChildren(); t->parent = 0; delete t; } @@ -130,7 +127,6 @@ void PIScreenTile::setFocus() { void PIScreenTile::drawEventInternal(PIScreenDrawer * d) { if (!visible) { - //d->clearRect(x, y, x + width, y + height); return; } d->fillRect(x_, y_, x_ + width_, y_ + height_, back_symbol, (Color)back_format.color_char, (Color)back_format.color_back, back_format.flags); @@ -232,7 +228,7 @@ void PIScreenTile::layout() { } int cx = x_ + marginLeft, cy = y_ + marginTop; for (int i = 0; i < tiles.size_s(); ++i) { - PIScreenTile * t(tiles[i]); + PIScreenTile * t = tiles[i]; if (!t->visible || !t->needLayout()) continue; t->x_ = cx; t->y_ = cy; diff --git a/src_main/console/piscreentile.h b/src_main/console/piscreentile.h index a9dc0e91..f8d7e6b1 100644 --- a/src_main/console/piscreentile.h +++ b/src_main/console/piscreentile.h @@ -2,22 +2,22 @@ * \brief Basic PIScreen tile */ /* - PIP - Platform Independent Primitives - Basic PIScreen tile - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Basic PIScreen tile + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISCREENTILE_H diff --git a/src_main/console/piscreentiles.cpp b/src_main/console/piscreentiles.cpp index ddc70568..ddfd3c41 100644 --- a/src_main/console/piscreentiles.cpp +++ b/src_main/console/piscreentiles.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Various tiles for PIScreen - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Various tiles for PIScreen + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piscreentiles.h" @@ -154,7 +154,6 @@ void TileList::resizeEvent(int w, int h) { void TileList::drawEvent(PIScreenDrawer * d) { lhei = height_ - 2; - //int osp = piMini(3, lhei / 4); int is = piClampi(offset, 0, piMaxi(0, content.size_s() - 1)), ie = piClampi(offset + lhei, 0, content.size_s()); if (is > 0) d->drawText(x_, y_, PIString(" /\\ ").repeat(width_ / 4), Green, Default, Bold); if (ie < content.size_s()) d->drawText(x_, y_ + height_ - 1, PIString(" \\/ ").repeat(width_ / 4), Green, Default, Bold); @@ -182,11 +181,6 @@ void TileList::drawEvent(PIScreenDrawer * d) { } scroll->setMaximum(piMaxi(0, content.size_s() - 1)); scroll->setValue(cur); - /*int cx = x_ + width_ - 1; - d->drawLine(cx, y_ + 1, cx, y_ + height_ - 2, vert_line, Green); - if (content.size_s() > 1) - d->drawPixel(cx, y_ + piRound(float(cur) / (content.size_s() - 1) * (lhei - 1)) + 1, ' ', Green, Green); - if (ie < content.size_s()) d->drawText(x_, y_ + height_ - 1, PIString(" \\/ ").repeat(width_ / 4), Green, Default, Bold);*/ } @@ -289,7 +283,6 @@ bool TileList::mouseEvent(PIKbdListener::MouseEvent me) { break; case PIKbdListener::MouseButtonDblClick: keyEvent(PIKbdListener::KeyEvent(PIKbdListener::Return)); - //raiseEvent(TileEvent(RowPressed, cur)); return true; default: break; } diff --git a/src_main/console/piscreentiles.h b/src_main/console/piscreentiles.h index 1396211c..08f85d10 100644 --- a/src_main/console/piscreentiles.h +++ b/src_main/console/piscreentiles.h @@ -2,22 +2,22 @@ * \brief Various tiles for PIScreen */ /* - PIP - Platform Independent Primitives - Various tiles for PIScreen - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Various tiles for PIScreen + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISCREENTILES_H @@ -196,9 +196,6 @@ class PIP_EXPORT TileInput: public PIScreenTile { public: TileInput(const PIString & n = PIString()); virtual ~TileInput() {} - /*enum EventType { - EditFinished - };*/ PIScreenTypes::CellFormat format; PIString text; int max_length; @@ -212,34 +209,5 @@ protected: PITimeMeasurer tm_blink; }; -/* -class PIP_EXPORT TileTabs: public PIScreenTile { - PIOBJECT_SUBCLASS(TileTabs, PIScreenTile) -public: - TileTabs(const PIString & n = PIString()); - enum EventType { - TabChanged - }; - struct Tab { - Tab(const PIString & l = PIString(), int k = 0, PIScreenTile * t = 0) { - label = l; - key = k; - tile = t; - } - PIString label; - int key; - PIScreenTile * tile; - }; - PIScreenTypes::CellFormat format_tab; - PIScreenTypes::CellFormat format_tab_selected; - PIDeque tabs; -protected: - void sizeHint(int & w, int & h) const; - void drawEvent(PIScreenDrawer * d); - bool keyEvent(PIKbdListener::KeyEvent key); - void selectTab(int index); - int cur; -}; -*/ #endif // PISCREENTILES_H diff --git a/src_main/console/piscreentypes.h b/src_main/console/piscreentypes.h index fc39465c..67dd9bd7 100644 --- a/src_main/console/piscreentypes.h +++ b/src_main/console/piscreentypes.h @@ -2,22 +2,22 @@ * \brief Types for PIScreen */ /* - PIP - Platform Independent Primitives - Types for PIScreen + PIP - Platform Independent Primitives + Types for PIScreen Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISCREENTYPES_H @@ -72,14 +72,6 @@ namespace PIScreenTypes { Vertical /** Vertical */ }; - //! Position - enum PIP_EXPORT Position { - //Left /** Left */ , - //Right /** Right */ , - //Top /** Top */ , - //Bottom /** Bottom */ - }; - //! Focus flags enum PIP_EXPORT FocusFlag { CanHasFocus /** Tile can has focus */ = 0x1, @@ -150,8 +142,5 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIScreenTypes::Cell & v) inline PIByteArray & operator >>(PIByteArray & s, PIScreenTypes::Cell & v) {s >> v.format.raw_format >> v.symbol; return s;} -//__PICONTAINERS_SIMPLE_TYPE__(PIScreenTypes::Cell) -//__PIBYTEARRAY_SIMPLE_TYPE__(PIScreenTypes::Cell) - #endif // PISCREENTYPES_H diff --git a/src_main/console/piterminal.cpp b/src_main/console/piterminal.cpp index 6038ba68..d8dfacb3 100644 --- a/src_main/console/piterminal.cpp +++ b/src_main/console/piterminal.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Virtual terminal Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes_p.h" #include "piterminal.h" diff --git a/src_main/console/piterminal.h b/src_main/console/piterminal.h index e3ec1957..9c08244f 100644 --- a/src_main/console/piterminal.h +++ b/src_main/console/piterminal.h @@ -2,22 +2,22 @@ * \brief Virtual terminal */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Virtual terminal - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PITERMINAL_H diff --git a/src_main/containers/picontainers.cpp b/src_main/containers/picontainers.cpp index dfd7966c..d4a356c8 100755 --- a/src_main/containers/picontainers.cpp +++ b/src_main/containers/picontainers.cpp @@ -1,23 +1,22 @@ /* - PIP - Platform Independent Primitives - Generic containers - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Generic containers + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ -// * This class based on std::vector, expanding his functionality /** \class PIVector * \brief Dynamic array of any type diff --git a/src_main/containers/picontainers.h b/src_main/containers/picontainers.h index cab85e5b..688388de 100755 --- a/src_main/containers/picontainers.h +++ b/src_main/containers/picontainers.h @@ -5,22 +5,22 @@ * to use them */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Base for generic containers - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICONTAINERS_H diff --git a/src_main/containers/picontainersmodule.h b/src_main/containers/picontainersmodule.h index 0027320f..a6f70551 100644 --- a/src_main/containers/picontainersmodule.h +++ b/src_main/containers/picontainersmodule.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Module includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Module includes + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICONTAINERSMODULE_H diff --git a/src_main/containers/pideque.h b/src_main/containers/pideque.h index 751b8fc7..9d2cd145 100755 --- a/src_main/containers/pideque.h +++ b/src_main/containers/pideque.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Dynamic array of any type - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -97,7 +97,6 @@ public: size_t pos; public: inline const_iterator(): parent(0), pos(0) {} - //inline T & operator *() {return (*parent)[pos];} inline const T & operator *() const {return (*parent)[pos];} inline void operator ++() {++pos;} inline void operator ++(int) {++pos;} @@ -133,7 +132,6 @@ public: size_t pos; public: inline const_reverse_iterator(): parent(0), pos(0) {} - //inline T & operator *() {return (*parent)[pos];} inline const T & operator *() const {return (*parent)[pos];} inline void operator ++() {--pos;} inline void operator ++(int) {--pos;} diff --git a/src_main/containers/pimap.h b/src_main/containers/pimap.h index 7579d990..d74ee98e 100644 --- a/src_main/containers/pimap.h +++ b/src_main/containers/pimap.h @@ -4,22 +4,22 @@ * This file declares PIMap */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Associative array with custom types of key and value - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIMAP_H @@ -201,11 +201,6 @@ public: if (other.isEmpty()) return *this; if (other.size() == 1) {insert(other.pim_index[0].key, other.pim_content[0]); return *this;} if (other.size() == 2) {insert(other.pim_index[0].key, other.pim_content[0]); insert(other.pim_index[1].key, other.pim_content[1]); return *this;} - /*pim_content << other.pim_content; - size_t si = pim_index.size(); - for (int i = 0; i < other.pim_index.size_s(); ++i) - pim_index << MapIndex(other.pim_index[i].key, other.pim_index[i].index + si); - _sort();*/ for (int i = 0; i < other.pim_index.size_s(); ++i) insert(other.pim_index[i].key, other.pim_content[other.pim_index[i].index]); return *this; @@ -214,11 +209,9 @@ public: bool operator ==(const PIMap & t) const {return (pim_content == t.pim_content && pim_index == t.pim_index);} bool operator !=(const PIMap & t) const {return (pim_content != t.pim_content || pim_index != t.pim_index);} bool contains(const Key & key) const {bool f(false); _find(key, f); return f;} - //int etries(const T & v) const {int ec = 0; for (size_t i = 0; i < pim_size; ++i) if (v == pim_data[i]) ++ec; return ec;} PIMap & reserve(size_t new_size) {pim_content.reserve(new_size); pim_index.reserve(new_size); return *this;} - //PIMap & removeAll(const T & v) {for (llong i = 0; i < pim_size; ++i) if (pim_data[i] == v) {remove(i); --i;} return *this;} PIMap & removeOne(const Key & key) {bool f(false); ssize_t i = _find(key, f); if (f) _remove(i); return *this;} PIMap & remove(const Key & key) {return removeOne(key);} PIMap & erase(const Key & key) {return removeOne(key);} @@ -230,7 +223,6 @@ public: } PIMap & insert(const Key & key, const T & value) { - //MapIndex * i = _find(key); bool f(false); ssize_t i = _find(key, f); //piCout << "insert key=" << key << "found=" << f << "index=" << i << "value=" << value; @@ -239,11 +231,9 @@ public: } else { pim_content.push_back(value); pim_index.insert(i, MapIndex(key, pim_content.size() - 1)); - //_sort(); } return *this; } - //const T value(const Key & key, const T & default_ = T()) const {MapIndex * i = _find(key); if (i == 0) return default_; return pim_content[i->index];} const T value(const Key & key, const T & default_ = T()) const {bool f(false); ssize_t i = _find(key, f); if (!f) return default_; return pim_content[pim_index[i].index];} PIVector values() const {return pim_content;} Key key(const T & value_, const Key & default_ = Key()) const {for (int i = 0; i < pim_index.size_s(); ++i) if (pim_content[pim_index[i].index] == value_) return pim_index[i].key; return default_;} @@ -289,12 +279,6 @@ protected: } void _sort() {piQuickSort(pim_index.data(), pim_index.size_s() - 1);} ssize_t _find(const Key & k, bool & found) const { - /*for (size_t i = 0; i < pim_index.size(); ++i) - if (pim_index[i].key == k) { - return (MapIndex * )&(pim_index[i]); - } - return 0;*/ - //piCout << "find for" << k << pim_index.size_s(); if (pim_index.isEmpty()) { found = false; return 0; @@ -325,62 +309,8 @@ protected: PIVector pim_content; PIDeque pim_index; }; -//template bool operator <(const typename PIMap::MapIndex & f, const typename PIMap::MapIndex & s) {return f.key < s.key;} -//template bool operator >(const typename PIMap::MapIndex & f, const typename PIMap::MapIndex & s) {return f.key > s.key;} -/*#define __PIMAP_SIMPLE_FUNCTIONS__(T) - template<> inline PIMap::~PIMap() {dealloc(); _reset();} \ - template<> inline PIMap & PIMap::push_back(const T & v) {alloc(pim_size + 1); pim_data[pim_size - 1] = v; return *this;} \ - template<> inline PIMap & PIMap::fill(const T & f) { \ - for (size_t i = 0; i < pim_size; ++i) \ - pim_data[i] = f; \ - return *this; \ - } \ - template<> inline PIMap & PIMap::resize(size_t new_size, const T & f) { \ - if (new_size < pim_size) \ - pim_size = new_size; \ - if (new_size > pim_size) { \ - size_t os = pim_size; \ - alloc(new_size); \ - for (size_t i = os; i < new_size; ++i) pim_data[i] = f; \ - } \ - return *this; \ - } \ - template<> inline PIMap & PIMap::insert(size_t index, const T & v) { \ - alloc(pim_size + 1); \ - if (index < pim_size - 1) { \ - size_t os = pim_size - index - 1; \ - memmove(&(pim_data[index + 1]), &(pim_data[index]), os * sizeof(T)); \ - } \ - pim_data[index] = v; \ - return *this; \ - } \ - template<> inline PIMap & PIMap::remove(size_t index, size_t count) { \ - if (index + count >= pim_size) { \ - resize(index); \ - return *this; \ - } \ - size_t os = pim_size - index - count; \ - memmove(&(pim_data[index]), &(pim_data[index + count]), os * sizeof(T)); \ - pim_size -= count; \ - return *this; \ - } - -__PIMAP_SIMPLE_FUNCTIONS__(char) -__PIMAP_SIMPLE_FUNCTIONS__(uchar) -__PIMAP_SIMPLE_FUNCTIONS__(short) -__PIMAP_SIMPLE_FUNCTIONS__(ushort) -__PIMAP_SIMPLE_FUNCTIONS__(int) -__PIMAP_SIMPLE_FUNCTIONS__(uint) -__PIMAP_SIMPLE_FUNCTIONS__(long) -__PIMAP_SIMPLE_FUNCTIONS__(ulong) -__PIMAP_SIMPLE_FUNCTIONS__(llong) -__PIMAP_SIMPLE_FUNCTIONS__(ullong) -__PIMAP_SIMPLE_FUNCTIONS__(float) -__PIMAP_SIMPLE_FUNCTIONS__(double) -__PIMAP_SIMPLE_FUNCTIONS__(ldouble)*/ - #else diff --git a/src_main/containers/piqueue.h b/src_main/containers/piqueue.h index 9ab69adb..60612797 100755 --- a/src_main/containers/piqueue.h +++ b/src_main/containers/piqueue.h @@ -4,22 +4,22 @@ * This file declare PIQueue */ /* - PIP - Platform Independent Primitives - Queue container - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Queue container + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIQUEUE_H diff --git a/src_main/containers/piset.h b/src_main/containers/piset.h index 18ff29a3..795124ac 100644 --- a/src_main/containers/piset.h +++ b/src_main/containers/piset.h @@ -4,22 +4,22 @@ * This file declare PISet */ /* - PIP - Platform Independent Primitives - Set container - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Set container + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISET_H @@ -59,27 +59,17 @@ public: //! Contructs set from vector of elements PISet(const PIVector & values) { if (values.isEmpty()) return; - //_CSet::pim_content.resize(values.size_s()); - //_CSet::pim_index.resize(values.size_s()); for (int i = 0; i < values.size_s(); ++i) { - //_CSet::pim_index[i].index = i; - //_CSet::pim_index[i].key = values[i]; _CSet::insert(values[i], 0); } - //_CSet::_sort(); } //! Contructs set from deque of elements PISet(const PIDeque & values) { if (values.isEmpty()) return; - //_CSet::pim_content.resize(values.size_s()); - //_CSet::pim_index.resize(values.size_s()); for (int i = 0; i < values.size_s(); ++i) { - //_CSet::pim_index[i].index = i; - //_CSet::pim_index[i].key = values[i]; _CSet::insert(values[i], 0); } - //_CSet::_sort(); } typedef T key_type; diff --git a/src_main/containers/pistack.h b/src_main/containers/pistack.h index 88eee91d..9cbd072b 100755 --- a/src_main/containers/pistack.h +++ b/src_main/containers/pistack.h @@ -4,22 +4,22 @@ * This file declare PIStack */ /* - PIP - Platform Independent Primitives - Stack container + PIP - Platform Independent Primitives + Stack container Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISTACK_H diff --git a/src_main/containers/pivector.h b/src_main/containers/pivector.h index 5c1807f1..37426486 100755 --- a/src_main/containers/pivector.h +++ b/src_main/containers/pivector.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Dynamic array of any type - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/core/pibitarray.cpp b/src_main/core/pibitarray.cpp index 53034451..be267f55 100644 --- a/src_main/core/pibitarray.cpp +++ b/src_main/core/pibitarray.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Bit array + Ivan Pelipenko peri4ko@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pibitarray.h" #include "picout.h" diff --git a/src_main/core/pibitarray.h b/src_main/core/pibitarray.h index a01ca578..2e68a2e8 100755 --- a/src_main/core/pibitarray.h +++ b/src_main/core/pibitarray.h @@ -2,22 +2,22 @@ * \brief Bit array */ /* - PIP - Platform Independent Primitives - Bit array - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Bit array + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIBITARRAY_H diff --git a/src_main/core/pibytearray.cpp b/src_main/core/pibytearray.cpp index 531698ad..470bdc26 100755 --- a/src_main/core/pibytearray.cpp +++ b/src_main/core/pibytearray.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Byte array - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -18,7 +18,7 @@ */ #include "pibytearray.h" -#include "pistring.h" +#include "pistringlist.h" #include /*! \class PIByteArray diff --git a/src_main/core/pibytearray.h b/src_main/core/pibytearray.h index 5ec7870f..cee46ce1 100755 --- a/src_main/core/pibytearray.h +++ b/src_main/core/pibytearray.h @@ -301,7 +301,6 @@ inline bool operator !=(PIByteArray & f, PIByteArray & s) {if (f.size_s() != s.s __PIBYTEARRAY_SIMPLE_TYPE__(bool) __PIBYTEARRAY_SIMPLE_TYPE__(char) -//__PIBYTEARRAY_SIMPLE_TYPE__(uchar) __PIBYTEARRAY_SIMPLE_TYPE__(short) __PIBYTEARRAY_SIMPLE_TYPE__(ushort) __PIBYTEARRAY_SIMPLE_TYPE__(int) diff --git a/src_main/core/pichar.cpp b/src_main/core/pichar.cpp index 53730a81..c51417b1 100644 --- a/src_main/core/pichar.cpp +++ b/src_main/core/pichar.cpp @@ -2,22 +2,22 @@ * \brief Unicode char */ /* - PIP - Platform Independent Primitives - Unicode char - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Unicode char + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes_p.h" @@ -75,7 +75,6 @@ ushort charFromCodepage(const char * c, int size, const char * codepage, int * t if (ret <= 0) return 0; if (taken) *taken = ret; return buffer; - //printf("request %d\n", sz); # else wchar_t wc(0); mbtowc(0, 0, 0); // reset mbtowc @@ -378,10 +377,7 @@ PICout operator <<(PICout s, const PIChar & v) { } else #endif #ifdef WINDOWS - //if (PICout::isBufferActive()) s << v.toSystem(); - //else - // s << v.toConsole1Byte(); #else { char tc[8]; diff --git a/src_main/core/pichar.h b/src_main/core/pichar.h index 5de820ab..cf7dbe0f 100755 --- a/src_main/core/pichar.h +++ b/src_main/core/pichar.h @@ -2,22 +2,22 @@ * \brief Unicode char */ /* - PIP - Platform Independent Primitives - Unicode char - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Unicode char + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICHAR_H @@ -57,37 +57,14 @@ public: //! Contructs symbol from no more than 4 bytes of string PIChar(const char * c, int * bytes = 0); - //inline operator const int() {return static_cast(ch);} - //inline operator const char() {return toAscii();} - //! Copy operator PIChar & operator =(const char v) {ch = v; return *this;} - /*inline PIChar & operator =(const short v) {ch = v; return *this;} - inline PIChar & operator =(const int v) {ch = v; return *this;} - inline PIChar & operator =(const uchar v) {ch = v; return *this;} - inline PIChar & operator =(const ushort v) {ch = v; return *this;} - inline PIChar & operator =(const uint v) {ch = v; return *this;}*/ //! Compare operator bool operator ==(const PIChar & o) const; - /*inline bool operator ==(const PIChar & o) const {if (o.isAscii() ^ isAscii()) return false; - if (isAscii()) return (o.toAscii() == toAscii()); - return (o.toInt() == toInt());} - inline bool operator ==(const char o) const {return (PIChar(o) == *this);} - inline bool operator ==(const short o) const {return (PIChar(o) == *this);} - inline bool operator ==(const int o) const {return (PIChar(o) == *this);} - inline bool operator ==(const uchar o) const {return (PIChar(o) == *this);} - inline bool operator ==(const ushort o) const {return (PIChar(o) == *this);} - inline bool operator ==(const uint o) const {return (PIChar(o) == *this);}*/ //! Compare operator bool operator !=(const PIChar & o) const {return !(o == *this);} - /*inline bool operator !=(const char o) const {return (PIChar(o) != *this);} - inline bool operator !=(const short o) const {return (PIChar(o) != *this);} - inline bool operator !=(const int o) const {return (PIChar(o) != *this);} - inline bool operator !=(const uchar o) const {return (PIChar(o) != *this);} - inline bool operator !=(const ushort o) const {return (PIChar(o) != *this);} - inline bool operator !=(const uint o) const {return (PIChar(o) != *this);}*/ //! Compare operator bool operator >(const PIChar & o) const; diff --git a/src_main/core/pichunkstream.cpp b/src_main/core/pichunkstream.cpp index de9cf10b..34f814ae 100644 --- a/src_main/core/pichunkstream.cpp +++ b/src_main/core/pichunkstream.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Binary markup serializator + Ivan Pelipenko peri4ko@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pichunkstream.h" /*! \class PIChunkStream @@ -99,7 +118,6 @@ uint PIChunkStream::readVInt(PIByteArray & s) { for (abc = 0; abc < 3; ++abc) { uchar mask = (0x80 >> abc); if ((bytes[0] & mask) == mask) { - //if (s.isEmpty()) return 0; bytes[0] &= (mask - 1); s >> bytes[abc + 1]; } else break; diff --git a/src_main/core/pichunkstream.h b/src_main/core/pichunkstream.h index 5df3d629..ef4f9e25 100644 --- a/src_main/core/pichunkstream.h +++ b/src_main/core/pichunkstream.h @@ -2,22 +2,22 @@ * \brief Binary markup serializator */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Binary markup serializator - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICHUNKSTREAM_H diff --git a/src_main/core/picli.cpp b/src_main/core/picli.cpp index 8c95d035..cb58e5e4 100755 --- a/src_main/core/picli.cpp +++ b/src_main/core/picli.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Command-Line Parser - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Command-Line Parser + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "picli.h" diff --git a/src_main/core/picli.h b/src_main/core/picli.h index e992e32d..43d8e01c 100755 --- a/src_main/core/picli.h +++ b/src_main/core/picli.h @@ -2,22 +2,22 @@ * \brief Command-Line parser */ /* - PIP - Platform Independent Primitives - Command-Line Parser - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Command-Line Parser + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICLI_H diff --git a/src_main/core/picollection.cpp b/src_main/core/picollection.cpp index 73867eee..7b94cf47 100755 --- a/src_main/core/picollection.cpp +++ b/src_main/core/picollection.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Peer - named I/O ethernet node, forming self-organized peering network + Ivan Pelipenko peri4ko@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "picollection.h" diff --git a/src_main/core/picollection.h b/src_main/core/picollection.h index aafdf361..ac8d3017 100755 --- a/src_main/core/picollection.h +++ b/src_main/core/picollection.h @@ -2,22 +2,22 @@ * \brief Custom elements collection */ /* - PIP - Platform Independent Primitives - Peer - named I/O ethernet node, forming self-organized peering network - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Peer - named I/O ethernet node, forming self-organized peering network + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICOLLECTION_H @@ -72,7 +72,6 @@ public: protected: struct Group { Group(const PIString & name_ = PIString()) {name = name_;} - //~Group() {piCout << "delete group" << name << this; piForeach (const PIObject * o, elements) delete o; elements.clear();} PIString name; PIVector elements; }; diff --git a/src_main/core/picoremodule.h b/src_main/core/picoremodule.h index 04dc4b13..de313302 100644 --- a/src_main/core/picoremodule.h +++ b/src_main/core/picoremodule.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Module includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Module includes + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICOREMODULE_H @@ -22,7 +22,6 @@ #include "picollection.h" #include "piobject.h" -#include "pistatemachine.h" #include "pitime.h" #include "picli.h" #include "pichunkstream.h" diff --git a/src_main/core/picout.cpp b/src_main/core/picout.cpp index 2d14e126..c20cf82f 100644 --- a/src_main/core/picout.cpp +++ b/src_main/core/picout.cpp @@ -226,13 +226,6 @@ PICout PICout::operator <<(const PICoutAction v) { if (isOutputDeviceActive(StdOut)) { #ifdef WINDOWS /// TODO : wondows ClearScreen !!! - /*GetConsoleCursorInfo(__Private__::hOut, &curinfo); - curinfo.bVisible = false; - SetConsoleCursorInfo(__Private__::hOut, &curinfo); - - SetConsoleCursorPosition(__Private__::hOut, ulcoord); - FillConsoleOutputAttribute(__Private__::hOut, __Private__::dattr, width * (height + 1), ulcoord, &written); - FillConsoleOutputCharacter(__Private__::hOut, ' ', width * (height + 1), ulcoord, &written);*/ #else printf("\e[H\e[J"); #endif @@ -262,14 +255,11 @@ PICout PICout::operator <<(const PICoutAction v) { if (PICout::isOutputDeviceActive(PICout::Buffer)) PICout::__string__() << (v);\ }\ } -//#define PICOUTTOTARGETS(v) {if (PICout::isOutputDeviceActive(PICout::Buffer)) PICout::__string__() << (v); else printf("%s", (v).dataConsole());} #define PINUMERICCOUT if (cnb_ == 10) PICOUTTOTARGET(v) else PICOUTTOTARGETS(PIString::fromNumber(v, cnb_)) PICout PICout::operator <<(const char * v) {if (!act_) return *this; if (v[0] == '\0') return *this; space(); quote(); PICOUTTOTARGET(v) quote(); return *this;} -//PICout PICout::operator <<(const std::string & v) {space(); quote(); if (PICout::isOutputDeviceActive(PICout::Buffer)) PICout::__string__() << StdString2PIString(v); else std::cout << (v); quote(); return *this;} - PICout PICout::operator <<(const bool v) {if (!act_) return *this; space(); if (v) PICOUTTOTARGET("true") else PICOUTTOTARGET("false") return *this;} PICout PICout::operator <<(const char v) {if (!act_) return *this; space(); PICOUTTOTARGET(v) return *this;} diff --git a/src_main/core/piflags.h b/src_main/core/piflags.h index 370edd57..3a5b4699 100644 --- a/src_main/core/piflags.h +++ b/src_main/core/piflags.h @@ -2,22 +2,22 @@ * \brief General flags class */ /* - PIP - Platform Independent Primitives - General flags class - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + General flags class + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIFLAGS_H diff --git a/src_main/core/piincludes.cpp b/src_main/core/piincludes.cpp index 80c40385..5600257c 100755 --- a/src_main/core/piincludes.cpp +++ b/src_main/core/piincludes.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Global includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Global includes + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes.h" diff --git a/src_main/core/piincludes.h b/src_main/core/piincludes.h index 87512c6e..652186c3 100755 --- a/src_main/core/piincludes.h +++ b/src_main/core/piincludes.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Minimal PIP includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Minimal PIP includes + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINCLUDES_H diff --git a/src_main/core/piincludes_p.h b/src_main/core/piincludes_p.h index 95da08cd..d35cc504 100644 --- a/src_main/core/piincludes_p.h +++ b/src_main/core/piincludes_p.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Private PIP includes - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/core/piinit.cpp b/src_main/core/piinit.cpp index a73dd5e3..68d03f3a 100644 --- a/src_main/core/piinit.cpp +++ b/src_main/core/piinit.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Initialization + PIP - Platform Independent Primitives + Initialization Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes_p.h" @@ -33,20 +33,20 @@ #endif #ifdef WINDOWS # include - extern FILETIME __pi_ftjan1970; - extern PINtQueryTimerResolution getTimerResolutionAddr; - extern PINtSetTimerResolution setTimerResolutionAddr; - void __PISetTimerResolution() { - if (setTimerResolutionAddr == NULL || getTimerResolutionAddr == NULL) - return; - ULONG _max(0), _min(0), _cur(0); - //printf("getTimerResolution ...\n"); - LONG q = getTimerResolutionAddr(&_max, &_min, &_cur); - //printf("getTimerResolution %d %lu %lu %lu\n", q, _min, _max, _cur); - if (q == 0) - setTimerResolutionAddr(_min, TRUE, &_cur); - //printf("setTimerResolution %lu\n", cur); - } +extern FILETIME __pi_ftjan1970; +extern PINtQueryTimerResolution getTimerResolutionAddr; +extern PINtSetTimerResolution setTimerResolutionAddr; +void __PISetTimerResolution() { + if (setTimerResolutionAddr == NULL || getTimerResolutionAddr == NULL) + return; + ULONG _max(0), _min(0), _cur(0); + //printf("getTimerResolution ...\n"); + LONG q = getTimerResolutionAddr(&_max, &_min, &_cur); + //printf("getTimerResolution %d %lu %lu %lu\n", q, _min, _max, _cur); + if (q == 0) + setTimerResolutionAddr(_min, TRUE, &_cur); + //printf("setTimerResolution %lu\n", cur); +} #else # include # ifndef FREERTOS @@ -64,24 +64,13 @@ # include # include //# include - extern clock_serv_t __pi_mac_clock; +extern clock_serv_t __pi_mac_clock; #endif #ifdef PIP_ICU # define U_NOEXCEPT # include # include #endif -/* -#ifdef WINDOWS -# include -# include -# include -# include -#else -# include -# include -# include -#endif*/ #ifdef HAS_LOCALE @@ -90,10 +79,10 @@ static locale_t currentLocale_t = 0; PRIVATE_DEFINITION_START(PIInit) #ifdef WINDOWS - HMODULE ntlib; - ULONG prev_res; +HMODULE ntlib; +ULONG prev_res; #endif - bool delete_locs; +bool delete_locs; PRIVATE_DEFINITION_END(PIInit) #ifndef FREERTOS @@ -133,12 +122,12 @@ PIInit::PIInit() { signal(SIGPIPE, SIG_IGN); PIStringList ifpathes; ifpathes << PIStringAscii("/bin/ifconfig") << PIStringAscii("/sbin/ifconfig") - << PIStringAscii("/usr/bin/ifconfig") << PIStringAscii("/usr/sbin/ifconfig"); + << PIStringAscii("/usr/bin/ifconfig") << PIStringAscii("/usr/sbin/ifconfig"); piForeachC (PIString & i, ifpathes) - if (fileExists(i)) { - sinfo->ifconfigPath = i; - piBreak; - } + if (fileExists(i)) { + sinfo->ifconfigPath = i; + piBreak; + } # else // OS version DWORD dwVersion = GetVersion(); @@ -165,9 +154,7 @@ PIInit::PIInit() { setTimerResolutionAddr = (PINtSetTimerResolution)GetProcAddress(PRIVATE->ntlib, "NtSetTimerResolution"); __PISetTimerResolution(); } - /*if (setTimerResolution) setTimerResolutionAddr(1, TRUE, &(PRIVATE->prev_res));*/ # endif - //piDebug = true; # ifdef HAS_LOCALE //cout << "has locale" << endl; if (currentLocale_t != 0) { @@ -241,12 +228,12 @@ PIInit::PIInit() { GetSystemInfo(&sysinfo); sinfo->processorsCount = sysinfo.dwNumberOfProcessors; switch (sysinfo.wProcessorArchitecture) { - case PROCESSOR_ARCHITECTURE_AMD64: sinfo->architecture = PIStringAscii("x86_64"); break; - case PROCESSOR_ARCHITECTURE_ARM: sinfo->architecture = PIStringAscii("arm"); break; - case PROCESSOR_ARCHITECTURE_IA64: sinfo->architecture = PIStringAscii("Intel Itanium-based"); break; - case PROCESSOR_ARCHITECTURE_INTEL: sinfo->architecture = PIStringAscii("x86"); break; - case PROCESSOR_ARCHITECTURE_UNKNOWN: - default: sinfo->architecture = PIStringAscii("unknown"); break; + case PROCESSOR_ARCHITECTURE_AMD64: sinfo->architecture = PIStringAscii("x86_64"); break; + case PROCESSOR_ARCHITECTURE_ARM: sinfo->architecture = PIStringAscii("arm"); break; + case PROCESSOR_ARCHITECTURE_IA64: sinfo->architecture = PIStringAscii("Intel Itanium-based"); break; + case PROCESSOR_ARCHITECTURE_INTEL: sinfo->architecture = PIStringAscii("x86"); break; + case PROCESSOR_ARCHITECTURE_UNKNOWN: + default: sinfo->architecture = PIStringAscii("unknown"); break; } int argc_(0); wchar_t ** argv_ = CommandLineToArgvW(GetCommandLineW(), &argc_); @@ -284,25 +271,25 @@ PIInit::PIInit() { sinfo->OS_version = esp_get_idf_version(); #endif sinfo->OS_name = -#ifdef WINDOWS - PIStringAscii("Windows"); + #ifdef WINDOWS + PIStringAscii("Windows"); #else -# ifdef QNX - PIStringAscii("QNX"); + # ifdef QNX + PIStringAscii("QNX"); # else -# ifdef MAC_OS - PIStringAscii("MacOS"); + # ifdef MAC_OS + PIStringAscii("MacOS"); # else -# ifdef ANDROID - PIStringAscii("Android"); + # ifdef ANDROID + PIStringAscii("Android"); # else -# ifdef FREE_BSD - PIStringAscii("FreeBSD"); + # ifdef FREE_BSD + PIStringAscii("FreeBSD"); # else -# ifdef FREERTOS - PIStringAscii("FreeRTOS"); + # ifdef FREERTOS + PIStringAscii("FreeRTOS"); # else - uns.sysname; + uns.sysname; # endif # endif # endif @@ -318,7 +305,6 @@ PIInit::~PIInit() { PIResourcesStorage::instance()->clear(); #ifdef WINDOWS WSACleanup(); - //if (setTimerResolution) setTimerResolutionAddr(PRIVATE->prev_res, TRUE, &(PRIVATE->prev_res)); if (PRIVATE->ntlib) FreeLibrary(PRIVATE->ntlib); PRIVATE->ntlib = 0; #endif @@ -332,67 +318,66 @@ PIInit::~PIInit() { #ifdef PIP_ICU u_cleanup(); #endif - //if (currentLocale_t != 0) freelocale(currentLocale_t); } bool PIInit::isBuildOptionEnabled(PIInit::BuildOption o) { switch (o) { - case ICU: return -#ifdef PIP_ICU + case ICU: return + #ifdef PIP_ICU true; #else false; #endif - case USB: return -#ifdef PIP_USB + case USB: return + #ifdef PIP_USB true; #else false; #endif - case STL: return -#ifdef PIP_CONTAINERS_STL + case STL: return + #ifdef PIP_CONTAINERS_STL true; #else false; #endif - case Crypt: return -#ifdef PIP_CRYPT + case Crypt: return + #ifdef PIP_CRYPT true; #else false; #endif - case Introspection: return -#ifdef PIP_INTROSPECTION + case Introspection: return + #ifdef PIP_INTROSPECTION true; #else false; #endif - case FFTW: return -#ifdef PIP_FFTW + case FFTW: return + #ifdef PIP_FFTW true; #else false; #endif - case Compress: return -#ifdef PIP_COMPRESS + case Compress: return + #ifdef PIP_COMPRESS true; #else false; #endif - case OpenCL: return -#ifdef PIP_OPENCL + case OpenCL: return + #ifdef PIP_OPENCL true; #else false; #endif - case Cloud: return -#ifdef PIP_CLOUD - true; + case Cloud: return + #ifdef PIP_CLOUD + true; #else - false; + false; #endif - default: return false; + default: return false; } return false; } diff --git a/src_main/core/piinit.h b/src_main/core/piinit.h index 31d0e235..6aaabb8e 100644 --- a/src_main/core/piinit.h +++ b/src_main/core/piinit.h @@ -2,22 +2,22 @@ * \brief Initialization */ /* - PIP - Platform Independent Primitives - Initialization - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Initialization + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINIT_H diff --git a/src_main/core/piobject.cpp b/src_main/core/piobject.cpp index 69e2af49..5d190f99 100755 --- a/src_main/core/piobject.cpp +++ b/src_main/core/piobject.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Object, base class of some PIP classes, provide EVENT -> EVENT_HANDLER mechanism + PIP - Platform Independent Primitives + Object, base class of some PIP classes, provide EVENT -> EVENT_HANDLER mechanism Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piobject.h" @@ -73,7 +73,6 @@ PIString PIObject::__MetaFunc::fullFormat() const { PIObject::PIObject(const PIString & name): _signature_(__PIOBJECT_SIGNATURE__), emitter_(0), thread_safe_(false), proc_event_queue(false) { - //__PIVariantInitBuiltin__(); setName(name); setDebug(true); mutexObjects().lock(); @@ -181,14 +180,6 @@ void PIObject::piConnect(const PIString & src, const PIString & sig, const PIStr d->connectors << s; } -/* -PIStringList PIObject::events() { - PIStringList l; - for (PIMap::const_iterator i = signals_.begin(); i != signals_.end(); i++) - l << (*i).first; - return l; -} -*/ PIStringList PIObject::scopeList() const { PIMutexLocker ml(__meta_mutex()); @@ -580,8 +571,6 @@ bool PIObject::isPIObject(const PIObject * o) { } - - void PIObject::dump(const PIString & line_prefix) const { //printf("dump %s \"%s\"\n", className(), name().data()); PICout(PICoutManipulators::AddNewLine) << line_prefix << "class " << className() << " (" << (const void*)this << ", \"" << name() << "\") {"; @@ -627,8 +616,6 @@ void PIObject::dump(const PIString & line_prefix) const { } - - void dumpApplication() { PIMutexLocker _ml(PIObject::mutexObjects()); //printf("dump application ...\n"); @@ -654,6 +641,7 @@ void dumpApplication() { //printf("dump application done\n"); } + #ifndef FREERTOS bool dumpApplicationToFile(const PIString & path) { PIFile f(path + "_tmp"); @@ -672,8 +660,6 @@ bool dumpApplicationToFile(const PIString & path) { #endif - - void PIObject::__MetaData::addScope(const PIString & s, uint shash) { if (!scope_id.contains(shash)) { scope_list << s; @@ -682,8 +668,6 @@ void PIObject::__MetaData::addScope(const PIString & s, uint shash) { } - - void PIObject::__Connection::destroy() { #ifdef PIP_CXX11_SUPPORT if (functor) delete functor; diff --git a/src_main/core/piobject.h b/src_main/core/piobject.h index 5cd84ab2..c774c1e1 100755 --- a/src_main/core/piobject.h +++ b/src_main/core/piobject.h @@ -4,22 +4,22 @@ * This file declare PIObject class and associated macros */ /* - PIP - Platform Independent Primitives - Object, base class of some PIP classes, provide EVENT -> EVENT_HANDLER mechanism + PIP - Platform Independent Primitives + Object, base class of some PIP classes, provide EVENT -> EVENT_HANDLER mechanism Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIOBJECT_H diff --git a/src_main/core/pipropertystorage.cpp b/src_main/core/pipropertystorage.cpp index e3e2e173..b4947ed4 100644 --- a/src_main/core/pipropertystorage.cpp +++ b/src_main/core/pipropertystorage.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Storage of properties for GUI usage + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pipropertystorage.h" diff --git a/src_main/core/pistatemachine.h b/src_main/core/pistatemachine.h deleted file mode 100755 index 49aca74c..00000000 --- a/src_main/core/pistatemachine.h +++ /dev/null @@ -1,334 +0,0 @@ -/*! \file pistatemachine.h - * \brief Base class for custom state machine -*/ -/* - PIP - Platform Independent Primitives - State machine - Ivan Pelipenko peri4ko@yandex.ru - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -#ifndef PISTATEMACHINE_H -#define PISTATEMACHINE_H - -#include "piobject.h" - -/*! \brief Base class for custom state machine - * - * \section PIStateMachine_synopsis Synopsis - * This class provide functionality of state machine. - * You should inherit from this class, implement \a execution() - * and \a transition() functions, set rules and periodically - * call \a tick() function to proper work of machine. - * - * \section PIStateMachine_prepare Prepare for work - * %State machine operates with "state", "rule" and "condition". - * * "State" is some class (by default \c int), associated name and - * optional "handler" - pointer to function executed on every \a tick(); - * * "Rule" define rule of transition from one machine state to other. - * It is also has optional "handler"; - * * "Condition" is a part of rule and define possibility of transition. - * - * First of all you should define states of your machine by function - * \a addState(). Then you should define transition rules for machine - * by function \a addRule(). Finally you can set initial state by function - * \a setInitialState() and provide periodically execution of function - * \a tick(). - * - * \section PIStateMachine_principle Principle of work - * At any time the state machine is in some state. You can ask machine - * to enter in new state by function \a switchToState(). If all conditions - * done machine switch it state immediately, else machine remember request - * and will be try switch to the new state every tick. Successfull state - * switching execute function \a transition(), every tick execute - * function \a execution() with current state. On successfull transition - * if rule "handler" is not null it execute. Every \a tick() if current - * state "handler" is not null it execute. - * - * \section PIStateMachine_conditions Conditions - * Each rule has transition condition. Condition is array of pairs - * (string, number). It means that every condition by name "string" - * should be performed as least "number" times. Empty condition always - * permits transition. - * - * %State machine have current performed conditions. You can read this - * conditions by function \a currentConditions() and perform new - * conditions by functions \a performCondition() and \a performConditions(). - * Currend conditions can de erased by function \a resetConditions(). - * - * \section PIStateMachine_example Example - * This is simple example demonstrates all features: - * \snippet pistatemachine.cpp main -*/ -template -class PIP_EXPORT PIStateMachine: public PIObject -{ - PIOBJECT_SUBCLASS(PIStateMachine, PIObject) -public: - //! Constructs an empty state machine - PIStateMachine(void * _parent = 0) {if (_parent == 0) parent_ = this; else parent_ = _parent; resetConditions();} - ~PIStateMachine() {;} - - //! %Condition is a pair (string, number) - typedef PIPair Condition; - - //! %Rule of transition between states of machine - struct Rule { - //! Constuctor - Rule() {handler = 0; from = to = Type(); autoTransition = resetAllConditions = false;} - //! Constuctor - Rule(Type f, Type t, const PIStringList & c = PIStringList(), Handler h = 0, bool at = false, bool rac = false) { - from = f; - to = t; - for (int i = 0; i < c.size_s(); ++i) - conditions << Condition(c[i], 1); - autoTransition = at; - resetAllConditions = rac; - handler = h; - } - //! Source state - Type from; - //! Destination state - Type to; - //! %Conditions of transition - PIVector conditions; - //! Automatic transition - bool autoTransition; - //! Reset or not all performed conditions of machine on transition - bool resetAllConditions; - //! Pointer to function executed on transition - Handler handler; - //! Add condition of transition - void addCondition(const PIString & name, int times = 1) {if (times > 0) conditions << Condition(name, times);} - bool operator ==(const Rule & other) const {return (from == other.from) && (to == other.to);} - bool operator !=(const Rule & other) const {return (from != other.from) || (to != other.to);} - }; - - //! %State of machine - struct State { - //! Constuctor - State() {handler = 0; value = Type();} - //! Constuctor - State(Type v, const PIString & n = "", Handler h = 0) {value = v; name = n; handler = h;} - //! %State value - Type value; - //! %State name - PIString name; - //! Pointer to function executed on tick - Handler handler; - bool operator ==(const State & other) const {return value == other.value;} - bool operator !=(const State & other) const {return value != other.value;} - }; - - void * parent() const {return parent_;} - void setParent(void * parent) {parent_ = parent;} - - //! Add state of machine - void addState(Type value, const PIString & name = "", Handler handler = 0) {if (states_.contains(State(value, name))) return; states_ << State(value, name, handler);} - - //! States count - int statesCount() const {return states_.size_s();} - - //! Remove all states - void clearStates() {states_.clear();} - - - //! Add rule of transition - void addRule(Type from, Type to, const PIString & condition, Handler handler = 0, bool autoTransition = false, bool resetAllConditions = false) {if (rules_.contains(Rule(from, to))) return; rules_ << Rule(from, to, PIStringList(condition), handler, autoTransition, resetAllConditions);} - - //! Add rule of transition - void addRule(Type from, Type to, Handler handler, bool autoTransition = false, bool resetAllConditions = false) {if (rules_.contains(Rule(from, to))) return; rules_ << Rule(from, to, PIStringList(), handler, autoTransition, resetAllConditions);} - - //! Add rule of transition - void addRule(Type from, Type to, const PIStringList & conditions = PIStringList(), Handler handler = 0, bool autoTransition = false, bool resetAllConditions = false) {if (rules_.contains(Rule(from, to))) return; rules_ << Rule(from, to, conditions, handler, autoTransition, resetAllConditions);} - - //! Add rule of transition - void addRule(const Rule & rule) {if (rules_.contains(rule)) return; rules_ << rule;} - - //! Rules count - int rulesCount() const {return rules_.size_s();} - - //! Remove all rules - void clearRules() {rules_.clear();} - - - //! Setup initial state. \a reset() will set machine state to "value" - void setInitialState(Type value) { - for (int i = 0; i < states_.size_s(); ++i) - if (states_[i].value == value) { - init_ = state_ = states_[i]; - return; - } - } - - /** \brief Try to switch machine state to state "to" - * \details If there is rule of transition exists and this rule conditions - * is performed then machine switched to new state immediately. Otherwise machine - * will be try to enter to new state every \a tick(). - * \return \c true if state switched immediately, otherwise \c false */ - bool switchToState(Type to) { - switch_to = to; - for (int i = 0; i < rules_.size_s(); ++i) { - Rule & r(rules_[i]); - if ((r.from != state_.value) || (r.to != to)) continue; - if (!checkConditions(r)) continue; - State ts = findState(to); - if (r.handler != 0 && parent_ != 0) r.handler(parent_); - transition(state_, ts); - state_ = ts; - resetConditions(r); - return true; - } - return false; - } - - //! Reset machine state to initial and clear all conditions - void reset() {state_ = init_; resetConditions();} - - //! Returns current state of machine - const State & currentState() const {return state_;} - - - //! Reset all performed conditions - void resetConditions() {cond.clear(); cond_count = 0;} - - //! Reset performed condition with name "name" - void resetCondition(const PIString & name) { - for (int i = 0; i < cond.size_s(); ++i) - if (cond[i].first == name) { - cond.remove(i); - i--; - } - } - - //! Perform condition with name "name" "times" times. - void performCondition(const PIString & name, int times = 1) { - if (times <= 0) return; - for (int i = 0; i < cond.size_s(); ++i) - if (cond[i].first == name) { - cond[i].second += times; - return; - } - cond << Condition(name, times); - } - - //! Perform every condition with name from "names" one time. - void performConditions(const PIStringList & names) { - bool ok; - for (int n = 0; n < names.size_s(); ++n) { - ok = false; - for (int i = 0; i < cond.size_s(); ++i) { - if (cond[i].first == names[n]) { - cond[i].second++; - ok = true; - break; - } - } - if (ok) continue; - cond << Condition(names[n], 1); - } - } - - //! Returns all current performed conditions - const PIVector & currentConditions() const {return cond;} - - Type * currentState_ptr() {return &state_.value;} - int * conditionsCount_ptr() {cond_count = cond.size_s(); return &cond_count;} - -//! \handlers -//! \{ - - //! \fn void tick() - //! \brief Main function of machine. Execute \a execution() and check if need to switch state - - //! \fn void tick(void * data, int delim) - //! \brief Main function of machine. Execute \a execution() and check if need to switch state - -//! \} - - EVENT_HANDLER(void, tick) {tick(0, 0);} - EVENT_HANDLER2(void, tick, void * , data, int, delim) { - execution(state_); - if (state_.handler != 0 && parent_ != 0) state_.handler(parent_); - if (switch_to != state_.value) switchToState(switch_to); - else { - piForeachC (Rule & r, rules_) { - if (!r.autoTransition || r.from != state_.value) continue; - if (checkConditions(r)) { - switchToState(r.to); - break; - } - } - } - } - -protected: - - //! Reimplement this function to process current state of machine - virtual void execution(const State & state) {;} - - //! Reimplement this function to process switching current state of machine - virtual void transition(const State & from, const State & to) {;} - -private: - State findState(Type value) { - for (int i = 0; i < states_.size_s(); ++i) - if (states_[i].value == value) - return states_[i]; - return State(); - } - bool checkConditions(const Rule & rule) { - //if (cond.size_s() < rule.conditions.size_s()) return false; - int oc = 0; - for (int i = 0; i < cond.size_s(); ++i) { - PIString & rn(cond[i].first); - for (int j = 0; j < rule.conditions.size_s(); ++j) { - if (rn != rule.conditions[j].first) continue; - if (cond[i].second < rule.conditions[j].second) return false; - oc++; - } - } - return (rule.conditions.size_s() == oc); - } - void resetConditions(const Rule & rule) { - if (rule.resetAllConditions) { - cond.clear(); - return; - } - for (int i = 0; i < cond.size_s(); ++i) { - PIString & rn(cond[i].first); - for (int j = 0; j < rule.conditions.size_s(); ++j) { - if (rn != rule.conditions[j].first) continue; - cond[i].second -= rule.conditions[j].second; - if (cond[i].second <= 0) { - cond.remove(i); - i--; - } - } - } - } - - PIVector states_; - PIVector rules_; - State init_, state_; - Type switch_to; - void * parent_; - int cond_count; - PIVector cond; - -}; - - -#endif // PISTATEMACHINE_H diff --git a/src_main/core/pistring.cpp b/src_main/core/pistring.cpp index 6e952f93..4cd27fab 100755 --- a/src_main/core/pistring.cpp +++ b/src_main/core/pistring.cpp @@ -1,23 +1,25 @@ /* - PIP - Platform Independent Primitives - String - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + String + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + #include "piincludes_p.h" #include "pistring.h" +#include "pistringlist.h" #ifdef PIP_ICU # define U_NOEXCEPT # include "unicode/ucnv.h" @@ -216,7 +218,6 @@ llong PIString::toNumberBase(const PIString & value, int base, bool * ok) { else base = 10; } else if (base < 2 || base > 40) {if (ok != 0) *ok = false; return 0;} - //v.reverse(); if (ok) *ok = true; PIVector digits; llong ret = 0, m = 1; @@ -236,14 +237,6 @@ llong PIString::toNumberBase(const PIString & value, int base, bool * ok) { m *= base; } if (neg) ret = -ret; - /*piForeachC (PIChar & i, v) { - if (i == PIChar('-')) {ret = -ret; continue;} - cs = fromBaseN[int(i.toAscii())]; - cout << i << " = " << cs << endl; - if (cs < 0 || cs >= base) return ret; - ret += cs * m; - m *= base; - }*/ return ret; } @@ -494,29 +487,6 @@ PIString & PIString::operator +=(const char * str) { PIString & PIString::operator +=(const wchar_t * str) { if (!str) return *this; - //cout << "wc" << endl; - /*int l = 0, sz; - char * c = new char[MB_CUR_MAX]; - while (str[l] != 0) ++l; - for (int i = 0; i < l; ++i) { - sz = wctomb(c, str[i]); - switch (sz) { - case 4: - push_back(PIChar(*(int*)c)); - continue; - case 3: - push_back(PIChar(*(int*)c)); - back().ch &= 0xFFFFFF; - continue; - case 2: - push_back(PIChar(*(short * )c)); - continue; - default: - push_back(PIChar(c[0])); - break; - } - } - delete[] c;*/ int i = -1; while (str[++i]) push_back(PIChar(ushort(str[i]))); @@ -589,9 +559,6 @@ PIString PIString::mid(const int start, const int len) const { } else { if (l > length() - s) l = length() - s; - //for (int i = s; i < s + l; ++i) - // str += at(i); -// std::cout << "mid " << s << " " << l << " " << size_s() << " " << start << " " << len << "\n"; return PIString(&(at(s)), l); } return PIString(); @@ -668,8 +635,6 @@ PIString & PIString::replaceAll(const PIString & what, const PIString & with) { PIString & PIString::insert(int index, const PIString & str) { - //uint c = str.length(); - //for (uint i = 0; i < c; ++i) insert(index + i, str[i]); PIDeque::insert(index, *((const PIDeque*)&str)); return *this; } @@ -1094,46 +1059,6 @@ ldouble PIString::toLDouble() const { return atof(toNativeDecimalPoints().data()); } -/* -short PIString::toShort() const { - PIString s(trimmed().toLowerCase().toNativeDecimalPoints()); - short v; - if (s.left(2) == "0x") {sscanf(s.data(), "%hx", &v); return v;} - if (s.left(1) == "0") {sscanf(s.data(), "%ho", &v); return v;} - sscanf(s.data(), "%hd", &v); - return v; -} - - -int PIString::toInt() const { - PIString s(trimmed().toLowerCase().toNativeDecimalPoints()); - int v; - if (s.left(2) == "0x") {sscanf(s.data(), "%x", &v); return v;} - if (s.left(1) == "0") {sscanf(s.data(), "%o", &v); return v;} - sscanf(s.data(), "%d", &v); - return v; -} - - -long PIString::toLong() const { - PIString s(trimmed().toLowerCase().toNativeDecimalPoints()); - long v; - if (s.left(2) == "0x") {sscanf(s.data(), "%lx", &v); return v;} - if (s.left(1) == "0") {sscanf(s.data(), "%lo", &v); return v;} - sscanf(s.data(), "%ld", &v); - return v; -} - - -llong PIString::toLLong() const { - PIString s(trimmed().toLowerCase().toNativeDecimalPoints()); - llong v; - if (s.left(2) == "0x") {sscanf(s.data(), "%llx", &v); return v;} - if (s.left(1) == "0") {sscanf(s.data(), "%llo", &v); return v;} - sscanf(s.data(), "%lld", &v); - return v; -} -*/ PIString & PIString::setReadableSize(llong bytes) { clear(); @@ -1164,20 +1089,19 @@ PIString & PIString::setReadableSize(llong bytes) { inline char chrUpr(char c) { if (c >= 'a' && c <= 'z') return c + 'A' - 'a'; - //if (c >= 'а' && c <= 'я') return c + 'А' - 'а'; return c; } inline char chrLwr(char c) { if (c >= 'A' && c <= 'Z') return c + 'a' - 'A'; - //if (c >= 'А' && c <= 'Я') return c + 'а' - 'А'; return c; } const static PIString _versionDelims_ = PIStringAscii("._-+"); + void parseVersion(PIString s, PIVector & codes, PIStringList & strs) { s.trim(); if (s.isEmpty()) { @@ -1220,6 +1144,7 @@ void parseVersion(PIString s, PIVector & codes, PIStringList & strs) { //piCout << codes << strs; } + int versionLabelValue(PIString s) { int ret = -10000; if (s.isEmpty()) return 0; @@ -1240,6 +1165,7 @@ int versionLabelValue(PIString s) { return ret; } + int versionCompare(const PIString & v0, const PIString & v1, int components) { PIStringList strs[2]; PIVector codes[2]; parseVersion(v0.toLowerCase(), codes[0], strs[0]); @@ -1291,35 +1217,9 @@ PICout operator <<(PICout s, const PIString & v) { s.space(); s.quote(); s.setControl(0, true); - //if (PICout::isBufferActive()) - s << v.data(); - //else { - // s << v.dataConsole(); - //} + s << v.data(); s.restoreControl(); s.quote(); return s; } - - -PIStringList& PIStringList::removeDuplicates() { - PIStringList l; - PIString s; - bool ae; - for (int i = 0; i < size_s(); ++i) { - ae = false; - s = at(i); - for (int j = 0; j < l.size_s(); ++j) { - if (s != l[j]) continue; - ae = true; break; - } - if (!ae) { - l << s; - continue; - } - remove(i); - --i; - } - return *this; -} diff --git a/src_main/core/pistring.h b/src_main/core/pistring.h index 16a750d9..5afe1173 100755 --- a/src_main/core/pistring.h +++ b/src_main/core/pistring.h @@ -4,22 +4,22 @@ * This file declare string and string list classes */ /* - PIP - Platform Independent Primitives - String - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + String + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISTRING_H @@ -43,14 +43,12 @@ public: static const float ElideCenter; static const float ElideRight ; - //inline PIString & operator +=(const char c) {push_back(c); return *this;} PIString & operator +=(const PIChar & c) {push_back(c); return *this;} PIString & operator +=(const char * str); PIString & operator +=(const wchar_t * str); PIString & operator +=(const PIByteArray & ba) {appendFromChars((const char * )ba.data(), ba.size_s(), __utf8name__); return *this;} PIString & operator +=(const PIString & str); - //PIString(const char c) {*this += c;} PIString(const PIString & o): PIDeque() {*this += o;} @@ -85,19 +83,6 @@ public: /*! \brief Contructs string as sequence of symbols "c" of buffer with length "len" * \details Example: \snippet pistring.cpp PIString(int, PIChar) */ PIString(const int len, const PIChar & c): PIDeque() {for (int i = 0; i < len; ++i) push_back(c);} - - -// PIString(const short & value): PIDeque() {*this = fromNumber(value);} -// PIString(const ushort & value): PIDeque() {*this = fromNumber(value);} -// PIString(const int & value): PIDeque() {*this = fromNumber(value);} -// PIString(const uint & value): PIDeque() {*this = fromNumber(value);} -// PIString(const long & value): PIDeque() {*this = fromNumber(value);} -// PIString(const ulong & value): PIDeque() {*this = fromNumber(value);} -// PIString(const llong & value): PIDeque() {*this = fromNumber(value);} -// PIString(const ullong & value): PIDeque() {*this = fromNumber(value);} -// PIString(const float & value): PIDeque() {*this = fromNumber(value);} -// PIString(const double & value): PIDeque() {*this = fromNumber(value);} - ~PIString() {} @@ -122,7 +107,6 @@ public: //! Compare operator bool operator ==(const PIChar c) const {return *this == PIString(c);} - //inline bool operator ==(const char c) const {return *this == PIString(c);} //! Compare operator bool operator ==(const char * str) const {return *this == PIString(str);} @@ -132,7 +116,6 @@ public: //! Compare operator bool operator !=(const PIChar c) const {return *this != PIString(c);} - //inline bool operator !=(const char c) const {return *this != PIString(c);} //! Compare operator bool operator !=(const char * str) const {return *this != PIString(str);} @@ -142,7 +125,6 @@ public: //! Compare operator bool operator <(const PIChar c) const {return *this < PIString(c);} - //inline bool operator <(const char c) const {return *this < PIString(c);} //! Compare operator bool operator <(const char * str) const {return *this < PIString(str);} @@ -152,7 +134,6 @@ public: //! Compare operator bool operator >(const PIChar c) const {return *this > PIString(c);} - //inline bool operator >(const char c) const {return *this > PIString(c);} //! Compare operator bool operator >(const char * str) const {return *this > PIString(str);} @@ -162,7 +143,6 @@ public: //! Compare operator bool operator <=(const PIChar c) const {return *this <= PIString(c);} - //inline bool operator <=(const char c) const {return *this <= PIString(c);} //! Compare operator bool operator <=(const char * str) const {return *this <= PIString(str);} @@ -172,29 +152,13 @@ public: //! Compare operator bool operator >=(const PIChar c) const {return *this >= PIString(c);} - //inline bool operator >=(const char c) const {return *this >= PIString(c);} //! Compare operator bool operator >=(const char * str) const {return *this >= PIString(str);} - -// operator bool() const {return toBool();} -// operator short() const {return toShort();} -// operator ushort() const {return toUShort();} -// operator int() const {return toInt();} -// operator uint() const {return toUInt();} -// operator long() const {return toLong();} -// operator ulong() const {return toULong();} -// operator llong() const {return toLLong();} -// operator ullong() const {return toULLong();} -// operator float() const {return toFloat();} -// operator double() const {return toDouble();} - - /*! \brief Append string "str" at the end of string * \details Example: \snippet pistring.cpp PIString::<<(PIString) */ PIString & operator <<(const PIString & str) {*this += str; return *this;} -// inline PIString & operator <<(const char c) {*this += c; return *this;} /*! \brief Append symbol "c" at the end of string * \details Example: \snippet pistring.cpp PIString::<<(PIChar) */ @@ -633,8 +597,6 @@ public: //! \details Example: \snippet pistring.cpp PIString::toFloat ldouble toLDouble() const; - //inline PIString & setNumber(const char value) {clear(); *this += itos(value); return *this;} - //! \brief Set string content to numeric representation of "value" in base "base" //! \details Example: \snippet pistring.cpp PIString::setNumber PIString & setNumber(const short value, int base = 10, bool * ok = 0) {clear(); *this += PIString::fromNumber(value, base, ok); return *this;} @@ -683,8 +645,6 @@ public: //! \details Example: \snippet pistring.cpp PIString::setReadableSize PIString & setReadableSize(llong bytes); - //inline static PIString fromNumber(const char value) {return PIString(itos(value));} - //! \brief Return string contains numeric representation of "value" in base "base" //! \details Example: \snippet pistring.cpp PIString::fromNumber static PIString fromNumber(const short value, int base = 10, bool * ok = 0) {return fromNumberBaseS(llong(value), base, ok);} @@ -793,13 +753,9 @@ inline PIByteArray & operator >>(PIByteArray & s, PIString & v) {v.clear(); s >> //! \relatesalso PIString \brief Return concatenated string inline PIString operator +(const PIString & str, const PIString & f) {PIString s(str); s += f; return s;} -//inline PIString operator +(const PIString & f, const char c) {PIString s(f); s.push_back(c); return s;} - //! \relatesalso PIString \brief Return concatenated string inline PIString operator +(const PIString & f, const char * str) {PIString s(f); s += str; return s;} -//inline PIString operator +(const char c, const PIString & f) {return PIString(c) + f;} - //! \relatesalso PIString \brief Return concatenated string inline PIString operator +(const char * str, const PIString & f) {return PIString(str) + f;} @@ -812,79 +768,6 @@ int versionCompare(const PIString & v0, const PIString & v1, int components = 6) PIString versionNormalize(const PIString & v); -/*!\brief Strings array class - * \details This class is based on \a PIDeque and - * expand it functionality. */ -class PIP_EXPORT PIStringList: public PIDeque -{ -public: - - //! Contructs empty strings list - PIStringList() {;} - - ~PIStringList() {;} - - //! Contructs strings list with one string "str" - PIStringList(const PIString & str) {push_back(str);} - - //! Contructs empty strings list with strings "s0" and "s1" - PIStringList(const PIString & s0, const PIString & s1) {push_back(s0); push_back(s1);} - - //! Contructs empty strings list with strings "s0", "s1" and "s2" - PIStringList(const PIString & s0, const PIString & s1, const PIString & s2) {push_back(s0); push_back(s1); push_back(s2);} - - //! Contructs empty strings list with strings "s0", "s1", "s2" and "s3" - PIStringList(const PIString & s0, const PIString & s1, const PIString & s2, const PIString & s3) {push_back(s0); push_back(s1); push_back(s2); push_back(s3);} - - PIStringList(const PIStringList & o): PIDeque() {resize(o.size()); for (uint i = 0; i < size(); ++i) (*this)[i] = o[i];} - PIStringList(const PIVector & o): PIDeque() {resize(o.size()); for (uint i = 0; i < size(); ++i) (*this)[i] = o[i];} - PIStringList(const PIDeque & o): PIDeque() {resize(o.size()); for (uint i = 0; i < size(); ++i) (*this)[i] = o[i];} - - - //! \brief Join all strings in one with delimiter "delim" and return it - //! \details Example: \snippet pistring.cpp PIStringList::join - PIString join(const PIString & delim) const {PIString s; for (uint i = 0; i < size(); ++i) {s += at(i); if (i < size() - 1) s += delim;} return s;} - - //! \brief Remove all strings equal "value" and return this - //! \details Example: \snippet pistring.cpp PIStringList::removeStrings - PIStringList & removeStrings(const PIString & value) {for (uint i = 0; i < size(); ++i) {if (at(i) == value) {remove(i); --i;}} return *this;} - - PIStringList & remove(uint num) {PIDeque::remove(num); return *this;} - PIStringList & remove(uint num, uint count) {PIDeque::remove(num, count); return *this;} - - //! \brief Remove duplicated strings and return this - //! \details Example: \snippet pistring.cpp PIStringList::removeDuplicates - PIStringList & removeDuplicates(); - - //! \brief Trim all strings - //! \details Example: \snippet pistring.cpp PIStringList::trim - PIStringList & trim() {for (uint i = 0; i < size(); ++i) at(i).trim(); return *this;} - - //! Return sum of lengths of all strings - uint contentSize() {uint s = 0; for (uint i = 0; i < size(); ++i) s += at(i).size(); return s;} - - //! Compare operator - bool operator ==(const PIStringList & o) const {if (size() != o.size()) return false; for (size_t i = 0; i < size(); ++i) if (o[i] != (*this)[i]) return false; return true;} - - //! Compare operator - bool operator !=(const PIStringList & o) const {return !(o == (*this));} - - PIStringList & operator =(const PIStringList & o) {PIDeque::operator=(o); return *this;} - - PIStringList & operator <<(const PIString & str) {append(str); return *this;} - PIStringList & operator <<(const PIStringList & sl) {append(sl); return *this;} - -}; - - -//! \relatesalso PIStringList \relatesalso PIByteArray \brief Output operator to PIByteArray -inline PIByteArray & operator <<(PIByteArray & s, const PIStringList & v) {s << int(v.size_s()); for (int i = 0; i < v.size_s(); ++i) s << v[i]; return s;} - -//! \relatesalso PIStringList \relatesalso PIByteArray \brief Input operator from PIByteArray -inline PIByteArray & operator >>(PIByteArray & s, PIStringList & v) {int sz; s >> sz; v.resize(sz); for (int i = 0; i < sz; ++i) s >> v[i]; return s;} - -//! \relatesalso PIStringList \relatesalso PICout \brief Output operator to PICout -inline PICout operator <<(PICout s, const PIStringList & v) {s.space(); s.setControl(0, true); s << "{"; for (uint i = 0; i < v.size(); ++i) {s << "\"" << v[i] << "\""; if (i < v.size() - 1) s << ", ";} s << "}"; s.restoreControl(); return s;} template<> inline uint piHash(const PIString & s) {return s.hash();} diff --git a/src_main/core/pistring_std.h b/src_main/core/pistring_std.h index 6ab92dd8..913b376f 100644 --- a/src_main/core/pistring_std.h +++ b/src_main/core/pistring_std.h @@ -5,8 +5,8 @@ */ /* PIP - Platform Independent Primitives - STD for PIString - Ivan Pelipenko peri4ko@yandex.ru + STD for PIString + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -28,7 +28,7 @@ typedef std::basic_string wstring; #endif -#include "pistring.h" +#include "pistringlist.h" inline std::string PIString2StdString(const PIString & v) { @@ -42,12 +42,6 @@ inline std::string PIString2StdString(const PIString & v) { s.push_back(char(tc)); wc >>= 8; } - /*if (at(i).isAscii()) - s.push_back(at(i).toAscii()); - else { - s.push_back(at(i).toCharPtr()[0]); - s.push_back(at(i).toCharPtr()[1]); - }*/ } } return s; diff --git a/src_main/core/pistringlist.cpp b/src_main/core/pistringlist.cpp new file mode 100644 index 00000000..acace3fb --- /dev/null +++ b/src_main/core/pistringlist.cpp @@ -0,0 +1,42 @@ +/* + PIP - Platform Independent Primitives + Strings array class + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "pistringlist.h" + + +PIStringList& PIStringList::removeDuplicates() { + PIStringList l; + PIString s; + bool ae; + for (int i = 0; i < size_s(); ++i) { + ae = false; + s = at(i); + for (int j = 0; j < l.size_s(); ++j) { + if (s != l[j]) continue; + ae = true; break; + } + if (!ae) { + l << s; + continue; + } + remove(i); + --i; + } + return *this; +} diff --git a/src_main/core/pistringlist.h b/src_main/core/pistringlist.h new file mode 100644 index 00000000..0a9669f0 --- /dev/null +++ b/src_main/core/pistringlist.h @@ -0,0 +1,100 @@ +/*! \brief Strings array class + * \details This class is based on \a PIDeque and + * expand it functionality. */ +/* + PIP - Platform Independent Primitives + Strings array class + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#ifndef PISTRINGLIST_H +#define PISTRINGLIST_H + +#include "pistring.h" + + +class PIP_EXPORT PIStringList: public PIDeque +{ +public: + + //! Contructs empty strings list + PIStringList() {;} + + ~PIStringList() {;} + + //! Contructs strings list with one string "str" + PIStringList(const PIString & str) {push_back(str);} + + //! Contructs empty strings list with strings "s0" and "s1" + PIStringList(const PIString & s0, const PIString & s1) {push_back(s0); push_back(s1);} + + //! Contructs empty strings list with strings "s0", "s1" and "s2" + PIStringList(const PIString & s0, const PIString & s1, const PIString & s2) {push_back(s0); push_back(s1); push_back(s2);} + + //! Contructs empty strings list with strings "s0", "s1", "s2" and "s3" + PIStringList(const PIString & s0, const PIString & s1, const PIString & s2, const PIString & s3) {push_back(s0); push_back(s1); push_back(s2); push_back(s3);} + + PIStringList(const PIStringList & o): PIDeque() {resize(o.size()); for (uint i = 0; i < size(); ++i) (*this)[i] = o[i];} + PIStringList(const PIVector & o): PIDeque() {resize(o.size()); for (uint i = 0; i < size(); ++i) (*this)[i] = o[i];} + PIStringList(const PIDeque & o): PIDeque() {resize(o.size()); for (uint i = 0; i < size(); ++i) (*this)[i] = o[i];} + + + //! \brief Join all strings in one with delimiter "delim" and return it + //! \details Example: \snippet pistring.cpp PIStringList::join + PIString join(const PIString & delim) const {PIString s; for (uint i = 0; i < size(); ++i) {s += at(i); if (i < size() - 1) s += delim;} return s;} + + //! \brief Remove all strings equal "value" and return this + //! \details Example: \snippet pistring.cpp PIStringList::removeStrings + PIStringList & removeStrings(const PIString & value) {for (uint i = 0; i < size(); ++i) {if (at(i) == value) {remove(i); --i;}} return *this;} + + PIStringList & remove(uint num) {PIDeque::remove(num); return *this;} + PIStringList & remove(uint num, uint count) {PIDeque::remove(num, count); return *this;} + + //! \brief Remove duplicated strings and return this + //! \details Example: \snippet pistring.cpp PIStringList::removeDuplicates + PIStringList & removeDuplicates(); + + //! \brief Trim all strings + //! \details Example: \snippet pistring.cpp PIStringList::trim + PIStringList & trim() {for (uint i = 0; i < size(); ++i) at(i).trim(); return *this;} + + //! Return sum of lengths of all strings + uint contentSize() {uint s = 0; for (uint i = 0; i < size(); ++i) s += at(i).size(); return s;} + + //! Compare operator + bool operator ==(const PIStringList & o) const {if (size() != o.size()) return false; for (size_t i = 0; i < size(); ++i) if (o[i] != (*this)[i]) return false; return true;} + + //! Compare operator + bool operator !=(const PIStringList & o) const {return !(o == (*this));} + + PIStringList & operator =(const PIStringList & o) {PIDeque::operator=(o); return *this;} + + PIStringList & operator <<(const PIString & str) {append(str); return *this;} + PIStringList & operator <<(const PIStringList & sl) {append(sl); return *this;} + +}; + + +//! \relatesalso PIStringList \relatesalso PIByteArray \brief Output operator to PIByteArray +inline PIByteArray & operator <<(PIByteArray & s, const PIStringList & v) {s << int(v.size_s()); for (int i = 0; i < v.size_s(); ++i) s << v[i]; return s;} + +//! \relatesalso PIStringList \relatesalso PIByteArray \brief Input operator from PIByteArray +inline PIByteArray & operator >>(PIByteArray & s, PIStringList & v) {int sz; s >> sz; v.resize(sz); for (int i = 0; i < sz; ++i) s >> v[i]; return s;} + +//! \relatesalso PIStringList \relatesalso PICout \brief Output operator to PICout +inline PICout operator <<(PICout s, const PIStringList & v) {s.space(); s.setControl(0, true); s << "{"; for (uint i = 0; i < v.size(); ++i) {s << "\"" << v[i] << "\""; if (i < v.size() - 1) s << ", ";} s << "}"; s.restoreControl(); return s;} + +#endif // PISTRINGLIST_H diff --git a/src_main/core/pitime.cpp b/src_main/core/pitime.cpp index 39352bf6..5e3fdb8c 100755 --- a/src_main/core/pitime.cpp +++ b/src_main/core/pitime.cpp @@ -1,21 +1,22 @@ /* - PIP - Platform Independent Primitives - Timer - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Timer + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + #include "piincludes_p.h" #include "pitime.h" #include "pisystemtests.h" @@ -244,8 +245,6 @@ PISystemTime PISystemTime::current(bool precise_but_not_system) { ullong lt = ullong(sft.dwHighDateTime) * 0x100000000U + ullong(sft.dwLowDateTime); return PISystemTime(lt / 10000000U, (lt % 10000000U) * 100U); } - //long t_cur = GetCurrentTime(); - //return PISystemTime(t_cur / 1000, (t_cur % 1000) * 1000000); #else # ifdef MAC_OS mach_timespec_t t_cur; diff --git a/src_main/core/pitime.h b/src_main/core/pitime.h index 12971788..e0a00c0b 100755 --- a/src_main/core/pitime.h +++ b/src_main/core/pitime.h @@ -2,22 +2,22 @@ * \brief Time structs */ /* - PIP - Platform Independent Primitives - Time structs - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Time structs + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PITIME_H diff --git a/src_main/core/pitime_win.h b/src_main/core/pitime_win.h index 00834722..d12dcb1e 100644 --- a/src_main/core/pitime_win.h +++ b/src_main/core/pitime_win.h @@ -31,11 +31,6 @@ #include -//inline PISystemTime SYSTEMTIME2PISystemTime(SYSTEMTIME &t) { -// PISystemTime st; - -//} - inline PISystemTime FILETIME2PISystemTime(const FILETIME &t) { PISystemTime st; ullong lt = ullong(t.dwHighDateTime) * 0x100000000U + ullong(t.dwLowDateTime); diff --git a/src_main/core/pivariant.h b/src_main/core/pivariant.h index d6e7e2fc..d40fa561 100755 --- a/src_main/core/pivariant.h +++ b/src_main/core/pivariant.h @@ -82,8 +82,6 @@ struct PIP_EXPORT __PIVariantTypeInfo__ { __TYPEINFO_SINGLE(T, T &) \ __TYPEINFO_SINGLE(T, const T) \ __TYPEINFO_SINGLE(T, const T &) - //__TYPEINFO_SINGLE(T, T *) - //__TYPEINFO_SINGLE(T, const T *) class PIP_EXPORT __PIVariantInfoStorage__ { @@ -465,31 +463,6 @@ public: * Otherwise returns content as type T. */ template T value() const {return getAsValue(*this);} - /* - operator bool() const {return toBool();} - operator char() const {return toInt();} - operator uchar() const {return toInt();} - operator short() const {return toInt();} - operator ushort() const {return toInt();} - operator int() const {return toInt();} - operator uint() const {return toInt();} - operator long() const {return toInt();} - operator ulong() const {return toInt();} - operator llong() const {return toLLong();} - operator ullong() const {return (ullong)toLLong();} - operator float() const {return toFloat();} - operator double() const {return toDouble();} - operator ldouble() const {return toLDouble();} - operator PITime() const {return toTime();} - operator PIDate() const {return toDate();} - operator PIDateTime() const {return toDateTime();} - operator PIString() const {return toString();} - operator PIStringList() const {return toStringList();} - operator PIBitArray() const {return toBitArray();} - operator PIByteArray() const {return toByteArray();} - operator const char*() const {return toString().data();} - operator void*() const {return (void*)(toLLong());} - */ //! Assign operator PIVariant & operator =(const PIVariant & v); @@ -683,7 +656,6 @@ template<> inline PIVariantTypes::IODevice PIVariant::value() const {return toIO template<> inline PIPointd PIVariant::value() const {return toPoint();} template<> inline PIRectd PIVariant::value() const {return toRect();} -//template<> inline PIVariant PIVariant::fromValue(const char * v) {return PIVariant(PIString(v));} template<> inline PIVariant PIVariant::fromValue(const bool & v) {return PIVariant(v);} template<> inline PIVariant PIVariant::fromValue(const char & v) {return PIVariant(v);} template<> inline PIVariant PIVariant::fromValue(const uchar & v) {return PIVariant(v);} diff --git a/src_main/core/pivarianttypes.h b/src_main/core/pivarianttypes.h index 04549179..395ecf38 100644 --- a/src_main/core/pivarianttypes.h +++ b/src_main/core/pivarianttypes.h @@ -25,7 +25,7 @@ #ifndef PIVARIANTYPES_H #define PIVARIANTYPES_H -#include "pistring.h" +#include "pistringlist.h" class PIPropertyStorage; @@ -33,125 +33,125 @@ class PIPropertyStorage; namespace PIVariantTypes { - /** - * @brief name-value pair - */ - struct PIP_EXPORT Enumerator { - Enumerator(int v = 0, const PIString & n = PIString()): value(v), name(n) {} - int value; - PIString name; - }; +/** + * @brief name-value pair + */ +struct PIP_EXPORT Enumerator { + Enumerator(int v = 0, const PIString & n = PIString()): value(v), name(n) {} + int value; + PIString name; +}; + +/** + * @brief Collection of PIVariantTypes::Enumerator. It's replace classic c-style enum. + * Contains elements with unique name and not uniqueue values. + */ +struct PIP_EXPORT Enum { + Enum(const PIString & n = PIString()): enum_name(n) {} + PIString toString() const {return selected;} // obsolete /** - * @brief Collection of PIVariantTypes::Enumerator. It's replace classic c-style enum. - * Contains elements with unique name and not uniqueue values. + * @brief Find selected value. + * @return selected value, otherwrise 0 */ - struct PIP_EXPORT Enum { - Enum(const PIString & n = PIString()): enum_name(n) {} - PIString toString() const {return selected;} // obsolete + int selectedValue() const; - /** - * @brief Find selected value. - * @return selected value, otherwrise 0 - */ - int selectedValue() const; + /** + * @brief Get selected name + * @return selected name, otherwrise empty PIString + */ + PIString selectedName() const {return selected;} - /** - * @brief Get selected name - * @return selected name, otherwrise empty PIString - */ - PIString selectedName() const {return selected;} + /** + * @brief Select value if exists in Enum. If Enum contains several PIVariantTypes::Enumerator with same values, + * first PIVariantTypes::Enumerator will selected + * @param v value for selection + * @return true if value exists in Enum, false otherwrise + */ + bool selectValue(int v); - /** - * @brief Select value if exists in Enum. If Enum contains several PIVariantTypes::Enumerator with same values, - * first PIVariantTypes::Enumerator will selected - * @param v value for selection - * @return true if value exists in Enum, false otherwrise - */ - bool selectValue(int v); + /** + * @brief Select name if exists in enum + * @param n name for selection + * @return true if name exists in Enum, false otherwrise + */ + bool selectName(const PIString & n); - /** - * @brief Select name if exists in enum - * @param n name for selection - * @return true if name exists in Enum, false otherwrise - */ - bool selectName(const PIString & n); + /** + * @brief Find PIVariantTypes::Enumerator with specific name and return it value + * @param n name for search + * @return value of founded PIVariantTypes::Enumerator, 0 otherwrise + */ + int value(const PIString & n) const; - /** - * @brief Find PIVariantTypes::Enumerator with specific name and return it value - * @param n name for search - * @return value of founded PIVariantTypes::Enumerator, 0 otherwrise - */ - int value(const PIString & n) const; + /** + * @brief Find first PIVariantTypes::Enumerator with specific value and return it name + * @param v value for search + * @return name of founded PIVariantTypes::Enumerator, empty string otherwrise + */ + PIString name(int v) const; - /** - * @brief Find first PIVariantTypes::Enumerator with specific value and return it name - * @param v value for search - * @return name of founded PIVariantTypes::Enumerator, empty string otherwrise - */ - PIString name(int v) const; + /** + * @brief Make vector of Enum values + */ + PIVector values() const; - /** - * @brief Make vector of Enum values - */ - PIVector values() const; + /** + * @brief Make vector of Enum names + */ + PIStringList names() const; + PIString enum_name; + PIString selected; + PIVector enum_list; - /** - * @brief Make vector of Enum names - */ - PIStringList names() const; - PIString enum_name; - PIString selected; - PIVector enum_list; + /** + * @brief Add PIVariantTypes::Enumerator to Enum + */ + Enum & operator <<(const Enumerator & v); - /** - * @brief Add PIVariantTypes::Enumerator to Enum - */ - Enum & operator <<(const Enumerator & v); + /** + * @brief Add PIVariantTypes::Enumerator element to Enum. Element contains specific name and value more per + * unit then last element. If the is no elements, contains zero value. + * @param v name for new PIVariantTypes::Enumerator element + */ + Enum & operator <<(const PIString & v); - /** - * @brief Add PIVariantTypes::Enumerator element to Enum. Element contains specific name and value more per - * unit then last element. If the is no elements, contains zero value. - * @param v name for new PIVariantTypes::Enumerator element - */ - Enum & operator <<(const PIString & v); + /** + * @brief Add PIVariantTypes::Enumerator element for each name in vector + */ + Enum & operator <<(const PIStringList & v); +}; - /** - * @brief Add PIVariantTypes::Enumerator element for each name in vector - */ - Enum & operator <<(const PIStringList & v); - }; +struct PIP_EXPORT File { + File(const PIString & p = PIString(), const PIString & f = PIString(), bool abs = false): file(p), filter(f), is_abs(abs) {} + PIString toString() const {return file;} + PIString file; + PIString filter; + bool is_abs; +}; - struct PIP_EXPORT File { - File(const PIString & p = PIString(), const PIString & f = PIString(), bool abs = false): file(p), filter(f), is_abs(abs) {} - PIString toString() const {return file;} - PIString file; - PIString filter; - bool is_abs; - }; +struct PIP_EXPORT Dir { + Dir(const PIString & d = PIString(), bool abs = false): dir(d), is_abs(abs) {} + PIString toString() const {return dir;} + PIString dir; + bool is_abs; +}; - struct PIP_EXPORT Dir { - Dir(const PIString & d = PIString(), bool abs = false): dir(d), is_abs(abs) {} - PIString toString() const {return dir;} - PIString dir; - bool is_abs; - }; +struct PIP_EXPORT Color { + Color(uint v = 0) {rgba = v;} + uint rgba; +}; - struct PIP_EXPORT Color { - Color(uint v = 0) {rgba = v;} - uint rgba; - }; - - struct PIP_EXPORT IODevice { - IODevice(); - void set(const PIPropertyStorage & ps); - PIPropertyStorage get() const; - PIString toPICout() const; - PIString prefix; - int mode; // PIIODevice::DeviceMode - int options; // PIIODevice::DeviceOptions - PIByteArray props; - }; +struct PIP_EXPORT IODevice { + IODevice(); + void set(const PIPropertyStorage & ps); + PIPropertyStorage get() const; + PIString toPICout() const; + PIString prefix; + int mode; // PIIODevice::DeviceMode + int options; // PIIODevice::DeviceOptions + PIByteArray props; +}; } diff --git a/src_main/crypt/piauth.h b/src_main/crypt/piauth.h index caea1ec4..aca4939c 100644 --- a/src_main/crypt/piauth.h +++ b/src_main/crypt/piauth.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PIP Authentication API - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -87,9 +87,6 @@ public: //! Server event on check client password EVENT1(passwordCheck, bool, result) - - //EVENT_HANDLER1(void, received, PIByteArray, data); - private: State disconnect(PIByteArray & ba, const PIString & error = PIString()); bool isAuthorizedKey(const PIByteArray & pkey); diff --git a/src_main/crypt/picrypt.h b/src_main/crypt/picrypt.h index 6d50b8e3..e11be27e 100644 --- a/src_main/crypt/picrypt.h +++ b/src_main/crypt/picrypt.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Cryptographic class using lib Sodium - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/crypt/picryptmodule.h b/src_main/crypt/picryptmodule.h index 9ee55f82..51946c76 100644 --- a/src_main/crypt/picryptmodule.h +++ b/src_main/crypt/picryptmodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/geo/piellipsoidmodel.cpp b/src_main/geo/piellipsoidmodel.cpp index 6a42cf21..b01f1737 100644 --- a/src_main/geo/piellipsoidmodel.cpp +++ b/src_main/geo/piellipsoidmodel.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Contains geo ellipsoid models + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "piellipsoidmodel.h" diff --git a/src_main/geo/piellipsoidmodel.h b/src_main/geo/piellipsoidmodel.h index 6f1f0720..a7f1c64a 100644 --- a/src_main/geo/piellipsoidmodel.h +++ b/src_main/geo/piellipsoidmodel.h @@ -2,22 +2,22 @@ * \brief Contains geo ellipsoid models */ /* - PIP - Platform Independent Primitives - Contains geo ellipsoid models - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + PIP - Platform Independent Primitives + Contains geo ellipsoid models + Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIELLIPSOIDMODEL_H diff --git a/src_main/geo/pigeomodule.h b/src_main/geo/pigeomodule.h index 16231c8c..688ff81a 100644 --- a/src_main/geo/pigeomodule.h +++ b/src_main/geo/pigeomodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/geo/pigeoposition.cpp b/src_main/geo/pigeoposition.cpp index 211d68e4..1c06878f 100644 --- a/src_main/geo/pigeoposition.cpp +++ b/src_main/geo/pigeoposition.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Class for geo position storage and conversions + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pigeoposition.h" const double PIGeoPosition::one_cm_tolerance = 0.01; // One centimeter tolerance. @@ -382,12 +401,6 @@ double PIGeoPosition::radiusEarth(double geolat, PIEllipsoidModel ell) { } -//PIGeoPosition &PIGeoPosition::operator=(const PIGeoPosition &v) { -// *((PIMathVectorT3d*)(this)) = *((PIMathVectorT3d*)&v); -// return *this; -//} - - PIGeoPosition &PIGeoPosition::operator=(const PIMathVectorT3d &v) { *((PIMathVectorT3d*)(this)) = v; return *this; diff --git a/src_main/geo/pigeoposition.h b/src_main/geo/pigeoposition.h index dd922f67..c99647e0 100644 --- a/src_main/geo/pigeoposition.h +++ b/src_main/geo/pigeoposition.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Class for geo position storage and conversions - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -141,7 +141,6 @@ public: /// Returns as PIMathVectorT3d const PIMathVectorT3d & vector() const {return *this;} -// PIGeoPosition &operator=(const PIGeoPosition & v); PIGeoPosition &operator=(const PIMathVectorT3d & v); PIGeoPosition &operator-=(const PIGeoPosition &right); PIGeoPosition &operator+=(const PIGeoPosition &right); diff --git a/src_main/introspection/piintrospection_base.h b/src_main/introspection/piintrospection_base.h index 786af71f..6b86771d 100644 --- a/src_main/introspection/piintrospection_base.h +++ b/src_main/introspection/piintrospection_base.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - base macros and types Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINTROSPECTION_BASE_H diff --git a/src_main/introspection/piintrospection_containers.cpp b/src_main/introspection/piintrospection_containers.cpp index 764dbe25..2142a578 100644 --- a/src_main/introspection/piintrospection_containers.cpp +++ b/src_main/introspection/piintrospection_containers.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - interface for containers Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piintrospection_containers.h" diff --git a/src_main/introspection/piintrospection_containers.h b/src_main/introspection/piintrospection_containers.h index 6e827b86..23de690f 100644 --- a/src_main/introspection/piintrospection_containers.h +++ b/src_main/introspection/piintrospection_containers.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - interface for containers Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINTROSPECTION_CONTAINERS_H diff --git a/src_main/introspection/piintrospection_containers_p.cpp b/src_main/introspection/piintrospection_containers_p.cpp index be53a6e1..9fb274c0 100644 --- a/src_main/introspection/piintrospection_containers_p.cpp +++ b/src_main/introspection/piintrospection_containers_p.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - implementation of containers Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piintrospection_containers_p.h" diff --git a/src_main/introspection/piintrospection_containers_p.h b/src_main/introspection/piintrospection_containers_p.h index 7c29cf72..f9d24a71 100644 --- a/src_main/introspection/piintrospection_containers_p.h +++ b/src_main/introspection/piintrospection_containers_p.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - implementation of containers Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINTROSPECTION_CONTAINERS_P_H diff --git a/src_main/introspection/piintrospection_server.cpp b/src_main/introspection/piintrospection_server.cpp index 4a7a650d..2ea2a85f 100644 --- a/src_main/introspection/piintrospection_server.cpp +++ b/src_main/introspection/piintrospection_server.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifdef PIP_INTROSPECTION diff --git a/src_main/introspection/piintrospection_server.h b/src_main/introspection/piintrospection_server.h index e126ca78..19b5f655 100644 --- a/src_main/introspection/piintrospection_server.h +++ b/src_main/introspection/piintrospection_server.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINTROSPECTION_SERVER_H diff --git a/src_main/introspection/piintrospection_server_p.cpp b/src_main/introspection/piintrospection_server_p.cpp index d0ff0744..e5935f10 100644 --- a/src_main/introspection/piintrospection_server_p.cpp +++ b/src_main/introspection/piintrospection_server_p.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - Base server structs Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piintrospection_server_p.h" @@ -27,8 +27,6 @@ const uint PIIntrospection::sign = 0x0F1C2B3A; - - PIIntrospection::RequiredInfo::RequiredInfo() { types = itInfo; } @@ -39,18 +37,13 @@ PIIntrospection::ProcessInfo::ProcessInfo() { } - - PIIntrospection::ObjectInfo::ObjectInfo() { queued_events = 0; } - - PIIntrospection::ProcessInfo PIIntrospection::getInfo() { PIIntrospection::ProcessInfo ret; - PISystemInfo * si = PISystemInfo::instance(); ret.architecture = si->architecture; ret.execCommand = si->execCommand; @@ -60,9 +53,7 @@ PIIntrospection::ProcessInfo PIIntrospection::getInfo() { ret.OS_version = si->OS_version; ret.processorsCount = si->processorsCount; ret.user = si->user; - ret.build_options = PIInit::buildOptions(); - return ret; } diff --git a/src_main/introspection/piintrospection_server_p.h b/src_main/introspection/piintrospection_server_p.h index 181c6df7..d47b83da 100644 --- a/src_main/introspection/piintrospection_server_p.h +++ b/src_main/introspection/piintrospection_server_p.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - Base server structs Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINTROSPECTION_SERVER_P_H diff --git a/src_main/introspection/piintrospection_threads.cpp b/src_main/introspection/piintrospection_threads.cpp index 79346132..98d829d0 100644 --- a/src_main/introspection/piintrospection_threads.cpp +++ b/src_main/introspection/piintrospection_threads.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - interface for threads Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifdef PIP_INTROSPECTION diff --git a/src_main/introspection/piintrospection_threads.h b/src_main/introspection/piintrospection_threads.h index eb4ad442..e582ae07 100644 --- a/src_main/introspection/piintrospection_threads.h +++ b/src_main/introspection/piintrospection_threads.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - interface for threads Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINTROSPECTION_THREADS_H diff --git a/src_main/introspection/piintrospection_threads_p.cpp b/src_main/introspection/piintrospection_threads_p.cpp index 94cf1326..d872d479 100644 --- a/src_main/introspection/piintrospection_threads_p.cpp +++ b/src_main/introspection/piintrospection_threads_p.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - implementation of threads Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piintrospection_threads_p.h" @@ -36,9 +36,7 @@ PIIntrospectionThreads::PIIntrospectionThreads() { void PIIntrospectionThreads::threadNew(PIThread * t) { PIMutexLocker _ml(mutex); - //ThreadInfo & ti(threads[t]); threads.insert(t, ThreadInfo()); - //piCout << "register thread" << id << name; } diff --git a/src_main/introspection/piintrospection_threads_p.h b/src_main/introspection/piintrospection_threads_p.h index 3ae6c247..b9f12461 100644 --- a/src_main/introspection/piintrospection_threads_p.h +++ b/src_main/introspection/piintrospection_threads_p.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Introspection module - implementation of threads Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIINTROSPECTION_THREADS_P_H diff --git a/src_main/io_devices/pican.cpp b/src_main/io_devices/pican.cpp index 71f82417..de52c62c 100644 --- a/src_main/io_devices/pican.cpp +++ b/src_main/io_devices/pican.cpp @@ -1,3 +1,21 @@ +/* + PIP - Platform Independent Primitives + CAN + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ #include "pican.h" #include "pipropertystorage.h" #include "piincludes_p.h" @@ -18,14 +36,6 @@ #endif -//PRIVATE_DEFINITION_START(PICAN) -//#ifdef PIP_CAN -//int fd; -//spi_ioc_transfer spi_ioc_tr; -//#endif -//PRIVATE_DEFINITION_END(PICAN) - - REGISTER_DEVICE(PICAN) diff --git a/src_main/io_devices/pican.h b/src_main/io_devices/pican.h index 878b6174..a1e12c78 100644 --- a/src_main/io_devices/pican.h +++ b/src_main/io_devices/pican.h @@ -1,3 +1,25 @@ +/*! \file pican.h + * \brief CAN device +*/ +/* + PIP - Platform Independent Primitives + CAN + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #ifndef PICAN_H #define PICAN_H diff --git a/src_main/io_devices/piconfig.cpp b/src_main/io_devices/piconfig.cpp index d0452e4f..ed2c4d15 100755 --- a/src_main/io_devices/piconfig.cpp +++ b/src_main/io_devices/piconfig.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Config parser - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -17,12 +17,14 @@ along with this program. If not, see . */ -#include + #include "piconfig.h" #include "pifile.h" #include "piiostring.h" -#include "pistring_std.h" - +#ifdef PIP_STD_IOSTREAM +# include "pistring_std.h" +# include +#endif /*! \class PIConfig * \brief Configuration file * \details This class provide handle access to configuration file. @@ -258,7 +260,7 @@ void PIConfig::Entry::coutt(std::ostream & s, const PIString & p) const { void PIConfig::Entry::piCoutt(PICout s, const PIString & p) const { PIString nl = p + " "; if (!_value.isEmpty()) s << p << _name << " = " << _value << " (" << _type << " " << _comment << ")" << PICoutManipulators::NewLine; - else std::cout << p << _name << std::endl; + else s << p << _name << PICoutManipulators::NewLine; piForeachC (Entry * i, _children) i->piCoutt(s, nl); } @@ -620,8 +622,6 @@ PIString PIConfig::getPrefixFromLine(PIString line, bool * exists) { void PIConfig::writeAll() { //cout << this << " write < " << size() << endl; _clearDev(); - //*this << "1234567894132456798\n"; return; - //writeEntry(&root); buildFullNames(&root); Branch b = allLeaves(); PIString prefix, tprefix; @@ -635,7 +635,7 @@ void PIConfig::writeAll() { if (b[j]->_line == i) { b[j]->buildLine(); _writeDev((b[j]->_all).cutLeft(prefix.size()) + "\n"); - //cout << this << " " << b[j]->_all << endl; + //cout << this << " " << b[j]->_all << endl; ++j; } else { _writeDev(other[i]); @@ -647,7 +647,7 @@ void PIConfig::writeAll() { } if (i < other.size_s() - 1) _writeDev('\n'); - //cout << this << " " << other[i] << endl; + //cout << this << " " << other[i] << endl; } } else { _writeDev(other[i]); @@ -659,7 +659,7 @@ void PIConfig::writeAll() { } if (i < other.size_s() - 1) _writeDev('\n'); - //cout << this << " " << other[i] << endl; + //cout << this << " " << other[i] << endl; } } _flushDev(); @@ -787,7 +787,6 @@ void PIConfig::parse() { //piCout << "[PIConfig] str" << str.size() << str << str.toUTF8(); ind = str.find('='); if ((ind > 0) && (str[0] != '#')) { - //name = str.left(ind).trimmed(); tree = (prefix + str.left(ind).trimmed()).split(delim); if (tree.front() == "include") { name = str.mid(ind + 1).trimmed(); diff --git a/src_main/io_devices/piconfig.h b/src_main/io_devices/piconfig.h index aeba3861..943c9b08 100755 --- a/src_main/io_devices/piconfig.h +++ b/src_main/io_devices/piconfig.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Configuration parser and writer - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -94,8 +94,6 @@ public: bool isEntryExists(const PIString & name) const {piForeachC (Entry * i, *this) if (entryExists(i, name)) return true; return false;} int indexOf(const Entry * e) {for (int i = 0; i < size_s(); ++i) if (at(i) == e) return i; return -1;} - //void clear() {piForeach (Entry * i, *this) delete i; PIVector::clear();} - private: bool entryExists(const Entry * e, const PIString & name) const; void allLeaves(Branch & b, Entry * e) {piForeach (Entry * i, e->_children) {if (i->isLeaf()) b << i; else allLeaves(b, i);}} diff --git a/src_main/io_devices/pidir.cpp b/src_main/io_devices/pidir.cpp index e6e1cc54..c4db1962 100755 --- a/src_main/io_devices/pidir.cpp +++ b/src_main/io_devices/pidir.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Directory - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Directory + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes_p.h" #include "pidir.h" diff --git a/src_main/io_devices/pidir.h b/src_main/io_devices/pidir.h index e6157635..4873b252 100755 --- a/src_main/io_devices/pidir.h +++ b/src_main/io_devices/pidir.h @@ -2,22 +2,22 @@ * \brief Local directory */ /* - PIP - Platform Independent Primitives - Directory - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Directory + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIDIR_H diff --git a/src_main/io_devices/piethernet.cpp b/src_main/io_devices/piethernet.cpp index c670486d..4a6e33a5 100755 --- a/src_main/io_devices/piethernet.cpp +++ b/src_main/io_devices/piethernet.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Ethernet, UDP/TCP Broadcast/Multicast - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Ethernet, UDP/TCP Broadcast/Multicast + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes_p.h" #include "piethernet.h" @@ -216,7 +216,6 @@ PIEthernet::PIEthernet(): PIIODevice("", ReadWrite) { construct(); setType(UDP); setParameters(PIEthernet::ReuseAddress | PIEthernet::MulticastLoop | PIEthernet::KeepConnection); - //if (type_ != UDP) init(); } @@ -297,13 +296,9 @@ bool PIEthernet::init() { } if (params[PIEthernet::ReuseAddress]) ethSetsockoptBool(sock, SOL_SOCKET, SO_REUSEADDR); if (params[PIEthernet::Broadcast]) ethSetsockoptBool(sock, SOL_SOCKET, SO_BROADCAST); - //if (type() == PIEthernet::TCP_Client) ethSetsockoptBool(sock, SOL_SOCKET, SO_KEEPALIVE); applyTimeouts(); applyOptInt(IPPROTO_IP, IP_TTL, TTL()); // piCoutObj << "inited" << path(); - //cout << "inited " << sock << ": bc = " << params << endl; - //fcntl(sock, F_SETFL, 0/*O_NONBLOCK*/); - //piCoutObj << "init" << sock; return true; } @@ -360,7 +355,6 @@ bool PIEthernet::openDevice() { init(); if (sock == -1 || path().isEmpty()) return false; addr_r.set(path()); - //Address::splitIPPort(path(), &ip_, &port_); if (type() == TCP_Client) connecting_ = true; if (type() != UDP || mode() == PIIODevice::WriteOnly) @@ -387,7 +381,6 @@ bool PIEthernet::openDevice() { opened_ = true; while (!mcast_queue.isEmpty()) joinMulticastGroup(mcast_queue.dequeue()); - //cout << "!" << endl; applyTimeouts(); applyOptInt(IPPROTO_IP, IP_TTL, TTL()); addr_lr.clear(); @@ -479,9 +472,6 @@ bool PIEthernet::joinMulticastGroup(const PIString & group) { return true; } PIFlags params = parameters(); -//#ifndef QNX - //if (!params[Broadcast]) - //;piCoutObj << "Warning: \"Broadcast\" parameter not set, \"joinMulticastGroup(\"" << group << "\")\" may be useless!"; addr_r.set(path()); #ifndef FREERTOS struct ip_mreqn mreq; @@ -508,11 +498,6 @@ bool PIEthernet::joinMulticastGroup(const PIString & group) { mreq.imr_interface.s_addr = addr_r.ip(); #endif -/*#ifndef WINDOWS - PIEthernet::InterfaceList il = interfaces(); - const PIEthernet::Interface * ci = il.getByAddress(ip_); - if (ci != 0) mreq.imr_ifindex = ci->index; -#endif*/ //piCout << "join group" << group << "ip" << ip_ << "with index" << mreq.imr_ifindex << "socket" << sock; mreq.imr_multiaddr.s_addr = inet_addr(group.dataAscii()); if (ethSetsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) != 0) { @@ -522,20 +507,6 @@ bool PIEthernet::joinMulticastGroup(const PIString & group) { if (params[PIEthernet::MulticastLoop]) ethSetsockoptInt(sock, IPPROTO_IP, IP_MULTICAST_LOOP); applyOptInt(IPPROTO_IP, IP_MULTICAST_TTL, multicastTTL()); if (!mcast_groups.contains(group)) mcast_groups << group; -//#else -// parseAddress(path(), &ip_, &port_); -// struct ip_mreq mreq; -// memset(&mreq, 0, sizeof(mreq)); -// mreq.imr_interface.s_addr = inet_addr(ip_.dataAscii()); -// mreq.imr_multiaddr.s_addr = inet_addr(group.dataAscii()); -// if (ethSetsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) != 0) { -// piCoutObj << "Can`t join multicast group " << group << ", " << ethErrorString(); -// return false; -// } -// if (params[PIEthernet::MulticastLoop]) ethSetsockoptInt(sock, IPPROTO_IP, IP_MULTICAST_LOOP); -// applyOptInt(IPPROTO_IP, IP_MULTICAST_TTL, multicastTTL()); -// if (!mcast_groups.contains(group)) mcast_groups << group; -//#endif return true; } @@ -601,22 +572,6 @@ bool PIEthernet::connect(bool threaded) { connected(); } return connected_; - /*if (sock == -1) return false; - memset(addr_, 0, sizeof(*addr_)); - parseAddress(path_, &ip_, &port_); - PRIVATE->addr_.sin_port = htons(port_); - PRIVATE->addr_.sin_addr.s_addr = inet_addr(ip_.data()); - PRIVATE->addr_.sin_family = AF_INET; -#ifdef QNX - PRIVATE->addr_.sin_len = sizeof(*addr_); -#endif - //piCoutObj << "connect to " << ip << ":" << port_; - connected_ = (::connect(sock, (sockaddr * )addr_, sizeof(*addr_)) == 0); - if (!connected_) - piCoutObj << "Can`t connect to " << ip_ << ":" << port_ << ", " << ethErrorString(); - opened_ = connected_; - if (connected_) connected(); - return connected_;*/ } @@ -664,7 +619,7 @@ bool PIEthernet::listen(bool threaded) { return true; } -//#include + int PIEthernet::readDevice(void * read_to, int max_size) { //piCout << "read" << sock; if (sock == -1) init(); @@ -704,10 +659,8 @@ int PIEthernet::readDevice(void * read_to, int max_size) { PRIVATE->addr_.sin_len = sizeof(PRIVATE->addr_); #endif //piCoutObj << "connect to " << ip_ << ":" << port_ << "..."; - //qDebug() << "connect to " << ip_.data() << ":" << port_ << sock << PRIVATE->addr_.sin_addr.s_addr << "..."; connected_ = (::connect(sock, (sockaddr * )&(PRIVATE->addr_), sizeof(PRIVATE->addr_)) == 0); //piCoutObj << "connect to " << ip_ << ":" << port_ << connected_; - //qDebug() << "connect to " << ip_.data() << ":" << port_ << connected_; if (!connected_) piCoutObj << "Can`t connect to" << addr_r << "," << ethErrorString(); opened_ = connected_; @@ -717,13 +670,11 @@ int PIEthernet::readDevice(void * read_to, int max_size) { } else piMSleep(10); //piCout << "connected to" << path(); - //qDebug() << "connected to" << path().data(); } if (!connected_) return -1; errorClear(); rs = ethRecv(sock, read_to, max_size); //piCoutObj << "readed" << rs; - //qDebug() << "readed" << rs; if (rs <= 0) { lerr = ethErrorCore(); //piCoutObj << "readed error" << lerr << errorString().data() << parameters()[DisonnectOnTimeout]; @@ -735,7 +686,6 @@ int PIEthernet::readDevice(void * read_to, int max_size) { if ((lerr == EWOULDBLOCK || lerr == EAGAIN) && !parameters()[DisonnectOnTimeout]) { #endif //piCoutObj << errorString(); - //piMSleep(10); return -1; } if (connected_) { @@ -749,7 +699,6 @@ int PIEthernet::readDevice(void * read_to, int max_size) { //piCoutObj << "eth" << ip_ << "disconnected"; } if (rs > 0) received(read_to, rs); - //qDebug() << "return from read" << rs; return rs; case UDP: memset(&PRIVATE->raddr_, 0, sizeof(PRIVATE->raddr_)); @@ -757,14 +706,11 @@ int PIEthernet::readDevice(void * read_to, int max_size) { if (rs > 0) { addr_lr.set(uint(PRIVATE->raddr_.sin_addr.s_addr), ntohs(PRIVATE->raddr_.sin_port)); //piCoutObj << "read from" << ip_r << ":" << port_r << rs << "bytes"; - //piCout << "received from" << lastReadAddress(); received(read_to, rs); } //else piCoutObj << "read returt" << rs << ", error" << ethErrorString(); return rs; - //return ::read(sock, read_to, max_size); default: break; - //return ::read(sock, (char * )read_to, max_size); } return -1; } @@ -801,8 +747,7 @@ int PIEthernet::writeDevice(const void * data, int max_size) { return ret; case UDP: PRIVATE->saddr_.sin_port = htons(addr_s.port()); - /*if (params[PIEthernet::Broadcast]) PRIVATE->saddr_.sin_addr.s_addr = INADDR_BROADCAST; - else*/ PRIVATE->saddr_.sin_addr.s_addr = addr_s.ip(); + PRIVATE->saddr_.sin_addr.s_addr = addr_s.ip(); PRIVATE->saddr_.sin_family = AF_INET; //piCoutObj << "write to" << ip_s << ":" << port_s << "socket" << sock_s << max_size << "bytes ..."; return ethSendto(sock_s, data, max_size, @@ -843,7 +788,6 @@ int PIEthernet::writeDevice(const void * data, int max_size) { } return ret; default: break; - //return ::read(sock, read_to, max_size); } return -1; } @@ -907,10 +851,6 @@ void PIEthernet::server_func(void * eth) { ce->clients_mutex.unlock(); ce->newConnection(e); //cout << "connected " << ip << endl; - //char d[256]; - //cout << " recv " << recv(s, d, 256, 0) << endl; - //cout << recv(ce->clients_.back()->sock, d, 256, 0) << endl; - } @@ -1029,8 +969,6 @@ PIEthernet::InterfaceList PIEthernet::interfaces() { ci.index = pAdapter->Index; ci.mac = macFromBytes(PIByteArray(pAdapter->Address, pAdapter->AddressLength)); ci.flags = PIEthernet::ifActive | PIEthernet::ifRunning; - //if (ret->ifa_flags & IFF_BROADCAST) ci.flags |= PIEthernet::ifBroadcast; - //if (ret->ifa_flags & IFF_MULTICAST) ci.flags |= PIEthernet::ifMulticast; if (pAdapter->Type == MIB_IF_TYPE_PPP) ci.flags |= PIEthernet::ifPTP; if (pAdapter->Type == MIB_IF_TYPE_LOOPBACK) ci.flags |= PIEthernet::ifLoopback; ci.broadcast.clear(); @@ -1047,10 +985,6 @@ PIEthernet::InterfaceList PIEthernet::interfaces() { il << ci; as = as->Next; } - /*if (ci.flags[PIEthernet::ifBroadcast]) - ci.broadcast = getSockAddr(ret->ifa_broadaddr); - if (ci.flags[PIEthernet::ifPTP]) - ci.ptp = getSockAddr(ret->ifa_dstaddr);*/ pAdapter = pAdapter->Next; } } else @@ -1060,40 +994,6 @@ PIEthernet::InterfaceList PIEthernet::interfaces() { #else #ifdef FREERTOS #else -/*# ifdef QNX - PIStringList il, sl; - PIProcess proc; - proc.setGrabOutput(true); - proc.exec(ifconfigPath.c_str(), "-l"); - if (!proc.waitForFinish(1000)) return sl; - PIString out(proc.readOutput()); - il = out.split(" "); - il.removeAll(""); - piForeachC (PIString & i, il) { - proc.exec(ifconfigPath.c_str(), i); - if (!proc.waitForFinish(1000)) return il; - sl << i.trimmed(); - out = proc.readOutput(); - int al = out.length(); - al = (al - out.replaceAll("alias", "").length()) / 5; - for (int j = 0; j < al; ++j) - sl << i.trimmed() + ":" + PIString::fromNumber(j); - } - return sl; -# else - PIStringList sl; - PIProcess proc; - proc.setGrabOutput(true); - proc.exec(ifconfigPath.c_str(), "-s"); - if (!proc.waitForFinish(1000)) return sl; - PIString out(proc.readOutput()); - out.cutLeft(out.find('\n') + 1); - while (!out.isEmpty()) { - sl << out.left(out.find(' ')); - out.cutLeft(out.find('\n') + 1); - } - return sl; -# endif*/ # ifdef ANDROID struct ifconf ifc; int s = ::socket(AF_INET, SOCK_STREAM, IPPROTO_IP); @@ -1222,38 +1122,6 @@ PIEthernet::Address PIEthernet::interfaceAddress(const PIString & interface_) { PIVector PIEthernet::allAddresses() { -/*#ifdef WINDOWS - PIStringList al; - PIString ca; - PIP_ADAPTER_INFO pAdapterInfo, pAdapter = 0; - int ret = 0; - ulong ulOutBufLen = sizeof(IP_ADAPTER_INFO); - pAdapterInfo = (IP_ADAPTER_INFO * ) HeapAlloc(GetProcessHeap(), 0, (sizeof (IP_ADAPTER_INFO))); - if (pAdapterInfo == 0) { - piCout << "[PIEthernet] Error allocating memory needed to call GetAdaptersinfo"; - return PIStringList(); - } - if (GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) == ERROR_BUFFER_OVERFLOW) { - HeapFree(GetProcessHeap(), 0, (pAdapterInfo)); - pAdapterInfo = (IP_ADAPTER_INFO *) HeapAlloc(GetProcessHeap(), 0, (ulOutBufLen)); - if (pAdapterInfo == 0) { - piCout << "[PIEthernet] Error allocating memory needed to call GetAdaptersinfo"; - return PIStringList(); - } - } - if ((ret = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen)) == NO_ERROR) { - pAdapter = pAdapterInfo; - while (pAdapter) { - ca = PIString(pAdapter->IpAddressList.IpAddress.String); - if (ca != "0.0.0.0") al << ca; - pAdapter = pAdapter->Next; - } - } else - piCout << "[PIEthernet] GetAdaptersInfo failed with error: " << ret; - if (pAdapterInfo) - HeapFree(GetProcessHeap(), 0, (pAdapterInfo)); - return al; -#else*/ PIEthernet::InterfaceList il = interfaces(); PIVector
ret; bool has_127 = false; @@ -1266,13 +1134,11 @@ PIVector PIEthernet::allAddresses() { // piCout << "[PIEthernet::allAddresses]" << al; if (!has_127) ret << Address("127.0.0.1"); return ret; - //#endif } // System wrap - int PIEthernet::ethErrorCore() { #ifdef WINDOWS return WSAGetLastError(); diff --git a/src_main/io_devices/piethernet.h b/src_main/io_devices/piethernet.h index b0b27fc1..bab074b3 100755 --- a/src_main/io_devices/piethernet.h +++ b/src_main/io_devices/piethernet.h @@ -2,22 +2,22 @@ * \brief Ethernet device */ /* - PIP - Platform Independent Primitives - Ethernet, UDP/TCP Broadcast/Multicast - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Ethernet, UDP/TCP Broadcast/Multicast + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIETHERNET_H @@ -211,8 +211,6 @@ public: //! Returns parameters PIFlags parameters() const {return (PIFlags)(property(PIStringAscii("parameters")).toInt());} - //PIByteArray macAddress() {if (!init_) init(); struct ifreq ifr; memset(&ifr, 0, sizeof(ifr)); memcpy(ifr.ifr_name, "eth0", 5); ioctl(sock, SIOCSIFHWADDR, &ifr); return PIByteArray(&ifr.ifr_hwaddr.sa_data, 6);} - //! Returns %PIEthernet type Type type() const {return (Type)(property(PIStringAscii("type")).toInt());} diff --git a/src_main/io_devices/pifile.cpp b/src_main/io_devices/pifile.cpp index 34252d15..cc9d0d9c 100755 --- a/src_main/io_devices/pifile.cpp +++ b/src_main/io_devices/pifile.cpp @@ -16,6 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ + #include "piincludes_p.h" #include "pifile.h" #include "pidir.h" @@ -153,15 +154,6 @@ bool PIFile::openTemporary(PIIODevice::DeviceMode mode) { } -//PIFile::PIFile(const PIFile & other) { -// PRIVATE->fd = 0; -// fdi = -1; -// setPrecision(other.prec_); -// setPath(other.path()); -// mode_ = other.mode_; -//} - - bool PIFile::openDevice() { close(); PIString p = path(); @@ -632,20 +624,6 @@ PIFile::FileInfo PIFile::fileInfo(const PIString & path) { ret.size = filesize.QuadPart; ret.time_access = FILETIME2PIDateTime(fi.ftLastAccessTime); ret.time_modification = FILETIME2PIDateTime(fi.ftLastWriteTime); - /*PIByteArray sec; - DWORD sec_n(0); - //SECURITY_DESCRIPTOR sec; - GetFileSecurity(path.data(), DACL_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION, (SECURITY_DESCRIPTOR*)sec.data(), 0, &sec_n); - sec.resize(sec_n); - GetFileSecurity(path.data(), DACL_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION, (SECURITY_DESCRIPTOR*)sec.data(), sec.size(), &sec_n); - errorClear(); - SID sid; BOOL def; - GetSecurityDescriptorGroup((PSECURITY_DESCRIPTOR)sec.data(), &sid, &def); - char * s(0); - ConvertSidToStringSid((PSID)&sid, s); - piCout << s; - LocalFree(s); - //ret.id_user = ;*/ } CloseHandle(hFile); #else @@ -708,7 +686,6 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info) if (!info.perm_user.write) attr |= FILE_ATTRIBUTE_READONLY; if (SetFileAttributes((LPCTSTR)(fp.data()), attr) == 0) { piCout << "[PIFile] applyFileInfo: \"SetFileAttributes\" error:" << errorString(); - //return false; } HANDLE hFile = 0; if ((attr & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY) { @@ -724,7 +701,6 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info) } CloseHandle(hFile); #else -//#ifndef ESP_PLATFORM int mode(0); if (info.perm_user.read) mode |= S_IRUSR; if (info.perm_user.write) mode |= S_IWUSR; @@ -737,11 +713,9 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info) if (info.perm_other.exec) mode |= S_IXOTH; if (chmod(fp.data(), mode) != 0) { piCout << "[PIFile] applyFileInfo: \"chmod\" error:" << errorString(); - //return false; } if (chown(fp.data(), info.id_user, info.id_group) != 0) { piCout << "[PIFile] applyFileInfo: \"chown\" error:" << errorString(); - //return false; } struct timeval tm[2]; PISystemTime st = info.time_access.toSystemTime(); @@ -752,9 +726,7 @@ bool PIFile::applyFileInfo(const PIString & path, const PIFile::FileInfo & info) tm[1].tv_usec = st.nanoseconds / 1000; if (utimes(fp.data(), tm) != 0) { piCout << "[PIFile] applyFileInfo: \"utimes\" error:" << errorString(); - //return false; } -//#endif #endif return true; } diff --git a/src_main/io_devices/pifile.h b/src_main/io_devices/pifile.h index 4c2fc5a5..e8af7626 100755 --- a/src_main/io_devices/pifile.h +++ b/src_main/io_devices/pifile.h @@ -2,22 +2,22 @@ * \brief Local file */ /* - PIP - Platform Independent Primitives - File + PIP - Platform Independent Primitives + File Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIFILE_H @@ -91,13 +91,8 @@ public: //! Open temporary file with open mode "mode" bool openTemporary(PIIODevice::DeviceMode mode = PIIODevice::ReadWrite); -// PIFile(const PIFile & other); - ~PIFile() {closeDevice();} - //PIFile & operator =(const PIFile & f) {path_ = f.path_; type_ = f.type_; return *this;} - - //! Immediate write all buffered data to disk void flush(); @@ -112,7 +107,6 @@ public: //! Move read/write position to text line number "line" void seekToLine(llong line); - //void fill(char c) {stream.fill(c);} //! Read one char and return it char readChar(); @@ -178,8 +172,6 @@ public: //! Write to file binary content of "v" PIFile & writeBinary(const double v) {write(&v, sizeof(v)); return *this;} - //PIFile & operator =(const PIFile & f) {PIIODevice::setPath(f.path()); mode_ = f.mode_; return *this;} - //! Write to file text representation of "v" PIFile & operator <<(const char v); //! Write to file string "v" @@ -209,7 +201,6 @@ public: //! Write to file text representation of "v" with precision \a precision() PIFile & operator <<(double v); - //! Read from file text representation of "v" PIFile & operator >>(char & v); //! Read from file text representation of "v" diff --git a/src_main/io_devices/pigpio.cpp b/src_main/io_devices/pigpio.cpp index d6d0f9e4..808983f5 100644 --- a/src_main/io_devices/pigpio.cpp +++ b/src_main/io_devices/pigpio.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives GPIO Andrey Bychkov work.a.b@yandex.ru, Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "pigpio.h" @@ -139,7 +139,6 @@ bool PIGPIO::getPinState(int gpio_num) { } } //piCoutObj << "pinState" << gpio_num << ":" << ret << (int)r << errorString(); - //initGPIO(gpio_num, PIGPIO::In); TODO: discuss - why? #endif return false; } @@ -193,7 +192,7 @@ void PIGPIO::end() { } -void PIGPIO::initPin(int gpio_num, Direction dir) { //, PullUpDownControl pull) { +void PIGPIO::initPin(int gpio_num, Direction dir) { #ifdef GPIO_SYS_CLASS PIMutexLocker ml(mutex); GPIOData & g(gpio_[gpio_num]); diff --git a/src_main/io_devices/pigpio.h b/src_main/io_devices/pigpio.h index ea8dc4b6..cd2b91e7 100644 --- a/src_main/io_devices/pigpio.h +++ b/src_main/io_devices/pigpio.h @@ -2,22 +2,22 @@ * \brief GPIO */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives GPIO Andrey Bychkov work.a.b@yandex.ru, Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIGPIO_H @@ -38,16 +38,12 @@ public: In /** Input direction (read) */, Out /** Output direction (write) */ }; - //enum PullUpDownControl {NoPull, PullUp, PullDown}; - //! \brief Returns singleton object of %PIGPIO static PIGPIO * instance(); - //! \brief Initialize pin \"gpio_num\" for \"dir\" mode - void initPin(int gpio_num, Direction dir = PIGPIO::In);//, PullUpDownControl pull); - + void initPin(int gpio_num, Direction dir = PIGPIO::In); //! \brief Set pin \"gpio_num\" value to \"value\" void pinSet (int gpio_num, bool value); @@ -61,7 +57,6 @@ public: //! \brief Returns pin \"gpio_num\" state bool pinState(int gpio_num); - //! \brief Starts watch for pin \"gpio_num\". //! \details Pins watching starts only with \a PIThread::start() function! //! This function doesn`t affect thread state @@ -77,7 +72,6 @@ public: //! This function doesn`t affect thread state void clearWatch(); - EVENT2(pinChanged, int, gpio_num, bool, new_value) //! \events diff --git a/src_main/io_devices/piiobytearray.cpp b/src_main/io_devices/piiobytearray.cpp index 34a445d1..395c5f03 100644 --- a/src_main/io_devices/piiobytearray.cpp +++ b/src_main/io_devices/piiobytearray.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - PIIODevice wrapper around PIByteArray - Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + PIP - Platform Independent Primitives + PIIODevice wrapper around PIByteArray + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piiobytearray.h" @@ -27,8 +27,6 @@ * This class sllow you to use PIByteArray as PIIODevice and pass it to, e.g. PIConfig */ -//REGISTER_DEVICE(PIIOByteArray); - PIIOByteArray::PIIOByteArray(PIByteArray *buffer, PIIODevice::DeviceMode mode) { open(buffer, mode); diff --git a/src_main/io_devices/piiobytearray.h b/src_main/io_devices/piiobytearray.h index 0874a93b..1656519f 100644 --- a/src_main/io_devices/piiobytearray.h +++ b/src_main/io_devices/piiobytearray.h @@ -2,22 +2,22 @@ * \brief PIIODevice wrapper around PIByteArray */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives PIIODevice wrapper around PIByteArray - Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIIOBYTEARRAY_H diff --git a/src_main/io_devices/piiodevice.cpp b/src_main/io_devices/piiodevice.cpp index 54e6480a..f4919052 100755 --- a/src_main/io_devices/piiodevice.cpp +++ b/src_main/io_devices/piiodevice.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Abstract input/output device - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Abstract input/output device + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piiodevice.h" @@ -191,7 +191,6 @@ void PIIODevice::_init() { // setThreadedReadBufferSize(512); #else threaded_read_buffer_size = 4096; -// setThreadedReadBufferSize(4096); #endif timer.setName("__S__.PIIODevice.reopen_timer"); write_thread.setName("__S__.PIIODevice.write_thread"); @@ -268,7 +267,6 @@ void PIIODevice::begin() { //cout << " ok\n"; return; } - //init(); if (!timer.isRunning() && isReopenEnabled()) timer.start(reopenTimeout()); } diff --git a/src_main/io_devices/piiodevice.h b/src_main/io_devices/piiodevice.h index a1ecba52..d23d1541 100755 --- a/src_main/io_devices/piiodevice.h +++ b/src_main/io_devices/piiodevice.h @@ -2,22 +2,22 @@ * \brief Abstract input/output device */ /* - PIP - Platform Independent Primitives - Abstract input/output device - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Abstract input/output device + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIIODEVICE_H @@ -209,9 +209,6 @@ public: //! Write maximum "max_size" bytes of "data" to device int write(const void * data, int max_size) {return writeDevice(data, max_size);} - //int write(const PIByteArray & data) {return writeDevice(data.data(), data.size_s());} - - //! Read from device for "timeout_ms" milliseconds and return readed data as PIByteArray. Timeout should to be greater than 0 PIByteArray readForTime(double timeout_ms); diff --git a/src_main/io_devices/piiodevicesmodule.h b/src_main/io_devices/piiodevicesmodule.h index ddb10efc..2a8c3443 100644 --- a/src_main/io_devices/piiodevicesmodule.h +++ b/src_main/io_devices/piiodevicesmodule.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Module includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Module includes + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIIODEVICESMODULE_H diff --git a/src_main/io_devices/piiostring.cpp b/src_main/io_devices/piiostring.cpp index 43cb5671..62999b10 100644 --- a/src_main/io_devices/piiostring.cpp +++ b/src_main/io_devices/piiostring.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - PIIODevice wrapper around PIString - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + PIIODevice wrapper around PIString + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piiostring.h" @@ -27,8 +27,6 @@ * This class allow you to use PIString as PIIODevice and pass it to, e.g. PIConfig */ -//REGISTER_DEVICE(PIIOString); - PIIOString::PIIOString(PIString * string, PIIODevice::DeviceMode mode) { open(string, mode); diff --git a/src_main/io_devices/piiostring.h b/src_main/io_devices/piiostring.h index 5be7eab4..e16b7244 100644 --- a/src_main/io_devices/piiostring.h +++ b/src_main/io_devices/piiostring.h @@ -2,22 +2,22 @@ * \brief PIIODevice wrapper around PIString */ /* - PIP - Platform Independent Primitives - PIIODevice wrapper around PIString - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + PIIODevice wrapper around PIString + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIIOSTRING_H diff --git a/src_main/io_devices/pipeer.cpp b/src_main/io_devices/pipeer.cpp index fe519f03..260812f6 100755 --- a/src_main/io_devices/pipeer.cpp +++ b/src_main/io_devices/pipeer.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Peer - named I/O ethernet node + PIP - Platform Independent Primitives + Peer - named I/O ethernet node Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "pipeer.h" @@ -79,7 +79,6 @@ PIPeer::PeerData::~PeerData() { void PIPeer::PeerData::dtThread() { - // << "send DT ..."; dt_out.send(data); //piCoutObj << "send DT done"; } @@ -172,13 +171,10 @@ PIPeer::PIPeer(const PIString & n): PIIODevice(), inited__(false), eth_tcp_srv(P read_buffer_size = 128; self_info.dist = 0; self_info.time = PISystemTime::current(); - //joinMulticastGroup("239.240.241.242"); randomize(); - //id_ = self_info.name + "_" + PIString::fromNumber(randomi()); CONNECTU(&sync_timer, tickEvent, this, timerEvent); prev_ifaces = PIEthernet::interfaces(); no_timer = false; -// initNetwork(); sync_timer.addDelimiter(5); } @@ -231,7 +227,6 @@ void PIPeer::timerEvent(void * data, int delim) { checkNetwork(); break; } - //send("broadcast", 9); } @@ -269,7 +264,6 @@ void PIPeer::initEths(PIStringList al) { void PIPeer::initMBcasts(PIStringList al) { -// destroyMBcasts(); PIEthernet * ce; const PIEthernet::Interface * cint; PIString nm; @@ -316,7 +310,6 @@ void PIPeer::initMBcasts(PIStringList al) { //piCoutObj << "invalid address for bcast" << a; } } -// eth_lo.setDebug(false); eth_lo.setName("__S__PIPeer_eth_loopback"); eth_lo.setParameters(PIEthernet::SeparateSockets); eth_lo.init(); @@ -398,17 +391,6 @@ PIPeer::PeerInfo * PIPeer::quickestPeer(const PIString & to) { if (!peers_map.contains(to)) return 0; //piCout << "*** search quickest peer" << to; PIVector tp = addresses_map.value(to); - /*PeerInfo * dp = 0; - int mping = 0x7FFFFFFF; - for (int i = 0; i < tp.size_s(); ++i) { - int p = tp[i]->ping(); - if (mping > p && p > 0) { - mping = p; - dp = tp[i]; - } - } - //piCout << "*** search quickest peer: found" << (dp ? dp->name : "0"); - return dp;*/ if (tp.isEmpty()) return 0; return tp.back(); } @@ -471,7 +453,6 @@ bool PIPeer::dataRead(uchar * readed, int size) { int type, cnt; PIString from, to; ba >> type; -// PIMutexLocker locker(eth_mutex); eth_mutex.lock(); // piCout << "dataRead lock"; if (type == 5) { // ping request @@ -728,10 +709,8 @@ bool PIPeer::mbcastRead(uchar * data, int size) { bool PIPeer::sendToNeighbour(PIPeer::PeerInfo * peer, const PIByteArray & ba) { - //if (peer->_neth == 0) return false; PIEthernet::Address addr = peer->fastestAddress(); //piCout << "[PIPeer] sendToNeighbour" << peer->name << addr << ba.size_s() << "bytes ..."; - //bool ok = peer->_neth->send(peer->_naddress, ba.data(), ba.size_s()); send_mutex.lock(); bool ok = eth_send.send(addr, ba); //piCout << "[PIPeer] sendToNeighbour" << (ok ? "ok" : "fail"); @@ -745,17 +724,11 @@ void PIPeer::sendMBcast(const PIByteArray & ba) { send_mc_mutex.lock(); // piCout << "sendMBcast" << ba.size() << "bytes ..."; piForeach (PIEthernet * e, eths_mcast) { - //errorClear(); - //piCout << "send to" << e->path() << e->sendAddress();// << e->send(ba); - //piCout << PIEthernet::ethErrorString(); if (e->isOpened()) if (e->send(ba)) diag_s.sended(ba.size_s()); } piForeach (PIEthernet * e, eths_bcast) { - //errorClear(); - //piCout << "send to" << e->path() << e->sendAddress();// << e->send(ba); - //piCout << PIEthernet::ethErrorString(); if (e->isOpened()) if (e->send(ba)) diag_s.sended(ba.size_s()); @@ -864,10 +837,6 @@ bool PIPeer::openDevice() { diag_s.reset(); //piCoutObj << "open..."; return true; -// PIMutexLocker ml(peers_mutex); -// if (trust_peer.isEmpty()) -// return !peers.isEmpty(); -// return hasPeer(trust_peer); } @@ -931,8 +900,6 @@ void PIPeer::checkNetwork() { void PIPeer::reinit() { no_timer = true; -// timer.stop(); -// timer.clearDelimiters(); PIMutexLocker mbl(mc_mutex); PIMutexLocker ethl(eth_mutex); // piCout << "reinit lock"; @@ -940,14 +907,6 @@ void PIPeer::reinit() { PIMutexLocker sl(send_mutex); initNetwork(); sendSelfInfo(); -// eth_send.close(); -// eth_lo.stopThreadedRead(); -// eth_lo.close(); -// eth_send.init(); -// eth_send.open(); -// eth_lo.startThreadedRead(); -// timer.addDelimiter(5); -// timer.start(1000); no_timer = false; if (!sync_timer.isRunning()) sync_timer.start(1000); } diff --git a/src_main/io_devices/pipeer.h b/src_main/io_devices/pipeer.h index f8395ad9..c142b81b 100755 --- a/src_main/io_devices/pipeer.h +++ b/src_main/io_devices/pipeer.h @@ -2,22 +2,22 @@ * \brief Peering net node */ /* - PIP - Platform Independent Primitives - Peer - named I/O ethernet node, forming self-organized peering network - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Peer - named I/O ethernet node, forming self-organized peering network + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIPEER_H @@ -47,7 +47,6 @@ public: struct PeerAddress { PeerAddress(const PIEthernet::Address & a = PIEthernet::Address(), const PIEthernet::Address & m = PIEthernet::Address("255.255.255.0")); bool isAvailable() const {return ping > 0;} - //inline const Address & operator =(const Address & v) {address = v.address; netmask = v.netmask; piCout << "!!!!!!!!!" << last_ping; return *this;} PIEthernet::Address address; PIEthernet::Address netmask; double ping; // ms diff --git a/src_main/io_devices/piserial.cpp b/src_main/io_devices/piserial.cpp index b0301d2a..88d24bf1 100755 --- a/src_main/io_devices/piserial.cpp +++ b/src_main/io_devices/piserial.cpp @@ -1,21 +1,22 @@ /* - PIP - Platform Independent Primitives - COM + PIP - Platform Independent Primitives + COM Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + #include "piincludes_p.h" #include "piserial.h" #include "piconfig.h" @@ -627,16 +628,6 @@ void PISerial::applySettings() { PRIVATE->desc.Parity = params[PISerial::ParityOdd] ? 1 : 2; } PRIVATE->desc.StopBits = params[PISerial::TwoStopBits] ? TWOSTOPBITS : ONESTOPBIT; - - /*PRIVATE->desc.fOutxCtsFlow = 0; - PRIVATE->desc.fOutxDsrFlow = 0; - PRIVATE->desc.fDtrControl = 0; - PRIVATE->desc.fRtsControl = 0; - PRIVATE->desc.fInX = 0; - PRIVATE->desc.fOutX = 0; - PRIVATE->desc.fBinary = 1; - PRIVATE->desc.fAbortOnError = 0; - PRIVATE->desc.fNull = 0;*/ if (SetCommState(PRIVATE->hCom, &PRIVATE->desc) == -1) { piCoutObj << "Unable to set comm state for \"" << path() << "\""; return; @@ -704,7 +695,6 @@ int PISerial::readDevice(void * read_to, int max_size) { if (!canRead()) return -1; if (sending) return -1; // piCoutObj << "com event ..."; - //WaitCommEvent(PRIVATE->hCom, 0, 0); //piCoutObj << "read ..." << PRIVATE->hCom; ReadFile(PRIVATE->hCom, read_to, max_size, &PRIVATE->readed, 0); DWORD err = GetLastError(); @@ -729,12 +719,6 @@ int PISerial::writeDevice(const void * data, int max_size) { return -1; } #ifdef WINDOWS -// if (block_write != wait) { -// block_write = wait; -// piCoutObj << "set timeout ..."; -// setReadIsBlocking(block_read); -// piCoutObj << "set timeout ok"; -// } DWORD wrote; // piCoutObj << "send ...";// << max_size;// << ": " << PIString((char*)data, max_size); sending = true; @@ -943,24 +927,6 @@ PIVector PISerial::availableDevicesInfo(bool test) { PIVector ret; DeviceInfo di; #ifdef WINDOWS - /*HKEY key = 0; - RegOpenKey(HKEY_LOCAL_MACHINE, (LPCTSTR)"HARDWARE\\DEVICEMAP\\SERIALCOMM", &key); - if (key != 0) { - char name[1024], data[1024]; - DWORD index = 0; - LONG res = ERROR_SUCCESS; - while (res != ERROR_NO_MORE_ITEMS) { - memset(name, 0, 1024); - memset(data, 0, 1024); - DWORD name_len = 1024, data_len = 1024, type = 0; - res = RegEnumValue(key, index, (LPTSTR)name, &name_len, NULL, &type, (uchar * )data, &data_len); - if (res == ERROR_NO_MORE_ITEMS) break; - di.path = PIString(data, data_len).trim(); - ret << di; - index++; - } - RegCloseKey(key); - }*/ static const GUID guids[] = {GUID_DEVINTERFACE_MODEM, GUID_DEVINTERFACE_COMPORT}; static const int guids_cnt = sizeof(guids) / sizeof(GUID); for (int i = 0; i < guids_cnt; ++i) { @@ -1076,17 +1042,7 @@ PIVector PISerial::availableDevicesInfo(bool test) { continue; } bool rok = true; -#ifdef WINDOWS - /*COMMTIMEOUTS times; - times.ReadIntervalTimeout = MAXDWORD; - times.ReadTotalTimeoutConstant = 0; - times.ReadTotalTimeoutMultiplier = 0; - times.WriteTotalTimeoutConstant = 1; - times.WriteTotalTimeoutMultiplier = 0; - SetCommTimeouts(hComm, ×); - if (ReadFile(hComm, &void_, 1, &readed_, 0) == 0) - rok = GetLastError() == ;*/ -#else +#ifndef WINDOWS int void_ = 0; fcntl(fd, F_SETFL, O_NONBLOCK); if (::read(fd, &void_, 1) == -1) @@ -1122,7 +1078,6 @@ void PISerial::threadedReadBufferSizeChanged() { //piCoutObj << "b" << ss.xmit_fifo_size; ss.xmit_fifo_size = piMaxi(threadedReadBufferSize(), 4096); ioctl(fd, TIOCSSERIAL, &ss); - //ioctl(fd, TIOCGSERIAL, &ss); //piCoutObj << "a" << ss.xmit_fifo_size; #endif } diff --git a/src_main/io_devices/piserial.h b/src_main/io_devices/piserial.h index e52fec2f..bd264b98 100755 --- a/src_main/io_devices/piserial.h +++ b/src_main/io_devices/piserial.h @@ -2,22 +2,22 @@ * \brief Serial device */ /* - PIP - Platform Independent Primitives - COM + PIP - Platform Independent Primitives + COM Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISERIAL_H @@ -161,8 +161,6 @@ public: void setVTime(int t) {vtime = t; applySettings();} - - //! Returns device name PIString device() const {return path();} @@ -174,17 +172,14 @@ public: int VTime() const {return vtime;} - //! Discard all buffered input and output data void flush(); - int read(void * read_to, int max_size) {return readDevice(read_to, max_size);} bool read(void * read_to, int max_size, double timeout_ms); PIString read(int size = -1, double timeout_ms = 1000.); PIByteArray readData(int size = -1, double timeout_ms = 1000.); - //! \brief Write to device data "data" with maximum size "size" and wait for data written if "wait" is \b true. //! \returns \b true if sended bytes count = "size" bool send(const void * data, int size); diff --git a/src_main/io_devices/pisharedmemory.cpp b/src_main/io_devices/pisharedmemory.cpp index 377414ae..63e43293 100644 --- a/src_main/io_devices/pisharedmemory.cpp +++ b/src_main/io_devices/pisharedmemory.cpp @@ -1,21 +1,22 @@ /* - PIP - Platform Independent Primitives - File + PIP - Platform Independent Primitives + File Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + #include "piincludes_p.h" #include "pisharedmemory.h" #include "pipropertystorage.h" @@ -152,7 +153,6 @@ bool PISharedMemory::closeDevice() { //piCoutObj << "close" << PIString(PRIVATE->name) << PRIVATE->data; if (PRIVATE->data) munmap(PRIVATE->data, dsize); if (PRIVATE->owner) { - //if (!PRIVATE->name.isEmpty()) { //piCout << "unlink" << PIString(PRIVATE->name); shm_unlink((const char *)PRIVATE->name.data()); } diff --git a/src_main/io_devices/pisharedmemory.h b/src_main/io_devices/pisharedmemory.h index cc471c06..f00046e8 100644 --- a/src_main/io_devices/pisharedmemory.h +++ b/src_main/io_devices/pisharedmemory.h @@ -2,22 +2,22 @@ * \brief Shared memory */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Shared Memory Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISHAREDMEMORY_H @@ -88,7 +88,6 @@ private: int dsize; PRIVATE_DECLARATION - }; diff --git a/src_main/io_devices/pispi.cpp b/src_main/io_devices/pispi.cpp index b2ca12a7..eaa26732 100644 --- a/src_main/io_devices/pispi.cpp +++ b/src_main/io_devices/pispi.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + SPI + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pispi.h" #include "pipropertystorage.h" #include "piincludes_p.h" diff --git a/src_main/io_devices/pispi.h b/src_main/io_devices/pispi.h index 442312ca..82d19ef5 100644 --- a/src_main/io_devices/pispi.h +++ b/src_main/io_devices/pispi.h @@ -1,3 +1,25 @@ +/*! \file pispi.h + * \brief SPI device +*/ +/* + PIP - Platform Independent Primitives + SPI + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #ifndef PISPI_H #define PISPI_H diff --git a/src_main/io_devices/pitransparentdevice.cpp b/src_main/io_devices/pitransparentdevice.cpp index 6255ccbb..a82d301f 100644 --- a/src_main/io_devices/pitransparentdevice.cpp +++ b/src_main/io_devices/pitransparentdevice.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives PIIODevice that pass write to read Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "pitransparentdevice.h" @@ -61,9 +61,6 @@ int PITransparentDevice::writeDevice(const void * data, int max_size) { } - - - bool PITransparentDevice::openDevice() { return true; } diff --git a/src_main/io_devices/pitransparentdevice.h b/src_main/io_devices/pitransparentdevice.h index c03c286c..c3cb73ad 100644 --- a/src_main/io_devices/pitransparentdevice.h +++ b/src_main/io_devices/pitransparentdevice.h @@ -2,22 +2,22 @@ * \brief PIIODevice that pass write to read */ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives PIIODevice that pass write to read Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PITRANSPARENTDEVICE_H diff --git a/src_main/io_devices/piusb.h b/src_main/io_devices/piusb.h index e4d16a34..ce729734 100755 --- a/src_main/io_devices/piusb.h +++ b/src_main/io_devices/piusb.h @@ -132,7 +132,6 @@ protected: void configureFromFullPathDevice(const PIString & full_path); int readDevice(void * read_to, int max_size); int writeDevice(const void * data, int max_size); - //bool init(); bool openDevice(); bool closeDevice(); DeviceInfoFlags deviceInfoFlags() const {return PIIODevice::Reliable;} diff --git a/src_main/io_utils/pibasetransfer.cpp b/src_main/io_utils/pibasetransfer.cpp index 3ac42ae1..59a00ea1 100644 --- a/src_main/io_utils/pibasetransfer.cpp +++ b/src_main/io_utils/pibasetransfer.cpp @@ -1,5 +1,23 @@ -#include "pibasetransfer.h" +/* + PIP - Platform Independent Primitives + Base class for reliable send and receive data in fixed packets with error correction, pause and resume + Andrey Bychkov work.a.b@yandex.ru + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include "pibasetransfer.h" const uint PIBaseTransfer::signature = 0x54424950; @@ -16,7 +34,6 @@ PIBaseTransfer::PIBaseTransfer(): crc(standardCRC_16()), diag(false) { send_up = 0; timeout_ = 10.; diag.setDisconnectTimeout(timeout_ / 10); - //CONNECTU(&diag, qualityChanged, this, diagChanged); diag.setName("PIBaseTransfer"); diag.start(50); packets_count = 10; @@ -144,7 +161,6 @@ void PIBaseTransfer::received(PIByteArray data) { // piCoutObj << "Done Packet" << h.id; } if (is_receiving && h.id == 0) { -// if (checkSession() == 0 && pt == pt_ReplySuccess) finish_receive(true); if (pt == pt_ReplySuccess) { mutex_session.lock(); int cs = checkSession(); @@ -183,8 +199,6 @@ void PIBaseTransfer::received(PIByteArray data) { } if (is_receiving) { if (header.session_id != h.session_id) { - //sendBreak(h.session_id); - //return; piCoutObj << "restart receive"; mutex_header.unlock(); finish_receive(false, true); @@ -214,7 +228,6 @@ void PIBaseTransfer::received(PIByteArray data) { replies.fill(pt_Unknown); pm_string.resize(replies.size(), '-'); diag.reset(); -// diag.start(100); //piCoutObj << "receiveStarted()"; is_receiving = true; break_ = false; @@ -261,7 +274,6 @@ bool PIBaseTransfer::send_process() { packet_header_size = sizeof(PacketHeader) + customHeader().size(); break_ = false; diag.reset(); -// diag.start(100); sendStarted(); is_sending = true; int session_size = session.size(); @@ -278,14 +290,12 @@ bool PIBaseTransfer::send_process() { send_up = 0; send_tm.reset(); mutex_send.unlock(); - //int ltm = 0; for (int i = 0; i < session_size; i++) { mutex_send.lock(); int sq = send_queue; mutex_send.unlock(); if (sq >= packets_count || is_pause) { --i; - //piMSleep(PIP_MIN_MSLEEP); if (is_pause) { piMSleep(40); //piCout << "send pause"; @@ -368,9 +378,7 @@ bool PIBaseTransfer::send_process() { send_queue++; mutex_send.unlock(); } - // if (chk == -1) return finish_send(false); if (break_) return finish_send(false); - //piMSleep(PIP_MIN_MSLEEP); } return finish_send(false); } @@ -410,7 +418,6 @@ void PIBaseTransfer::buildSession(PIVector parts) { fi.id = parts[i].id; //piCout << fi.id << state_string; bytes_all += parts[i].size; - //fi.size = fi.entry.size; fi.start = 0; llong rest = parts[i].size - (packet_size - cur_size); //piCout << i << fi.size << rest << bytes_all; @@ -494,8 +501,7 @@ bool PIBaseTransfer::getStartRequest() { mutex_session.lock(); if (replies[0] == pt_ReplySuccess) { state_string = "send permited!"; - //packets_count = piClampi(10 / tm.elapsed_m(), 2, 100); - //piCoutObj << "ping " << tm.elapsed_m() << packets_count; + //piCoutObj << "ping " << tm.elapsed_m(); mutex_session.unlock(); return true; } @@ -528,9 +534,7 @@ void PIBaseTransfer::processData(int id, PIByteArray & data) { while (!data.isEmpty()) { ba.clear(); data >> fi; - //if (fi.size > 0) data >> ba; - //fi.fsize = ba.size(); bytes_cur += fi.size; //piCoutObj << "recv" << fi; session[id - 1] << fi; @@ -549,7 +553,6 @@ PIByteArray PIBaseTransfer::build_packet(int id) { PIByteArray ret; PIByteArray ba; //piCoutObj << "session id" << header.session_id; - //ret << header; ret.append(customHeader()); mutex_session.lock(); for (int i = 0; i < session[id].size_s(); i++) { @@ -587,7 +590,6 @@ bool PIBaseTransfer::finish_send(bool ok) { mutex_header.unlock(); //piCoutObj << state_string << PIString::readableSize(bytes_all); sendFinished(ok); -// diag.stop(); bytes_all = bytes_cur = 0; return ok; } @@ -604,7 +606,6 @@ void PIBaseTransfer::finish_receive(bool ok, bool quet) { } //piCoutObj << state_string << PIString::readableSize(bytes_all); receiveFinished(ok); -// diag.stop(); bytes_all = bytes_cur = 0; } diff --git a/src_main/io_utils/pibasetransfer.h b/src_main/io_utils/pibasetransfer.h index 585c92d2..3cf281f1 100644 --- a/src_main/io_utils/pibasetransfer.h +++ b/src_main/io_utils/pibasetransfer.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Base class for reliable send and receive data in fixed packets with error correction, pause and resume - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/io_utils/piconnection.cpp b/src_main/io_utils/piconnection.cpp index 7013e0fc..ddafa147 100644 --- a/src_main/io_utils/piconnection.cpp +++ b/src_main/io_utils/piconnection.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Complex I/O point + PIP - Platform Independent Primitives + Complex I/O point Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piconnection.h" @@ -152,7 +152,6 @@ bool PIConnection::configure(PIConfig & conf, const PIString & name_) { PIIODevice * dev = addDevice(fn, dm); if (!dev) continue; dev_aliases[n] = fn; - //device_names[n] = dev; setDeviceName(dev, n); dev->setName(name_ + ".device." + dev_list[i]); PIConfig::Entry de = ce.getValue("device." + n); @@ -357,7 +356,6 @@ PIIODevice * PIConnection::addDevice(const PIString & full_path, PIIODevice::Dev void PIConnection::setDeviceName(PIIODevice * dev, const PIString & name) { if (!dev) return; device_names[name] = dev; - //dev->setProperty(); } @@ -522,7 +520,6 @@ PIPacketExtractor * PIConnection::addFilter(PIPacketExtractor * filter, const PI } if (!e->devices.contains(dev)) { bounded_extractors[dev] << e->extractor; - //if (PIString(dev->className()) == "PIPacketExtractor") dev->setThreadSafe(false); e->devices << dev; } return e->extractor; @@ -1124,7 +1121,6 @@ void __DevicePool_threadReadDP(void * ddp) { if (!dev->open()) {piMSleep(dev->reopenTimeout()); return;} PIByteArray ba; ba = dev->read(dev->threadedReadBufferSize()); -// dd->dev->threadedRead(ba.data(), ba.size()); if (ba.isEmpty()) {piMSleep(10); return;} dev->threadedRead(ba.data(), ba.size_s()); dev->threadedReadEvent(ba.data(), ba.size_s()); diff --git a/src_main/io_utils/piconnection.h b/src_main/io_utils/piconnection.h index 3d2606da..5af11b52 100644 --- a/src_main/io_utils/piconnection.h +++ b/src_main/io_utils/piconnection.h @@ -2,22 +2,22 @@ * \brief Complex I/O point */ /* - PIP - Platform Independent Primitives - Complex I/O point - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Complex I/O point + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICONNECTION_H @@ -43,7 +43,6 @@ public: ~PIConnection(); - /*! \brief Configure connection from config file "config" from section "name". Returns if configuration was successful * \details \b Warning: all devices, filters and channels removed before configure! */ bool configureFromConfig(const PIString & config, const PIString & name = PIStringAscii("connection")); @@ -84,7 +83,6 @@ public: //! Returns all devices bounded to this connection PIVector boundedDevices() const; - /*! \brief Add filter with name "name" to device with full path "full_path_name" or filter "full_path_name" * \details If there is no filter with name "name", connection create new with split mode "mode" and bound * to it device "full_path_name" or filter "full_path_name". If filter with name "name" already exists, @@ -115,7 +113,6 @@ public: //! Remove all filters from connection void removeAllFilters(); - //! Returns all filters of connection PIVector filters() const; @@ -128,7 +125,6 @@ public: //! Returns all devices bounded to filter "name" PIVector filterBoundedDevices(const PIString & name) const; - /*! \brief Add to connection channel from "name_from" to "name_to" * \details "name_from" and "name_to" can be full pathes of devices or device names or filter names. * Returns \b false if there if no such device or filter, else create channel and returns \b true */ @@ -171,7 +167,6 @@ public: //! Returns all channels of this connection as full pathes or filter names pair array (from, to) PIVector > channels() const; - /*! \brief Add to connection sender with name "name" device with full path "full_path" * \details If there is no sender with name "name", connection create new, bound * to it device "full_path_name" and start sender timer with frequency "frequency". @@ -209,7 +204,6 @@ public: //! Remove from connection all senders void removeAllSenders(); - //! Start read thread of device with full path "full_path" void startThreadedRead(const PIString & full_path_name); @@ -259,7 +253,6 @@ public: //! Returns PIDiagnostics * assosiated with device or filter "dev" PIDiagnostics * diagnostic(const PIIODevice * dev) const {return diags_.value(const_cast(dev), 0);} - //! Write data "data" to device with full path "full_path" and returns result of \a write() function of device int writeByFullPath(const PIString & full_path, const PIByteArray & data); @@ -269,7 +262,6 @@ public: //! Write data "data" to device "dev" and returns result of \a write() function of device int write(PIIODevice * dev, const PIByteArray & data); - //! Returns all connections in application static PIVector allConnections(); @@ -407,7 +399,6 @@ private: PIMap diags_; static PIVector _connections; - }; void __DevicePool_threadReadDP(void * ddp); diff --git a/src_main/io_utils/pidatatransfer.cpp b/src_main/io_utils/pidatatransfer.cpp index 97a596fb..b6e2eba0 100644 --- a/src_main/io_utils/pidatatransfer.cpp +++ b/src_main/io_utils/pidatatransfer.cpp @@ -1,17 +1,36 @@ +/* + PIP - Platform Independent Primitives + Class for send and receive PIByteArray via PIBaseTransfer + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pidatatransfer.h" PIByteArray PIDataTransfer::buildPacket(Part fi) { PIByteArray ba; ba.resize(fi.size); - memcpy(ba.data(), data_.data(fi.start), fi.size); + memcpy(ba.data(), data_.data(fi.start), fi.size); return ba; } void PIDataTransfer::receivePart(Part fi, PIByteArray ba, PIByteArray pheader) { if (data_.size() < fi.start + fi.size) data_.resize(fi.start + fi.size); - memcpy(data_.data(fi.start), ba.data(), ba.size_s()); + memcpy(data_.data(fi.start), ba.data(), ba.size_s()); } diff --git a/src_main/io_utils/pidatatransfer.h b/src_main/io_utils/pidatatransfer.h index 92c8bad9..4dce5b17 100644 --- a/src_main/io_utils/pidatatransfer.h +++ b/src_main/io_utils/pidatatransfer.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Class for send and receive PIByteArray via PIBaseTransfer - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -25,6 +25,7 @@ #include "pibasetransfer.h" + class PIP_EXPORT PIDataTransfer: public PIBaseTransfer { PIOBJECT_SUBCLASS(PIDataTransfer, PIBaseTransfer) @@ -39,7 +40,6 @@ private: virtual PIByteArray buildPacket(Part p); virtual void receivePart(PIBaseTransfer::Part fi, PIByteArray ba, PIByteArray pheader); PIByteArray data_; - }; diff --git a/src_main/io_utils/pidiagnostics.cpp b/src_main/io_utils/pidiagnostics.cpp index d67d19ee..35ff2197 100644 --- a/src_main/io_utils/pidiagnostics.cpp +++ b/src_main/io_utils/pidiagnostics.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Speed and quality in/out diagnostics - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Speed and quality in/out diagnostics + Andrey Bychkov work.a.b@yandex.ru, Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "pidiagnostics.h" @@ -37,8 +37,6 @@ * */ - - PIDiagnostics::State::State() { immediate_freq = integral_freq = 0.f; received_packets_per_sec = 0ull; @@ -71,7 +69,6 @@ PIDiagnostics::PIDiagnostics(bool start_): PITimer(/*PITimer::Pool*/) { PIDiagnostics::~PIDiagnostics() { //piCout << "~PIDiagnostics start..."; - //PITimer::stop(); //piCout << "~PIDiagnostics done!"; } @@ -179,8 +176,6 @@ void PIDiagnostics::tick(void * , int ) { cur_state.sended_bytes_per_sec = ullong(double(send.bytes_ok) / its); } //piCoutObj << "tick" << recv.cnt_ok << send.cnt_ok; -// speedRecv = PIString::readableSize(ullong(double(history_rec.front().bytes_ok) / hz)) + "/s"; -// speedSend = PIString::readableSize(ullong(double(history_send.front().bytes_ok) / hz)) + "/s"; cur_state.receive_speed = PIString::readableSize(cur_state.received_bytes_per_sec) + "/s"; cur_state.send_speed = PIString::readableSize(cur_state.sended_bytes_per_sec) + "/s"; int arc = recv.cnt_ok + recv.cnt_fail; @@ -237,7 +232,6 @@ void PIDiagnostics::propertyChanged(const PIString &) { void PIDiagnostics::changeDisconnectTimeout(float disct) { - //PITimer::stop(); mutex_state.lock(); disconn_ = piMaxf(disct, interval() / 1000.f); if (interval() > 0) { @@ -251,15 +245,5 @@ void PIDiagnostics::changeDisconnectTimeout(float disct) { } //piCoutObj << hist_size << disconn_ << interval(); mutex_state.unlock(); - //PITimer::start(); } - -//void PIDiagnostics::constLock() const { -// const_cast(this)->lock(); -//} - - -//void PIDiagnostics::constUnlock() const { -// const_cast(this)->unlock(); -//} diff --git a/src_main/io_utils/pidiagnostics.h b/src_main/io_utils/pidiagnostics.h index 7201bda2..74a69348 100644 --- a/src_main/io_utils/pidiagnostics.h +++ b/src_main/io_utils/pidiagnostics.h @@ -2,22 +2,22 @@ * \brief Connection quality diagnostics */ /* - PIP - Platform Independent Primitives - Speed and quality in/out diagnostics - Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + PIP - Platform Independent Primitives + Speed and quality in/out diagnostics + Andrey Bychkov work.a.b@yandex.ru, Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIDIAGNOSTICS_H @@ -77,44 +77,6 @@ public: //! Returns period of full disconnect in seconds and period of averaging frequency void setDisconnectTimeout(float s) {setProperty("disconnectTimeout", s);} - /* - //! Returns immediate receive frequency, packets/s - float immediateFrequency() const {return cur_state.immediate_freq;} - - //! Returns integral receive frequency for \a disconnectTimeout() seconds, packets/s - float integralFrequency() const {return cur_state.integral_freq;} - - //! Returns correct received packets per second - ullong receiveCountPerSec() const {return cur_state.received_packets_per_sec;} - - //! Returns sended packets per second - ullong sendCountPerSec() const {return cur_state.sended_packets_per_sec;} - - //! Returns correct received bytes per second - ullong receiveBytesPerSec() const {return cur_state.received_bytes_per_sec;} - - //! Returns sended bytes per second - ullong sendBytesPerSec() const {return cur_state.sended_bytes_per_sec;} - - //! Returns overall correct received bytes - ullong receiveBytes() const {return cur_state.received_bytes;} - - //! Returns overall wrong received bytes - ullong wrongBytes() const {return cur_state.received_bytes_wrong;} - - //! Returns overall sended bytes - ullong sendBytes() const {return cur_state.sended_bytes;} - - //! Returns overall correct received packets count - ullong receiveCount() const {return cur_state.received_packets;} - - //! Returns overall wrong received packets count - ullong wrongCount() const {return cur_state.received_packets_wrong;} - - //! Returns overall sended packets count - ullong sendCount() const {return cur_state.sended_packets;} - */ - //! Returns connection quality PIDiagnostics::Quality quality() const; @@ -124,55 +86,9 @@ public: //! Returns send speed in format "n {B|kB|MB|GB|TB}/s" PIString sendSpeed() const; - /* DEPRECATED - //! Returns immediate receive frequency pointer, packets/s. Useful for output to PIConsole - const float * immediateFrequency_ptr() const {return &cur_state.immediate_freq;} - - //! Returns integral receive frequency pointer for period, packets/s. Useful for output to PIConsole - const float * integralFrequency_ptr() const {return &cur_state.integral_freq;} - - //! Returns correct received packets per second pointer. Useful for output to PIConsole - const ullong * receiveCountPerSec_ptr() const {return &cur_state.received_packets_per_sec;} - - //! Returns sended packets per second pointer. Useful for output to PIConsole - const ullong * sendCountPerSec_ptr() const {return &cur_state.sended_packets_per_sec;} - - //! Returns correct received bytes per second pointer. Useful for output to PIConsole - const ullong * receiveBytesPerSec_ptr() const {return &cur_state.received_bytes_per_sec;} - - //! Returns sended bytes per second pointer. Useful for output to PIConsole - const ullong * sendBytesPerSec_ptr() const {return &cur_state.sended_bytes_per_sec;} - - //! Returns overall correct received bytes pointer. Useful for output to PIConsole - const ullong * receiveBytes_ptr() const {return &cur_state.received_bytes;} - - //! Returns overall wrong received bytes pointer. Useful for output to PIConsole - const ullong * wrongBytes_ptr() const {return &cur_state.received_bytes_wrong;} - - //! Returns overall sended bytes pointer. Useful for output to PIConsole - const ullong * sendBytes_ptr() const {return &cur_state.sended_bytes;} - - //! Returns overall correct received packets count pointer. Useful for output to PIConsole - const ullong * receiveCount_ptr() const {return &cur_state.received_packets;} - - //! Returns overall wrong received packets count pointer. Useful for output to PIConsole - const ullong * wrongCount_ptr() const {return &cur_state.received_packets_wrong;} - - //! Returns overall sended packets count pointer. Useful for output to PIConsole - const ullong * sendCount_ptr() const {return &cur_state.sended_packets;} - - //! Returns connection quality pointer. Useful for output to PIConsole - const int * quality_ptr() const {return (int * )&cur_state.quality;} - - //! Returns receive speed pointer in format "n {B|kB|MB|GB|TB}/s". Useful for output to PIConsole - const PIString * receiveSpeed_ptr() const {return &cur_state.receive_speed;} - - //! Returns send speed pointer in format "n {B|kB|MB|GB|TB}/s". Useful for output to PIConsole - const PIString * sendSpeed_ptr() const {return &cur_state.send_speed;}*/ EVENT_HANDLER0(void, start) {PITimer::start(100.); changeDisconnectTimeout(disconn_);} EVENT_HANDLER1(void, start, double, msecs) {if (msecs > 0.) {PITimer::start(msecs); changeDisconnectTimeout(disconn_);}} - //EVENT_HANDLER0(void, stop) {PITimer::stop();} EVENT_HANDLER0(void, reset); EVENT_HANDLER1(void, received, int, size) {received(size, true);} @@ -224,8 +140,6 @@ private: Entry calcHistory(PIQueue & hist, int & cnt); void propertyChanged(const PIString &); void changeDisconnectTimeout(float disct); -// void constLock() const; -// void constUnlock() const; PIQueue history_rec, history_send; float disconn_; diff --git a/src_main/io_utils/pifiletransfer.cpp b/src_main/io_utils/pifiletransfer.cpp index 5366597b..290e5c13 100644 --- a/src_main/io_utils/pifiletransfer.cpp +++ b/src_main/io_utils/pifiletransfer.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Class for send and receive files and directories via PIBaseTransfer + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pifiletransfer.h" const char PIFileTransfer::sign[] = {'P', 'F', 'T'}; @@ -11,7 +30,6 @@ PIFileTransfer::PIFileTransfer() { dir = PIDir::current(); started_ = scanning = false; bytes_file_all = bytes_file_cur = 0; -// CONNECT(void, this, sendStarted, this, send_started); CONNECT(void, this, receiveStarted, this, receive_started); CONNECT1(void, bool, this, sendFinished, this, send_finished); CONNECT1(void, bool, this, receiveFinished, this, receive_finished); @@ -72,7 +90,6 @@ bool PIFileTransfer::sendFiles(const PIVector &files) { PIStringList names; //piCoutObj << "prepare to send" << files_.size() << "files"; for (int i = 0; i < files_.size_s(); i++) { - //files_[i].path = dir.relative(files_[i].path); if (names.contains(files_[i].path)) { files_.remove(i); --i; @@ -212,10 +229,6 @@ PIByteArray PIFileTransfer::buildPacket(Part p) { return PIByteArray(); } } - //if (fi.isDir()) { - // piCout << "create dir" << fi.path; - // dir.make(fi.path); - //} cur_file_string = fi.path; bytes_file_all = fi.size; bytes_file_cur = p.start; diff --git a/src_main/io_utils/pifiletransfer.h b/src_main/io_utils/pifiletransfer.h index 49c457a8..d4d778db 100644 --- a/src_main/io_utils/pifiletransfer.h +++ b/src_main/io_utils/pifiletransfer.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Class for send and receive files and directories via PIBaseTransfer - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -103,7 +103,6 @@ private: virtual void receivePart(Part fi, PIByteArray ba, PIByteArray pheader); virtual PIByteArray buildPacket(Part fi); virtual PIByteArray customHeader(); - // EVENT_HANDLER(void, send_started); EVENT_HANDLER(void, receive_started); EVENT_HANDLER1(void, send_finished, bool, ok); EVENT_HANDLER1(void, receive_finished, bool, ok); diff --git a/src_main/io_utils/piioutilsmodule.h b/src_main/io_utils/piioutilsmodule.h index 70e7f9b6..a012138e 100644 --- a/src_main/io_utils/piioutilsmodule.h +++ b/src_main/io_utils/piioutilsmodule.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Module includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Module includes + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIIOUTILSMODULE_H diff --git a/src_main/io_utils/pipacketextractor.cpp b/src_main/io_utils/pipacketextractor.cpp index 344252d1..35e05b0c 100644 --- a/src_main/io_utils/pipacketextractor.cpp +++ b/src_main/io_utils/pipacketextractor.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Packets extractor - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/io_utils/pipacketextractor.h b/src_main/io_utils/pipacketextractor.h index 1b6e5706..52657bf9 100644 --- a/src_main/io_utils/pipacketextractor.h +++ b/src_main/io_utils/pipacketextractor.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Packets extractor - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -109,13 +109,13 @@ public: //! Returns missed by validating functions bytes count ullong missedBytes() const {return missed;} - // //! Returns missed by validating functions packets count, = missedBytes() / packetSize - ullong missedPackets() const {/*if (packetSize_hf == 0) return missed; return missed / packetSize_hf*/; return missed_packets;} + //! Returns missed by validating functions packets count, = missedBytes() / packetSize + ullong missedPackets() const {return missed_packets;} //! Returns pointer to \a missedBytes() count. Useful for output to PIConsole const ullong * missedBytes_ptr() const {return &missed;} - // //! Returns pointer to \a missedPackets() count. Useful for output to PIConsole + //! Returns pointer to \a missedPackets() count. Useful for output to PIConsole const ullong * missedPackets_ptr() const {return &missed_packets;} //! Add data to extractor, raise \a packetReceived() if packet is ready diff --git a/src_main/math/picompress.h b/src_main/math/picompress.h index f2f883fd..ce7e8d89 100644 --- a/src_main/math/picompress.h +++ b/src_main/math/picompress.h @@ -1,3 +1,25 @@ +/*! \file picompress.h + * \brief Compress class using zlib +*/ +/* + PIP - Platform Independent Primitives + Compress class using zlib + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #ifndef PICOMPRESS_H #define PICOMPRESS_H diff --git a/src_main/math/picrc.h b/src_main/math/picrc.h index bbbe4104..e18f9440 100755 --- a/src_main/math/picrc.h +++ b/src_main/math/picrc.h @@ -2,22 +2,22 @@ * \brief CRC checksum calculator */ /* - PIP - Platform Independent Primitives - CRC checksum calculator - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + CRC checksum calculator + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICRC_H @@ -159,8 +159,6 @@ private: }; -//template -//inline std::ostream & operator <<(std::ostream & s, const uint_cl & v) {std::ios::fmtflags f = s.flags(); s << std::hex; for (uint i = 0; i < v.length(); ++i) {s << int(v.data()[i]); if (v.data()[i] < 0x10) s << '0'; s << ' ';} s.flags(f); return s;} inline uchar reverseByte(uchar b) { uchar ret = 0; diff --git a/src_main/math/pievaluator.cpp b/src_main/math/pievaluator.cpp index 34a8e417..884e5941 100755 --- a/src_main/math/pievaluator.cpp +++ b/src_main/math/pievaluator.cpp @@ -166,8 +166,6 @@ PIEvaluatorContent::PIEvaluatorContent() { addFunction("defined", 1); addFunction("round", 1); clearCustomVariables(); - //addVariable("n", 0.); - //addVariable("x1", 123); } @@ -195,19 +193,12 @@ void PIEvaluatorContent::clearCustomVariables() { void PIEvaluatorContent::sortVariables() { - //Variable tv; for (uint i = 0; i < variables.size(); i++) { for (uint j = variables.size() - 1; j > i; j--) { if (variables[j].name.length() <= variables[i].name.length()) continue; piSwap(variables[i], variables[j]); } } - /* - * qDebug() << "---"; - * for (int i = 0; i < variables.size(); i++) { - * qDebug() << variables[i].name; - } - */ } @@ -258,6 +249,7 @@ BaseFunctions PIEvaluatorContent::getBaseFunction(const PIString & name) { return bfUnknown; } + const PIString & PIEvaluator::prepare(const PIString & string) { currentString = string.trimmed(); if (currentString.isEmpty()) currentString = "0"; @@ -402,18 +394,15 @@ bool PIEvaluator::fillElements() { elements[i].var_num = -666; } currentVariables.clear(); - //qDebug().nospace() << "search for functions ..."; for (int i = 0; i < content.functionsCount(); i++) { curfind = content.function(i).identifier; - cfunc = i; //(int)content.function(i).type; + cfunc = i; flen = curfind.length(); fstart = 0; while (fstart >= 0) { fstart = tmps.find(curfind, fstart); if (fstart < 0) break; if (tmps[fstart + flen] != '(') { - //currentString.insert(fstart + flen, "("); - //return true; fstart++; continue; } @@ -425,7 +414,6 @@ bool PIEvaluator::fillElements() { } } cnum = 0; - //qDebug().nospace() << "search for variables ..."; for (int i = 0; i < content.variablesCount(); i++) { curfind = content.variable(i).name; flen = curfind.length(); @@ -442,18 +430,11 @@ bool PIEvaluator::fillElements() { } curfind = ""; cnum = 1; - //qDebug().nospace() << "search for numbers ..."; for (int i = 0; i < tmps.length(); i++) { cc = tmps[i]; - /*if (cc == " " || cc == "(" || cc == ")") { - curfind = ""; - cpart = 0; - numFound = false; - continue; - }*/ switch (cpart) { case 0: - if ((cc >= '0' && cc <= '9')) {// || cc == '-' || cc == '+') { + if ((cc >= '0' && cc <= '9')) { curfind += cc; cpart = 1; continue; @@ -515,7 +496,6 @@ bool PIEvaluator::fillElements() { break; } if (numFound) { - //qDebug().nospace() << "add " << cnum << ": " << curfind << " = " << curfind.toDouble(); currentVariables.push_back(Variable("tmp" + PIString::fromNumber(cnum), curfind.toDouble())); for (int j = i - curfind.length(); j < i; j++) { elements[j].set(etNumber, cnum, -cnum); @@ -528,7 +508,6 @@ bool PIEvaluator::fillElements() { } } if (cpart > 0) { - //qDebug().nospace() << "add " << cnum << ": " << curfind << " = " << curfind.toDouble(); currentVariables.push_back(Variable("tmp" + PIString::fromNumber(cnum), curfind.toDouble())); for (int j = tmps.length() - curfind.length(); j < tmps.length(); j++) { elements[j].set(etNumber, cnum, -cnum); @@ -536,7 +515,6 @@ bool PIEvaluator::fillElements() { } } cc = nc = fc; - //qDebug().nospace() << "search for signes ..."; for (int i = 0; i < tmps.length(); i++) { cc = tmps[i]; if (i > 0) pc = tmps[i - 1]; @@ -559,7 +537,6 @@ bool PIEvaluator::fillElements() { ///cout << "found sign " << cc << " :" << cnum - 1 << endl; if (cc == '-' && currentVariables.size_s() >= cnum) currentVariables[cnum - 1].value = -currentVariables[cnum - 1].value; - //i++; continue; } } @@ -569,9 +546,7 @@ bool PIEvaluator::fillElements() { continue; } } - /* - qDebug().nospace() << tmps; - cout << " "; + /*cout << " "; for (int i = 0; i < elements.size(); i++) { switch (elements[i].type) { case etFunction: cout << "f"; break; @@ -580,10 +555,8 @@ bool PIEvaluator::fillElements() { case etVariable: cout << "v"; break; } } - cout << endl; - */ + cout << endl; */ return false; - //for (int i = 0; i < currentVariables.size(); i++) qDebug() << "var " << i << ": " << currentVariables[i].value.real(); } @@ -598,7 +571,6 @@ bool PIEvaluator::setSignes() { fc = tmps[i].toLower(); sc = tmps[ni].toLower(); pc = tmps[pi].toLower(); - //if (elements[i].type == etOperator || elements[ni].type == etVariable) continue; if (fc == ',' || sc == ',') continue; if (elements[i].type == etOperator && elements[ni].type == etOperator) continue; if (fc == ')' && (elements[ni].type == etNumber || elements[ni].type == etVariable || elements[ni].type == etFunction)) needInsert = 1; @@ -614,32 +586,13 @@ bool PIEvaluator::setSignes() { case 1: currentString.insert(ni + inserted, "*"); elements.insert(ni + inserted, Element(etOperator, -1)); - //inserted++; - //i++; return true; - /*case 2: - currentString.insert(ni + inserted, ")"); - currentString.insert(ni + inserted, "("); - elements.insert(ni + inserted, Element(etOperator, -1)); - elements.insert(ni + inserted, Element(etOperator, -1)); - inserted++; - i++; - return true;*/ case 3: currentString.insert(ni + inserted, "1*"); elements.insert(ni + inserted, Element(etOperator, -1)); - //inserted; - //i++; return true; } } - /*if (elements[tmps.length() - 1].type == etFunction) { - currentString.insert(tmps.length() + inserted, ")"); - currentString.insert(tmps.length() + inserted, "("); - elements.insert(tmps.length() + inserted, Element(etOperator, -1)); - elements.insert(tmps.length() + inserted, Element(etOperator, -1)); - return true; - }*/ return false; } @@ -658,7 +611,6 @@ void PIEvaluator::convert() { } currentString.replace(i, j - i, " "); for (int k = i + 1; k < j; k++) elements.remove(i); - //i++; } for (int i = 0; i < currentString.length(); i++) { pe = elements[i]; @@ -671,7 +623,6 @@ void PIEvaluator::convert() { } currentString.replace(i, j - i, " "); for (int k = i + 1; k < j; k++) elements.remove(i); - //i++; } for (int i = 0; i < currentString.length(); i++) { pe = elements[i]; @@ -684,10 +635,8 @@ void PIEvaluator::convert() { } currentString.replace(i, j - i, " "); for (int k = i + 1; k < j; k++) elements.remove(i); - //i++; } - /*qDebug().nospace() << currentString; - cout << " "; + /*cout << " "; for (int i = 0; i < elements.size(); i++) { switch (elements[i].type) { case etFunction: cout << "f"; break; @@ -696,7 +645,7 @@ void PIEvaluator::convert() { case etVariable: cout << "v"; break; } } - cout << endl;*/ + cout << endl; */ } @@ -707,7 +656,6 @@ PIString PIEvaluator::preprocess(const PIString & string) { ret = prepare(string); convert(); instructions.clear(); - //qDebug() << preproc->currentString; variables = currentVariables; lind = parse(currentString); if (instructions.size() == 0) { @@ -715,8 +663,7 @@ PIString PIEvaluator::preprocess(const PIString & string) { instructions.push_back(Instruction(oNone, PIVector(1, lind), -variables.size_s())); } kvars = &(content.variables); - /* - cout << endl << "variables:" << endl; + /*cout << endl << "variables:" << endl; for (int i = 0; i < variables.size(); i++) cout << i << " value = " << variables[i].value << endl; @@ -729,8 +676,7 @@ PIString PIEvaluator::preprocess(const PIString & string) { cout << instructions[i].operators[j] << "; "; cout << endl << " function " << instructions[i].function << endl; cout << " out " << instructions[i].out << endl; - } - */ + } */ makeOutput(ret); return ret; } @@ -745,9 +691,7 @@ int PIEvaluator::parse(const PIString & string, int offset) { PIVector args, atmp; PIVector opers; - ///qDebug() << "to parse :" + string; - ///cout << " "; for (int i = 0; i < slen; i++) cout << preproc->elements[i + offset].type; cout << endl; - + //cout << " "; for (int i = 0; i < slen; i++) cout << preproc->elements[i + offset].type; cout << endl; for (int i = 0; i < slen; i++) { ce = elements[i + offset]; cc = string[i]; @@ -761,16 +705,11 @@ int PIEvaluator::parse(const PIString & string, int offset) { case etFunction: i++; cfunc = content.function(ce.var_num); - //facnt = cfunc.arguments; atmp.clear(); bcnt = farg = 1; - ///qDebug() << "function: " + cfunc.identifier; - //for (int k = 0; k < facnt; k++) { carg = ""; k = i + 1; - //if (string.size_s() <= k || k < 0) return -666; while (bcnt > 0) { - //if (k < facnt - 1) fcomma = string.indexOf(',', j); cc = string[k]; switch (cc.toAscii()) { case '(': bcnt++; break; @@ -807,10 +746,8 @@ int PIEvaluator::parse(const PIString & string, int offset) { instructions.push_back(Instruction(oFunction, atmp, farg, ce.var_num)); args.push_back(farg); //for (int i = 0; i < args.size_s(); i++) cout << preproc->currentVariables[-args[i]].value << endl; - //i = j + 1; continue; case etOperator: - //qDebug() << "operator: " << cc; if (cc == '(') { sbrackets = inBrackets(string.right(slen - i)); args.push_back(parse(sbrackets, i + offset + 1)); @@ -833,12 +770,10 @@ int PIEvaluator::parse(const PIString & string, int offset) { if (cc == '|') {opers.push_back(oOr); continue;} } } - /* - cout << "stack: " << endl << "args: "; + /*cout << "stack: " << endl << "args: "; for (int i = 0; i < args.size_s(); i++) cout << args[i] << ", "; cout << endl << "opers: "; - for (int i = 0; i < opers.size_s(); i++) cout << opers[i] << ", "; - */ + for (int i = 0; i < opers.size_s(); i++) cout << opers[i] << ", "; */ if (opers.size_s() == 0) { if (args.size_s() > 0) return args.back(); else return -666; @@ -846,7 +781,7 @@ int PIEvaluator::parse(const PIString & string, int offset) { int oprior = -1; PIVector opv; - for (;;) { + while(1) { operationsByPriority(++oprior, opv); if (opv.isEmpty()) break; for (int j = 0; j < opers.size_s(); j++) { @@ -875,7 +810,7 @@ int PIEvaluator::parse(const PIString & string, int offset) { } } return instructions.back().out; - ///cout << endl; + //cout << endl; } @@ -898,7 +833,7 @@ bool PIEvaluator::check() { fac = cf.arguments; gac = ci.operators.size_s(); for (int j = 0; j < ci.operators.size_s(); j++) { - if (ci.operators[j] == -666) { //(ci.operators[j] < -variables.size_s() || ci.operators[j] >= kvars->size()) { + if (ci.operators[j] == -666) { error = true; gac--; } @@ -1013,7 +948,6 @@ inline void PIEvaluator::execFunction(const Instruction & ci) { const Function & cfunc(content.function(ci.function)); int oi = -ci.out - 1; complexd tmp, stmp, ttmp; - //qDebug() << "function " << (int)cfunc.type; switch (cfunc.type) { case bfSin: tmpvars[oi].value = sin(value(ci.operators[0])); diff --git a/src_main/math/pievaluator.h b/src_main/math/pievaluator.h index 72cf3396..fa4095a2 100755 --- a/src_main/math/pievaluator.h +++ b/src_main/math/pievaluator.h @@ -23,7 +23,7 @@ #ifndef PIEVALUATOR_H #define PIEVALUATOR_H -#include "pistring.h" +#include "pistringlist.h" #include "pimathcomplex.h" typedef complexd (*FuncFunc)(void * , int, complexd * ); @@ -160,10 +160,7 @@ public: void setVariable(int index, complexd value = 0.) {if (index >= 0 && index < content.variablesCount()) content.setVariableValue(index, value);} void setCustomVariableValue(int index, complexd value = 0.) {content.variables[index + content.cv_count].value = value;} -/* - //! Add function "name" with arguments count "args_count" and handler "func". Three arguments will be passed to handler: \a data(), "args_count" and array of input values. - void addFunction(const PIString & name, int args_count, FuncFunc func) {content.addCustomFunction(name, args_count, func);} -*/ + //! Evaluate last successfully checked with function \a check() expression and returns result complexd evaluate(); diff --git a/src_main/math/pifft.cpp b/src_main/math/pifft.cpp index f136d6bc..1c9b7f8b 100644 --- a/src_main/math/pifft.cpp +++ b/src_main/math/pifft.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Class for FFT, IFFT and Hilbert transformations - Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru, Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/math/pifft.h b/src_main/math/pifft.h index 09f6e764..98004528 100644 --- a/src_main/math/pifft.h +++ b/src_main/math/pifft.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Class for FFT, IFFT and Hilbert transformations - Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru, Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/math/pifixedpoint.h b/src_main/math/pifixedpoint.h index 6a54fd82..facffa53 100644 --- a/src_main/math/pifixedpoint.h +++ b/src_main/math/pifixedpoint.h @@ -27,14 +27,12 @@ template class PIP_EXPORT PIFixedPoint { -// friend PICout operator <<(PICout s, const FixedPoint<> & v); public: typedef PIFixedPoint fp; PIFixedPoint(const Type &v = Type()) {val = fpv(v);} PIFixedPoint(const fp &v) {val = v.val;} PIFixedPoint(const float &v) {val = Precision == 0 ? Type(v) : Type(v * (2 << (Precision-1)));} PIFixedPoint(const double &v) {val = Precision == 0 ? Type(v) : Type(v * (2 << (Precision-1)));} -// FixedPoint(const long double &v) {val = Precision == 0 ? Type(v) : Type(v * (2 << Precision-1));} template fp & operator =(const T & v) {val = fpv(Type(v)); return *this;} @@ -58,25 +56,13 @@ public: fp operator *(const fp & v) {fp p; p.val = fpi(val * v.val); return p;} fp operator /(const fp & v) {fp p; p.val = fpv(val) / v.val; return p;} - /*fp & operator =(const Type & v) {val = fpv(v); return *this;} - bool operator ==(const Type & v) const {val == fpv(v);} - bool operator !=(const Type & v) const {val != fpv(v);} - void operator +=(const Type & v) {val += fpv(v);} - void operator -=(const Type & v) {val -= fpv(v);} - void operator *=(const Type & v) {val *= fpv(v);} - void operator /=(const Type & v) {val /= fpv(v);} - fp operator +(const Type & v) {fp p = fp(*this); p.val += fpv(v); return p;} - fp operator -(const Type & v) {fp p = fp(*this); p.val -= fpv(v); return p;} - fp operator *(const Type & v) {fp p = fp(*this); p.val *= fpv(v); return p;} - fp operator /(const Type & v) {fp p = fp(*this); p.val /= fpv(v); return p;}*/ - Type fpv(Type v) const {return Type(v << Precision);} Type fpi(Type v) const {return Type(v >> Precision);} Type fpc(Type v) const {return v - fpv(fpi(v));} Type val; }; -/* + template inline PICout operator <<(PICout s, const PIFixedPoint & v) { s.space(); s.setControl(0, true); @@ -100,5 +86,5 @@ inline PICout operator <<(PICout s, const PIFixedPoint & v) { s.restoreControl(); return s; } -*/ + #endif // PIFIXEDPOINT_H diff --git a/src_main/math/pigeometry.h b/src_main/math/pigeometry.h index de7ca8cb..3a5b75cd 100644 --- a/src_main/math/pigeometry.h +++ b/src_main/math/pigeometry.h @@ -2,22 +2,22 @@ * \brief Geometry base class */ /* - PIP - Platform Independent Primitives - Geometry - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Geometry + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ diff --git a/src_main/math/pimathcomplex.h b/src_main/math/pimathcomplex.h index a80cbec6..ebedcdab 100644 --- a/src_main/math/pimathcomplex.h +++ b/src_main/math/pimathcomplex.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PIP math complex - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/math/pimathmatrix.h b/src_main/math/pimathmatrix.h index 71f3ae1c..0ee2df58 100644 --- a/src_main/math/pimathmatrix.h +++ b/src_main/math/pimathmatrix.h @@ -62,7 +62,6 @@ class PIP_EXPORT PIMathMatrixT { public: PIMathMatrixT() {resize(Rows, Cols);} PIMathMatrixT(const PIVector & val) {resize(Rows, Cols); int i = 0; PIMM_FOR_I_WB(r, c) m[r][c] = val[i++];} - //PIMathMatrixT(const _CMatrix & o) {resize(Rows, Cols); int i = 0; PIMM_FOR_I_WB(r, c) m[r][c] = val[i++];} static _CMatrix identity() {_CMatrix tm = _CMatrix(); PIMM_FOR_WB(r, c) tm.m[r][c] = (c == r ? Type(1) : Type(0)); return tm;} static _CMatrix filled(const Type & v) {_CMatrix tm; PIMM_FOR_WB(r, c) tm.m[r][c] = v; return tm;} @@ -185,7 +184,6 @@ public: for (uint k = i; k < Cols; ++k) smat.m[k][j] -= mul * smat.m[k][i]; for (uint k = 0; k < Cols; ++k) mtmp.m[k][j] -= mul * mtmp.m[k][i]; } - //cout << i << endl << smat << endl; if (i < Cols - 1) { if (fabs(smat.m[i+1][i+1]) < Type(1E-200)) { if (ok != 0) *ok = false; @@ -456,7 +454,6 @@ public: for (uint k = 0; k < _V2D::cols_; ++k) mtmp.element(k, j) -= mul * mtmp.element(k, i); if (sv != 0) (*sv)[j] -= mul * (*sv)[i]; } - //cout << i << endl << smat << endl; if (i < _V2D::cols_ - 1) { if (_PIMathMatrixNullCompare(smat.element(i+1, i+1))) { if (ok != 0) *ok = false; diff --git a/src_main/math/pimathmodule.h b/src_main/math/pimathmodule.h index f2649e0e..00ef4154 100644 --- a/src_main/math/pimathmodule.h +++ b/src_main/math/pimathmodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/math/pimathsolver.cpp b/src_main/math/pimathsolver.cpp index d0ebff91..b1f12a5c 100644 --- a/src_main/math/pimathsolver.cpp +++ b/src_main/math/pimathsolver.cpp @@ -117,12 +117,6 @@ void PIMathSolver::fromTF(const TransferFunction & TF) { void PIMathSolver::solveEyler1(double u, double h) { - /*for (uint i = 0; i < size; ++i) { - * sum = 0.; - * for (uint j = 0; j < size; ++j) - * sum += A[j][i] * X[j]; - * xx[i] = sum + d[i] * u; - }*/ F[0] = A * X + d * u; X += F[0] * h; moveF(); @@ -200,7 +194,7 @@ void PIMathSolver::solvePA(double u, double h, uint deg) { solveEyler2(u, h); break; } - /// calc last piece + // calc last piece x0 = 0.; td = 1.; t = times[0]; @@ -221,7 +215,7 @@ void PIMathSolver::solvePA(double u, double h, uint deg) { lp = x0 - x1; if (deg > 2) { - /// calc prev piece + // calc prev piece x0 = 0.; td = 1.; dh = times[1] - times[2]; @@ -233,10 +227,10 @@ void PIMathSolver::solvePA(double u, double h, uint deg) { } x0 *= t; ct = x1 - x0; - /// calc correction + // calc correction ct -= pY[k]; } - /// calc final + // calc final X[k] += lp - ct; pY[k] = lp; } else { diff --git a/src_main/math/pimathvector.h b/src_main/math/pimathvector.h index 63bc8cce..6149c213 100644 --- a/src_main/math/pimathvector.h +++ b/src_main/math/pimathvector.h @@ -27,23 +27,17 @@ template class PIMathMatrixT; -//class PIMathVectorT; - - -//#define PIMVCONSTR(n, t, args) PIMathVectorT _PIMathVectorConstruct(args) {PIVector v; for (int i=0; i(v)} /// Vector templated #define PIMV_FOR(v, s) for (uint v = s; v < Size; ++v) -//#pragma pack(push, 1) template class PIP_EXPORT PIMathVectorT { typedef PIMathVectorT _CVector; public: PIMathVectorT() {resize();} - //PIMathVectorT(Type val) {resize(Size); PIMV_FOR(i, 0) c[i] = val;} PIMathVectorT(const PIVector & val) {resize(); PIMV_FOR(i, 0) c[i] = val[i];} PIMathVectorT(const _CVector & st, const _CVector & fn) {resize(); set(st, fn);} @@ -98,16 +92,9 @@ public: return ret; } -// operator PIMathMatrixT<1, Size, Type>() {return transposed();} -// operator PIMathMatrixT() { -// PIMathMatrixT ret; -// PIMV_FOR(i, 0) ret[i][0] = c[i]; -// return ret; -// } - Type distToLine(const _CVector & lp0, const _CVector & lp1) { _CVector a(lp0, lp1), b(lp0, *this), c(lp1, *this); - Type f = fabs(a[0]*b[1] - a[1]*b[0]) / a.length();//, s = b.length() + c.length() - a.length(); + Type f = fabs(a[0]*b[1] - a[1]*b[0]) / a.length(); return f;} template /// vector {Size, Type} to vector {Size1, Type1} @@ -121,7 +108,6 @@ private: Type c[Size]; }; -//#pragma pack(pop) template inline PIMathVectorT operator *(const Type & x, const PIMathVectorT & v) { @@ -142,10 +128,6 @@ inline PIByteArray & operator <<(PIByteArray & s, const PIMathVectorT inline PIByteArray & operator >>(PIByteArray & s, PIMathVectorT & v) {for (uint i = 0; i < Size; ++i) s >> v[i]; return s;} -//template /// vector {Size0, Type0} to vector {Size1, Type1} -//inline operator PIMathVectorT(const PIMathVectorT & v) {PIMathVectorT tv; uint sz = piMin(Size0, Size1); for (uint i = 0; i < sz; ++i) tv[i] = v[i]; return tv;} - - template inline PIMathVectorT<2u, T> createVectorT2(T x, T y) {return PIMathVectorT<2u, T>(PIVector() << x << y);} template @@ -230,10 +212,9 @@ public: _CVector operator &(const _CVector & v) const {_CVector tv = _CVector(*this); PIMV_FOR(i, 0) tv[i] *= v[i]; return tv;} Type operator ^(const _CVector & v) const {Type tv(0); PIMV_FOR(i, 0) tv += c[i] * v[i]; return tv;} - //inline operator PIMathMatrix<1, Size, Type>() {return PIMathMatrix<1, Size, Type>(c);} Type distToLine(const _CVector & lp0, const _CVector & lp1) { _CVector a(lp0, lp1), b(lp0, *this), c(lp1, *this); - Type f = fabs(a[0]*b[1] - a[1]*b[0]) / a.length();//, s = b.length() + c.length() - a.length(); + Type f = fabs(a[0]*b[1] - a[1]*b[0]) / a.length(); return f; } @@ -245,7 +226,6 @@ public: inline const Type * data() const {return c.data();} private: -// uint size_; PIVector c; }; diff --git a/src_main/math/piquaternion.cpp b/src_main/math/piquaternion.cpp index fefd0306..5ea23fe9 100644 --- a/src_main/math/piquaternion.cpp +++ b/src_main/math/piquaternion.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Class for quaternions + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "piquaternion.h" @@ -65,11 +84,6 @@ PIQuaternion PIQuaternion::rotated(const PIMathVectorT3d & u, double a) const { void PIQuaternion::rotate(const PIMathVectorT3d & u, double a) { PIQuaternion v(u * sin(a / 2.), cos(a / 2.)); - /*PIMathMatrixT44d r = v.makeMatrix() * makeMatrix() * v.inverted().makeMatrix(); - q[0] = r[0][0]; - q[1] = r[1][0]; - q[2] = r[2][0]; - q[3] = r[3][0];*/ *this = (v * (*this) * v.conjugate()); } @@ -140,7 +154,6 @@ PIQuaternion PIQuaternion::fromAngles(double ax, double ay, double az) { PIQuaternion PIQuaternion::fromAngles2(double ax, double ay, double az) { double om = createVectorT3d(ax,ay,az).length(); -// az = M_PI - az; if (om == 0.) return PIQuaternion(PIMathVectorT3d(), 1.); PIQuaternion res; res.q[0] = cos(om/2); diff --git a/src_main/math/piquaternion.h b/src_main/math/piquaternion.h index 1e0bf631..475da1b6 100644 --- a/src_main/math/piquaternion.h +++ b/src_main/math/piquaternion.h @@ -58,7 +58,6 @@ protected: }; PIQuaternion operator *(const double & a, const PIQuaternion & q); -//PIQuaternion operator *(const PIQuaternion & q, const double & a) {return a*q;} PIQuaternion operator *(const PIQuaternion & q0, const PIQuaternion & q1); inline PIQuaternion operator +(const PIQuaternion & q0, const PIQuaternion & q1) {return PIQuaternion(q0.vector() + q1.vector(), q0.scalar() + q1.scalar());} inline PIQuaternion operator -(const PIQuaternion & q0, const PIQuaternion & q1) {return PIQuaternion(q0.vector() - q1.vector(), q0.scalar() - q1.scalar());} diff --git a/src_main/math/pistatistic.h b/src_main/math/pistatistic.h index 0055896d..6ad0a45d 100644 --- a/src_main/math/pistatistic.h +++ b/src_main/math/pistatistic.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Class for calculacing math statistic in values array - Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -46,9 +46,7 @@ public: return false; mean = given_mean; variance = skewness = kurtosis = T(); - /* - * Variance (using corrected two-pass algorithm) - */ + // Variance (using corrected two-pass algorithm) for (i = 0; i < n; i++) v1 += sqr(val[i] - mean); for (i = 0; i < n; i++) @@ -59,9 +57,7 @@ public: if (var < T()) var = T(); stddev = sqrt(var); - /* - * Skewness and kurtosis - */ + // Skewness and kurtosis if (stddev != T()) { for (i = 0; i < n; i++) { v = (val[i] - mean) / stddev; diff --git a/src_main/piplatform.h b/src_main/piplatform.h index 35e659ee..8fc0331d 100644 --- a/src_main/piplatform.h +++ b/src_main/piplatform.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Platform and compiler macros - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Platform and compiler macros + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIPLATFORM_H diff --git a/src_main/resources/piresources.cpp b/src_main/resources/piresources.cpp index 1eb2d4a9..726634bb 100644 --- a/src_main/resources/piresources.cpp +++ b/src_main/resources/piresources.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Resources subsystem + PIP - Platform Independent Primitives + Resources subsystem Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piresources.h" @@ -22,7 +22,6 @@ PIResources::PIResources() { - } diff --git a/src_main/resources/piresources.h b/src_main/resources/piresources.h index 35910550..a677e875 100644 --- a/src_main/resources/piresources.h +++ b/src_main/resources/piresources.h @@ -2,22 +2,22 @@ * \brief Resources subsystem */ /* - PIP - Platform Independent Primitives - Resources subsystem + PIP - Platform Independent Primitives + Resources subsystem Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIRESOURCES_H diff --git a/src_main/resources/piresourcesstorage.cpp b/src_main/resources/piresourcesstorage.cpp index 9994310f..9b8dbc01 100644 --- a/src_main/resources/piresourcesstorage.cpp +++ b/src_main/resources/piresourcesstorage.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Resources subsystem + PIP - Platform Independent Primitives + Resources subsystem Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piresourcesstorage.h" @@ -23,12 +23,10 @@ PIResourcesStorage::Section::Section() { - } PIResourcesStorage::Section::~Section() { - //piCout << "~Section"; } diff --git a/src_main/resources/piresourcesstorage.h b/src_main/resources/piresourcesstorage.h index 09703f6a..8c81b8be 100644 --- a/src_main/resources/piresourcesstorage.h +++ b/src_main/resources/piresourcesstorage.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Resources subsystem + PIP - Platform Independent Primitives + Resources subsystem Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIRESOURCES_P_H @@ -72,7 +72,6 @@ private: ~PIResourcesStorage(); PIMap sections; - }; diff --git a/src_main/system/picodec.cpp b/src_main/system/picodec.cpp index 4e41ed7f..235d2ad6 100755 --- a/src_main/system/picodec.cpp +++ b/src_main/system/picodec.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Text codings coder, based on "iconv" - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Text codings coder, based on "iconv" + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIP_FREERTOS diff --git a/src_main/system/picodec.h b/src_main/system/picodec.h index 7e1b44c0..67a88941 100755 --- a/src_main/system/picodec.h +++ b/src_main/system/picodec.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Text codings coder, based on "iconv" - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Text codings coder, based on "iconv" + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PICODEC_H diff --git a/src_main/system/pilibrary.cpp b/src_main/system/pilibrary.cpp index 40ac3060..955f3c55 100644 --- a/src_main/system/pilibrary.cpp +++ b/src_main/system/pilibrary.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Dynamic library - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Dynamic library + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIP_FREERTOS diff --git a/src_main/system/pilibrary.h b/src_main/system/pilibrary.h index be72db10..653f7db6 100644 --- a/src_main/system/pilibrary.h +++ b/src_main/system/pilibrary.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Dynamic library - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Dynamic library + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ # #ifndef PILIBRARY_H diff --git a/src_main/system/piprocess.cpp b/src_main/system/piprocess.cpp index 1ae9ce95..50b2a7f0 100755 --- a/src_main/system/piprocess.cpp +++ b/src_main/system/piprocess.cpp @@ -77,7 +77,6 @@ void PIProcess::startProc(bool detached) { /// arguments convertion #ifdef WINDOWS int as = 0; - //args.pop_front(); piForeachC (PIString & i, args) as += i.lengthAscii() + 3; char * a = new char[as]; @@ -120,17 +119,14 @@ void PIProcess::startProc(bool detached) { f_in.openTemporary(PIIODevice::ReadWrite); t_in = true; } - //f_in.open(PIIODevice::ReadWrite); f_in.close(); if (f_out.path().isEmpty()) { f_out.openTemporary(PIIODevice::ReadWrite); t_out = true; } - //f_out.open(PIIODevice::WriteOnly); f_out.close(); if (f_err.path().isEmpty()) { f_err.openTemporary(PIIODevice::ReadWrite); t_err = true; } - //f_err.open(PIIODevice::WriteOnly); f_err.close(); str = args.front(); is_exec = true; @@ -173,16 +169,6 @@ void PIProcess::startProc(bool detached) { #else //cout << "exec " << tf_in << ", " << tf_out << ", " << tf_err << endl; - /*PIStringList clsl; - char * a_ = e[0]; - int ai_ = 0; - while (a_) { - piCoutObj << "a_" << PIString(a_); - clsl << PIString(a_); - ai_++; - a_ = e[ai_]; - } - piCoutObj << clsl;*/ if (execve(str.data(), a, e) < 0) piCoutObj << "\"execve" << str << args << "\" error :" << errorString(); } else { @@ -190,9 +176,6 @@ void PIProcess::startProc(bool detached) { //cout << "wait" << endl; if (!detached) { wait(&exit_code); - /*if (tf_in != 0) fclose(tf_in); - if (tf_out != 0) fclose(tf_out); - if (tf_err != 0) fclose(tf_err);*/ pid_ = 0; if (!detached) PRIVATE->pid = pid_; //cout << "wait done" << endl; diff --git a/src_main/system/pisignals.cpp b/src_main/system/pisignals.cpp index 8139caff..6b360286 100755 --- a/src_main/system/pisignals.cpp +++ b/src_main/system/pisignals.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Signals - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Signals + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes.h" diff --git a/src_main/system/pisignals.h b/src_main/system/pisignals.h index 79f64617..7709c355 100755 --- a/src_main/system/pisignals.h +++ b/src_main/system/pisignals.h @@ -2,22 +2,22 @@ * \brief System signals */ /* - PIP - Platform Independent Primitives - Signals - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Signals + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISIGNALS_H diff --git a/src_main/system/pisingleapplication.h b/src_main/system/pisingleapplication.h index f2859186..ad596699 100644 --- a/src_main/system/pisingleapplication.h +++ b/src_main/system/pisingleapplication.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives + PIP - Platform Independent Primitives Single application - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISINGLEAPPLICATION_H diff --git a/src_main/system/pisysteminfo.cpp b/src_main/system/pisysteminfo.cpp index e06872ae..bcea0873 100644 --- a/src_main/system/pisysteminfo.cpp +++ b/src_main/system/pisysteminfo.cpp @@ -1,21 +1,22 @@ /* - PIP - Platform Independent Primitives - System information - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + System information + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + #include "pisysteminfo.h" #include "piincludes_p.h" #include "pidir.h" @@ -29,8 +30,6 @@ #define SALT_SIZE 8 - - PISystemInfo::MountInfo::MountInfo() { space_all = space_used = space_free = 0; removable = false; @@ -135,16 +134,9 @@ PIVector PISystemInfo::mountInfo(bool ignore_cache) { } else clet += PIChar(letters[i]); } - - /*HANDLE hVolume = FindFirstVolumeA(volGUID, 1024); - if (hVolume) { - do { - piCout << "Volume" << PIString(volGUID); - } while (FindNextVolumeA(hVolume, volGUID, 1024)) - FindVolumeClose(hVolume); - }*/ -#else -# ifdef LINUX +#endif + +#ifdef LINUX PIString s_df, s_m; char in[1024]; memset(in, 0, 1024); @@ -200,9 +192,8 @@ PIVector PISystemInfo::mountInfo(bool ignore_cache) { ret << m; //piCout << ml; } -# else -# endif #endif + #ifdef ESP_PLATFORM esp_chip_info_t chip_info; esp_chip_info(&chip_info); @@ -258,10 +249,6 @@ PIString PISystemInfo::machineKey() { f.write(salt); } ret = si->OS_name + "_" + si->architecture + "_" + si->hostname + "_" + salt.toHex(); - /*PIEthernet::InterfaceList il = PIEthernet::interfaces(); - const PIEthernet::Interface * lo = il.getByAddress("127.0.0.1"); - if (lo) - ret += lo->mac;*/ } return ret; } diff --git a/src_main/system/pisysteminfo.h b/src_main/system/pisysteminfo.h index 9e736bae..db1e54d2 100644 --- a/src_main/system/pisysteminfo.h +++ b/src_main/system/pisysteminfo.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - System information - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + System information + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISYSTEMINFO_H diff --git a/src_main/system/pisystemmodule.h b/src_main/system/pisystemmodule.h index 6b6bcc92..f550868f 100644 --- a/src_main/system/pisystemmodule.h +++ b/src_main/system/pisystemmodule.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Module includes - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Module includes + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISYSTEMMODULE_H diff --git a/src_main/system/pisystemmonitor.cpp b/src_main/system/pisystemmonitor.cpp index 686c3942..6b28f9b1 100755 --- a/src_main/system/pisystemmonitor.cpp +++ b/src_main/system/pisystemmonitor.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Process resource monitor - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Process resource monitor + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes_p.h" @@ -37,8 +37,6 @@ #endif - - PISystemMonitor::ProcessStatsFixed::ProcessStatsFixed() { ID = parent_ID = group_ID = session_ID = priority = threads = 0; physical_memsize = resident_memsize = share_memsize = virtual_memsize = data_memsize = 0; @@ -61,8 +59,6 @@ PISystemMonitor::ThreadStatsFixed::ThreadStatsFixed() { } - - #ifndef FREERTOS PRIVATE_DEFINITION_START(PISystemMonitor) #ifndef WINDOWS @@ -215,18 +211,14 @@ void PISystemMonitor::run() { PRIVATE->cpu_u_prev = PRIVATE->cpu_u_cur = uint64toST(ru.ri_user_time); PRIVATE->cpu_s_prev = PRIVATE->cpu_s_cur = uint64toST(ru.ri_system_time); } - cycle++; - //if (cycle >= 4) { - PRIVATE->cpu_u_prev = PRIVATE->cpu_u_cur; - PRIVATE->cpu_s_prev = PRIVATE->cpu_s_cur; - PRIVATE->cpu_u_cur = uint64toST(ru.ri_user_time); - PRIVATE->cpu_s_cur = uint64toST(ru.ri_system_time); - tstat.cpu_load_system = 100.f * (PRIVATE->cpu_s_cur - PRIVATE->cpu_s_prev).toMilliseconds() / delay_; - tstat.cpu_load_user = 100.f * (PRIVATE->cpu_u_cur - PRIVATE->cpu_u_prev).toMilliseconds() / delay_; - //tstat.cpu_load_system /= cpu_count; - //tstat.cpu_load_user /= cpu_count; - cycle = 0; - //piCout << (PRIVATE->cpu_u_cur - PRIVATE->cpu_u_prev).toMilliseconds() / delay_; + PRIVATE->cpu_u_prev = PRIVATE->cpu_u_cur; + PRIVATE->cpu_s_prev = PRIVATE->cpu_s_cur; + PRIVATE->cpu_u_cur = uint64toST(ru.ri_user_time); + PRIVATE->cpu_s_cur = uint64toST(ru.ri_system_time); + tstat.cpu_load_system = 100.f * (PRIVATE->cpu_s_cur - PRIVATE->cpu_s_prev).toMilliseconds() / delay_; + tstat.cpu_load_user = 100.f * (PRIVATE->cpu_u_cur - PRIVATE->cpu_u_prev).toMilliseconds() / delay_; + cycle = 0; + //piCout << (PRIVATE->cpu_u_cur - PRIVATE->cpu_u_prev).toMilliseconds() / delay_; # else PRIVATE->file.seekToBegin(); PIString str(PRIVATE->file.readAll(true)); @@ -252,18 +244,15 @@ void PISystemMonitor::run() { PRIVATE->cpu_u_prev = PRIVATE->cpu_u_cur = sl[12].toLLong(); PRIVATE->cpu_s_prev = PRIVATE->cpu_s_cur = sl[13].toLLong(); } - cycle++; - //if (cycle >= 4) { - PRIVATE->cpu_u_prev = PRIVATE->cpu_u_cur; - PRIVATE->cpu_s_prev = PRIVATE->cpu_s_cur; - PRIVATE->cpu_u_cur = sl[12].toLLong(); - PRIVATE->cpu_s_cur = sl[13].toLLong(); - tstat.cpu_load_system = (PRIVATE->cpu_s_cur - PRIVATE->cpu_s_prev) / (delay_ / 1000.); - tstat.cpu_load_user = (PRIVATE->cpu_u_cur - PRIVATE->cpu_u_prev) / (delay_ / 1000.); - tstat.cpu_load_system /= cpu_count; - tstat.cpu_load_user /= cpu_count; - cycle = 0; - //} + PRIVATE->cpu_u_prev = PRIVATE->cpu_u_cur; + PRIVATE->cpu_s_prev = PRIVATE->cpu_s_cur; + PRIVATE->cpu_u_cur = sl[12].toLLong(); + PRIVATE->cpu_s_cur = sl[13].toLLong(); + tstat.cpu_load_system = (PRIVATE->cpu_s_cur - PRIVATE->cpu_s_prev) / (delay_ / 1000.); + tstat.cpu_load_user = (PRIVATE->cpu_u_cur - PRIVATE->cpu_u_prev) / (delay_ / 1000.); + tstat.cpu_load_system /= cpu_count; + tstat.cpu_load_user /= cpu_count; + cycle = 0; tstat.priority = sl[16].toInt(); tstat.threads = sl[18].toInt(); //piCout << "\n"; @@ -287,8 +276,6 @@ void PISystemMonitor::run() { } # endif #else -// HMODULE hMod; -// DWORD cbNeeded; if (GetProcessMemoryInfo(PRIVATE->hProc, &PRIVATE->mem_cnt, sizeof(PRIVATE->mem_cnt)) != 0) { tstat.physical_memsize = PRIVATE->mem_cnt.WorkingSetSize; } @@ -323,7 +310,6 @@ void PISystemMonitor::run() { PRIVATE->tm_kernel = tm_kernel_c; PRIVATE->tm_user = tm_user_c; } - //cycle++; cycle = 0; if (el_s <= 0.) { tstat.cpu_load_system = 0.f; @@ -345,7 +331,6 @@ void PISystemMonitor::run() { tstat.cpu_load_system = piClampf(tstat.cpu_load_system, 0.f, 100.f); tstat.cpu_load_user = piClampf(tstat.cpu_load_user , 0.f, 100.f); - //PISystemTime dt = PISystemTime::fromMilliseconds(delay_); for (PIMap::iterator i = cur_tm.begin(); i != cur_tm.end(); ++i) { if (!last_tm.contains(i.key())) continue; ThreadStats & ts_new(i.value()); @@ -394,7 +379,6 @@ void PISystemMonitor::gatherThread(llong id) { PIStringList sl = str.split(" "); if (sl.size_s() < 14) return; //piCout << sl[0] << sl[12] << sl[13]; - //ts.work_time = ct - ts.created.toSystemTime(); ts.user_time = PISystemTime::fromMilliseconds(sl[12].toInt() * 10.); ts.kernel_time = PISystemTime::fromMilliseconds(sl[13].toInt() * 10.); # else @@ -416,7 +400,6 @@ void PISystemMonitor::gatherThread(llong id) { ts.user_time = FILETIME2PISystemTime(times[3]); # endif #endif - //cur_ts << ts; cur_tm[id] = ts; } diff --git a/src_main/system/pisystemmonitor.h b/src_main/system/pisystemmonitor.h index 1f79892f..a860a19a 100755 --- a/src_main/system/pisystemmonitor.h +++ b/src_main/system/pisystemmonitor.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Process resource monitor - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Process resource monitor + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISYSTEMMONITOR_H @@ -131,9 +131,7 @@ inline PICout operator <<(PICout s, const PISystemMonitor::ThreadStats & v) { << ", work " << v.work_time.toMilliseconds() << " ms" << ", kernel " << v.kernel_time.toMilliseconds() << " ms" << ", user " << v.user_time.toMilliseconds() << " ms" - /*<< ", label \"" << v.label << "\", all " << PIString::readableSize(v.space_all) - << ", used " << PIString::readableSize(v.space_used) - << ", free " << PIString::readableSize(v.space_free)*/ << ")\n"; + << ")\n"; s.restoreControl(); return s; } diff --git a/src_main/system/pisystemtests.cpp b/src_main/system/pisystemtests.cpp index 9a669aaf..ee1b9797 100755 --- a/src_main/system/pisystemtests.cpp +++ b/src_main/system/pisystemtests.cpp @@ -1,23 +1,22 @@ /* - PIP - Platform Independent Primitives - System tests results (see system_test folder) - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + System tests results (see system_test folder) + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ - #include "pisystemtests.h" #ifndef PIP_FREERTOS @@ -38,7 +37,6 @@ namespace PISystemTests { PISystemTests::PISystemTestReader::PISystemTestReader() { #if !defined(WINDOWS) && !defined(FREERTOS) PIConfig conf(PIStringAscii("/etc/pip.conf"), PIIODevice::ReadOnly); - //conf.setReopenEnabled(false); time_resolution_ns = conf.getValue(PIStringAscii("time_resolution_ns"), 1).toLong(); time_elapsed_ns = conf.getValue(PIStringAscii("time_elapsed_ns"), 0).toLong(); usleep_offset_us = conf.getValue(PIStringAscii("usleep_offset_us"), 60).toLong(); diff --git a/src_main/system/pisystemtests.h b/src_main/system/pisystemtests.h index 47090346..7aaafc85 100755 --- a/src_main/system/pisystemtests.h +++ b/src_main/system/pisystemtests.h @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - System tests results (see system_test folder) - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + System tests results (see system_test folder) + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PISYSTEMTESTS_H @@ -33,7 +33,6 @@ namespace PISystemTests { }; extern PISystemTestReader pisystestreader; - -}; +} #endif // PISYSTEMTESTS_H diff --git a/src_main/thread/pigrabberbase.h b/src_main/thread/pigrabberbase.h index 7191ae9c..d0d30acb 100644 --- a/src_main/thread/pigrabberbase.h +++ b/src_main/thread/pigrabberbase.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Abstract class for create grabbers - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/thread/pimutex.cpp b/src_main/thread/pimutex.cpp index 071296f7..b1bafc43 100755 --- a/src_main/thread/pimutex.cpp +++ b/src_main/thread/pimutex.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Mutex - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Mutex + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /** \class PIMutex @@ -113,7 +113,6 @@ bool PIMutex::isLocked() const { void PIMutex::init() { if (inited_) destroy(); #ifdef WINDOWS -// PRIVATE->mutex = CreateMutex(NULL, FALSE, NULL); PRIVATE->mutex = CreateEvent(NULL, FALSE, TRUE, NULL); // std::cout << "create " << (ullong)PRIVATE->mutex << std::endl; #else diff --git a/src_main/thread/pimutex.h b/src_main/thread/pimutex.h index 594330ea..6bd8f5a1 100755 --- a/src_main/thread/pimutex.h +++ b/src_main/thread/pimutex.h @@ -2,22 +2,22 @@ * \brief Mutex */ /* - PIP - Platform Independent Primitives - Mutex + PIP - Platform Independent Primitives + Mutex Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PIMUTEX_H diff --git a/src_main/thread/pipipelinethread.h b/src_main/thread/pipipelinethread.h index 7472bf05..830d56e5 100644 --- a/src_main/thread/pipipelinethread.h +++ b/src_main/thread/pipipelinethread.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Class for create multihread pipeline - Copyright (C) 2020 Andrey Bychkov work.a.b@yandex.ru + Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -52,7 +52,7 @@ public: void enqueue(const Tin &v) {enqueue(v, 0);} EVENT_HANDLER2(void, enqueue, const Tin &, v, bool *, overload) { mutex.lock(); - //piCoutObj << "enque" << overload;//max_size << in.size(); + //piCoutObj << "enque" << overload; if (max_size == 0 || in.size() < max_size) { in.enqueue(v); if (overload) *overload = false; @@ -150,7 +150,6 @@ private: last = r; mutex_l.unlock(); cnt++; -// next_overload = true; //piCoutObj << "calc ok" << &next_overload; calculated(r, &next_overload); } diff --git a/src_main/thread/pithread.cpp b/src_main/thread/pithread.cpp index 0ac81d46..53daed8f 100755 --- a/src_main/thread/pithread.cpp +++ b/src_main/thread/pithread.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Thread - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Thread + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "piincludes_p.h" @@ -91,11 +91,7 @@ end(); */ - - __PIThreadCollection *__PIThreadCollection::instance() { - /*static CDCore * ret = new CDCore(); - return ret;*/ return __PIThreadCollection_Initializer__::__instance__; } @@ -250,14 +246,12 @@ void PIThread::stop(bool wait) { bool PIThread::start(int timer_delay) { if (running_) return false; - //if (terminating) waitForFinish(); delay_ = timer_delay; return _startThread((void*)thread_function); } bool PIThread::startOnce() { - if (terminating) waitForFinish(); if (running_) return false; return _startThread((void*)thread_function_once); } @@ -326,15 +320,11 @@ int PIThread::priority2System(PIThread::Priority p) { bool PIThread::_startThread(void * func) { - //if (terminating) waitForFinish(); terminating = false; running_ = true; #ifndef WINDOWS pthread_attr_t attr; pthread_attr_init(&attr); -# ifndef ANDROID - //pthread_attr_setschedparam(&attr, &(PRIVATE->sparam)); -# endif pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); int ret = pthread_create(&PRIVATE->thread, &attr, (void*(*)(void*))func, this); //PICout(PICoutManipulators::DefaultControls) << "pthread_create" << PRIVATE->thread; @@ -374,24 +364,24 @@ bool PIThread::_startThread(void * func) { void PIThread::setPriority(PIThread::Priority prior) { #ifndef FREERTOS // FreeRTOS can't change priority runtime priority_ = prior; -#ifndef WINDOWS +# ifndef WINDOWS if (!running_ || (PRIVATE->thread == 0)) return; //PICout(PICoutManipulators::DefaultControls) << "setPriority" << PRIVATE->thread; policy_ = 0; memset(&(PRIVATE->sparam), 0, sizeof(PRIVATE->sparam)); pthread_getschedparam(PRIVATE->thread, &policy_, &(PRIVATE->sparam)); PRIVATE->sparam. -# ifndef LINUX +# ifndef LINUX sched_priority -# else +# else __sched_priority -# endif +# endif = priority2System(priority_); pthread_setschedparam(PRIVATE->thread, policy_, &(PRIVATE->sparam)); -#else +# else if (!running_ || (PRIVATE->thread == 0)) return; SetThreadPriority(PRIVATE->thread, priority2System(priority_)); -#endif +# endif #endif //FREERTOS } @@ -458,8 +448,6 @@ void PIThread::_beginThread() { pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, 0); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, 0); # endif -#else - //__PISetTimerResolution(); #endif #ifdef WINDOWS tid_ = GetCurrentThreadId(); @@ -585,6 +573,5 @@ void PIThread::runOnce(std::function func, const PIString & name) { __PIThreadCollection::instance()->startedAuto(t); CONNECTU(t, stopped, __PIThreadCollection::instance(), stoppedAuto); t->startOnce(); - //return t; } diff --git a/src_main/thread/pithread.h b/src_main/thread/pithread.h index 24e0a231..5cf0055f 100755 --- a/src_main/thread/pithread.h +++ b/src_main/thread/pithread.h @@ -4,22 +4,22 @@ * This file declare thread class and some wait functions */ /* - PIP - Platform Independent Primitives - Thread - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Thread + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PITHREAD_H @@ -104,9 +104,6 @@ public: #endif EVENT_HANDLER0(bool, startOnce); EVENT_HANDLER1(bool, startOnce, ThreadFunc, func) {ret_func = func; return startOnce();} -//#ifdef PIP_CXX11_SUPPORT -// EVENT_HANDLER1(bool, startOnce, std::function, func) {ret_func = [func](void*){func();}; return startOnce();} -//#endif EVENT_HANDLER0(void, stop) {stop(false);} EVENT_HANDLER1(void, stop, bool, wait); EVENT_HANDLER0(void, terminate); diff --git a/src_main/thread/pithreadmodule.h b/src_main/thread/pithreadmodule.h index 4d0e7bab..e0d97bcb 100644 --- a/src_main/thread/pithreadmodule.h +++ b/src_main/thread/pithreadmodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Ivan Pelipenko peri4ko@yandex.ru + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/src_main/thread/pitimer.cpp b/src_main/thread/pitimer.cpp index 0a954bf8..f3a68a64 100755 --- a/src_main/thread/pitimer.cpp +++ b/src_main/thread/pitimer.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Timer - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Timer + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "pitimer.h" @@ -448,9 +448,6 @@ bool _PITimerImp_Pool::startTimer(double interval_ms) { bool _PITimerImp_Pool::stopTimer(bool wait) { Pool::instance()->remove(this); -// if (wait) { -// Pool::instance()->waitForDelete(this); -// } return true; } diff --git a/src_main/thread/pitimer.h b/src_main/thread/pitimer.h index bfcc3ee5..2d58b847 100755 --- a/src_main/thread/pitimer.h +++ b/src_main/thread/pitimer.h @@ -2,22 +2,22 @@ * \brief Timer */ /* - PIP - Platform Independent Primitives - Timer - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + Timer + Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef PITIMER_H @@ -43,7 +43,7 @@ public: double interval() const {return interval_;} void setInterval(double i); - // ! \brief Return \c true if thread is running + //! \brief Return \c true if thread is running bool isRunning() const {return running_;} bool isStopped() const {return !running_;} @@ -86,7 +86,6 @@ public: enum TimerImplementation { Thread /*! Timer works in his own thread. Intervals are measured by the system time */ = 0x01, ThreadRT /*! Using POSIX timer with SIGEV_THREAD notification. \attention Doesn`t support on Windows and Mac OS! */ = 0x02, - // SignalRT /*! */ = 0x03, Pool /*! Using single TimerPool for all timers with this implementation. TimerPool works as Thread implementation and * sequentially executes all timers. \attention Use this implementation with care! */ = 0x04 }; diff --git a/src_usb/piusb.cpp b/src_usb/piusb.cpp index 5558aa02..91e131a3 100644 --- a/src_usb/piusb.cpp +++ b/src_usb/piusb.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + USB, based on libusb + Ivan Pelipenko peri4ko@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "piusb.h" #include "piincludes_p.h" #include "piconfig.h" @@ -284,7 +303,6 @@ bool PIUSB::openDevice() { bool PIUSB::closeDevice() { #ifdef PIP_USB if (hdev == 0) return true; - //usb_reset(hdev); usb_release_interface(hdev, intefrace_); usb_close(hdev); hdev = 0; @@ -300,8 +318,11 @@ int PIUSB::readDevice(void * read_to, int max_size) { #ifdef PIP_USB if (isClosed() || ep_read.isNull()) return -1; switch (ep_read.transfer_type) { - case Endpoint::Bulk: /*piCoutObj << "bulk read" << max_size;*/ return usb_bulk_read(hdev, ep_read.address, (char * )read_to, max_size, timeout_r); break; - case Endpoint::Interrupt: return usb_interrupt_read(hdev, ep_read.address, (char * )read_to, max_size, timeout_r); break; + case Endpoint::Bulk: + /*piCoutObj << "bulk read" << max_size;*/ + return usb_bulk_read(hdev, ep_read.address, (char * )read_to, max_size, timeout_r); + case Endpoint::Interrupt: + return usb_interrupt_read(hdev, ep_read.address, (char * )read_to, max_size, timeout_r); default: break; } return -1; @@ -315,8 +336,11 @@ int PIUSB::writeDevice(const void * data, int max_size) { #ifdef PIP_USB if (isClosed() || ep_write.isNull()) return -1; switch (ep_read.transfer_type) { - case Endpoint::Bulk: /*piCoutObj << "bulk write" << max_size;*/ return usb_bulk_write(hdev, ep_write.address, (char * )const_cast(data), max_size, timeout_w); break; - case Endpoint::Interrupt: return usb_interrupt_write(hdev, ep_read.address, (char * )data, max_size, timeout_w); break; + case Endpoint::Bulk: + /*piCoutObj << "bulk write" << max_size;*/ + return usb_bulk_write(hdev, ep_write.address, (char * )const_cast(data), max_size, timeout_w); + case Endpoint::Interrupt: + return usb_interrupt_write(hdev, ep_read.address, (char * )data, max_size, timeout_w); default: break; } return -1; @@ -329,7 +353,6 @@ int PIUSB::writeDevice(const void * data, int max_size) { int PIUSB::controlWrite(const void * data, int max_size) { #ifdef PIP_USB if (isClosed()) return -1; - //return usb_control_msg(hdev, ); return -1; #else return -1; diff --git a/utils/cloud_dispatcher/CMakeLists.txt b/utils/cloud_dispatcher/CMakeLists.txt index ceb5f8eb..80d86378 100644 --- a/utils/cloud_dispatcher/CMakeLists.txt +++ b/utils/cloud_dispatcher/CMakeLists.txt @@ -3,7 +3,6 @@ file(GLOB CPPS "*.cpp") file(GLOB HDRS "*.h") add_executable(picloud ${CPPS} ${HDRS}) target_link_libraries(picloud pip pip_cloud) -# apple_rpath_patch(picloud) if (DEFINED LIB) install(TARGETS picloud DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) else() diff --git a/utils/cloud_dispatcher/main.cpp b/utils/cloud_dispatcher/main.cpp index 388cf14b..d85c147c 100644 --- a/utils/cloud_dispatcher/main.cpp +++ b/utils/cloud_dispatcher/main.cpp @@ -1,6 +1,26 @@ +/* + PIP - Platform Independent Primitives + PICloud dispatcher + Andrey Bychkov work.a.b@yandex.ru, Ivan Pelipenko peri4ko@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pip.h" #include "picrypt.h" + using namespace PICoutManipulators; PIString ip = "0.0.0.0"; diff --git a/utils/code_model_generator/CMakeLists.txt b/utils/code_model_generator/CMakeLists.txt index d0e92f62..51995226 100755 --- a/utils/code_model_generator/CMakeLists.txt +++ b/utils/code_model_generator/CMakeLists.txt @@ -8,7 +8,6 @@ set_deploy_property(pip_cmg make_rc(pip_cmg _RC) add_executable(pip_cmg "main.cpp" ${_RC}) target_link_libraries(pip_cmg pip) -# apple_rpath_patch(pip_cmg) if (DEFINED LIB) install(TARGETS pip_cmg DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) else() diff --git a/utils/code_model_generator/main.cpp b/utils/code_model_generator/main.cpp index 5edebf41..6cb26cbf 100755 --- a/utils/code_model_generator/main.cpp +++ b/utils/code_model_generator/main.cpp @@ -365,52 +365,6 @@ void writeModel(PICodeParser & parser, PICLI & cli, const PIString out, bool met f << "#include \"" << out << ".h\"\n"; if (inc_cpp) f << inc_string; f << "\nusing namespace PICodeInfo;\n\n"; - /* - PIString entry, argtype, rettype, args; - piForeachC (PICodeParser::Entity * e, parser.entities) { - if (e->name.find("::") >= 0 || e->name.startsWith("_PI")) continue; - entry.clear(); - entry << "\nPIVariant execFunction(" << e->name << " * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) {\n"; - const PIVector & fl(e->functions); - bool efunc = true; - piForeachC (PICodeParser::Member & m, fl) { - if (m.name.startsWith("__stat") || m.attributes[PICodeParser::Static]) continue; - //piCout << e->name << m.name << m.visibility; - args.clear(); - rettype = m.type; - if (rettype.startsWith("const") && rettype.endsWith("&")) - rettype.cutLeft(5).cutRight(1).trim(); - if (rettype.endsWith("&")) continue; - bool aok = true, ret = (m.type != "void"); - if (m.arguments_full.size() > 4 || m.visibility != PICodeParser::Public) continue; - for (int i = 0; i < m.arguments_full.size_s(); ++i) { - if (i > 0) args << ", "; - argtype = m.arguments_type[i]; - if (argtype.startsWith("const") && argtype.endsWith("&")) - argtype.cutLeft(5).cutRight(1).trim(); - if (argtype.endsWith("&")) { - aok = false; - continue; - } - //entry << "(" << m.arguments_type[i] << ")"; - //if (parser.isEnum(m.arguments_type[i])) entry << "(int)"; - args << "arg" << i << ".toValue<" << argtype << " >()"; - } - if (!aok) continue; - efunc = false; - entry << "\tif (strcmp(function, \"" << m.name << "\") == 0) {"; - if (ret) entry << "return PIVariant::fromValue<" << rettype << " >("; - entry << "object->" << m.name << "(" << args << ")"; - if (ret) entry << ");"; - else entry << "; return PIVariant();"; - entry << "}\n"; - } - if (efunc) continue; - f << entry << "\tPICout(PICoutManipulators::AddNewLine) << \"Can`t find function \\\"\" << function << \"\\\" in " - << e->type << " \\\"" << e->name << "\\\"!\";\n\treturn PIVariant();\n}\n"; - ventities << e; - } - */ if (meta || enums || getters) { if (getters) { @@ -476,16 +430,6 @@ void writeModel(PICodeParser & parser, PICLI & cli, const PIString out, bool met f << "#ifndef " << defname << "\n#define " << defname << "\n\n"; f << "#include \"pivariant.h\"\n#include \"picodeinfo.h\""; if (inc_h) f << inc_string; - /* - f << "\n\n"; - piForeachC (PICodeParser::Entity * e, ventities) - f << e->type << " " << e->name << ";\n"; - f << "\n"; - piForeachC (PICodeParser::Entity * e, ventities) { - f << "\nPIVariant execFunction(" << e->name << " * object, const char * function, const PIVariant & arg0 = PIVariant(), \ -const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant());"; - } - */ if (streams) { f << "\n\n// Stream operators\n"; piForeachC (PICodeParser::Entity * e, parser.entities) { diff --git a/utils/code_model_generator/main_test.cpp b/utils/code_model_generator/main_test.cpp deleted file mode 100755 index edb4dab6..00000000 --- a/utils/code_model_generator/main_test.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - PIP - Platform Independent Primitives - Code model generator - Copyright (C) 2015 Ivan Pelipenko peri4ko@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include "pitimer.h" -#include "test.h" - -void event(void * , int d) { - piCout << "tick" << d; -} - -PITimer tm; - -int main(int argc, char * argv[]) { - //tm.setSlot(event); - //tm.start(200); - /*execFunction(&tm, "setSlot", PIVariant::fromValue(event)); - execFunction(&tm, "start", 200); - piMSleep(1000); - execFunction(&tm, "addDelimiter", 2); - piMSleep(1000); - execFunction(&tm, "stop"); - execFunction(&tm, "stop_"); - piMSleep(1000);*/ - typedef PIMap::value_type mpair; - piForeachC (mpair & i, *(PICodeInfo::classesInfo)) - piCout << *i.second; - piCout << "\n\n"; - typedef PIMap::value_type epair; - piForeachC (epair & i, *(PICodeInfo::enumsInfo)) - piCout << *i.second; - return 0; -}; diff --git a/utils/code_model_generator/test.cpp b/utils/code_model_generator/test.cpp deleted file mode 100755 index c3242a40..00000000 --- a/utils/code_model_generator/test.cpp +++ /dev/null @@ -1,7084 +0,0 @@ -// Generated by "PIP Code model generator" 29.04.2014 18:03:05 - -#include -#include "test.h" - -using namespace PICodeInfo; - -#include "piusb.h" -#include "picli.h" -#include "pitime.h" -#include "pipeer.h" -#include "pimath.h" -#include "pifile.h" -#include "pichar.h" -#include "pitimer.h" -#include "pimutex.h" -#include "picodec.h" -#include "pithread.h" -#include "pistring.h" -#include "piserial.h" -#include "piobject.h" -#include "piconfig.h" -#include "pivariant.h" -#include "pisignals.h" -#include "piprocess.h" -#include "pimonitor.h" -#include "piconsole.h" -#include "piprotocol.h" -#include "piiodevice.h" -#include "piincludes.h" -#include "piethernet.h" -#include "pibitarray.h" -#include "pievaluator.h" -#include "pibytearray.h" -#include "pibinarylog.h" -#include "picollection.h" -#include "pikbdlistener.h" -#include "pidiagnostics.h" -#include "pisystemmonitor.h" -#include "pimultiprotocol.h" -#include "pipacketextractor.h" - - -PIVariant execFunction(PIMutex * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "lock") == 0) {object->lock(); return PIVariant();} - if (strcmp(function, "unlock") == 0) {object->unlock(); return PIVariant();} - if (strcmp(function, "tryLock") == 0) {return PIVariant::fromValue(object->tryLock());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIMutex\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIBitArray * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "bitSize") == 0) {return PIVariant::fromValue(object->bitSize());} - if (strcmp(function, "byteSize") == 0) {return PIVariant::fromValue(object->byteSize());} - if (strcmp(function, "data") == 0) {return PIVariant::fromValue(object->data());} - if (strcmp(function, "toUChar") == 0) {return PIVariant::fromValue(object->toUChar());} - if (strcmp(function, "toUShort") == 0) {return PIVariant::fromValue(object->toUShort());} - if (strcmp(function, "toUInt") == 0) {return PIVariant::fromValue(object->toUInt());} - if (strcmp(function, "toULong") == 0) {return PIVariant::fromValue(object->toULong());} - if (strcmp(function, "toULLong") == 0) {return PIVariant::fromValue(object->toULLong());} - if (strcmp(function, "at") == 0) {return PIVariant::fromValue(object->at(arg0.toValue()));} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIBitArray\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIHuffman * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "compress") == 0) {return PIVariant::fromValue >(object->compress(arg0.toValue >()));} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIHuffman\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIByteArray * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "resized") == 0) {return PIVariant::fromValue(object->resized(arg0.toValue()));} - if (strcmp(function, "toBase64") == 0) {return PIVariant::fromValue(object->toBase64());} - if (strcmp(function, "fromBase64") == 0) {return PIVariant::fromValue(object->fromBase64());} - if (strcmp(function, "compressedRLE") == 0) {return PIVariant::fromValue(object->compressedRLE(arg0.toValue()));} - if (strcmp(function, "decompressedRLE") == 0) {return PIVariant::fromValue(object->decompressedRLE(arg0.toValue()));} - if (strcmp(function, "checksumPlain8") == 0) {return PIVariant::fromValue(object->checksumPlain8());} - if (strcmp(function, "checksumPlain32") == 0) {return PIVariant::fromValue(object->checksumPlain32());} - if (strcmp(function, "checksumCRC8") == 0) {return PIVariant::fromValue(object->checksumCRC8());} - if (strcmp(function, "checksumCRC16") == 0) {return PIVariant::fromValue(object->checksumCRC16());} - if (strcmp(function, "checksumCRC32") == 0) {return PIVariant::fromValue(object->checksumCRC32());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIByteArray\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIChar * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "isDigit") == 0) {return PIVariant::fromValue(object->isDigit());} - if (strcmp(function, "isHex") == 0) {return PIVariant::fromValue(object->isHex());} - if (strcmp(function, "isGraphical") == 0) {return PIVariant::fromValue(object->isGraphical());} - if (strcmp(function, "isControl") == 0) {return PIVariant::fromValue(object->isControl());} - if (strcmp(function, "isLower") == 0) {return PIVariant::fromValue(object->isLower());} - if (strcmp(function, "isUpper") == 0) {return PIVariant::fromValue(object->isUpper());} - if (strcmp(function, "isPrint") == 0) {return PIVariant::fromValue(object->isPrint());} - if (strcmp(function, "isSpace") == 0) {return PIVariant::fromValue(object->isSpace());} - if (strcmp(function, "isAlpha") == 0) {return PIVariant::fromValue(object->isAlpha());} - if (strcmp(function, "isAscii") == 0) {return PIVariant::fromValue(object->isAscii());} - if (strcmp(function, "toInt") == 0) {return PIVariant::fromValue(object->toInt());} - if (strcmp(function, "toWCharPtr") == 0) {return PIVariant::fromValue(object->toWCharPtr());} - if (strcmp(function, "toCharPtr") == 0) {return PIVariant::fromValue(object->toCharPtr());} - if (strcmp(function, "toWChar") == 0) {return PIVariant::fromValue(object->toWChar());} - if (strcmp(function, "toAscii") == 0) {return PIVariant::fromValue(object->toAscii());} - if (strcmp(function, "unicode16Code") == 0) {return PIVariant::fromValue(object->unicode16Code());} - if (strcmp(function, "toUpper") == 0) {return PIVariant::fromValue(object->toUpper());} - if (strcmp(function, "toLower") == 0) {return PIVariant::fromValue(object->toLower());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIChar\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIString * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "mid") == 0) {return PIVariant::fromValue(object->mid(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "left") == 0) {return PIVariant::fromValue(object->left(arg0.toValue()));} - if (strcmp(function, "right") == 0) {return PIVariant::fromValue(object->right(arg0.toValue()));} - if (strcmp(function, "trimmed") == 0) {return PIVariant::fromValue(object->trimmed());} - if (strcmp(function, "replaced") == 0) {return PIVariant::fromValue(object->replaced(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "replaced") == 0) {return PIVariant::fromValue(object->replaced(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "replaceAll") == 0) {return PIVariant::fromValue(object->replaceAll(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "reversed") == 0) {return PIVariant::fromValue(object->reversed());} - if (strcmp(function, "takeMid") == 0) {return PIVariant::fromValue(object->takeMid(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "takeLeft") == 0) {return PIVariant::fromValue(object->takeLeft(arg0.toValue()));} - if (strcmp(function, "takeRight") == 0) {return PIVariant::fromValue(object->takeRight(arg0.toValue()));} - if (strcmp(function, "takeSymbol") == 0) {return PIVariant::fromValue(object->takeSymbol());} - if (strcmp(function, "takeWord") == 0) {return PIVariant::fromValue(object->takeWord());} - if (strcmp(function, "takeCWord") == 0) {return PIVariant::fromValue(object->takeCWord());} - if (strcmp(function, "takeLine") == 0) {return PIVariant::fromValue(object->takeLine());} - if (strcmp(function, "takeNumber") == 0) {return PIVariant::fromValue(object->takeNumber());} - if (strcmp(function, "takeRange") == 0) {return PIVariant::fromValue(object->takeRange(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "lengthAscii") == 0) {return PIVariant::fromValue(object->lengthAscii());} - if (strcmp(function, "data") == 0) {return PIVariant::fromValue(object->data());} - if (strcmp(function, "stdString") == 0) {return PIVariant::fromValue(object->stdString());} - if (strcmp(function, "toByteArray") == 0) {return PIVariant::fromValue(object->toByteArray());} - if (strcmp(function, "split") == 0) {return PIVariant::fromValue(object->split(arg0.toValue()));} - if (strcmp(function, "toUpperCase") == 0) {return PIVariant::fromValue(object->toUpperCase());} - if (strcmp(function, "toLowerCase") == 0) {return PIVariant::fromValue(object->toLowerCase());} - if (strcmp(function, "toNativeDecimalPoints") == 0) {return PIVariant::fromValue(object->toNativeDecimalPoints());} - if (strcmp(function, "find") == 0) {return PIVariant::fromValue(object->find(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "find") == 0) {return PIVariant::fromValue(object->find(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "find") == 0) {return PIVariant::fromValue(object->find(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "find") == 0) {return PIVariant::fromValue(object->find(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "findLast") == 0) {return PIVariant::fromValue(object->findLast(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "findLast") == 0) {return PIVariant::fromValue(object->findLast(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "findLast") == 0) {return PIVariant::fromValue(object->findLast(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "findLast") == 0) {return PIVariant::fromValue(object->findLast(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "findWord") == 0) {return PIVariant::fromValue(object->findWord(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "findCWord") == 0) {return PIVariant::fromValue(object->findCWord(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "startsWith") == 0) {return PIVariant::fromValue(object->startsWith(arg0.toValue()));} - if (strcmp(function, "endsWith") == 0) {return PIVariant::fromValue(object->endsWith(arg0.toValue()));} - if (strcmp(function, "length") == 0) {return PIVariant::fromValue(object->length());} - if (strcmp(function, "isEmpty") == 0) {return PIVariant::fromValue(object->isEmpty());} - if (strcmp(function, "toBool") == 0) {return PIVariant::fromValue(object->toBool());} - if (strcmp(function, "toChar") == 0) {return PIVariant::fromValue(object->toChar());} - if (strcmp(function, "toShort") == 0) {return PIVariant::fromValue(object->toShort(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "toUShort") == 0) {return PIVariant::fromValue(object->toUShort(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "toInt") == 0) {return PIVariant::fromValue(object->toInt(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "toUInt") == 0) {return PIVariant::fromValue(object->toUInt(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "toLong") == 0) {return PIVariant::fromValue(object->toLong(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "toULong") == 0) {return PIVariant::fromValue(object->toULong(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "toLLong") == 0) {return PIVariant::fromValue(object->toLLong(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "toULLong") == 0) {return PIVariant::fromValue(object->toULLong(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "toFloat") == 0) {return PIVariant::fromValue(object->toFloat());} - if (strcmp(function, "toDouble") == 0) {return PIVariant::fromValue(object->toDouble());} - if (strcmp(function, "toLDouble") == 0) {return PIVariant::fromValue(object->toLDouble());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIString\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIStringList * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "join") == 0) {return PIVariant::fromValue(object->join(arg0.toValue()));} - if (strcmp(function, "contentSize") == 0) {return PIVariant::fromValue(object->contentSize());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIStringList\"!"; - return PIVariant(); -} - -PIVariant execFunction(PISystemTime * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "toSeconds") == 0) {return PIVariant::fromValue(object->toSeconds());} - if (strcmp(function, "toMilliseconds") == 0) {return PIVariant::fromValue(object->toMilliseconds());} - if (strcmp(function, "toMicroseconds") == 0) {return PIVariant::fromValue(object->toMicroseconds());} - if (strcmp(function, "toNanoseconds") == 0) {return PIVariant::fromValue(object->toNanoseconds());} - if (strcmp(function, "sleep") == 0) {object->sleep(); return PIVariant();} - if (strcmp(function, "abs") == 0) {return PIVariant::fromValue(object->abs());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PISystemTime\"!"; - return PIVariant(); -} - -PIVariant execFunction(PITime * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "toString") == 0) {return PIVariant::fromValue(object->toString(arg0.toValue()));} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in struct \"PITime\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIDate * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "toString") == 0) {return PIVariant::fromValue(object->toString(arg0.toValue()));} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in struct \"PIDate\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIDateTime * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "normalized") == 0) {return PIVariant::fromValue(object->normalized());} - if (strcmp(function, "normalize") == 0) {object->normalize(); return PIVariant();} - if (strcmp(function, "toString") == 0) {return PIVariant::fromValue(object->toString(arg0.toValue()));} - if (strcmp(function, "toSecondSinceEpoch") == 0) {return PIVariant::fromValue(object->toSecondSinceEpoch());} - if (strcmp(function, "toSystemTime") == 0) {return PIVariant::fromValue(object->toSystemTime());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in struct \"PIDateTime\"!"; - return PIVariant(); -} - -PIVariant execFunction(Solver * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "solve") == 0) {object->solve(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "fromTF") == 0) {object->fromTF(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setMethod") == 0) {object->setMethod(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setTime") == 0) {object->setTime(arg0.toValue()); return PIVariant();} - if (strcmp(function, "solveEyler1") == 0) {object->solveEyler1(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solveEyler2") == 0) {object->solveEyler2(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solveRK4") == 0) {object->solveRK4(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solveABM2") == 0) {object->solveABM2(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solveABM3") == 0) {object->solveABM3(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solveABM4") == 0) {object->solveABM4(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solvePA") == 0) {object->solvePA(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "solvePA2") == 0) {object->solvePA2(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solvePA3") == 0) {object->solvePA3(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solvePA4") == 0) {object->solvePA4(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "solvePA5") == 0) {object->solvePA5(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"Solver\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIFFT * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "calcFFT") == 0) {return PIVariant::fromValue * >(object->calcFFT(arg0.toValue >()));} - if (strcmp(function, "calcFFT") == 0) {return PIVariant::fromValue * >(object->calcFFT(arg0.toValue >()));} - if (strcmp(function, "calcFFTinverse") == 0) {return PIVariant::fromValue * >(object->calcFFTinverse(arg0.toValue >()));} - if (strcmp(function, "calcHilbert") == 0) {return PIVariant::fromValue * >(object->calcHilbert(arg0.toValue >()));} - if (strcmp(function, "getAmplitude") == 0) {return PIVariant::fromValue >(object->getAmplitude());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIFFT\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIVariant * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue()); return PIVariant();} - if (strcmp(function, "toBool") == 0) {return PIVariant::fromValue(object->toBool());} - if (strcmp(function, "toInt") == 0) {return PIVariant::fromValue(object->toInt());} - if (strcmp(function, "toLLong") == 0) {return PIVariant::fromValue(object->toLLong());} - if (strcmp(function, "toFloat") == 0) {return PIVariant::fromValue(object->toFloat());} - if (strcmp(function, "toDouble") == 0) {return PIVariant::fromValue(object->toDouble());} - if (strcmp(function, "toLDouble") == 0) {return PIVariant::fromValue(object->toLDouble());} - if (strcmp(function, "toComplexd") == 0) {return PIVariant::fromValue(object->toComplexd());} - if (strcmp(function, "toComplexld") == 0) {return PIVariant::fromValue(object->toComplexld());} - if (strcmp(function, "toTime") == 0) {return PIVariant::fromValue(object->toTime());} - if (strcmp(function, "toDate") == 0) {return PIVariant::fromValue(object->toDate());} - if (strcmp(function, "toDateTime") == 0) {return PIVariant::fromValue(object->toDateTime());} - if (strcmp(function, "toSystemTime") == 0) {return PIVariant::fromValue(object->toSystemTime());} - if (strcmp(function, "toString") == 0) {return PIVariant::fromValue(object->toString());} - if (strcmp(function, "toStringList") == 0) {return PIVariant::fromValue(object->toStringList());} - if (strcmp(function, "toBitArray") == 0) {return PIVariant::fromValue(object->toBitArray());} - if (strcmp(function, "toByteArray") == 0) {return PIVariant::fromValue(object->toByteArray());} - if (strcmp(function, "type") == 0) {return PIVariant::fromValue(object->type());} - if (strcmp(function, "typeName") == 0) {return PIVariant::fromValue(object->typeName());} - if (strcmp(function, "isValid") == 0) {return PIVariant::fromValue(object->isValid());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIVariant\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIObject * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "name") == 0) {return PIVariant::fromValue(object->name());} - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "debug") == 0) {return PIVariant::fromValue(object->debug());} - if (strcmp(function, "setName") == 0) {object->setName(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setDebug") == 0) {object->setDebug(arg0.toValue()); return PIVariant();} - if (strcmp(function, "properties") == 0) {return PIVariant::fromValue >(object->properties());} - if (strcmp(function, "propertiesCount") == 0) {return PIVariant::fromValue(object->propertiesCount());} - if (strcmp(function, "property") == 0) {return PIVariant::fromValue(object->property(arg0.toValue()));} - if (strcmp(function, "setProperty") == 0) {object->setProperty(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "isPropertyExists") == 0) {return PIVariant::fromValue(object->isPropertyExists(arg0.toValue()));} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIObject\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIThread * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "start") == 0) {return PIVariant::fromValue(object->start());} - if (strcmp(function, "start") == 0) {return PIVariant::fromValue(object->start(arg0.toValue()));} - if (strcmp(function, "start") == 0) {return PIVariant::fromValue(object->start(arg0.toValue()));} - if (strcmp(function, "start") == 0) {return PIVariant::fromValue(object->start(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "startOnce") == 0) {return PIVariant::fromValue(object->startOnce());} - if (strcmp(function, "startOnce") == 0) {return PIVariant::fromValue(object->startOnce(arg0.toValue()));} - if (strcmp(function, "stop") == 0) {object->stop(); return PIVariant();} - if (strcmp(function, "stop") == 0) {object->stop(arg0.toValue()); return PIVariant();} - if (strcmp(function, "terminate") == 0) {object->terminate(); return PIVariant();} - if (strcmp(function, "setData") == 0) {object->setData(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setSlot") == 0) {object->setSlot(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setPriority") == 0) {object->setPriority(arg0.toValue()); return PIVariant();} - if (strcmp(function, "priority") == 0) {return PIVariant::fromValue(object->priority());} - if (strcmp(function, "isRunning") == 0) {return PIVariant::fromValue(object->isRunning());} - if (strcmp(function, "isStopping") == 0) {return PIVariant::fromValue(object->isStopping());} - if (strcmp(function, "waitForStart") == 0) {return PIVariant::fromValue(object->waitForStart());} - if (strcmp(function, "waitForStart") == 0) {return PIVariant::fromValue(object->waitForStart(arg0.toValue()));} - if (strcmp(function, "waitForFinish") == 0) {return PIVariant::fromValue(object->waitForFinish());} - if (strcmp(function, "waitForFinish") == 0) {return PIVariant::fromValue(object->waitForFinish(arg0.toValue()));} - if (strcmp(function, "needLockRun") == 0) {object->needLockRun(arg0.toValue()); return PIVariant();} - if (strcmp(function, "lock") == 0) {object->lock(); return PIVariant();} - if (strcmp(function, "unlock") == 0) {object->unlock(); return PIVariant();} - if (strcmp(function, "started") == 0) {object->started(); return PIVariant();} - if (strcmp(function, "stopped") == 0) {object->stopped(); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIThread\"!"; - return PIVariant(); -} - -PIVariant execFunction(PITimer * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "setData") == 0) {object->setData(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setSlot") == 0) {object->setSlot(arg0.toValue()); return PIVariant();} - if (strcmp(function, "interval") == 0) {return PIVariant::fromValue(object->interval());} - if (strcmp(function, "reset") == 0) {object->reset(); return PIVariant();} - if (strcmp(function, "start") == 0) {object->start(arg0.toValue()); return PIVariant();} - if (strcmp(function, "start") == 0) {object->start(arg0.toValue()); return PIVariant();} - if (strcmp(function, "deferredStart") == 0) {object->deferredStart(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "deferredStart") == 0) {object->deferredStart(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "stop") == 0) {object->stop(); return PIVariant();} - if (strcmp(function, "addDelimiter") == 0) {object->addDelimiter(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "removeDelimiter") == 0) {object->removeDelimiter(arg0.toValue()); return PIVariant();} - if (strcmp(function, "removeDelimiter") == 0) {object->removeDelimiter(arg0.toValue()); return PIVariant();} - if (strcmp(function, "removeDelimiter") == 0) {object->removeDelimiter(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setDelimiterValue") == 0) {object->setDelimiterValue(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setDelimiterValue") == 0) {object->setDelimiterValue(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setDelimiterValue") == 0) {object->setDelimiterValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "delimiterValue") == 0) {return PIVariant::fromValue(object->delimiterValue(arg0.toValue()));} - if (strcmp(function, "delimiterValue") == 0) {return PIVariant::fromValue(object->delimiterValue(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "clearDelimiters") == 0) {object->clearDelimiters(); return PIVariant();} - if (strcmp(function, "elapsed_n") == 0) {return PIVariant::fromValue(object->elapsed_n());} - if (strcmp(function, "elapsed_u") == 0) {return PIVariant::fromValue(object->elapsed_u());} - if (strcmp(function, "elapsed_m") == 0) {return PIVariant::fromValue(object->elapsed_m());} - if (strcmp(function, "elapsed_s") == 0) {return PIVariant::fromValue(object->elapsed_s());} - if (strcmp(function, "reset_time_n") == 0) {return PIVariant::fromValue(object->reset_time_n());} - if (strcmp(function, "reset_time_u") == 0) {return PIVariant::fromValue(object->reset_time_u());} - if (strcmp(function, "reset_time_m") == 0) {return PIVariant::fromValue(object->reset_time_m());} - if (strcmp(function, "reset_time_s") == 0) {return PIVariant::fromValue(object->reset_time_s());} - if (strcmp(function, "reset_time") == 0) {return PIVariant::fromValue(object->reset_time());} - if (strcmp(function, "timeout") == 0) {object->timeout(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PITimer\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIKbdListener * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "data") == 0) {return PIVariant::fromValue(object->data());} - if (strcmp(function, "setData") == 0) {object->setData(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setSlot") == 0) {object->setSlot(arg0.toValue()); return PIVariant();} - if (strcmp(function, "exitCaptured") == 0) {return PIVariant::fromValue(object->exitCaptured());} - if (strcmp(function, "exitKey") == 0) {return PIVariant::fromValue(object->exitKey());} - if (strcmp(function, "isActive") == 0) {return PIVariant::fromValue(object->isActive());} - if (strcmp(function, "enableExitCapture") == 0) {object->enableExitCapture(); return PIVariant();} - if (strcmp(function, "enableExitCapture") == 0) {object->enableExitCapture(arg0.toValue()); return PIVariant();} - if (strcmp(function, "disableExitCapture") == 0) {object->disableExitCapture(); return PIVariant();} - if (strcmp(function, "setActive") == 0) {object->setActive(); return PIVariant();} - if (strcmp(function, "setActive") == 0) {object->setActive(arg0.toValue()); return PIVariant();} - if (strcmp(function, "keyPressed") == 0) {object->keyPressed(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIKbdListener\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIIODevice * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "mode") == 0) {return PIVariant::fromValue(object->mode());} - if (strcmp(function, "path") == 0) {return PIVariant::fromValue(object->path());} - if (strcmp(function, "setPath") == 0) {object->setPath(arg0.toValue()); return PIVariant();} - if (strcmp(function, "isReadable") == 0) {return PIVariant::fromValue(object->isReadable());} - if (strcmp(function, "isWriteable") == 0) {return PIVariant::fromValue(object->isWriteable());} - if (strcmp(function, "isInitialized") == 0) {return PIVariant::fromValue(object->isInitialized());} - if (strcmp(function, "isOpened") == 0) {return PIVariant::fromValue(object->isOpened());} - if (strcmp(function, "isClosed") == 0) {return PIVariant::fromValue(object->isClosed());} - if (strcmp(function, "canRead") == 0) {return PIVariant::fromValue(object->canRead());} - if (strcmp(function, "canWrite") == 0) {return PIVariant::fromValue(object->canWrite());} - if (strcmp(function, "setReopenEnabled") == 0) {object->setReopenEnabled(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setReopenTimeout") == 0) {object->setReopenTimeout(arg0.toValue()); return PIVariant();} - if (strcmp(function, "isReopenEnabled") == 0) {return PIVariant::fromValue(object->isReopenEnabled());} - if (strcmp(function, "reopenTimeout") == 0) {return PIVariant::fromValue(object->reopenTimeout());} - if (strcmp(function, "setThreadedReadSlot") == 0) {object->setThreadedReadSlot(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setThreadedReadData") == 0) {object->setThreadedReadData(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setThreadedReadBufferSize") == 0) {object->setThreadedReadBufferSize(arg0.toValue()); return PIVariant();} - if (strcmp(function, "threadedReadBufferSize") == 0) {return PIVariant::fromValue(object->threadedReadBufferSize());} - if (strcmp(function, "threadedReadBuffer") == 0) {return PIVariant::fromValue(object->threadedReadBuffer());} - if (strcmp(function, "isThreadedRead") == 0) {return PIVariant::fromValue(object->isThreadedRead());} - if (strcmp(function, "startThreadedRead") == 0) {object->startThreadedRead(); return PIVariant();} - if (strcmp(function, "startThreadedRead") == 0) {object->startThreadedRead(arg0.toValue()); return PIVariant();} - if (strcmp(function, "stopThreadedRead") == 0) {object->stopThreadedRead(); return PIVariant();} - if (strcmp(function, "isThreadedWrite") == 0) {return PIVariant::fromValue(object->isThreadedWrite());} - if (strcmp(function, "startThreadedWrite") == 0) {object->startThreadedWrite(); return PIVariant();} - if (strcmp(function, "stopThreadedWrite") == 0) {object->stopThreadedWrite(); return PIVariant();} - if (strcmp(function, "clearThreadedWriteQueue") == 0) {object->clearThreadedWriteQueue(); return PIVariant();} - if (strcmp(function, "start") == 0) {object->start(); return PIVariant();} - if (strcmp(function, "stop") == 0) {object->stop(arg0.toValue()); return PIVariant();} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue()));} - if (strcmp(function, "readForTime") == 0) {return PIVariant::fromValue(object->readForTime(arg0.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue()));} - if (strcmp(function, "writeThreaded") == 0) {return PIVariant::fromValue(object->writeThreaded(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "writeThreaded") == 0) {return PIVariant::fromValue(object->writeThreaded(arg0.toValue()));} - if (strcmp(function, "configure") == 0) {return PIVariant::fromValue(object->configure(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "open") == 0) {return PIVariant::fromValue(object->open());} - if (strcmp(function, "open") == 0) {return PIVariant::fromValue(object->open(arg0.toValue()));} - if (strcmp(function, "open") == 0) {return PIVariant::fromValue(object->open(arg0.toValue()));} - if (strcmp(function, "open") == 0) {return PIVariant::fromValue(object->open(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "close") == 0) {return PIVariant::fromValue(object->close());} - if (strcmp(function, "initialize") == 0) {return PIVariant::fromValue(object->initialize());} - if (strcmp(function, "flush") == 0) {object->flush(); return PIVariant();} - if (strcmp(function, "opened") == 0) {object->opened(); return PIVariant();} - if (strcmp(function, "closed") == 0) {object->closed(); return PIVariant();} - if (strcmp(function, "threadedReadEvent") == 0) {object->threadedReadEvent(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "threadedWriteEvent") == 0) {object->threadedWriteEvent(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIIODevice\"!"; - return PIVariant(); -} - -PIVariant execFunction(PISerial * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "setSpeed") == 0) {object->setSpeed(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setOutSpeed") == 0) {object->setOutSpeed(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setInSpeed") == 0) {object->setInSpeed(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setDevice") == 0) {object->setDevice(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setParameters") == 0) {object->setParameters(arg0.toValue >()); return PIVariant();} - if (strcmp(function, "setParameter") == 0) {object->setParameter(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "isParameterSet") == 0) {return PIVariant::fromValue(object->isParameterSet(arg0.toValue()));} - if (strcmp(function, "parameters") == 0) {return PIVariant::fromValue >(object->parameters());} - if (strcmp(function, "setDataBitsCount") == 0) {object->setDataBitsCount(arg0.toValue()); return PIVariant();} - if (strcmp(function, "dataBitsCount") == 0) {return PIVariant::fromValue(object->dataBitsCount());} - if (strcmp(function, "setPin") == 0) {return PIVariant::fromValue(object->setPin(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "isPin") == 0) {return PIVariant::fromValue(object->isPin(arg0.toValue()));} - if (strcmp(function, "setLE") == 0) {return PIVariant::fromValue(object->setLE(arg0.toValue()));} - if (strcmp(function, "setDTR") == 0) {return PIVariant::fromValue(object->setDTR(arg0.toValue()));} - if (strcmp(function, "setRTS") == 0) {return PIVariant::fromValue(object->setRTS(arg0.toValue()));} - if (strcmp(function, "setCTS") == 0) {return PIVariant::fromValue(object->setCTS(arg0.toValue()));} - if (strcmp(function, "setST") == 0) {return PIVariant::fromValue(object->setST(arg0.toValue()));} - if (strcmp(function, "setSR") == 0) {return PIVariant::fromValue(object->setSR(arg0.toValue()));} - if (strcmp(function, "setCAR") == 0) {return PIVariant::fromValue(object->setCAR(arg0.toValue()));} - if (strcmp(function, "setRNG") == 0) {return PIVariant::fromValue(object->setRNG(arg0.toValue()));} - if (strcmp(function, "setDSR") == 0) {return PIVariant::fromValue(object->setDSR(arg0.toValue()));} - if (strcmp(function, "isLE") == 0) {return PIVariant::fromValue(object->isLE());} - if (strcmp(function, "isDTR") == 0) {return PIVariant::fromValue(object->isDTR());} - if (strcmp(function, "isRTS") == 0) {return PIVariant::fromValue(object->isRTS());} - if (strcmp(function, "isCTS") == 0) {return PIVariant::fromValue(object->isCTS());} - if (strcmp(function, "isST") == 0) {return PIVariant::fromValue(object->isST());} - if (strcmp(function, "isSR") == 0) {return PIVariant::fromValue(object->isSR());} - if (strcmp(function, "isCAR") == 0) {return PIVariant::fromValue(object->isCAR());} - if (strcmp(function, "isRNG") == 0) {return PIVariant::fromValue(object->isRNG());} - if (strcmp(function, "isDSR") == 0) {return PIVariant::fromValue(object->isDSR());} - if (strcmp(function, "setVTime") == 0) {object->setVTime(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setReadIsBlocking") == 0) {object->setReadIsBlocking(arg0.toValue()); return PIVariant();} - if (strcmp(function, "device") == 0) {return PIVariant::fromValue(object->device());} - if (strcmp(function, "outSpeed") == 0) {return PIVariant::fromValue(object->outSpeed());} - if (strcmp(function, "inSpeed") == 0) {return PIVariant::fromValue(object->inSpeed());} - if (strcmp(function, "VTime") == 0) {return PIVariant::fromValue(object->VTime());} - if (strcmp(function, "flush") == 0) {object->flush(); return PIVariant();} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "readData") == 0) {return PIVariant::fromValue(object->readData(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PISerial\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIFile * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "flush") == 0) {object->flush(); return PIVariant();} - if (strcmp(function, "seek") == 0) {object->seek(arg0.toValue()); return PIVariant();} - if (strcmp(function, "seekToBegin") == 0) {object->seekToBegin(); return PIVariant();} - if (strcmp(function, "seekToEnd") == 0) {object->seekToEnd(); return PIVariant();} - if (strcmp(function, "seekToLine") == 0) {object->seekToLine(arg0.toValue()); return PIVariant();} - if (strcmp(function, "readChar") == 0) {return PIVariant::fromValue(object->readChar());} - if (strcmp(function, "readLine") == 0) {return PIVariant::fromValue(object->readLine());} - if (strcmp(function, "readAll") == 0) {return PIVariant::fromValue(object->readAll(arg0.toValue()));} - if (strcmp(function, "readAll") == 0) {return PIVariant::fromValue(object->readAll(arg0.toValue()));} - if (strcmp(function, "setPath") == 0) {object->setPath(arg0.toValue()); return PIVariant();} - if (strcmp(function, "size") == 0) {return PIVariant::fromValue(object->size());} - if (strcmp(function, "pos") == 0) {return PIVariant::fromValue(object->pos());} - if (strcmp(function, "isEnd") == 0) {return PIVariant::fromValue(object->isEnd());} - if (strcmp(function, "isEmpty") == 0) {return PIVariant::fromValue(object->isEmpty());} - if (strcmp(function, "precision") == 0) {return PIVariant::fromValue(object->precision());} - if (strcmp(function, "setPrecision") == 0) {object->setPrecision(arg0.toValue()); return PIVariant();} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "clear") == 0) {object->clear(); return PIVariant();} - if (strcmp(function, "remove") == 0) {object->remove(); return PIVariant();} - if (strcmp(function, "resize") == 0) {object->resize(arg0.toValue()); return PIVariant();} - if (strcmp(function, "resize") == 0) {object->resize(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIFile\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIProcess * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "exitCode") == 0) {return PIVariant::fromValue(object->exitCode());} - if (strcmp(function, "pID") == 0) {return PIVariant::fromValue(object->pID());} - if (strcmp(function, "setGrabInput") == 0) {object->setGrabInput(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setGrabOutput") == 0) {object->setGrabOutput(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setGrabError") == 0) {object->setGrabError(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setInputFile") == 0) {object->setInputFile(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setOutputFile") == 0) {object->setOutputFile(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setErrorFile") == 0) {object->setErrorFile(arg0.toValue()); return PIVariant();} - if (strcmp(function, "unsetInputFile") == 0) {object->unsetInputFile(); return PIVariant();} - if (strcmp(function, "unsetOutputFile") == 0) {object->unsetOutputFile(); return PIVariant();} - if (strcmp(function, "unsetErrorFile") == 0) {object->unsetErrorFile(); return PIVariant();} - if (strcmp(function, "workingDirectory") == 0) {return PIVariant::fromValue(object->workingDirectory());} - if (strcmp(function, "setWorkingDirectory") == 0) {object->setWorkingDirectory(arg0.toValue()); return PIVariant();} - if (strcmp(function, "resetWorkingDirectory") == 0) {object->resetWorkingDirectory(); return PIVariant();} - if (strcmp(function, "readOutput") == 0) {return PIVariant::fromValue(object->readOutput());} - if (strcmp(function, "readError") == 0) {return PIVariant::fromValue(object->readError());} - if (strcmp(function, "environment") == 0) {return PIVariant::fromValue(object->environment());} - if (strcmp(function, "clearEnvironment") == 0) {object->clearEnvironment(); return PIVariant();} - if (strcmp(function, "removeEnvironmentVariable") == 0) {object->removeEnvironmentVariable(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setEnvironmentVariable") == 0) {object->setEnvironmentVariable(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "exec") == 0) {object->exec(arg0.toValue()); return PIVariant();} - if (strcmp(function, "exec") == 0) {object->exec(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "exec") == 0) {object->exec(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "exec") == 0) {object->exec(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue()); return PIVariant();} - if (strcmp(function, "exec") == 0) {object->exec(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "terminate") == 0) {object->terminate(); return PIVariant();} - if (strcmp(function, "waitForFinish") == 0) {return PIVariant::fromValue(object->waitForFinish());} - if (strcmp(function, "waitForFinish") == 0) {return PIVariant::fromValue(object->waitForFinish(arg0.toValue()));} - if (strcmp(function, "execStarted") == 0) {object->execStarted(arg0.toValue()); return PIVariant();} - if (strcmp(function, "execFinished") == 0) {object->execFinished(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIProcess\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIEthernet * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "setReadAddress") == 0) {object->setReadAddress(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setReadAddress") == 0) {object->setReadAddress(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setReadIP") == 0) {object->setReadIP(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setReadPort") == 0) {object->setReadPort(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setSendAddress") == 0) {object->setSendAddress(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setSendAddress") == 0) {object->setSendAddress(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setSendIP") == 0) {object->setSendIP(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setSendPort") == 0) {object->setSendPort(arg0.toValue()); return PIVariant();} - if (strcmp(function, "readAddress") == 0) {return PIVariant::fromValue(object->readAddress());} - if (strcmp(function, "readIP") == 0) {return PIVariant::fromValue(object->readIP());} - if (strcmp(function, "readPort") == 0) {return PIVariant::fromValue(object->readPort());} - if (strcmp(function, "sendAddress") == 0) {return PIVariant::fromValue(object->sendAddress());} - if (strcmp(function, "sendIP") == 0) {return PIVariant::fromValue(object->sendIP());} - if (strcmp(function, "sendPort") == 0) {return PIVariant::fromValue(object->sendPort());} - if (strcmp(function, "setParameters") == 0) {object->setParameters(arg0.toValue >()); return PIVariant();} - if (strcmp(function, "setParameter") == 0) {object->setParameter(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "isParameterSet") == 0) {return PIVariant::fromValue(object->isParameterSet(arg0.toValue()));} - if (strcmp(function, "parameters") == 0) {return PIVariant::fromValue >(object->parameters());} - if (strcmp(function, "type") == 0) {return PIVariant::fromValue(object->type());} - if (strcmp(function, "joinMulticastGroup") == 0) {return PIVariant::fromValue(object->joinMulticastGroup(arg0.toValue()));} - if (strcmp(function, "leaveMulticastGroup") == 0) {return PIVariant::fromValue(object->leaveMulticastGroup(arg0.toValue()));} - if (strcmp(function, "multicastGroups") == 0) {return PIVariant::fromValue(object->multicastGroups());} - if (strcmp(function, "connect") == 0) {return PIVariant::fromValue(object->connect());} - if (strcmp(function, "connect") == 0) {return PIVariant::fromValue(object->connect(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "connect") == 0) {return PIVariant::fromValue(object->connect(arg0.toValue()));} - if (strcmp(function, "isConnected") == 0) {return PIVariant::fromValue(object->isConnected());} - if (strcmp(function, "listen") == 0) {return PIVariant::fromValue(object->listen());} - if (strcmp(function, "listen") == 0) {return PIVariant::fromValue(object->listen(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "listen") == 0) {return PIVariant::fromValue(object->listen(arg0.toValue()));} - if (strcmp(function, "client") == 0) {return PIVariant::fromValue(object->client(arg0.toValue()));} - if (strcmp(function, "clientsCount") == 0) {return PIVariant::fromValue(object->clientsCount());} - if (strcmp(function, "clients") == 0) {return PIVariant::fromValue >(object->clients());} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue()));} - if (strcmp(function, "newConnection") == 0) {object->newConnection(arg0.toValue()); return PIVariant();} - if (strcmp(function, "connected") == 0) {object->connected(); return PIVariant();} - if (strcmp(function, "disconnected") == 0) {object->disconnected(arg0.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIEthernet\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIPacketExtractor * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "device") == 0) {return PIVariant::fromValue(object->device());} - if (strcmp(function, "setDevice") == 0) {object->setDevice(arg0.toValue()); return PIVariant();} - if (strcmp(function, "bufferSize") == 0) {return PIVariant::fromValue(object->bufferSize());} - if (strcmp(function, "setBufferSize") == 0) {object->setBufferSize(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setHeaderCheckSlot") == 0) {object->setHeaderCheckSlot(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setPacketData") == 0) {object->setPacketData(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "missedBytes") == 0) {return PIVariant::fromValue(object->missedBytes());} - if (strcmp(function, "missedPackets") == 0) {return PIVariant::fromValue(object->missedPackets());} - if (strcmp(function, "missedBytes_ptr") == 0) {return PIVariant::fromValue(object->missedBytes_ptr());} - if (strcmp(function, "missedPackets_ptr") == 0) {return PIVariant::fromValue(object->missedPackets_ptr());} - if (strcmp(function, "lastHeader") == 0) {return PIVariant::fromValue(object->lastHeader());} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "packetReceived") == 0) {object->packetReceived(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIPacketExtractor\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIConfig * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "getValues") == 0) {return PIVariant::fromValue(object->getValues(arg0.toValue()));} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "entriesCount") == 0) {return PIVariant::fromValue(object->entriesCount());} - if (strcmp(function, "isEntryExists") == 0) {return PIVariant::fromValue(object->isEntryExists(arg0.toValue()));} - if (strcmp(function, "allTree") == 0) {return PIVariant::fromValue(object->allTree());} - if (strcmp(function, "allLeaves") == 0) {return PIVariant::fromValue(object->allLeaves());} - if (strcmp(function, "entryIndex") == 0) {return PIVariant::fromValue(object->entryIndex(arg0.toValue()));} - if (strcmp(function, "getName") == 0) {return PIVariant::fromValue(object->getName(arg0.toValue()));} - if (strcmp(function, "getValue") == 0) {return PIVariant::fromValue(object->getValue(arg0.toValue()));} - if (strcmp(function, "getType") == 0) {return PIVariant::fromValue(object->getType(arg0.toValue()));} - if (strcmp(function, "getComment") == 0) {return PIVariant::fromValue(object->getComment(arg0.toValue()));} - if (strcmp(function, "addEntry") == 0) {object->addEntry(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue()); return PIVariant();} - if (strcmp(function, "setName") == 0) {object->setName(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setValue") == 0) {object->setValue(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setType") == 0) {object->setType(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setComment") == 0) {object->setComment(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "removeEntry") == 0) {object->removeEntry(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "removeEntry") == 0) {object->removeEntry(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "clear") == 0) {object->clear(); return PIVariant();} - if (strcmp(function, "readAll") == 0) {object->readAll(); return PIVariant();} - if (strcmp(function, "writeAll") == 0) {object->writeAll(); return PIVariant();} - if (strcmp(function, "delimiter") == 0) {return PIVariant::fromValue(object->delimiter());} - if (strcmp(function, "setDelimiter") == 0) {object->setDelimiter(arg0.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIConfig\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIMultiProtocolBase * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIMultiProtocolBase\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIProtocol * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "startReceive") == 0) {object->startReceive(); return PIVariant();} - if (strcmp(function, "startReceive") == 0) {object->startReceive(arg0.toValue()); return PIVariant();} - if (strcmp(function, "stopReceive") == 0) {object->stopReceive(); return PIVariant();} - if (strcmp(function, "setExpectedFrequency") == 0) {object->setExpectedFrequency(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setReceiverDevice") == 0) {object->setReceiverDevice(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setReceiverData") == 0) {object->setReceiverData(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setReceiverDataHeader") == 0) {object->setReceiverDataHeader(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setReceiverAddress") == 0) {object->setReceiverAddress(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setReceiverParameters") == 0) {object->setReceiverParameters(arg0.toValue >()); return PIVariant();} - if (strcmp(function, "setReceiveSlot") == 0) {object->setReceiveSlot(arg0.toValue()); return PIVariant();} - if (strcmp(function, "expectedFrequency") == 0) {return PIVariant::fromValue(object->expectedFrequency());} - if (strcmp(function, "startSend") == 0) {object->startSend(); return PIVariant();} - if (strcmp(function, "startSend") == 0) {object->startSend(arg0.toValue()); return PIVariant();} - if (strcmp(function, "stopSend") == 0) {object->stopSend(); return PIVariant();} - if (strcmp(function, "setSenderFrequency") == 0) {object->setSenderFrequency(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setSenderDevice") == 0) {object->setSenderDevice(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setSenderData") == 0) {object->setSenderData(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setSenderAddress") == 0) {object->setSenderAddress(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setSenderIP") == 0) {object->setSenderIP(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setSenderPort") == 0) {object->setSenderPort(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setSenderParameters") == 0) {object->setSenderParameters(arg0.toValue >()); return PIVariant();} - if (strcmp(function, "senderFrequency") == 0) {return PIVariant::fromValue(object->senderFrequency());} - if (strcmp(function, "start") == 0) {object->start(); return PIVariant();} - if (strcmp(function, "stop") == 0) {object->stop(); return PIVariant();} - if (strcmp(function, "send") == 0) {object->send(); return PIVariant();} - if (strcmp(function, "send") == 0) {object->send(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "send") == 0) {object->send(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "setName") == 0) {object->setName(arg0.toValue()); return PIVariant();} - if (strcmp(function, "name") == 0) {return PIVariant::fromValue(object->name());} - if (strcmp(function, "setDisconnectTimeout") == 0) {object->setDisconnectTimeout(arg0.toValue()); return PIVariant();} - if (strcmp(function, "disconnectTimeout") == 0) {return PIVariant::fromValue(object->disconnectTimeout());} - if (strcmp(function, "disconnectTimeout_ptr") == 0) {return PIVariant::fromValue(object->disconnectTimeout_ptr());} - if (strcmp(function, "immediateFrequency") == 0) {return PIVariant::fromValue(object->immediateFrequency());} - if (strcmp(function, "integralFrequency") == 0) {return PIVariant::fromValue(object->integralFrequency());} - if (strcmp(function, "immediateFrequency_ptr") == 0) {return PIVariant::fromValue(object->immediateFrequency_ptr());} - if (strcmp(function, "integralFrequency_ptr") == 0) {return PIVariant::fromValue(object->integralFrequency_ptr());} - if (strcmp(function, "receiveCountPerSec") == 0) {return PIVariant::fromValue(object->receiveCountPerSec());} - if (strcmp(function, "receiveCountPerSec_ptr") == 0) {return PIVariant::fromValue(object->receiveCountPerSec_ptr());} - if (strcmp(function, "sendCountPerSec") == 0) {return PIVariant::fromValue(object->sendCountPerSec());} - if (strcmp(function, "sendCountPerSec_ptr") == 0) {return PIVariant::fromValue(object->sendCountPerSec_ptr());} - if (strcmp(function, "receiveBytesPerSec") == 0) {return PIVariant::fromValue(object->receiveBytesPerSec());} - if (strcmp(function, "receiveBytesPerSec_ptr") == 0) {return PIVariant::fromValue(object->receiveBytesPerSec_ptr());} - if (strcmp(function, "sendBytesPerSec") == 0) {return PIVariant::fromValue(object->sendBytesPerSec());} - if (strcmp(function, "sendBytesPerSec_ptr") == 0) {return PIVariant::fromValue(object->sendBytesPerSec_ptr());} - if (strcmp(function, "receiveCount") == 0) {return PIVariant::fromValue(object->receiveCount());} - if (strcmp(function, "receiveCount_ptr") == 0) {return PIVariant::fromValue(object->receiveCount_ptr());} - if (strcmp(function, "wrongCount") == 0) {return PIVariant::fromValue(object->wrongCount());} - if (strcmp(function, "wrongCount_ptr") == 0) {return PIVariant::fromValue(object->wrongCount_ptr());} - if (strcmp(function, "sendCount") == 0) {return PIVariant::fromValue(object->sendCount());} - if (strcmp(function, "sendCount_ptr") == 0) {return PIVariant::fromValue(object->sendCount_ptr());} - if (strcmp(function, "missedCount") == 0) {return PIVariant::fromValue(object->missedCount());} - if (strcmp(function, "missedCount_ptr") == 0) {return PIVariant::fromValue(object->missedCount_ptr());} - if (strcmp(function, "quality") == 0) {return PIVariant::fromValue(object->quality());} - if (strcmp(function, "quality_ptr") == 0) {return PIVariant::fromValue(object->quality_ptr());} - if (strcmp(function, "receiverDeviceName") == 0) {return PIVariant::fromValue(object->receiverDeviceName());} - if (strcmp(function, "senderDeviceName") == 0) {return PIVariant::fromValue(object->senderDeviceName());} - if (strcmp(function, "receiverDeviceState") == 0) {return PIVariant::fromValue(object->receiverDeviceState());} - if (strcmp(function, "receiverDeviceState_ptr") == 0) {return PIVariant::fromValue(object->receiverDeviceState_ptr());} - if (strcmp(function, "senderDeviceState") == 0) {return PIVariant::fromValue(object->senderDeviceState());} - if (strcmp(function, "senderDeviceState_ptr") == 0) {return PIVariant::fromValue(object->senderDeviceState_ptr());} - if (strcmp(function, "receiveSpeed") == 0) {return PIVariant::fromValue(object->receiveSpeed());} - if (strcmp(function, "receiveSpeed_ptr") == 0) {return PIVariant::fromValue(object->receiveSpeed_ptr());} - if (strcmp(function, "sendSpeed") == 0) {return PIVariant::fromValue(object->sendSpeed());} - if (strcmp(function, "sendSpeed_ptr") == 0) {return PIVariant::fromValue(object->sendSpeed_ptr());} - if (strcmp(function, "receiverHistorySize") == 0) {return PIVariant::fromValue(object->receiverHistorySize());} - if (strcmp(function, "receiverHistorySize_ptr") == 0) {return PIVariant::fromValue(object->receiverHistorySize_ptr());} - if (strcmp(function, "senderHistorySize") == 0) {return PIVariant::fromValue(object->senderHistorySize());} - if (strcmp(function, "senderHistorySize_ptr") == 0) {return PIVariant::fromValue(object->senderHistorySize_ptr());} - if (strcmp(function, "writeReceiverHistory") == 0) {return PIVariant::fromValue(object->writeReceiverHistory());} - if (strcmp(function, "writeReceiverHistory_ptr") == 0) {return PIVariant::fromValue(object->writeReceiverHistory_ptr());} - if (strcmp(function, "writeSenderHistory") == 0) {return PIVariant::fromValue(object->writeSenderHistory());} - if (strcmp(function, "writeSenderHistory_ptr") == 0) {return PIVariant::fromValue(object->writeSenderHistory_ptr());} - if (strcmp(function, "receiveData") == 0) {return PIVariant::fromValue(object->receiveData());} - if (strcmp(function, "sendData") == 0) {return PIVariant::fromValue(object->sendData());} - if (strcmp(function, "packetExtractor") == 0) {return PIVariant::fromValue(object->packetExtractor());} - if (strcmp(function, "lastHeader") == 0) {return PIVariant::fromValue(object->lastHeader());} - if (strcmp(function, "receiverStarted") == 0) {object->receiverStarted(); return PIVariant();} - if (strcmp(function, "receiverStopped") == 0) {object->receiverStopped(); return PIVariant();} - if (strcmp(function, "senderStarted") == 0) {object->senderStarted(); return PIVariant();} - if (strcmp(function, "senderStopped") == 0) {object->senderStopped(); return PIVariant();} - if (strcmp(function, "received") == 0) {object->received(arg0.toValue()); return PIVariant();} - if (strcmp(function, "qualityChanged") == 0) {object->qualityChanged(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIProtocol\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIDiagnostics * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "immediateFrequency") == 0) {return PIVariant::fromValue(object->immediateFrequency());} - if (strcmp(function, "integralFrequency") == 0) {return PIVariant::fromValue(object->integralFrequency());} - if (strcmp(function, "receiveCountPerSec") == 0) {return PIVariant::fromValue(object->receiveCountPerSec());} - if (strcmp(function, "sendCountPerSec") == 0) {return PIVariant::fromValue(object->sendCountPerSec());} - if (strcmp(function, "receiveBytesPerSec") == 0) {return PIVariant::fromValue(object->receiveBytesPerSec());} - if (strcmp(function, "sendBytesPerSec") == 0) {return PIVariant::fromValue(object->sendBytesPerSec());} - if (strcmp(function, "receiveCount") == 0) {return PIVariant::fromValue(object->receiveCount());} - if (strcmp(function, "wrongCount") == 0) {return PIVariant::fromValue(object->wrongCount());} - if (strcmp(function, "sendCount") == 0) {return PIVariant::fromValue(object->sendCount());} - if (strcmp(function, "quality") == 0) {return PIVariant::fromValue(object->quality());} - if (strcmp(function, "receiveSpeed") == 0) {return PIVariant::fromValue(object->receiveSpeed());} - if (strcmp(function, "sendSpeed") == 0) {return PIVariant::fromValue(object->sendSpeed());} - if (strcmp(function, "immediateFrequency_ptr") == 0) {return PIVariant::fromValue(object->immediateFrequency_ptr());} - if (strcmp(function, "integralFrequency_ptr") == 0) {return PIVariant::fromValue(object->integralFrequency_ptr());} - if (strcmp(function, "receiveCountPerSec_ptr") == 0) {return PIVariant::fromValue(object->receiveCountPerSec_ptr());} - if (strcmp(function, "sendCountPerSec_ptr") == 0) {return PIVariant::fromValue(object->sendCountPerSec_ptr());} - if (strcmp(function, "receiveBytesPerSec_ptr") == 0) {return PIVariant::fromValue(object->receiveBytesPerSec_ptr());} - if (strcmp(function, "sendBytesPerSec_ptr") == 0) {return PIVariant::fromValue(object->sendBytesPerSec_ptr());} - if (strcmp(function, "receiveCount_ptr") == 0) {return PIVariant::fromValue(object->receiveCount_ptr());} - if (strcmp(function, "wrongCount_ptr") == 0) {return PIVariant::fromValue(object->wrongCount_ptr());} - if (strcmp(function, "sendCount_ptr") == 0) {return PIVariant::fromValue(object->sendCount_ptr());} - if (strcmp(function, "quality_ptr") == 0) {return PIVariant::fromValue(object->quality_ptr());} - if (strcmp(function, "receiveSpeed_ptr") == 0) {return PIVariant::fromValue(object->receiveSpeed_ptr());} - if (strcmp(function, "sendSpeed_ptr") == 0) {return PIVariant::fromValue(object->sendSpeed_ptr());} - if (strcmp(function, "start") == 0) {object->start(); return PIVariant();} - if (strcmp(function, "start") == 0) {object->start(arg0.toValue()); return PIVariant();} - if (strcmp(function, "reset") == 0) {object->reset(); return PIVariant();} - if (strcmp(function, "received") == 0) {object->received(arg0.toValue()); return PIVariant();} - if (strcmp(function, "received") == 0) {object->received(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "sended") == 0) {object->sended(arg0.toValue()); return PIVariant();} - if (strcmp(function, "qualityChanged") == 0) {object->qualityChanged(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIDiagnostics\"!"; - return PIVariant(); -} - -PIVariant execFunction(PISystemMonitor * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "startOnProcess") == 0) {return PIVariant::fromValue(object->startOnProcess(arg0.toValue()));} - if (strcmp(function, "startOnSelf") == 0) {return PIVariant::fromValue(object->startOnSelf());} - if (strcmp(function, "statistic") == 0) {return PIVariant::fromValue(object->statistic());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PISystemMonitor\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIConsole * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "addString") == 0) {object->addString(arg0.toValue(), arg1.toValue(), arg2.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue >()); return PIVariant();} - if (strcmp(function, "addEmptyLine") == 0) {object->addEmptyLine(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "getString") == 0) {return PIVariant::fromValue(object->getString(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "getShort") == 0) {return PIVariant::fromValue(object->getShort(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "getInt") == 0) {return PIVariant::fromValue(object->getInt(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "getFloat") == 0) {return PIVariant::fromValue(object->getFloat(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "getDouble") == 0) {return PIVariant::fromValue(object->getDouble(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "getString") == 0) {return PIVariant::fromValue(object->getString(arg0.toValue()));} - if (strcmp(function, "getShort") == 0) {return PIVariant::fromValue(object->getShort(arg0.toValue()));} - if (strcmp(function, "getInt") == 0) {return PIVariant::fromValue(object->getInt(arg0.toValue()));} - if (strcmp(function, "getFloat") == 0) {return PIVariant::fromValue(object->getFloat(arg0.toValue()));} - if (strcmp(function, "getDouble") == 0) {return PIVariant::fromValue(object->getDouble(arg0.toValue()));} - if (strcmp(function, "tabsCount") == 0) {return PIVariant::fromValue(object->tabsCount());} - if (strcmp(function, "currentTab") == 0) {return PIVariant::fromValue(object->currentTab());} - if (strcmp(function, "addTab") == 0) {return PIVariant::fromValue(object->addTab(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "removeTab") == 0) {object->removeTab(arg0.toValue()); return PIVariant();} - if (strcmp(function, "removeTab") == 0) {object->removeTab(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setTab") == 0) {return PIVariant::fromValue(object->setTab(arg0.toValue()));} - if (strcmp(function, "setTab") == 0) {return PIVariant::fromValue(object->setTab(arg0.toValue()));} - if (strcmp(function, "setTabBindKey") == 0) {return PIVariant::fromValue(object->setTabBindKey(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "setTabBindKey") == 0) {return PIVariant::fromValue(object->setTabBindKey(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "clearTabs") == 0) {object->clearTabs(arg0.toValue()); return PIVariant();} - if (strcmp(function, "addCustomStatus") == 0) {object->addCustomStatus(arg0.toValue()); return PIVariant();} - if (strcmp(function, "clearCustomStatus") == 0) {object->clearCustomStatus(); return PIVariant();} - if (strcmp(function, "defaultAlignment") == 0) {return PIVariant::fromValue(object->defaultAlignment());} - if (strcmp(function, "setDefaultAlignment") == 0) {object->setDefaultAlignment(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setColumnAlignment") == 0) {object->setColumnAlignment(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setColumnAlignmentToAll") == 0) {object->setColumnAlignmentToAll(arg0.toValue()); return PIVariant();} - if (strcmp(function, "fstr") == 0) {return PIVariant::fromValue(object->fstr(arg0.toValue >()));} - if (strcmp(function, "enableExitCapture") == 0) {object->enableExitCapture(arg0.toValue()); return PIVariant();} - if (strcmp(function, "disableExitCapture") == 0) {object->disableExitCapture(); return PIVariant();} - if (strcmp(function, "exitCaptured") == 0) {return PIVariant::fromValue(object->exitCaptured());} - if (strcmp(function, "exitKey") == 0) {return PIVariant::fromValue(object->exitKey());} - if (strcmp(function, "startServer") == 0) {object->startServer(arg0.toValue()); return PIVariant();} - if (strcmp(function, "stopPeer") == 0) {object->stopPeer(); return PIVariant();} - if (strcmp(function, "isServerStarted") == 0) {return PIVariant::fromValue(object->isServerStarted());} - if (strcmp(function, "clients") == 0) {return PIVariant::fromValue(object->clients());} - if (strcmp(function, "listenServers") == 0) {object->listenServers(); return PIVariant();} - if (strcmp(function, "availableServers") == 0) {return PIVariant::fromValue(object->availableServers());} - if (strcmp(function, "selectedServer") == 0) {return PIVariant::fromValue(object->selectedServer());} - if (strcmp(function, "connectToServer") == 0) {object->connectToServer(arg0.toValue()); return PIVariant();} - if (strcmp(function, "disconnect") == 0) {object->disconnect(); return PIVariant();} - if (strcmp(function, "isConnected") == 0) {return PIVariant::fromValue(object->isConnected());} - if (strcmp(function, "toUpperLeft") == 0) {object->toUpperLeft(); return PIVariant();} - if (strcmp(function, "moveRight") == 0) {object->moveRight(arg0.toValue()); return PIVariant();} - if (strcmp(function, "moveLeft") == 0) {object->moveLeft(arg0.toValue()); return PIVariant();} - if (strcmp(function, "moveTo") == 0) {object->moveTo(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "clearScreen") == 0) {object->clearScreen(); return PIVariant();} - if (strcmp(function, "clearScreenLower") == 0) {object->clearScreenLower(); return PIVariant();} - if (strcmp(function, "clearLine") == 0) {object->clearLine(); return PIVariant();} - if (strcmp(function, "newLine") == 0) {object->newLine(); return PIVariant();} - if (strcmp(function, "hideCursor") == 0) {object->hideCursor(); return PIVariant();} - if (strcmp(function, "showCursor") == 0) {object->showCursor(); return PIVariant();} - if (strcmp(function, "clearVariables") == 0) {object->clearVariables(); return PIVariant();} - if (strcmp(function, "clearVariables") == 0) {object->clearVariables(arg0.toValue()); return PIVariant();} - if (strcmp(function, "waitForFinish") == 0) {object->waitForFinish(); return PIVariant();} - if (strcmp(function, "start") == 0) {object->start(); return PIVariant();} - if (strcmp(function, "start") == 0) {object->start(arg0.toValue()); return PIVariant();} - if (strcmp(function, "stop") == 0) {object->stop(); return PIVariant();} - if (strcmp(function, "stop") == 0) {object->stop(arg0.toValue()); return PIVariant();} - if (strcmp(function, "keyPressed") == 0) {object->keyPressed(arg0.toValue(), arg1.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIConsole\"!"; - return PIVariant(); -} - -PIVariant execFunction(PICLI * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "addArgument") == 0) {object->addArgument(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "addArgument") == 0) {object->addArgument(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "addArgument") == 0) {object->addArgument(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "addArgument") == 0) {object->addArgument(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue()); return PIVariant();} - if (strcmp(function, "addArgument") == 0) {object->addArgument(arg0.toValue(), arg1.toValue(), arg2.toValue(), arg3.toValue()); return PIVariant();} - if (strcmp(function, "rawArgument") == 0) {return PIVariant::fromValue(object->rawArgument(arg0.toValue()));} - if (strcmp(function, "mandatoryArgument") == 0) {return PIVariant::fromValue(object->mandatoryArgument(arg0.toValue()));} - if (strcmp(function, "optionalArgument") == 0) {return PIVariant::fromValue(object->optionalArgument(arg0.toValue()));} - if (strcmp(function, "rawArguments") == 0) {return PIVariant::fromValue(object->rawArguments());} - if (strcmp(function, "mandatoryArguments") == 0) {return PIVariant::fromValue(object->mandatoryArguments());} - if (strcmp(function, "optionalArguments") == 0) {return PIVariant::fromValue(object->optionalArguments());} - if (strcmp(function, "programCommand") == 0) {return PIVariant::fromValue(object->programCommand());} - if (strcmp(function, "hasArgument") == 0) {return PIVariant::fromValue(object->hasArgument(arg0.toValue()));} - if (strcmp(function, "argumentValue") == 0) {return PIVariant::fromValue(object->argumentValue(arg0.toValue()));} - if (strcmp(function, "argumentShortKey") == 0) {return PIVariant::fromValue(object->argumentShortKey(arg0.toValue()));} - if (strcmp(function, "argumentFullKey") == 0) {return PIVariant::fromValue(object->argumentFullKey(arg0.toValue()));} - if (strcmp(function, "shortKeyPrefix") == 0) {return PIVariant::fromValue(object->shortKeyPrefix());} - if (strcmp(function, "fullKeyPrefix") == 0) {return PIVariant::fromValue(object->fullKeyPrefix());} - if (strcmp(function, "mandatoryArgumentsCount") == 0) {return PIVariant::fromValue(object->mandatoryArgumentsCount());} - if (strcmp(function, "optionalArgumentsCount") == 0) {return PIVariant::fromValue(object->optionalArgumentsCount());} - if (strcmp(function, "setShortKeyPrefix") == 0) {object->setShortKeyPrefix(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setFullKeyPrefix") == 0) {object->setFullKeyPrefix(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setMandatoryArgumentsCount") == 0) {object->setMandatoryArgumentsCount(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setOptionalArgumentsCount") == 0) {object->setOptionalArgumentsCount(arg0.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PICLI\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIEvaluatorContent * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "addFunction") == 0) {object->addFunction(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "addVariable") == 0) {object->addVariable(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "addCustomFunction") == 0) {object->addCustomFunction(arg0.toValue(), arg1.toValue(), arg2.toValue()); return PIVariant();} - if (strcmp(function, "functionsCount") == 0) {return PIVariant::fromValue(object->functionsCount());} - if (strcmp(function, "variablesCount") == 0) {return PIVariant::fromValue(object->variablesCount());} - if (strcmp(function, "customVariablesCount") == 0) {return PIVariant::fromValue(object->customVariablesCount());} - if (strcmp(function, "findFunction") == 0) {return PIVariant::fromValue(object->findFunction(arg0.toValue()));} - if (strcmp(function, "findVariable") == 0) {return PIVariant::fromValue(object->findVariable(arg0.toValue()));} - if (strcmp(function, "function") == 0) {return PIVariant::fromValue(object->function(arg0.toValue()));} - if (strcmp(function, "variable") == 0) {return PIVariant::fromValue(object->variable(arg0.toValue()));} - if (strcmp(function, "function") == 0) {return PIVariant::fromValue(object->function(arg0.toValue()));} - if (strcmp(function, "variable") == 0) {return PIVariant::fromValue(object->variable(arg0.toValue()));} - if (strcmp(function, "customVariable") == 0) {return PIVariant::fromValue(object->customVariable(arg0.toValue()));} - if (strcmp(function, "setVariableValue") == 0) {return PIVariant::fromValue(object->setVariableValue(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "setVariableName") == 0) {return PIVariant::fromValue(object->setVariableName(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "setVariableValue") == 0) {return PIVariant::fromValue(object->setVariableValue(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "setVariableName") == 0) {return PIVariant::fromValue(object->setVariableName(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "removeVariable") == 0) {object->removeVariable(arg0.toValue()); return PIVariant();} - if (strcmp(function, "removeVariable") == 0) {object->removeVariable(arg0.toValue()); return PIVariant();} - if (strcmp(function, "clearCustomVariables") == 0) {object->clearCustomVariables(); return PIVariant();} - if (strcmp(function, "sortVariables") == 0) {object->sortVariables(); return PIVariant();} - if (strcmp(function, "getBaseFunction") == 0) {return PIVariant::fromValue(object->getBaseFunction(arg0.toValue()));} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIEvaluatorContent\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIEvaluator * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "data") == 0) {return PIVariant::fromValue(object->data());} - if (strcmp(function, "setData") == 0) {object->setData(arg0.toValue()); return PIVariant();} - if (strcmp(function, "check") == 0) {return PIVariant::fromValue(object->check(arg0.toValue()));} - if (strcmp(function, "isCorrect") == 0) {return PIVariant::fromValue(object->isCorrect());} - if (strcmp(function, "setVariable") == 0) {return PIVariant::fromValue(object->setVariable(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "setVariable") == 0) {object->setVariable(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "setCustomVariableValue") == 0) {object->setCustomVariableValue(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "evaluate") == 0) {return PIVariant::fromValue(object->evaluate());} - if (strcmp(function, "removeVariable") == 0) {object->removeVariable(arg0.toValue()); return PIVariant();} - if (strcmp(function, "clearCustomVariables") == 0) {object->clearCustomVariables(); return PIVariant();} - if (strcmp(function, "variableIndex") == 0) {return PIVariant::fromValue(object->variableIndex(arg0.toValue()));} - if (strcmp(function, "unknownVariables") == 0) {return PIVariant::fromValue(object->unknownVariables());} - if (strcmp(function, "expression") == 0) {return PIVariant::fromValue(object->expression());} - if (strcmp(function, "error") == 0) {return PIVariant::fromValue(object->error());} - if (strcmp(function, "lastResult") == 0) {return PIVariant::fromValue(object->lastResult());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIEvaluator\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIMultiProtocol * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "addProtocol") == 0) {object->addProtocol(arg0.toValue()); return PIVariant();} - if (strcmp(function, "protocol") == 0) {return PIVariant::fromValue(object->protocol(arg0.toValue()));} - if (strcmp(function, "protocol") == 0) {return PIVariant::fromValue(object->protocol(arg0.toValue()));} - if (strcmp(function, "startSend") == 0) {object->startSend(); return PIVariant();} - if (strcmp(function, "startReceive") == 0) {object->startReceive(); return PIVariant();} - if (strcmp(function, "start") == 0) {object->start(); return PIVariant();} - if (strcmp(function, "stopSend") == 0) {object->stopSend(); return PIVariant();} - if (strcmp(function, "stopReceive") == 0) {object->stopReceive(); return PIVariant();} - if (strcmp(function, "stop") == 0) {object->stop(); return PIVariant();} - if (strcmp(function, "worseQuality") == 0) {return PIVariant::fromValue(object->worseQuality());} - if (strcmp(function, "bestQuality") == 0) {return PIVariant::fromValue(object->bestQuality());} - if (strcmp(function, "count") == 0) {return PIVariant::fromValue(object->count());} - if (strcmp(function, "clear") == 0) {object->clear(); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIMultiProtocol\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIRepeater * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "firstChannelName") == 0) {return PIVariant::fromValue(object->firstChannelName());} - if (strcmp(function, "secondChannelName") == 0) {return PIVariant::fromValue(object->secondChannelName());} - if (strcmp(function, "receiveCount") == 0) {return PIVariant::fromValue(object->receiveCount());} - if (strcmp(function, "receiveCount_ptr") == 0) {return PIVariant::fromValue(object->receiveCount_ptr());} - if (strcmp(function, "sendCount") == 0) {return PIVariant::fromValue(object->sendCount());} - if (strcmp(function, "sendCount_ptr") == 0) {return PIVariant::fromValue(object->sendCount_ptr());} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIRepeater\"!"; - return PIVariant(); -} - -PIVariant execFunction(PICodec * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "setFromCoding") == 0) {object->setFromCoding(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setToCoding") == 0) {object->setToCoding(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setCodings") == 0) {object->setCodings(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "availableCodecs") == 0) {return PIVariant::fromValue(object->availableCodecs());} - if (strcmp(function, "encode") == 0) {return PIVariant::fromValue(object->encode(arg0.toValue()));} - if (strcmp(function, "decode") == 0) {return PIVariant::fromValue(object->decode(arg0.toValue()));} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PICodec\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIPeer * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "send") == 0) {return PIVariant::fromValue(object->send(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "sendToAll") == 0) {object->sendToAll(arg0.toValue()); return PIVariant();} - if (strcmp(function, "sendToAll") == 0) {object->sendToAll(arg0.toValue()); return PIVariant();} - if (strcmp(function, "sendToAll") == 0) {object->sendToAll(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "isMulticastReceive") == 0) {return PIVariant::fromValue(object->isMulticastReceive());} - if (strcmp(function, "isBroadcastReceive") == 0) {return PIVariant::fromValue(object->isBroadcastReceive());} - if (strcmp(function, "allPeers") == 0) {return PIVariant::fromValue >(object->allPeers());} - if (strcmp(function, "isPeerExists") == 0) {return PIVariant::fromValue(object->isPeerExists(arg0.toValue()));} - if (strcmp(function, "getPeerByName") == 0) {return PIVariant::fromValue(object->getPeerByName(arg0.toValue()));} - if (strcmp(function, "lock") == 0) {object->lock(); return PIVariant();} - if (strcmp(function, "unlock") == 0) {object->unlock(); return PIVariant();} - if (strcmp(function, "dataReceivedEvent") == 0) {object->dataReceivedEvent(arg0.toValue(), arg1.toValue()); return PIVariant();} - if (strcmp(function, "peerConnectedEvent") == 0) {object->peerConnectedEvent(arg0.toValue()); return PIVariant();} - if (strcmp(function, "peerDisconnectedEvent") == 0) {object->peerDisconnectedEvent(arg0.toValue()); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIPeer\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIBinaryLog * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "playMode") == 0) {return PIVariant::fromValue(object->playMode());} - if (strcmp(function, "logDir") == 0) {return PIVariant::fromValue(object->logDir());} - if (strcmp(function, "filePrefix") == 0) {return PIVariant::fromValue(object->filePrefix());} - if (strcmp(function, "defaultID") == 0) {return PIVariant::fromValue(object->defaultID());} - if (strcmp(function, "playSpeed") == 0) {return PIVariant::fromValue(object->playSpeed());} - if (strcmp(function, "rapidStart") == 0) {return PIVariant::fromValue(object->rapidStart());} - if (strcmp(function, "setPlayMode") == 0) {object->setPlayMode(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setLogDir") == 0) {object->setLogDir(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setFilePrefix") == 0) {object->setFilePrefix(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setDefaultID") == 0) {object->setDefaultID(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setRapidStart") == 0) {object->setRapidStart(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setPlaySpeed") == 0) {object->setPlaySpeed(arg0.toValue()); return PIVariant();} - if (strcmp(function, "writeBinLog") == 0) {return PIVariant::fromValue(object->writeBinLog(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "writeBinLog") == 0) {return PIVariant::fromValue(object->writeBinLog(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "readBinLog") == 0) {return PIVariant::fromValue(object->readBinLog(arg0.toValue()));} - if (strcmp(function, "readBinLog") == 0) {return PIVariant::fromValue(object->readBinLog(arg0.toValue(), arg1.toValue(), arg2.toValue()));} - if (strcmp(function, "isEnd") == 0) {return PIVariant::fromValue(object->isEnd());} - if (strcmp(function, "isEmpty") == 0) {return PIVariant::fromValue(object->isEmpty());} - if (strcmp(function, "lastReadedID") == 0) {return PIVariant::fromValue(object->lastReadedID());} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "restart") == 0) {object->restart(); return PIVariant();} - if (strcmp(function, "createNewFile") == 0) {return PIVariant::fromValue(object->createNewFile());} - if (strcmp(function, "fileEnd") == 0) {object->fileEnd(); return PIVariant();} - if (strcmp(function, "fileError") == 0) {object->fileError(); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIBinaryLog\"!"; - return PIVariant(); -} - -PIVariant execFunction(PIUSB * object, const char * function, const PIVariant & arg0, const PIVariant & arg1, const PIVariant & arg2, const PIVariant & arg3) { - if (strcmp(function, "className") == 0) {return PIVariant::fromValue(object->className());} - if (strcmp(function, "currentDescriptor") == 0) {return PIVariant::fromValue(object->currentDescriptor());} - if (strcmp(function, "currentConfiguration") == 0) {return PIVariant::fromValue(object->currentConfiguration());} - if (strcmp(function, "currentInterface") == 0) {return PIVariant::fromValue(object->currentInterface());} - if (strcmp(function, "vendorID") == 0) {return PIVariant::fromValue(object->vendorID());} - if (strcmp(function, "productID") == 0) {return PIVariant::fromValue(object->productID());} - if (strcmp(function, "deviceNumber") == 0) {return PIVariant::fromValue(object->deviceNumber());} - if (strcmp(function, "timeoutRead") == 0) {return PIVariant::fromValue(object->timeoutRead());} - if (strcmp(function, "timeoutWrite") == 0) {return PIVariant::fromValue(object->timeoutWrite());} - if (strcmp(function, "endpointRead") == 0) {return PIVariant::fromValue(object->endpointRead());} - if (strcmp(function, "endpointWrite") == 0) {return PIVariant::fromValue(object->endpointWrite());} - if (strcmp(function, "endpoints") == 0) {return PIVariant::fromValue >(object->endpoints());} - if (strcmp(function, "endpointsRead") == 0) {return PIVariant::fromValue >(object->endpointsRead());} - if (strcmp(function, "endpointsWrite") == 0) {return PIVariant::fromValue >(object->endpointsWrite());} - if (strcmp(function, "getEndpointByAddress") == 0) {return PIVariant::fromValue(object->getEndpointByAddress(arg0.toValue()));} - if (strcmp(function, "setVendorID") == 0) {object->setVendorID(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setProductID") == 0) {object->setProductID(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setConfiguration") == 0) {return PIVariant::fromValue(object->setConfiguration(arg0.toValue()));} - if (strcmp(function, "setInterface") == 0) {return PIVariant::fromValue(object->setInterface(arg0.toValue()));} - if (strcmp(function, "setEndpointRead") == 0) {object->setEndpointRead(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setEndpointWrite") == 0) {object->setEndpointWrite(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setDeviceNumber") == 0) {object->setDeviceNumber(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setTimeoutRead") == 0) {object->setTimeoutRead(arg0.toValue()); return PIVariant();} - if (strcmp(function, "setTimeoutWrite") == 0) {object->setTimeoutWrite(arg0.toValue()); return PIVariant();} - if (strcmp(function, "read") == 0) {return PIVariant::fromValue(object->read(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "write") == 0) {return PIVariant::fromValue(object->write(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "controlWrite") == 0) {return PIVariant::fromValue(object->controlWrite(arg0.toValue(), arg1.toValue()));} - if (strcmp(function, "flush") == 0) {object->flush(); return PIVariant();} - PICout(AddNewLine) << "Can`t find function \"" << function << "\" in class \"PIUSB\"!"; - return PIVariant(); -} - - -__ClassInfo_TEST_H_Initializer__::__ClassInfo_TEST_H_Initializer__() { - if (_inited_) return; - _inited_ = true; - - ClassInfo * ci; - TypeInfo * ni; - FunctionInfo * fi; - EnumInfo * ei; - -// Classes - - ci = new ClassInfo(); - (*classesInfo)["PIMonitor"] = ci; - ci->name = "PIMonitor"; - ci->variables << TypeInfo("containers", "int"); - ci->variables << TypeInfo("strings", "int"); - ci->variables << TypeInfo("threads", "int"); - ci->variables << TypeInfo("timers", "int"); - ci->variables << TypeInfo("serials", "int"); - ci->variables << TypeInfo("ethernets", "int"); - ci->variables << TypeInfo("files", "int"); - ci->variables << TypeInfo("objects", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PIInit"] = ci; - ci->name = "PIInit"; - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fileExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("p", "string &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PICout"] = ci; - ci->name = "PICout"; - ci->variables << TypeInfo("fo_", "bool"); - ci->variables << TypeInfo("cc_", "bool"); - ci->variables << TypeInfo("fc_", "bool"); - ci->variables << TypeInfo("cnb_", "int"); - ci->variables << TypeInfo("attr_", "int"); - ci->variables << TypeInfo("co_", "PICoutControls"); - ci->variables << TypeInfo("cos_", "std::stack"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setControl"; fi->return_type = TypeInfo("", "PICout &"); - fi->arguments << TypeInfo("c", "PICoutControl"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setControl"; fi->return_type = TypeInfo("", "PICout &"); - fi->arguments << TypeInfo("c", "PICoutControls"); - fi->arguments << TypeInfo("save", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "saveControl"; fi->return_type = TypeInfo("", "PICout &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "restoreControl"; fi->return_type = TypeInfo("", "PICout &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "space"; fi->return_type = TypeInfo("", "PICout &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "quote"; fi->return_type = TypeInfo("", "PICout &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "newLine"; fi->return_type = TypeInfo("", "PICout &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "applyFormat"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("f", "PICoutFormat"); - - ci = new ClassInfo(); - (*classesInfo)["PIMutex"] = ci; - ci->name = "PIMutex"; - ci->variables << TypeInfo("mutex", "pthread_mutex_t"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "lock"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "unlock"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "tryLock"; fi->return_type = TypeInfo("", "bool"); - - ci = new ClassInfo(); - (*classesInfo)["PIMutexLocker"] = ci; - ci->name = "PIMutexLocker"; - ci->variables << TypeInfo("mutex", "PIMutex*"); - - ci = new ClassInfo(); - (*classesInfo)["PIBitArray"] = ci; - ci->name = "PIBitArray"; - ci->variables << TypeInfo("data_", "PIVector"); - ci->variables << TypeInfo("size_", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "bitSize"; fi->return_type = TypeInfo("", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "byteSize"; fi->return_type = TypeInfo("", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "resize"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("size", "uint &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearBit"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("index", "uint &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setBit"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("index", "uint &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBit"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("index", "uint &", Const); - fi->arguments << TypeInfo("value", "bool &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBit"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("index", "uint &", Const); - fi->arguments << TypeInfo("value", "uchar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "push_back"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("value", "bool &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "push_back"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("value", "uchar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "insert"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("index", "uint &", Const); - fi->arguments << TypeInfo("value", "bool &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "insert"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("index", "uint &", Const); - fi->arguments << TypeInfo("value", "uchar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "push_front"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("value", "bool &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "push_front"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("value", "uchar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "pop_back"; fi->return_type = TypeInfo("", "PIBitArray &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "pop_front"; fi->return_type = TypeInfo("", "PIBitArray &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "append"; fi->return_type = TypeInfo("", "PIBitArray &"); - fi->arguments << TypeInfo("ba", "PIBitArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "data"; fi->return_type = TypeInfo("", "uchar *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toUChar"; fi->return_type = TypeInfo("", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toUShort"; fi->return_type = TypeInfo("", "ushort"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toUInt"; fi->return_type = TypeInfo("", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toULong"; fi->return_type = TypeInfo("", "ulong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toULLong"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "at"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("index", "uint &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "bytesInBits"; fi->return_type = TypeInfo("", "uint"); - fi->arguments << TypeInfo("bits", "uint &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIHuffman"] = ci; - ci->name = "PIHuffman"; - ci->variables << TypeInfo("nodes", "PIVector"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "compress"; fi->return_type = TypeInfo("", "PIVector"); - fi->arguments << TypeInfo("src", "PIVector &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "nodeCompare"; fi->return_type = TypeInfo("", "int", Static); - fi->arguments << TypeInfo("f", "void *", Const); - fi->arguments << TypeInfo("s", "void *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calcFrequencies"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("src", "PIVector &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIHuffman::node"] = ci; - ci->name = "PIHuffman::node"; - ci->variables << TypeInfo("freq", "int"); - ci->variables << TypeInfo("word", "PIVector"); - ci->variables << TypeInfo("path", "PIBitArray"); - ci->variables << TypeInfo("parent", "node*"); - ci->variables << TypeInfo("right", "node*"); - ci->variables << TypeInfo("left", "node*"); - - ci = new ClassInfo(); - (*classesInfo)["PIByteArray"] = ci; - ci->name = "PIByteArray"; - ci->variables << TypeInfo("base64HelpStruct", "union"); - ci->variables << TypeInfo("base64Table", "char[64]", Const | Static); - ci->variables << TypeInfo("base64InvTable", "char[256]", Const | Static); - ci->variables << TypeInfo("huffman", "PIHuffman", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "resized"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("new_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "convertToBase64"; fi->return_type = TypeInfo("", "PIByteArray &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "convertFromBase64"; fi->return_type = TypeInfo("", "PIByteArray &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toBase64"; fi->return_type = TypeInfo("", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromBase64"; fi->return_type = TypeInfo("", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "compressRLE"; fi->return_type = TypeInfo("", "PIByteArray &"); - fi->arguments << TypeInfo("threshold", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "decompressRLE"; fi->return_type = TypeInfo("", "PIByteArray &"); - fi->arguments << TypeInfo("threshold", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "compressedRLE"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("threshold", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "decompressedRLE"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("threshold", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "compressHuffman"; fi->return_type = TypeInfo("", "PIByteArray &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "append"; fi->return_type = TypeInfo("", "PIByteArray &"); - fi->arguments << TypeInfo("data_", "void *", Const); - fi->arguments << TypeInfo("size_", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "append"; fi->return_type = TypeInfo("", "PIByteArray &"); - fi->arguments << TypeInfo("data_", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checksumPlain8"; fi->return_type = TypeInfo("", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checksumPlain32"; fi->return_type = TypeInfo("", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checksumCRC8"; fi->return_type = TypeInfo("", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checksumCRC16"; fi->return_type = TypeInfo("", "ushort"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checksumCRC32"; fi->return_type = TypeInfo("", "uint"); - - ci = new ClassInfo(); - (*classesInfo)["PIByteArray::RawData"] = ci; - ci->name = "PIByteArray::RawData"; - ci->variables << TypeInfo("d", "void*"); - ci->variables << TypeInfo("s", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PIChar"] = ci; - ci->name = "PIChar"; - ci->variables << TypeInfo("ch", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isDigit"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isHex"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isGraphical"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isControl"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isLower"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isUpper"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isPrint"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isSpace"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isAlpha"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isAscii"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toInt"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toWCharPtr"; fi->return_type = TypeInfo("", "const wchar_t *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toCharPtr"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toWChar"; fi->return_type = TypeInfo("", "wchar_t"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toAscii"; fi->return_type = TypeInfo("", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "unicode16Code"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toUpper"; fi->return_type = TypeInfo("", "PIChar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toLower"; fi->return_type = TypeInfo("", "PIChar"); - - ci = new ClassInfo(); - (*classesInfo)["PIString"] = ci; - ci->name = "PIString"; - ci->variables << TypeInfo("toBaseN", "char[]", Const | Static); - ci->variables << TypeInfo("fromBaseN", "int[]", Const | Static); - ci->variables << TypeInfo("data_", "PIByteArray", Mutable); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "mid"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("start", "int", Const); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "left"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "right"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "cutMid"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("start", "int", Const); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "cutLeft"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "cutRight"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "trim"; fi->return_type = TypeInfo("", "PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "trimmed"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "replace"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("from", "int", Const); - fi->arguments << TypeInfo("count", "int", Const); - fi->arguments << TypeInfo("with", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "replaced"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("from", "int", Const); - fi->arguments << TypeInfo("count", "int", Const); - fi->arguments << TypeInfo("with", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "replace"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("what", "PIString &", Const); - fi->arguments << TypeInfo("with", "PIString &", Const); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "replaced"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("what", "PIString &", Const); - fi->arguments << TypeInfo("with", "PIString &", Const); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "replaceAll"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("what", "PIString &", Const); - fi->arguments << TypeInfo("with", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "replaceAll"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("what", "PIString &", Const); - fi->arguments << TypeInfo("with", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "insert"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("index", "int", Const); - fi->arguments << TypeInfo("c", "PIChar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "insert"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("index", "int", Const); - fi->arguments << TypeInfo("c", "char &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "insert"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("index", "int", Const); - fi->arguments << TypeInfo("str", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "insert"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("index", "int", Const); - fi->arguments << TypeInfo("c", "char *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "expandRightTo"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("len", "int", Const); - fi->arguments << TypeInfo("c", "PIChar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "expandLeftTo"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("len", "int", Const); - fi->arguments << TypeInfo("c", "PIChar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reverse"; fi->return_type = TypeInfo("", "PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reversed"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeMid"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("start", "int", Const); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeLeft"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeRight"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("len", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeSymbol"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeWord"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeCWord"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeLine"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeNumber"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "takeRange"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("start", "PIChar &", Const); - fi->arguments << TypeInfo("end", "PIChar &", Const); - fi->arguments << TypeInfo("shield", "PIChar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "lengthAscii"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "data"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stdString"; fi->return_type = TypeInfo("", "std::string"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toByteArray"; fi->return_type = TypeInfo("", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "split"; fi->return_type = TypeInfo("", "PIStringList"); - fi->arguments << TypeInfo("delim", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toUpperCase"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toLowerCase"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toNativeDecimalPoints"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "find"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "char", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "find"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "PIString", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "find"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "char *", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "find"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "string", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findLast"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "char", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findLast"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "PIString", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findLast"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "char *", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findLast"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "string", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findWord"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("word", "PIString &", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findCWord"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("word", "PIString &", Const); - fi->arguments << TypeInfo("start", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startsWith"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("str", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "endsWith"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("str", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "length"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEmpty"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toBool"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toChar"; fi->return_type = TypeInfo("", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toShort"; fi->return_type = TypeInfo("", "short"); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toUShort"; fi->return_type = TypeInfo("", "ushort"); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toInt"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toUInt"; fi->return_type = TypeInfo("", "uint"); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toLong"; fi->return_type = TypeInfo("", "long"); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toULong"; fi->return_type = TypeInfo("", "ulong"); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toLLong"; fi->return_type = TypeInfo("", "llong"); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toULLong"; fi->return_type = TypeInfo("", "ullong"); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toFloat"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toDouble"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toLDouble"; fi->return_type = TypeInfo("", "ldouble"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "short", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "ushort", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "int", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "uint", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "long", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "ulong", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "llong &", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "ullong &", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "float", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "double &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setNumber"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("value", "ldouble &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReadableSize"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("bytes", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "short", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "ushort", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "int", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "uint", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "long", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "ulong", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "llong &", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "ullong &", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "float", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "double &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumber"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "ldouble &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromBool"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "bool", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readableSize"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("bytes", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeAll"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("v", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeAll"; fi->return_type = TypeInfo("", "PIString &"); - fi->arguments << TypeInfo("v", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumberBaseS"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "llong", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNumberBaseU"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("value", "ullong", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toNumberBase"; fi->return_type = TypeInfo("", "llong", Static); - fi->arguments << TypeInfo("value", "PIString &", Const); - fi->arguments << TypeInfo("base", "int"); - fi->arguments << TypeInfo("ok", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "appendFromChars"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("c", "char *", Const); - fi->arguments << TypeInfo("s", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "convertToStd"; fi->return_type = TypeInfo("", "string"); - - ci = new ClassInfo(); - (*classesInfo)["PIStringList"] = ci; - ci->name = "PIStringList"; - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "join"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("delim", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeStrings"; fi->return_type = TypeInfo("", "PIStringList &"); - fi->arguments << TypeInfo("value", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "remove"; fi->return_type = TypeInfo("", "PIStringList &"); - fi->arguments << TypeInfo("num", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "remove"; fi->return_type = TypeInfo("", "PIStringList &"); - fi->arguments << TypeInfo("num", "uint"); - fi->arguments << TypeInfo("count", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeDuplicates"; fi->return_type = TypeInfo("", "PIStringList &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "trim"; fi->return_type = TypeInfo("", "PIStringList &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "contentSize"; fi->return_type = TypeInfo("", "uint"); - - ci = new ClassInfo(); - (*classesInfo)["PISystemTime"] = ci; - ci->name = "PISystemTime"; - ci->variables << TypeInfo("seconds", "long"); - ci->variables << TypeInfo("nanoseconds", "long"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toSeconds"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toMilliseconds"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toMicroseconds"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toNanoseconds"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addSeconds"; fi->return_type = TypeInfo("", "PISystemTime &"); - fi->arguments << TypeInfo("v", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addMilliseconds"; fi->return_type = TypeInfo("", "PISystemTime &"); - fi->arguments << TypeInfo("v", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addMicroseconds"; fi->return_type = TypeInfo("", "PISystemTime &"); - fi->arguments << TypeInfo("v", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addNanoseconds"; fi->return_type = TypeInfo("", "PISystemTime &"); - fi->arguments << TypeInfo("v", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sleep"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "abs"; fi->return_type = TypeInfo("", "PISystemTime"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromSeconds"; fi->return_type = TypeInfo("", "PISystemTime", Static); - fi->arguments << TypeInfo("v", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromMilliseconds"; fi->return_type = TypeInfo("", "PISystemTime", Static); - fi->arguments << TypeInfo("v", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromMicroseconds"; fi->return_type = TypeInfo("", "PISystemTime", Static); - fi->arguments << TypeInfo("v", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromNanoseconds"; fi->return_type = TypeInfo("", "PISystemTime", Static); - fi->arguments << TypeInfo("v", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checkOverflows"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PITime"] = ci; - ci->name = "PITime"; - ci->variables << TypeInfo("milliseconds", "int"); - ci->variables << TypeInfo("seconds", "int"); - ci->variables << TypeInfo("minutes", "int"); - ci->variables << TypeInfo("hours", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toString"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("format", "PIString &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIDate"] = ci; - ci->name = "PIDate"; - ci->variables << TypeInfo("day", "int"); - ci->variables << TypeInfo("month", "int"); - ci->variables << TypeInfo("year", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toString"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("format", "PIString &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIDateTime"] = ci; - ci->name = "PIDateTime"; - ci->variables << TypeInfo("milliseconds", "int"); - ci->variables << TypeInfo("seconds", "int"); - ci->variables << TypeInfo("minutes", "int"); - ci->variables << TypeInfo("hours", "int"); - ci->variables << TypeInfo("day", "int"); - ci->variables << TypeInfo("month", "int"); - ci->variables << TypeInfo("year", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "normalized"; fi->return_type = TypeInfo("", "PIDateTime"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "normalize"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toString"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("format", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toSecondSinceEpoch"; fi->return_type = TypeInfo("", "time_t"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toSystemTime"; fi->return_type = TypeInfo("", "PISystemTime"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromSecondSinceEpoch"; fi->return_type = TypeInfo("", "PIDateTime", Static); - fi->arguments << TypeInfo("sec", "time_t", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromSystemTime"; fi->return_type = TypeInfo("", "PIDateTime", Static); - fi->arguments << TypeInfo("st", "PISystemTime &", Const); - - ci = new ClassInfo(); - (*classesInfo)["TransferFunction"] = ci; - ci->name = "TransferFunction"; - ci->variables << TypeInfo("vector_Bm", "PIVector"); - ci->variables << TypeInfo("vector_An", "PIVector"); - - ci = new ClassInfo(); - (*classesInfo)["Solver"] = ci; - ci->name = "Solver"; - ci->variables << TypeInfo("X", "PIMathVectord"); - ci->variables << TypeInfo("method_global", "Solver::Method", Static); - ci->variables << TypeInfo("methods_desc", "char[]", Const | Static); - ci->variables << TypeInfo("A", "PIMathMatrixd"); - ci->variables << TypeInfo("M", "PIMathMatrixd"); - ci->variables << TypeInfo("d", "PIMathVectord"); - ci->variables << TypeInfo("a1", "PIMathVectord"); - ci->variables << TypeInfo("b1", "PIMathVectord"); - ci->variables << TypeInfo("k1", "PIMathVectord"); - ci->variables << TypeInfo("k2", "PIMathVectord"); - ci->variables << TypeInfo("k3", "PIMathVectord"); - ci->variables << TypeInfo("k4", "PIMathVectord"); - ci->variables << TypeInfo("xx", "PIMathVectord"); - ci->variables << TypeInfo("XX", "PIMathVectord"); - ci->variables << TypeInfo("Y", "PIMathVectord"); - ci->variables << TypeInfo("pY", "PIMathVectord"); - ci->variables << TypeInfo("F", "PIVector"); - ci->variables << TypeInfo("times", "PIVector"); - ci->variables << TypeInfo("size", "uint"); - ci->variables << TypeInfo("step", "uint"); - ci->variables << TypeInfo("method", "Solver::Method"); - ci->variables << TypeInfo("sum", "double"); - ci->variables << TypeInfo("td", "double"); - ci->variables << TypeInfo("ct", "double"); - ci->variables << TypeInfo("lp", "double"); - ci->variables << TypeInfo("dh", "double"); - ci->variables << TypeInfo("t", "double"); - ci->variables << TypeInfo("x1", "double"); - ci->variables << TypeInfo("x0", "double"); - ci->variables << TypeInfo("ok", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solve"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fromTF"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("TF", "TransferFunction &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setMethod"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("m", "Method"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setTime"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("time", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solveEyler1"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solveEyler2"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solveRK4"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solveABM2"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solveABM3"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solveABM4"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solvePA"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - fi->arguments << TypeInfo("deg", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solvePA2"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solvePA3"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solvePA4"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "solvePA5"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("u", "double"); - fi->arguments << TypeInfo("h", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "moveF"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PIFFT"] = ci; - ci->name = "PIFFT"; - ci->variables << TypeInfo("result", "PIVector"); - ci->variables << TypeInfo("prepared", "bool"); - ci->variables << TypeInfo("curplan", "PIFFT::ftplan"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calcFFT"; fi->return_type = TypeInfo("", "PIVector *"); - fi->arguments << TypeInfo("val", "PIVector &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calcFFT"; fi->return_type = TypeInfo("", "PIVector *"); - fi->arguments << TypeInfo("val", "PIVector &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calcFFTinverse"; fi->return_type = TypeInfo("", "PIVector *"); - fi->arguments << TypeInfo("val", "PIVector &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calcHilbert"; fi->return_type = TypeInfo("", "PIVector *"); - fi->arguments << TypeInfo("val", "PIVector &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getAmplitude"; fi->return_type = TypeInfo("", "PIVector"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calc_coefs"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("cnt2", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calc_indexes"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("cnt2", "uint"); - fi->arguments << TypeInfo("deep2", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "coef"; fi->return_type = TypeInfo("", "complexd"); - fi->arguments << TypeInfo("n", "uint"); - fi->arguments << TypeInfo("k", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fftc1d"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector &", Const); - fi->arguments << TypeInfo("n", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fftc1r"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector &", Const); - fi->arguments << TypeInfo("n", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fftc1dinv"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector &", Const); - fi->arguments << TypeInfo("n", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "createPlan"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbasegeneratecomplexfftplan"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "uint"); - fi->arguments << TypeInfo("plan", "ftplan *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbase_ftbasegenerateplanrec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "int"); - fi->arguments << TypeInfo("tasktype", "int"); - fi->arguments << TypeInfo("plan", "ftplan *"); - fi->arguments << TypeInfo("plansize", "int *"); - fi->arguments << TypeInfo("precomputedsize", "int *"); - fi->arguments << TypeInfo("planarraysize", "int *"); - fi->arguments << TypeInfo("tmpmemsize", "int *"); - fi->arguments << TypeInfo("stackmemsize", "int *"); - fi->arguments << TypeInfo("stackptr", "ae_int_t"); - fi->arguments << TypeInfo("debugi", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbase_ftbaseprecomputeplanrec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("plan", "ftplan *"); - fi->arguments << TypeInfo("entryoffset", "int"); - fi->arguments << TypeInfo("stackptr", "ae_int_t"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbasefactorize"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "int"); - fi->arguments << TypeInfo("n1", "int *"); - fi->arguments << TypeInfo("n2", "int *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbase_ftbasefindsmoothrec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "int"); - fi->arguments << TypeInfo("seed", "int"); - fi->arguments << TypeInfo("leastfactor", "int"); - fi->arguments << TypeInfo("best", "int *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbasefindsmooth"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("n", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbaseexecuteplan"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector *"); - fi->arguments << TypeInfo("aoffset", "int"); - fi->arguments << TypeInfo("n", "int"); - fi->arguments << TypeInfo("plan", "ftplan *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbaseexecuteplanrec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector *"); - fi->arguments << TypeInfo("aoffset", "int"); - fi->arguments << TypeInfo("plan", "ftplan *"); - fi->arguments << TypeInfo("entryoffset", "int"); - fi->arguments << TypeInfo("stackptr", "ae_int_t"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbase_internalcomplexlintranspose"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector *"); - fi->arguments << TypeInfo("m", "int"); - fi->arguments << TypeInfo("n", "int"); - fi->arguments << TypeInfo("astart", "int"); - fi->arguments << TypeInfo("buf", "PIVector *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbase_ffticltrec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector *"); - fi->arguments << TypeInfo("astart", "int"); - fi->arguments << TypeInfo("astride", "int"); - fi->arguments << TypeInfo("b", "PIVector *"); - fi->arguments << TypeInfo("bstart", "int"); - fi->arguments << TypeInfo("bstride", "int"); - fi->arguments << TypeInfo("m", "int"); - fi->arguments << TypeInfo("n", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbase_internalreallintranspose"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector *"); - fi->arguments << TypeInfo("m", "int"); - fi->arguments << TypeInfo("n", "int"); - fi->arguments << TypeInfo("astart", "int"); - fi->arguments << TypeInfo("buf", "PIVector *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbase_fftirltrec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector *"); - fi->arguments << TypeInfo("astart", "int"); - fi->arguments << TypeInfo("astride", "int"); - fi->arguments << TypeInfo("b", "PIVector *"); - fi->arguments << TypeInfo("bstart", "int"); - fi->arguments << TypeInfo("bstride", "int"); - fi->arguments << TypeInfo("m", "int"); - fi->arguments << TypeInfo("n", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ftbase_ffttwcalc"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("a", "PIVector *"); - fi->arguments << TypeInfo("aoffset", "int"); - fi->arguments << TypeInfo("n1", "int"); - fi->arguments << TypeInfo("n2", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PIFFT::ftplan"] = ci; - ci->name = "PIFFT::ftplan"; - ci->variables << TypeInfo("plan", "PIVector"); - ci->variables << TypeInfo("precomputed", "PIVector"); - ci->variables << TypeInfo("tmpbuf", "PIVector"); - ci->variables << TypeInfo("stackbuf", "PIVector"); - - ci = new ClassInfo(); - (*classesInfo)["PIVariant"] = ci; - ci->name = "PIVariant"; - ci->variables << TypeInfo("nion", "u"); - ci->variables << TypeInfo("_vbitarray", "PIBitArray"); - ci->variables << TypeInfo("_vbytearray", "PIByteArray"); - ci->variables << TypeInfo("_vstring", "PIString"); - ci->variables << TypeInfo("_vstringlist", "PIStringList"); - ci->variables << TypeInfo("_vcustom", "PIByteArray"); - ci->variables << TypeInfo("type_", "PIVariant::Type"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "char *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "bool", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "char", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "uchar", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "short", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "ushort", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "int &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "uint &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "long &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "ulong &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "llong &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "ullong &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "float &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "double &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "ldouble &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "complexd &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "complexld &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "PIBitArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "PIStringList &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "PITime &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "PIDate &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "PIDateTime &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "PISystemTime &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toBool"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toInt"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toLLong"; fi->return_type = TypeInfo("", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toFloat"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toDouble"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toLDouble"; fi->return_type = TypeInfo("", "ldouble"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toComplexd"; fi->return_type = TypeInfo("", "complexd"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toComplexld"; fi->return_type = TypeInfo("", "complexld"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toTime"; fi->return_type = TypeInfo("", "PITime"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toDate"; fi->return_type = TypeInfo("", "PIDate"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toDateTime"; fi->return_type = TypeInfo("", "PIDateTime"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toSystemTime"; fi->return_type = TypeInfo("", "PISystemTime"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toString"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toStringList"; fi->return_type = TypeInfo("", "PIStringList"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toBitArray"; fi->return_type = TypeInfo("", "PIBitArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toByteArray"; fi->return_type = TypeInfo("", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "type"; fi->return_type = TypeInfo("", "PIVariant::Type"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "typeName"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isValid"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "typeFromName"; fi->return_type = TypeInfo("", "PIVariant::Type", Static); - fi->arguments << TypeInfo("tname", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "typeName"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("type", "PIVariant::Type"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "destroy"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PIObject"] = ci; - ci->name = "PIObject"; - ci->variables << TypeInfo("connections", "PIVector"); - ci->variables << TypeInfo("properties_", "PIMap"); - ci->variables << TypeInfo("objects", "PIVector", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "name"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "debug"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setName"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDebug"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("debug", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "properties"; fi->return_type = TypeInfo("", "const PIMap &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "propertiesCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "property"; fi->return_type = TypeInfo("", "PIVariant"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setProperty"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "PIVariant &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isPropertyExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piConnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIObject *"); - fi->arguments << TypeInfo("sig", "PIString &", Const); - fi->arguments << TypeInfo("dest", "void *"); - fi->arguments << TypeInfo("ev_h", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piConnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIObject *"); - fi->arguments << TypeInfo("sig", "PIString &", Const); - fi->arguments << TypeInfo("dest", "void *"); - fi->arguments << TypeInfo("ev_h", "void *"); - fi->arguments << TypeInfo("e_h", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piConnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIString &", Const); - fi->arguments << TypeInfo("sig", "PIString &", Const); - fi->arguments << TypeInfo("dest", "void *"); - fi->arguments << TypeInfo("ev_h", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piConnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIObject *"); - fi->arguments << TypeInfo("sig", "PIString &", Const); - fi->arguments << TypeInfo("dest", "PIString &", Const); - fi->arguments << TypeInfo("ev_h", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piConnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIString &", Const); - fi->arguments << TypeInfo("sig", "PIString &", Const); - fi->arguments << TypeInfo("dest", "PIString &", Const); - fi->arguments << TypeInfo("ev_h", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piDisconnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIObject *"); - fi->arguments << TypeInfo("sig", "PIString &", Const); - fi->arguments << TypeInfo("dest", "void *"); - fi->arguments << TypeInfo("ev_h", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piDisconnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIObject *"); - fi->arguments << TypeInfo("sig", "PIString &", Const); - fi->arguments << TypeInfo("dest", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piDisconnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIObject *"); - fi->arguments << TypeInfo("sig", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piDisconnect"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("src", "PIObject *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "raiseEvent"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("sender", "PIObject *"); - fi->arguments << TypeInfo("event", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "raiseEvent"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("destObject", "PIString &", Const); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findByName"; fi->return_type = TypeInfo("", "PIObject *", Static); - fi->arguments << TypeInfo("name", "PIString &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIObject::Connection"] = ci; - ci->name = "PIObject::Connection"; - ci->variables << TypeInfo("slot", "void*"); - ci->variables << TypeInfo("signal", "void*"); - ci->variables << TypeInfo("event", "PIString"); - ci->variables << TypeInfo("dest", "void*"); - - ci = new ClassInfo(); - (*classesInfo)["PIThread"] = ci; - ci->name = "PIThread"; - ci->parents << "PIObject"; - ci->variables << TypeInfo("terminating", "bool", Volatile); - ci->variables << TypeInfo("running", "bool", Volatile); - ci->variables << TypeInfo("lockRun", "bool", Volatile); - ci->variables << TypeInfo("timer", "int"); - ci->variables << TypeInfo("policy", "int"); - ci->variables << TypeInfo("data_", "void*"); - ci->variables << TypeInfo("mutex_", "PIMutex"); - ci->variables << TypeInfo("priority_", "PIThread::Priority"); - ci->variables << TypeInfo("ret_func", "ThreadFunc"); - ci->variables << TypeInfo("thread", "pthread_t"); - ci->variables << TypeInfo("sparam", "sched_param"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("timer_delay", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("timer_delay", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("func", "ThreadFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("func", "ThreadFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("func", "ThreadFunc"); - fi->arguments << TypeInfo("timer_delay", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("func", "ThreadFunc"); - fi->arguments << TypeInfo("timer_delay", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_startOnce__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startOnce"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_startOnce__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("func", "ThreadFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startOnce"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("func", "ThreadFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stop__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stop"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stop__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stop"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_terminate__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "terminate"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("d", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSlot"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("func", "ThreadFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setPriority"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prior", "PIThread::Priority"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "priority"; fi->return_type = TypeInfo("", "PIThread::Priority"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isRunning"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isStopping"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_waitForStart__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "waitForStart"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_waitForStart__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("timeout_msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "waitForStart"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("timeout_msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_waitForFinish__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "waitForFinish"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_waitForFinish__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("timeout_msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "waitForFinish"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("timeout_msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "needLockRun"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("need", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_lock__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "lock"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_unlock__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "unlock"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "mutex"; fi->return_type = TypeInfo("", "PIMutex &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_started__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "started"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stopped__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stopped"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "thread_function"; fi->return_type = TypeInfo("", "void *", Static); - fi->arguments << TypeInfo("t", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "thread_function_once"; fi->return_type = TypeInfo("", "void *", Static); - fi->arguments << TypeInfo("t", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "begin"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "run"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "end"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PITimer"] = ci; - ci->name = "PITimer"; - ci->parents << "PIThread"; - ci->variables << TypeInfo("st_time", "PISystemTime"); - ci->variables << TypeInfo("inc_time", "PISystemTime"); - ci->variables << TypeInfo("deferred_", "bool"); - ci->variables << TypeInfo("running_", "bool"); - ci->variables << TypeInfo("interval_", "double"); - ci->variables << TypeInfo("t_st", "timespec"); - ci->variables << TypeInfo("t_cur", "timespec"); - ci->variables << TypeInfo("data", "void*"); - ci->variables << TypeInfo("ret_func", "TimerEvent"); - ci->variables << TypeInfo("ret_funcs", "PIVector"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data_", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSlot"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("slot", "TimerEvent"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "interval"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_reset__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reset"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("msecs", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("msecs", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_deferredStart__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("interval_msecs", "double"); - fi->arguments << TypeInfo("delay_msecs", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "deferredStart"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("interval_msecs", "double"); - fi->arguments << TypeInfo("delay_msecs", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_deferredStart__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("interval_msecs", "double"); - fi->arguments << TypeInfo("start_datetime", "PIDateTime &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "deferredStart"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("interval_msecs", "double"); - fi->arguments << TypeInfo("start_datetime", "PIDateTime &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stop__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stop"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addDelimiter"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("delim", "int"); - fi->arguments << TypeInfo("slot", "TimerEvent"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeDelimiter"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("delim", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeDelimiter"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("slot", "TimerEvent"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeDelimiter"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("delim", "int"); - fi->arguments << TypeInfo("slot", "TimerEvent"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDelimiterValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("delim", "int"); - fi->arguments << TypeInfo("value", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDelimiterValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("slot", "TimerEvent"); - fi->arguments << TypeInfo("value", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDelimiterValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("delim", "int"); - fi->arguments << TypeInfo("slot", "TimerEvent"); - fi->arguments << TypeInfo("value", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "delimiterValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("delim", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "delimiterValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("delim", "int"); - fi->arguments << TypeInfo("slot", "TimerEvent"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_clearDelimiters__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearDelimiters"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "elapsed_n"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "elapsed_u"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "elapsed_m"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "elapsed_s"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reset_time_n"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reset_time_u"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reset_time_m"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reset_time_s"; fi->return_type = TypeInfo("", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reset_time"; fi->return_type = TypeInfo("", "PISystemTime"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "elapsed_system_n"; fi->return_type = TypeInfo("", "double", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "elapsed_system_u"; fi->return_type = TypeInfo("", "double", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "elapsed_system_m"; fi->return_type = TypeInfo("", "double", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "elapsed_system_s"; fi->return_type = TypeInfo("", "double", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_timeout__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delimiter", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "timeout"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delimiter", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "tick"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delimiter", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "run"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "end"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PITimer::TimerSlot"] = ci; - ci->name = "PITimer::TimerSlot"; - ci->variables << TypeInfo("slot", "TimerEvent"); - ci->variables << TypeInfo("delim", "int"); - ci->variables << TypeInfo("tick", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PIKbdListener"] = ci; - ci->name = "PIKbdListener"; - ci->parents << "PIThread"; - ci->variables << TypeInfo("exiting", "bool", Static); - ci->variables << TypeInfo("ret_func", "KBFunc"); - ci->variables << TypeInfo("exit_key", "char"); - ci->variables << TypeInfo("exit_enabled", "bool"); - ci->variables << TypeInfo("is_active", "bool"); - ci->variables << TypeInfo("data_", "void*"); - ci->variables << TypeInfo("rc", "int"); - ci->variables << TypeInfo("ret", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "data"; fi->return_type = TypeInfo("", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("_data", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSlot"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("slot", "KBFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exitCaptured"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exitKey"; fi->return_type = TypeInfo("", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isActive"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_enableExitCapture__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "enableExitCapture"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_enableExitCapture__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("key", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "enableExitCapture"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("key", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_disableExitCapture__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "disableExitCapture"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_setActive__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setActive"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_setActive__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("yes", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setActive"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("yes", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_keyPressed__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("key", "char"); - fi->arguments << TypeInfo("data", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "keyPressed"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("key", "char"); - fi->arguments << TypeInfo("data", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "begin"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "run"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "end"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PICollection"] = ci; - ci->name = "PICollection"; - ci->variables << TypeInfo("_groups", "PIVector*", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "groups"; fi->return_type = TypeInfo("", "PIStringList", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "groupElements"; fi->return_type = TypeInfo("", "PIVector", Static); - fi->arguments << TypeInfo("group", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addToGroup"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("group", "PIString &", Const); - fi->arguments << TypeInfo("element", "PIObject *", Const); - - ci = new ClassInfo(); - (*classesInfo)["PICollection::CollectionAdder"] = ci; - ci->name = "PICollection::CollectionAdder"; - - ci = new ClassInfo(); - (*classesInfo)["PICollection::Group"] = ci; - ci->name = "PICollection::Group"; - ci->variables << TypeInfo("name", "PIString"); - ci->variables << TypeInfo("elements", "PIVector"); - - ci = new ClassInfo(); - (*classesInfo)["__PICollectionInitializer"] = ci; - ci->name = "__PICollectionInitializer"; - ci->variables << TypeInfo("_inited_", "bool", Static); - - ci = new ClassInfo(); - (*classesInfo)["PIIODevice"] = ci; - ci->name = "PIIODevice"; - ci->parents << "PIThread"; - ci->variables << TypeInfo("mode_", "PIIODevice::DeviceMode"); - ci->variables << TypeInfo("ret_func_", "ReadRetFunc"); - ci->variables << TypeInfo("init_", "bool"); - ci->variables << TypeInfo("opened_", "bool"); - ci->variables << TypeInfo("thread_started_", "bool"); - ci->variables << TypeInfo("raise_threaded_read_", "bool"); - ci->variables << TypeInfo("ret_data_", "void*"); - ci->variables << TypeInfo("timer", "PITimer"); - ci->variables << TypeInfo("write_thread", "PIThread"); - ci->variables << TypeInfo("buffer_in", "PIByteArray"); - ci->variables << TypeInfo("buffer_tr", "PIByteArray"); - ci->variables << TypeInfo("write_queue", "PIQueue >"); - ci->variables << TypeInfo("tri", "ullong"); - ci->variables << TypeInfo("readed_", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "mode"; fi->return_type = TypeInfo("", "PIIODevice::DeviceMode"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "path"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setPath"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isReadable"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isWriteable"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isInitialized"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isOpened"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isClosed"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "canRead"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "canWrite"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReopenEnabled"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("yes", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReopenTimeout"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isReopenEnabled"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reopenTimeout"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setThreadedReadSlot"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("func", "ReadRetFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setThreadedReadData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("d", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setThreadedReadBufferSize"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("new_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "threadedReadBufferSize"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "threadedReadBuffer"; fi->return_type = TypeInfo("", "const uchar *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isThreadedRead"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startThreadedRead"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startThreadedRead"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("func", "ReadRetFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stopThreadedRead"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isThreadedWrite"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startThreadedWrite"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stopThreadedWrite"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearThreadedWriteQueue"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stop"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readForTime"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("timeout_ms", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeThreaded"; fi->return_type = TypeInfo("", "ullong"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeThreaded"; fi->return_type = TypeInfo("", "ullong"); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configure"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("config_file", "PIString &", Const); - fi->arguments << TypeInfo("section", "PIString &", Const); - fi->arguments << TypeInfo("parent_section", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "createFromFullPath"; fi->return_type = TypeInfo("", "PIIODevice *", Static); - fi->arguments << TypeInfo("full_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_open__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "open"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_open__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "open"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_open__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("_type", "DeviceMode &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "open"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("_type", "DeviceMode &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_open__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("_path", "PIString &", Const); - fi->arguments << TypeInfo("_mode", "DeviceMode &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "open"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("_path", "PIString &", Const); - fi->arguments << TypeInfo("_mode", "DeviceMode &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_close__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "close"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_initialize__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "initialize"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_flush__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "flush"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_opened__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "opened"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_closed__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "closed"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_threadedReadEvent__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "threadedReadEvent"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_threadedWriteEvent__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("id", "ullong"); - fi->arguments << TypeInfo("written_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "threadedWriteEvent"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("id", "ullong"); - fi->arguments << TypeInfo("written_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "init"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureDevice"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("e_main", "void *", Const); - fi->arguments << TypeInfo("e_parent", "void *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "openDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "closeDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "threadedRead"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullPathPrefix"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "constructFullPath"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureFromFullPath"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("full_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "terminate"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_check_start__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delim", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "check_start"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delim", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_write_func__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write_func"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "copy"; fi->return_type = TypeInfo("", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "_init"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "begin"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "run"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "end"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PISerial"] = ci; - ci->name = "PISerial"; - ci->parents << "PIIODevice"; - ci->variables << TypeInfo("desc", "termios"); - ci->variables << TypeInfo("sdesc", "termios"); - ci->variables << TypeInfo("readed", "uint"); - ci->variables << TypeInfo("fd", "int"); - ci->variables << TypeInfo("vtime", "int"); - ci->variables << TypeInfo("block_read", "bool"); - ci->variables << TypeInfo("timer", "PITimer"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "copy"; fi->return_type = TypeInfo("", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSpeed"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("speed", "PISerial::Speed"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setOutSpeed"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("speed", "PISerial::Speed"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setInSpeed"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("speed", "PISerial::Speed"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDevice"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("dev", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setParameters"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("parameters_", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setParameter"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("parameter", "PISerial::Parameters"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isParameterSet"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("parameter", "PISerial::Parameters"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "parameters"; fi->return_type = TypeInfo("", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDataBitsCount"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("bits", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "dataBitsCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setPin"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("number", "int"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isPin"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("number", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setLE"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDTR"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setRTS"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setCTS"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setST"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSR"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setCAR"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setRNG"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDSR"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isLE"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isDTR"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isRTS"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isCTS"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isST"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isSR"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isCAR"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isRNG"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isDSR"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setVTime"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("t", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReadIsBlocking"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("yes", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "device"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "outSpeed"; fi->return_type = TypeInfo("", "PISerial::Speed"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "inSpeed"; fi->return_type = TypeInfo("", "PISerial::Speed"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "VTime"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "flush"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - fi->arguments << TypeInfo("timeout_ms", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("timeout_ms", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readData"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("timeout_ms", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("data", "PIString &", Const); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "availableSpeeds"; fi->return_type = TypeInfo("", "PIVector", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "availableDevices"; fi->return_type = TypeInfo("", "PIStringList", Static); - fi->arguments << TypeInfo("test", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullPathPrefix"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureFromFullPath"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("full_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureDevice"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("e_main", "void *", Const); - fi->arguments << TypeInfo("e_parent", "void *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "received"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "_init"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "applySettings"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "convertSpeed"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("speed", "PISerial::Speed"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setBit"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("bit", "int"); - fi->arguments << TypeInfo("on", "bool"); - fi->arguments << TypeInfo("bname", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isBit"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("bit", "int"); - fi->arguments << TypeInfo("bname", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "openDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "closeDevice"; fi->return_type = TypeInfo("", "bool"); - - ci = new ClassInfo(); - (*classesInfo)["PIFile"] = ci; - ci->name = "PIFile"; - ci->parents << "PIIODevice"; - ci->variables << TypeInfo("fd", "FILE*"); - ci->variables << TypeInfo("ret", "int"); - ci->variables << TypeInfo("prec_", "int"); - ci->variables << TypeInfo("prec_str", "string"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "copy"; fi->return_type = TypeInfo("", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "flush"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "seek"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("position", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "seekToBegin"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "seekToEnd"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "seekToLine"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("line", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readChar"; fi->return_type = TypeInfo("", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readLine"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readAll"; fi->return_type = TypeInfo("", "llong"); - fi->arguments << TypeInfo("data", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readAll"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("forceRead", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setPath"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "size"; fi->return_type = TypeInfo("", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "pos"; fi->return_type = TypeInfo("", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEnd"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEmpty"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "precision"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setPrecision"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prec", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeToBinLog"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("id", "ushort"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "char", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "short", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "long", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "llong", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "uchar", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "ushort", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "uint", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "ulong", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "ullong", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "float", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinary"; fi->return_type = TypeInfo("", "PIFile &"); - fi->arguments << TypeInfo("v", "double", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_clear__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clear"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_remove__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "remove"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_resize__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("new_size", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "resize"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("new_size", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_resize__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("new_size", "llong"); - fi->arguments << TypeInfo("fill", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "resize"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("new_size", "llong"); - fi->arguments << TypeInfo("fill", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "openTemporary"; fi->return_type = TypeInfo("", "PIFile", Static); - fi->arguments << TypeInfo("mode", "PIIODevice::DeviceMode"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isExists"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "remove"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullPathPrefix"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureFromFullPath"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("full_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "openDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "closeDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "strType"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("type", "PIIODevice::DeviceMode", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIProcess"] = ci; - ci->name = "PIProcess"; - ci->parents << "PIThread"; - ci->variables << TypeInfo("args", "PIStringList"); - ci->variables << TypeInfo("env", "PIStringList"); - ci->variables << TypeInfo("wd", "PIString"); - ci->variables << TypeInfo("out", "PIByteArray"); - ci->variables << TypeInfo("f_in", "PIFile"); - ci->variables << TypeInfo("f_out", "PIFile"); - ci->variables << TypeInfo("f_err", "PIFile"); - ci->variables << TypeInfo("g_in", "bool"); - ci->variables << TypeInfo("g_out", "bool"); - ci->variables << TypeInfo("g_err", "bool"); - ci->variables << TypeInfo("t_in", "bool"); - ci->variables << TypeInfo("t_out", "bool"); - ci->variables << TypeInfo("t_err", "bool"); - ci->variables << TypeInfo("pid", "pid_t"); - ci->variables << TypeInfo("tf_in", "FILE*"); - ci->variables << TypeInfo("tf_out", "FILE*"); - ci->variables << TypeInfo("tf_err", "FILE*"); - ci->variables << TypeInfo("exit_code", "int"); - ci->variables << TypeInfo("sz", "int"); - ci->variables << TypeInfo("as", "int"); - ci->variables << TypeInfo("is_exec", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exitCode"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "pID"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setGrabInput"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("yes", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setGrabOutput"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("yes", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setGrabError"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("yes", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setInputFile"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setOutputFile"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setErrorFile"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "unsetInputFile"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "unsetOutputFile"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "unsetErrorFile"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "workingDirectory"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setWorkingDirectory"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "resetWorkingDirectory"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readOutput"; fi->return_type = TypeInfo("", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readError"; fi->return_type = TypeInfo("", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "environment"; fi->return_type = TypeInfo("", "PIStringList"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearEnvironment"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeEnvironmentVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("variable", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setEnvironmentVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("variable", "PIString &", Const); - fi->arguments << TypeInfo("value", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_exec__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("program", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("program", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_exec__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("program", "PIString &", Const); - fi->arguments << TypeInfo("arg", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("program", "PIString &", Const); - fi->arguments << TypeInfo("arg", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_exec__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("program", "PIString &", Const); - fi->arguments << TypeInfo("arg1", "PIString &", Const); - fi->arguments << TypeInfo("arg2", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("program", "PIString &", Const); - fi->arguments << TypeInfo("arg1", "PIString &", Const); - fi->arguments << TypeInfo("arg2", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_exec__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("program", "PIString &", Const); - fi->arguments << TypeInfo("arg1", "PIString &", Const); - fi->arguments << TypeInfo("arg2", "PIString &", Const); - fi->arguments << TypeInfo("arg3", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("program", "PIString &", Const); - fi->arguments << TypeInfo("arg1", "PIString &", Const); - fi->arguments << TypeInfo("arg2", "PIString &", Const); - fi->arguments << TypeInfo("arg3", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_exec__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("program", "PIString &", Const); - fi->arguments << TypeInfo("args_", "PIStringList &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exec"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("program", "PIString &", Const); - fi->arguments << TypeInfo("args_", "PIStringList &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_terminate__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "terminate"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_waitForFinish__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "waitForFinish"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_waitForFinish__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("timeout_msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "waitForFinish"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("timeout_msecs", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_execStarted__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("program", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "execStarted"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("program", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_execFinished__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("program", "PIString"); - fi->arguments << TypeInfo("exit_code", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "execFinished"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("program", "PIString"); - fi->arguments << TypeInfo("exit_code", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "currentEnvironment"; fi->return_type = TypeInfo("", "PIStringList", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "currentPID"; fi->return_type = TypeInfo("", "int", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "run"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exec_"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PIEthernet"] = ci; - ci->name = "PIEthernet"; - ci->parents << "PIIODevice"; - ci->variables << TypeInfo("sock", "int"); - ci->variables << TypeInfo("sock_s", "int"); - ci->variables << TypeInfo("port_", "int"); - ci->variables << TypeInfo("port_s", "int"); - ci->variables << TypeInfo("port_c", "int"); - ci->variables << TypeInfo("wrote", "int"); - ci->variables << TypeInfo("connected_", "bool"); - ci->variables << TypeInfo("connecting_", "bool"); - ci->variables << TypeInfo("addr_", "sockaddr_in"); - ci->variables << TypeInfo("saddr_", "sockaddr_in"); - ci->variables << TypeInfo("ip_", "PIString"); - ci->variables << TypeInfo("ip_s", "PIString"); - ci->variables << TypeInfo("ip_c", "PIString"); - ci->variables << TypeInfo("server_thread_", "PIThread"); - ci->variables << TypeInfo("clients_", "PIVector"); - ci->variables << TypeInfo("mcast_queue", "PIQueue"); - ci->variables << TypeInfo("mcast_groups", "PIStringList"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "copy"; fi->return_type = TypeInfo("", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReadAddress"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("port", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReadAddress"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip_port", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReadIP"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReadPort"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("port", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSendAddress"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("port", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSendAddress"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip_port", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSendIP"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSendPort"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("port", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readAddress"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readIP"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readPort"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendAddress"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendIP"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendPort"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setParameters"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("parameters_", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setParameter"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("parameter", "PIEthernet::Parameters"); - fi->arguments << TypeInfo("on", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isParameterSet"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("parameter", "PIEthernet::Parameters"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "parameters"; fi->return_type = TypeInfo("", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "type"; fi->return_type = TypeInfo("", "PIEthernet::Type"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "joinMulticastGroup"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("group", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "leaveMulticastGroup"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("group", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "multicastGroups"; fi->return_type = TypeInfo("", "const PIStringList &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "connect"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "connect"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("port", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "connect"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("ip_port", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isConnected"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "listen"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "listen"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("port", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "listen"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("ip_port", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "client"; fi->return_type = TypeInfo("", "PIEthernet *"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clientsCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clients"; fi->return_type = TypeInfo("", "PIVector"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("port", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("threaded", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("ip_port", "PIString &", Const); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("threaded", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("threaded", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - fi->arguments << TypeInfo("threaded", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_newConnection__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("client", "PIEthernet *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "newConnection"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("client", "PIEthernet *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_connected__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "connected"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_disconnected__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("withError", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "disconnected"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("withError", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "interfaces"; fi->return_type = TypeInfo("", "PIEthernet::InterfaceList", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "interfaceAddress"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("interface_", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "allAddresses"; fi->return_type = TypeInfo("", "PIStringList", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "parseAddress"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("ipp", "PIString &", Const); - fi->arguments << TypeInfo("ip", "PIString *"); - fi->arguments << TypeInfo("port", "int *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "macFromBytes"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("mac", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "macToBytes"; fi->return_type = TypeInfo("", "PIByteArray", Static); - fi->arguments << TypeInfo("mac", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "applyMask"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("mask", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getBroadcast"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("mask", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullPathPrefix"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureFromFullPath"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("full_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureDevice"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("e_main", "void *", Const); - fi->arguments << TypeInfo("e_parent", "void *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "received"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "init"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "openDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "closeDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "closeSocket"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("sd", "int &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getSockAddr"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("s", "sockaddr *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "server_func"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("eth", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setType"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("t", "Type"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "ethErrorString"; fi->return_type = TypeInfo("", "std::string", Static); - - ci = new ClassInfo(); - (*classesInfo)["PIEthernet::Interface"] = ci; - ci->name = "PIEthernet::Interface"; - ci->variables << TypeInfo("index", "int"); - ci->variables << TypeInfo("name", "PIString"); - ci->variables << TypeInfo("mac", "PIString"); - ci->variables << TypeInfo("address", "PIString"); - ci->variables << TypeInfo("netmask", "PIString"); - ci->variables << TypeInfo("broadcast", "PIString"); - ci->variables << TypeInfo("ptp", "PIString"); - ci->variables << TypeInfo("flags", "InterfaceFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isActive"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isRunning"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isBroadcast"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isMulticast"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isLoopback"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isPTP"; fi->return_type = TypeInfo("", "bool"); - - ci = new ClassInfo(); - (*classesInfo)["PIEthernet::InterfaceList"] = ci; - ci->name = "PIEthernet::InterfaceList"; - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getByIndex"; fi->return_type = TypeInfo("", "const Interface *"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getByName"; fi->return_type = TypeInfo("", "const Interface *"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getByAddress"; fi->return_type = TypeInfo("", "const Interface *"); - fi->arguments << TypeInfo("address", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getLoopback"; fi->return_type = TypeInfo("", "const Interface *"); - - ci = new ClassInfo(); - (*classesInfo)["PIPacketExtractor"] = ci; - ci->name = "PIPacketExtractor"; - ci->parents << "PIIODevice"; - ci->variables << TypeInfo("dev", "PIIODevice*"); - ci->variables << TypeInfo("mheader", "PIByteArray"); - ci->variables << TypeInfo("buffer", "PIByteArray"); - ci->variables << TypeInfo("sbuffer", "PIByteArray"); - ci->variables << TypeInfo("ret_func_header", "HeaderCheckFunc"); - ci->variables << TypeInfo("headerPtr", "void*"); - ci->variables << TypeInfo("data", "void*"); - ci->variables << TypeInfo("buffer_size", "int"); - ci->variables << TypeInfo("dataSize", "int"); - ci->variables << TypeInfo("headerSize", "int"); - ci->variables << TypeInfo("packetSize", "int"); - ci->variables << TypeInfo("allReaded", "int"); - ci->variables << TypeInfo("addSize", "int"); - ci->variables << TypeInfo("curInd", "int"); - ci->variables << TypeInfo("missed", "ullong"); - ci->variables << TypeInfo("missed_packets", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "copy"; fi->return_type = TypeInfo("", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "device"; fi->return_type = TypeInfo("", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDevice"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("device_", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "bufferSize"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setBufferSize"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("new_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setHeaderCheckSlot"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("f", "HeaderCheckFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setPacketData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("recHeaderPtr", "void *"); - fi->arguments << TypeInfo("recHeaderSize", "int"); - fi->arguments << TypeInfo("recDataSize", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "missedBytes"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "missedPackets"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "missedBytes_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "missedPackets_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "lastHeader"; fi->return_type = TypeInfo("", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_packetReceived__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("data", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "packetReceived"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "packetHeaderValidate"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("src", "uchar *"); - fi->arguments << TypeInfo("rec", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "packetValidate"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("rec", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "threadedRead"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullPathPrefix"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "openDevice"; fi->return_type = TypeInfo("", "bool"); - - ci = new ClassInfo(); - (*classesInfo)["PIConfig"] = ci; - ci->name = "PIConfig"; - ci->parents << "PIFile"; - ci->variables << TypeInfo("centry", "int"); - ci->variables << TypeInfo("delim", "PIString"); - ci->variables << TypeInfo("root", "PIConfig::Entry"); - ci->variables << TypeInfo("empty", "PIConfig::Entry"); - ci->variables << TypeInfo("lines", "uint"); - ci->variables << TypeInfo("other", "PIStringList"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIString &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIString &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "char *", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIStringList &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "bool", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "short", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "int", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "long", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uchar", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ushort", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uint", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ulong", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "float", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "double", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "char *", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIStringList &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "bool", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "short", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "int", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "long", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uchar", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ushort", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uint", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ulong", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "float", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "double", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValues"; fi->return_type = TypeInfo("", "PIConfig::Branch"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "PIString &", Const); - fi->arguments << TypeInfo("type", "PIString &", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "PIStringList &", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "char *", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "bool", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "short", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "int", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "long", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "uchar", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "ushort", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "uint", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "ulong", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "float", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "double", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "rootEntry"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "entriesCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEntryExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "allTree"; fi->return_type = TypeInfo("", "PIConfig::Branch"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "allLeaves"; fi->return_type = TypeInfo("", "PIConfig::Branch"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "entryIndex"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getName"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("number", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("number", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getType"; fi->return_type = TypeInfo("", "PIChar"); - fi->arguments << TypeInfo("number", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getComment"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("number", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addEntry"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "PIString &", Const); - fi->arguments << TypeInfo("type", "PIString &", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setName"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("number", "uint"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("number", "uint"); - fi->arguments << TypeInfo("value", "PIString &", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setType"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("number", "uint"); - fi->arguments << TypeInfo("type", "PIString &", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setComment"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("number", "uint"); - fi->arguments << TypeInfo("comment", "PIString &", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeEntry"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeEntry"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("number", "uint"); - fi->arguments << TypeInfo("write", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clear"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readAll"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeAll"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "delimiter"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDelimiter"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("d", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "childCount"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("e", "Entry *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "entryExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("e", "Entry *", Const); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "buildFullNames"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("e", "Entry *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "allLeaves"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("b", "Branch &"); - fi->arguments << TypeInfo("e", "Entry *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setEntryDelim"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("e", "Entry *"); - fi->arguments << TypeInfo("d", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "entryByIndex"; fi->return_type = TypeInfo("", "PIConfig::Entry &"); - fi->arguments << TypeInfo("index", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeEntry"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("b", "Branch &"); - fi->arguments << TypeInfo("e", "Entry *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "deleteEntry"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("e", "Entry *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getPrefixFromLine"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("line", "PIString"); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "parse"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PIConfig::Branch"] = ci; - ci->name = "PIConfig::Branch"; - ci->variables << TypeInfo("_empty", "Entry", Static); - ci->variables << TypeInfo("delim", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIString &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIString &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "char *", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIStringList &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "bool", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "short", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "int", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "long", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uchar", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ushort", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uint", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ulong", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "float", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "double", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "char *", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIStringList &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "bool", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "short", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "int", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "long", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uchar", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ushort", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uint", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ulong", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "float", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "double", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "allLeaves"; fi->return_type = TypeInfo("", "Branch"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValues"; fi->return_type = TypeInfo("", "Branch"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getLeaves"; fi->return_type = TypeInfo("", "Branch"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getBranches"; fi->return_type = TypeInfo("", "Branch"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "filter"; fi->return_type = TypeInfo("", "Branch &"); - fi->arguments << TypeInfo("f", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEntryExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "indexOf"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("e", "Entry *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "entryExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("e", "Entry *", Const); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "allLeaves"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("b", "Branch &"); - fi->arguments << TypeInfo("e", "Entry *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "coutt"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("s", "std::ostream &"); - fi->arguments << TypeInfo("p", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piCoutt"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("s", "PICout"); - fi->arguments << TypeInfo("p", "PIString &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIConfig::Entry"] = ci; - ci->name = "PIConfig::Entry"; - ci->variables << TypeInfo("_empty", "PIConfig::Entry::EntryPtr", Static); - ci->variables << TypeInfo("_parent", "PIConfig::Entry::EntryPtr*"); - ci->variables << TypeInfo("_children", "Branch"); - ci->variables << TypeInfo("_tab", "PIString"); - ci->variables << TypeInfo("_name", "PIString"); - ci->variables << TypeInfo("_value", "PIString"); - ci->variables << TypeInfo("_type", "PIString"); - ci->variables << TypeInfo("_comment", "PIString"); - ci->variables << TypeInfo("_all", "PIString"); - ci->variables << TypeInfo("_full_name", "PIString"); - ci->variables << TypeInfo("delim", "PIString"); - ci->variables << TypeInfo("_line", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "parent"; fi->return_type = TypeInfo("", "Entry *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "childCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "children"; fi->return_type = TypeInfo("", "Branch &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "child"; fi->return_type = TypeInfo("", "Entry *"); - fi->arguments << TypeInfo("index", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findChild"; fi->return_type = TypeInfo("", "Entry *"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findChild"; fi->return_type = TypeInfo("", "const Entry *"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isLeaf"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "name"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "value"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "type"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "comment"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullName"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setName"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setType"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setComment"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "PIStringList &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "char *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "bool", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "char", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "short", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "long", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "uchar", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "ushort", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "uint", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "ulong", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "float", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("value", "double", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIString &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIString &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "char *", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIStringList &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "bool", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "short", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "int", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "long", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uchar", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ushort", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uint", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ulong", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "float", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "double", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "char *", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "PIStringList &", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "bool", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "short", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "int", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "long", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uchar", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ushort", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "uint", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "ulong", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "float", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValue"; fi->return_type = TypeInfo("", "Entry &"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - fi->arguments << TypeInfo("def", "double", Const); - fi->arguments << TypeInfo("exists", "bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getValues"; fi->return_type = TypeInfo("", "Branch"); - fi->arguments << TypeInfo("vname", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEntryExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "compare"; fi->return_type = TypeInfo("", "int", Static); - fi->arguments << TypeInfo("f", "EntryPtr *", Const); - fi->arguments << TypeInfo("s", "EntryPtr *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "entryExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("e", "Entry *", Const); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "buildLine"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clear"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "coutt"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("s", "std::ostream &"); - fi->arguments << TypeInfo("p", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "piCoutt"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("s", "PICout"); - fi->arguments << TypeInfo("p", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "deleteBranch"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PIMultiProtocolBase"] = ci; - ci->name = "PIMultiProtocolBase"; - ci->parents << "PIObject"; - ci->variables << TypeInfo("mutex_receive", "PIMutex"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "received"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prot", "PIProtocol *"); - fi->arguments << TypeInfo("corrected", "bool"); - fi->arguments << TypeInfo("data", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveEvent"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("p", "PIMultiProtocolBase *"); - fi->arguments << TypeInfo("prot", "PIProtocol *"); - fi->arguments << TypeInfo("corrected", "bool"); - fi->arguments << TypeInfo("data", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PIProtocol"] = ci; - ci->name = "PIProtocol"; - ci->parents << "PIObject"; - ci->variables << TypeInfo("ser", "PISerial*"); - ci->variables << TypeInfo("eth", "PIEthernet*"); - ci->variables << TypeInfo("dataSize", "uint"); - ci->variables << TypeInfo("headerSize", "uint"); - ci->variables << TypeInfo("sendDataSize", "uint"); - ci->variables << TypeInfo("dataPtr", "uchar*"); - ci->variables << TypeInfo("headerPtr", "uchar*"); - ci->variables << TypeInfo("sendDataPtr", "uchar*"); - ci->variables << TypeInfo("ret_func", "ReceiveFunc"); - ci->variables << TypeInfo("packet_ext", "PIPacketExtractor*"); - ci->variables << TypeInfo("diagTimer", "PITimer*"); - ci->variables << TypeInfo("sendTimer", "PITimer*"); - ci->variables << TypeInfo("secTimer", "PITimer*"); - ci->variables << TypeInfo("mp_owner", "PIMultiProtocolBase*"); - ci->variables << TypeInfo("type_send", "PIProtocol::Type"); - ci->variables << TypeInfo("type_rec", "PIProtocol::Type"); - ci->variables << TypeInfo("net_diag", "PIProtocol::Quality"); - ci->variables << TypeInfo("last_freq", "PIDeque"); - ci->variables << TypeInfo("last_packets", "PIDeque"); - ci->variables << TypeInfo("protName", "PIString"); - ci->variables << TypeInfo("devReceiverName", "PIString"); - ci->variables << TypeInfo("devReceiverState", "PIString"); - ci->variables << TypeInfo("devSenderName", "PIString"); - ci->variables << TypeInfo("devSenderState", "PIString"); - ci->variables << TypeInfo("speedIn", "PIString"); - ci->variables << TypeInfo("speedOut", "PIString"); - ci->variables << TypeInfo("history_path_rec", "PIString"); - ci->variables << TypeInfo("history_path_send", "PIString"); - ci->variables << TypeInfo("history_rsize_rec", "PIString"); - ci->variables << TypeInfo("history_rsize_send", "PIString"); - ci->variables << TypeInfo("history_file_rec", "PIFile"); - ci->variables << TypeInfo("history_file_send", "PIFile"); - ci->variables << TypeInfo("history_id_rec", "ushort"); - ci->variables << TypeInfo("history_id_send", "ushort"); - ci->variables << TypeInfo("work", "bool"); - ci->variables << TypeInfo("new_mp_prot", "bool"); - ci->variables << TypeInfo("history_write_rec", "bool"); - ci->variables << TypeInfo("history_write_send", "bool"); - ci->variables << TypeInfo("exp_freq", "float"); - ci->variables << TypeInfo("send_freq", "float"); - ci->variables << TypeInfo("ifreq", "float"); - ci->variables << TypeInfo("immediate_freq", "float"); - ci->variables << TypeInfo("integral_freq", "float"); - ci->variables << TypeInfo("timeout_", "float"); - ci->variables << TypeInfo("packets", "int[2]"); - ci->variables << TypeInfo("pckt_cnt", "int"); - ci->variables << TypeInfo("pckt_cnt_max", "int"); - ci->variables << TypeInfo("cur_pckt", "char"); - ci->variables << TypeInfo("wrong_count", "ullong"); - ci->variables << TypeInfo("receive_count", "ullong"); - ci->variables << TypeInfo("send_count", "ullong"); - ci->variables << TypeInfo("missed_count", "ullong"); - ci->variables << TypeInfo("packets_in_sec", "ullong"); - ci->variables << TypeInfo("packets_out_sec", "ullong"); - ci->variables << TypeInfo("bytes_in_sec", "ullong"); - ci->variables << TypeInfo("bytes_out_sec", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_startReceive__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startReceive"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_startReceive__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("exp_frequency", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startReceive"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("exp_frequency", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stopReceive__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stopReceive"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setExpectedFrequency"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("frequency", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReceiverDevice"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("device", "PIString &", Const); - fi->arguments << TypeInfo("speed", "PISerial::Speed"); - fi->arguments << TypeInfo("force", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReceiverData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("dataPtr", "void *"); - fi->arguments << TypeInfo("dataSize", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReceiverDataHeader"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("headerPtr", "void *"); - fi->arguments << TypeInfo("headerSize", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReceiverAddress"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("port", "int"); - fi->arguments << TypeInfo("force", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReceiverParameters"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("parameters", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setReceiveSlot"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("slot", "ReceiveFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "expectedFrequency"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_startSend__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startSend"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_startSend__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("frequency", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startSend"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("frequency", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stopSend__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stopSend"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSenderFrequency"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("frequency", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSenderDevice"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("device", "PIString &", Const); - fi->arguments << TypeInfo("speed", "PISerial::Speed"); - fi->arguments << TypeInfo("force", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSenderData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("dataPtr", "void *"); - fi->arguments << TypeInfo("dataSize", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSenderAddress"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("port", "int"); - fi->arguments << TypeInfo("force", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSenderIP"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ip", "PIString &", Const); - fi->arguments << TypeInfo("force", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSenderPort"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("port", "int"); - fi->arguments << TypeInfo("force", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSenderParameters"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("parameters", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "senderFrequency"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stop__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stop"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_send__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_send__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_send__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("direct", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("direct", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setName"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "name"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDisconnectTimeout"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("timeout", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "disconnectTimeout"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "disconnectTimeout_ptr"; fi->return_type = TypeInfo("", "const float *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "immediateFrequency"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "integralFrequency"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "immediateFrequency_ptr"; fi->return_type = TypeInfo("", "const float *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "integralFrequency_ptr"; fi->return_type = TypeInfo("", "const float *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCountPerSec"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCountPerSec_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCountPerSec"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCountPerSec_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveBytesPerSec"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveBytesPerSec_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendBytesPerSec"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendBytesPerSec_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "wrongCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "wrongCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "missedCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "missedCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "quality"; fi->return_type = TypeInfo("", "PIProtocol::Quality"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "quality_ptr"; fi->return_type = TypeInfo("", "const int *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiverDeviceName"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "senderDeviceName"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiverDeviceState"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiverDeviceState_ptr"; fi->return_type = TypeInfo("", "const PIString *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "senderDeviceState"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "senderDeviceState_ptr"; fi->return_type = TypeInfo("", "const PIString *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveSpeed"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveSpeed_ptr"; fi->return_type = TypeInfo("", "const PIString *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendSpeed"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendSpeed_ptr"; fi->return_type = TypeInfo("", "const PIString *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiverHistorySize"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiverHistorySize_ptr"; fi->return_type = TypeInfo("", "const PIString *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "senderHistorySize"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "senderHistorySize_ptr"; fi->return_type = TypeInfo("", "const PIString *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeReceiverHistory"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeReceiverHistory_ptr"; fi->return_type = TypeInfo("", "const bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeSenderHistory"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeSenderHistory_ptr"; fi->return_type = TypeInfo("", "const bool *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveData"; fi->return_type = TypeInfo("", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendData"; fi->return_type = TypeInfo("", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "packetExtractor"; fi->return_type = TypeInfo("", "PIPacketExtractor *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "lastHeader"; fi->return_type = TypeInfo("", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_receiverStarted__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiverStarted"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_receiverStopped__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiverStopped"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_senderStarted__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "senderStarted"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_senderStopped__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "senderStopped"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_received__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("validate_is_ok", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "received"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("validate_is_ok", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_qualityChanged__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("new_quality", "PIProtocol::Quality"); - fi->arguments << TypeInfo("old_quality", "PIProtocol::Quality"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "qualityChanged"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("new_quality", "PIProtocol::Quality"); - fi->arguments << TypeInfo("old_quality", "PIProtocol::Quality"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receive"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("data", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "validate"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "headerValidate"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("src", "uchar *"); - fi->arguments << TypeInfo("rec", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checksum_i"; fi->return_type = TypeInfo("", "uint"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checksum_c"; fi->return_type = TypeInfo("", "uchar"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "aboutSend"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "init"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "init_sender"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("b", "PIConfig::Entry &"); - fi->arguments << TypeInfo("sb", "PIConfig::Entry &"); - fi->arguments << TypeInfo("config", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "init_receiver"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("b", "PIConfig::Entry &"); - fi->arguments << TypeInfo("rb", "PIConfig::Entry &"); - fi->arguments << TypeInfo("config", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "check_state"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calc_freq"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "calc_diag"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendEvent"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("e", "void *"); - fi->arguments << TypeInfo("nt", "i"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveEvent"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("t", "void *"); - fi->arguments << TypeInfo("data", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "headerValidateEvent"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("t", "void *"); - fi->arguments << TypeInfo("src", "uchar *"); - fi->arguments << TypeInfo("rec", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "diagEvent"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("t", "void *"); - fi->arguments << TypeInfo("nt", "i"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "secEvent"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("t", "void *"); - fi->arguments << TypeInfo("nt", "i"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setMultiProtocolOwner"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("mp", "PIMultiProtocolBase *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "multiProtocolOwner"; fi->return_type = TypeInfo("", "PIMultiProtocolBase *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "changeDisconnectTimeout"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PIDiagnostics"] = ci; - ci->name = "PIDiagnostics"; - ci->parents << "PITimer"; - ci->variables << TypeInfo("qual", "PIDiagnostics::Quality"); - ci->variables << TypeInfo("speedIn", "PIString"); - ci->variables << TypeInfo("speedOut", "PIString"); - ci->variables << TypeInfo("ifreq", "float"); - ci->variables << TypeInfo("immediate_freq", "float"); - ci->variables << TypeInfo("integral_freq", "float"); - ci->variables << TypeInfo("packets", "int[2]"); - ci->variables << TypeInfo("cur_pckt", "char"); - ci->variables << TypeInfo("rec_once", "char"); - ci->variables << TypeInfo("wrong_count", "ullong"); - ci->variables << TypeInfo("receive_count", "ullong"); - ci->variables << TypeInfo("send_count", "ullong"); - ci->variables << TypeInfo("packets_in_sec", "ullong"); - ci->variables << TypeInfo("packets_out_sec", "ullong"); - ci->variables << TypeInfo("bytes_in_sec", "ullong"); - ci->variables << TypeInfo("bytes_out_sec", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "immediateFrequency"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "integralFrequency"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCountPerSec"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCountPerSec"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveBytesPerSec"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendBytesPerSec"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "wrongCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "quality"; fi->return_type = TypeInfo("", "PIDiagnostics::Quality"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveSpeed"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendSpeed"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "immediateFrequency_ptr"; fi->return_type = TypeInfo("", "const float *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "integralFrequency_ptr"; fi->return_type = TypeInfo("", "const float *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCountPerSec_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCountPerSec_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveBytesPerSec_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendBytesPerSec_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "wrongCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "quality_ptr"; fi->return_type = TypeInfo("", "const int *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveSpeed_ptr"; fi->return_type = TypeInfo("", "const PIString *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendSpeed_ptr"; fi->return_type = TypeInfo("", "const PIString *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("msecs", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("msecs", "double"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_reset__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "reset"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_received__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "received"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_received__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("correct", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "received"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("size", "int"); - fi->arguments << TypeInfo("correct", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_sended__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sended"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_qualityChanged__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("new_quality", "PIDiagnostics::Quality"); - fi->arguments << TypeInfo("old_quality", "PIDiagnostics::Quality"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "qualityChanged"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("new_quality", "PIDiagnostics::Quality"); - fi->arguments << TypeInfo("old_quality", "PIDiagnostics::Quality"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "tick"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delimiter", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "changeDisconnectTimeout"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PISystemMonitor"] = ci; - ci->name = "PISystemMonitor"; - ci->parents << "PIThread"; - ci->variables << TypeInfo("file", "PIFile"); - ci->variables << TypeInfo("filem", "PIFile"); - ci->variables << TypeInfo("stat", "PISystemMonitor::ProcessStats"); - ci->variables << TypeInfo("pID_", "int"); - ci->variables << TypeInfo("page_size", "int"); - ci->variables << TypeInfo("cpu_count", "int"); - ci->variables << TypeInfo("cycle", "int"); - ci->variables << TypeInfo("cpu_u_cur", "llong"); - ci->variables << TypeInfo("cpu_u_prev", "llong"); - ci->variables << TypeInfo("cpu_s_cur", "llong"); - ci->variables << TypeInfo("cpu_s_prev", "llong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startOnProcess"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("pID", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startOnSelf"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "statistic"; fi->return_type = TypeInfo("", "const PISystemMonitor::ProcessStats &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "run"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PISystemMonitor::ProcessStats"] = ci; - ci->name = "PISystemMonitor::ProcessStats"; - ci->variables << TypeInfo("exec_name", "PIString"); - ci->variables << TypeInfo("state", "PIString"); - ci->variables << TypeInfo("ID", "int"); - ci->variables << TypeInfo("parent_ID", "int"); - ci->variables << TypeInfo("group_ID", "int"); - ci->variables << TypeInfo("session_ID", "int"); - ci->variables << TypeInfo("priority", "int"); - ci->variables << TypeInfo("threads", "int"); - ci->variables << TypeInfo("physical_memsize", "ulong"); - ci->variables << TypeInfo("resident_memsize", "ulong"); - ci->variables << TypeInfo("share_memsize", "ulong"); - ci->variables << TypeInfo("virtual_memsize", "ulong"); - ci->variables << TypeInfo("data_memsize", "ulong"); - ci->variables << TypeInfo("physical_memsize_readable", "PIString"); - ci->variables << TypeInfo("resident_memsize_readable", "PIString"); - ci->variables << TypeInfo("share_memsize_readable", "PIString"); - ci->variables << TypeInfo("virtual_memsize_readable", "PIString"); - ci->variables << TypeInfo("data_memsize_readable", "PIString"); - ci->variables << TypeInfo("cpu_load_system", "float"); - ci->variables << TypeInfo("cpu_load_user", "float"); - - ci = new ClassInfo(); - (*classesInfo)["PIConsole"] = ci; - ci->name = "PIConsole"; - ci->parents << "PIThread"; - ci->variables << TypeInfo("tabs", "PIVector"); - ci->variables << TypeInfo("binstr", "PIString"); - ci->variables << TypeInfo("rstr", "PIString"); - ci->variables << TypeInfo("rba", "PIByteArray"); - ci->variables << TypeInfo("tv", "PIConsole::Variable"); - ci->variables << TypeInfo("listener", "PIKbdListener*"); - ci->variables << TypeInfo("def_align", "PIConsole::Alignment"); - ci->variables << TypeInfo("ret_func", "KBFunc"); - ci->variables << TypeInfo("width", "int"); - ci->variables << TypeInfo("height", "int"); - ci->variables << TypeInfo("pwidth", "int"); - ci->variables << TypeInfo("pheight", "int"); - ci->variables << TypeInfo("ret", "int"); - ci->variables << TypeInfo("col_wid", "int"); - ci->variables << TypeInfo("num_format", "int"); - ci->variables << TypeInfo("systime_format", "int"); - ci->variables << TypeInfo("max_y", "uint"); - ci->variables << TypeInfo("vid", "int"); - ci->variables << TypeInfo("cur_tab", "uint"); - ci->variables << TypeInfo("col_cnt", "uint"); - ci->variables << TypeInfo("peer", "PIPeer*"); - ci->variables << TypeInfo("peer_timer", "PITimer"); - ci->variables << TypeInfo("server_name", "PIString"); - ci->variables << TypeInfo("server_mode", "bool"); - ci->variables << TypeInfo("state", "PIConsole::ConnectedState"); - ci->variables << TypeInfo("remote_clients", "PIVector"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addString"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "PIString *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "char *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "bool *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "short *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "int *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "long *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "llong *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "uchar *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "ushort *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "uint *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "ulong *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "ullong *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "float *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "double *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "PISystemTime *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "PIProtocol *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "PIDiagnostics *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "PISystemMonitor *", Const); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addBitVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("ptr", "void *", Const); - fi->arguments << TypeInfo("fromBit", "int"); - fi->arguments << TypeInfo("bitsCount", "int"); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addEmptyLine"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("column", "int"); - fi->arguments << TypeInfo("count", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getString"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("x", "int"); - fi->arguments << TypeInfo("y", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getShort"; fi->return_type = TypeInfo("", "short"); - fi->arguments << TypeInfo("x", "int"); - fi->arguments << TypeInfo("y", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getInt"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("x", "int"); - fi->arguments << TypeInfo("y", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getFloat"; fi->return_type = TypeInfo("", "float"); - fi->arguments << TypeInfo("x", "int"); - fi->arguments << TypeInfo("y", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getDouble"; fi->return_type = TypeInfo("", "double"); - fi->arguments << TypeInfo("x", "int"); - fi->arguments << TypeInfo("y", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getString"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getShort"; fi->return_type = TypeInfo("", "short"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getInt"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getFloat"; fi->return_type = TypeInfo("", "float"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getDouble"; fi->return_type = TypeInfo("", "double"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "tabsCount"; fi->return_type = TypeInfo("", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "currentTab"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addTab"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("bind_key", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeTab"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("index", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeTab"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setTab"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("index", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setTab"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setTabBindKey"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("index", "uint"); - fi->arguments << TypeInfo("bind_key", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setTabBindKey"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("bind_key", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearTabs"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("clearScreen", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addCustomStatus"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("str", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearCustomStatus"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "defaultAlignment"; fi->return_type = TypeInfo("", "PIConsole::Alignment"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDefaultAlignment"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("align", "Alignment"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setColumnAlignment"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("col", "int"); - fi->arguments << TypeInfo("align", "Alignment"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setColumnAlignmentToAll"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("align", "Alignment"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fstr"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("f", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "enableExitCapture"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("key", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "disableExitCapture"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exitCaptured"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exitKey"; fi->return_type = TypeInfo("", "char"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startServer"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stopPeer"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isServerStarted"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clients"; fi->return_type = TypeInfo("", "PIStringList"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "listenServers"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "availableServers"; fi->return_type = TypeInfo("", "PIStringList"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "selectedServer"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "connectToServer"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "disconnect"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isConnected"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toUpperLeft"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "moveRight"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "moveLeft"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "moveTo"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("x", "int"); - fi->arguments << TypeInfo("y", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearScreen"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearScreenLower"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearLine"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "newLine"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "hideCursor"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "showCursor"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_clearVariables__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearVariables"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_clearVariables__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("clearScreen", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearVariables"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("clearScreen", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_waitForFinish__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "waitForFinish"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_start__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("wait", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stop__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stop"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_stop__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("clear", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stop"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("clear", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_keyPressed__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("key", "char"); - fi->arguments << TypeInfo("data", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "keyPressed"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("key", "char"); - fi->arguments << TypeInfo("data", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "begin"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "run"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fillLabels"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "status"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checkColumn"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("col", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "bitsValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("src", "void *", Const); - fi->arguments << TypeInfo("offset", "int"); - fi->arguments << TypeInfo("count", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "toBin"; fi->return_type = TypeInfo("", "const char *"); - fi->arguments << TypeInfo("d", "void *", Const); - fi->arguments << TypeInfo("s", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printLine"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("str", "PIString &", Const); - fi->arguments << TypeInfo("dx", "int"); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "PIString &", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("str", "char *", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "bool", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "int", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "long", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "llong", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "float", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "double", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "char", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "short", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "uchar", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "ushort", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "uint", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "ulong", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "ullong", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "printValue"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("value", "PISystemTime &", Const); - fi->arguments << TypeInfo("format", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "key_event"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("key", "char"); - fi->arguments << TypeInfo("t", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "columns"; fi->return_type = TypeInfo("", "PIVector &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "column"; fi->return_type = TypeInfo("", "PIConsole::Column &"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "char *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "bool", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "char", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "short", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "long", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "llong", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "uchar", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "ushort", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "uint", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "ulong", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "ullong", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "float", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "double", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "couts"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("v", "PISystemTime &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "serverSendInfo"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "serverSendData"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "remoteClient"; fi->return_type = TypeInfo("", "RemoteClient &"); - fi->arguments << TypeInfo("fname", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_peerReceived__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("from", "PIString &", Const); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "peerReceived"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("from", "PIString &", Const); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_peerTimer__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delim", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "peerTimer"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delim", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_peerDisconnectedEvent__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "peerDisconnectedEvent"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIConsole::Variable"] = ci; - ci->name = "PIConsole::Variable"; - ci->variables << TypeInfo("name", "PIString"); - ci->variables << TypeInfo("format", "PIFlags"); - ci->variables << TypeInfo("nx", "int"); - ci->variables << TypeInfo("ny", "int"); - ci->variables << TypeInfo("type", "int"); - ci->variables << TypeInfo("offset", "int"); - ci->variables << TypeInfo("bitFrom", "int"); - ci->variables << TypeInfo("bitCount", "int"); - ci->variables << TypeInfo("size", "int"); - ci->variables << TypeInfo("id", "int"); - ci->variables << TypeInfo("remote", "bool"); - ci->variables << TypeInfo("ptr", "void*", Const); - ci->variables << TypeInfo("rdata", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEmpty"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "data"; fi->return_type = TypeInfo("", "const void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ba", "PIByteArray &"); - - ci = new ClassInfo(); - (*classesInfo)["PIConsole::VariableContent"] = ci; - ci->name = "PIConsole::VariableContent"; - ci->variables << TypeInfo("id", "int"); - ci->variables << TypeInfo("rdata", "PIByteArray"); - - ci = new ClassInfo(); - (*classesInfo)["PIConsole::Column"] = ci; - ci->name = "PIConsole::Column"; - ci->variables << TypeInfo("variables", "PIVector"); - ci->variables << TypeInfo("alignment", "Alignment"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "size"; fi->return_type = TypeInfo("", "uint"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "push_back"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("v", "Variable &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIConsole::Tab"] = ci; - ci->name = "PIConsole::Tab"; - ci->variables << TypeInfo("columns", "PIVector"); - ci->variables << TypeInfo("name", "PIString"); - ci->variables << TypeInfo("status", "PIString"); - ci->variables << TypeInfo("key", "char"); - - ci = new ClassInfo(); - (*classesInfo)["PIConsole::RemoteClient"] = ci; - ci->name = "PIConsole::RemoteClient"; - ci->variables << TypeInfo("name", "PIString"); - ci->variables << TypeInfo("state", "ConnectedState"); - - ci = new ClassInfo(); - (*classesInfo)["PICLI"] = ci; - ci->name = "PICLI"; - ci->parents << "PIObject"; - ci->variables << TypeInfo("_prefix_short", "PIString"); - ci->variables << TypeInfo("_prefix_full", "PIString"); - ci->variables << TypeInfo("_args_raw", "PIStringList"); - ci->variables << TypeInfo("_args_mand", "PIStringList"); - ci->variables << TypeInfo("_args_opt", "PIStringList"); - ci->variables << TypeInfo("keys_full", "PISet"); - ci->variables << TypeInfo("keys_short", "PISet"); - ci->variables << TypeInfo("_args", "PIVector"); - ci->variables << TypeInfo("_count_mand", "int"); - ci->variables << TypeInfo("_count_opt", "int"); - ci->variables << TypeInfo("needParse", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addArgument"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addArgument"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("shortKey", "PIChar &", Const); - fi->arguments << TypeInfo("value", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addArgument"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("shortKey", "char *", Const); - fi->arguments << TypeInfo("value", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addArgument"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("shortKey", "PIChar &", Const); - fi->arguments << TypeInfo("fullKey", "PIString &", Const); - fi->arguments << TypeInfo("value", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addArgument"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("shortKey", "char *", Const); - fi->arguments << TypeInfo("fullKey", "PIString &", Const); - fi->arguments << TypeInfo("value", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "rawArgument"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "mandatoryArgument"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "optionalArgument"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "rawArguments"; fi->return_type = TypeInfo("", "const PIStringList &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "mandatoryArguments"; fi->return_type = TypeInfo("", "const PIStringList &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "optionalArguments"; fi->return_type = TypeInfo("", "const PIStringList &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "programCommand"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "hasArgument"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "argumentValue"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "argumentShortKey"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "argumentFullKey"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "shortKeyPrefix"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullKeyPrefix"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "mandatoryArgumentsCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "optionalArgumentsCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setShortKeyPrefix"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prefix", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setFullKeyPrefix"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prefix", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setMandatoryArgumentsCount"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("count", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setOptionalArgumentsCount"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("count", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "parse"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PICLI::Argument"] = ci; - ci->name = "PICLI::Argument"; - ci->variables << TypeInfo("name", "PIString"); - ci->variables << TypeInfo("short_key", "PIChar"); - ci->variables << TypeInfo("full_key", "PIString"); - ci->variables << TypeInfo("value", "PIString"); - ci->variables << TypeInfo("has_value", "bool"); - ci->variables << TypeInfo("found", "bool"); - - ci = new ClassInfo(); - (*classesInfo)["Instruction"] = ci; - ci->name = "Instruction"; - ci->variables << TypeInfo("operation", "Operation"); - ci->variables << TypeInfo("out", "int"); - ci->variables << TypeInfo("function", "int"); - - ci = new ClassInfo(); - (*classesInfo)["Function"] = ci; - ci->name = "Function"; - ci->variables << TypeInfo("identifier", "PIString"); - ci->variables << TypeInfo("type", "BaseFunctions"); - ci->variables << TypeInfo("handler", "FuncFunc"); - ci->variables << TypeInfo("arguments", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PIEvaluatorContent"] = ci; - ci->name = "PIEvaluatorContent"; - ci->variables << TypeInfo("functions", "PIVector"); - ci->variables << TypeInfo("variables", "PIVector"); - ci->variables << TypeInfo("cv_count", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addFunction"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("args", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("val", "complexd &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addCustomFunction"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("args_count", "int"); - fi->arguments << TypeInfo("func", "FuncFunc"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "functionsCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "variablesCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "customVariablesCount"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findFunction"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findVariable"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("var_name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "function"; fi->return_type = TypeInfo("", "PIEvaluatorTypes::Function"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "variable"; fi->return_type = TypeInfo("", "PIEvaluatorTypes::Variable"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "function"; fi->return_type = TypeInfo("", "PIEvaluatorTypes::Function"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "variable"; fi->return_type = TypeInfo("", "PIEvaluatorTypes::Variable"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "customVariable"; fi->return_type = TypeInfo("", "PIEvaluatorTypes::Variable"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setVariableValue"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("index", "int"); - fi->arguments << TypeInfo("new_value", "complexd"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setVariableName"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("index", "int"); - fi->arguments << TypeInfo("new_name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setVariableValue"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("var_name", "PIString &", Const); - fi->arguments << TypeInfo("new_value", "complexd &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setVariableName"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("var_name", "PIString &", Const); - fi->arguments << TypeInfo("new_name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("index", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("var_name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearCustomVariables"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sortVariables"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getBaseFunction"; fi->return_type = TypeInfo("", "PIEvaluatorTypes::BaseFunctions"); - fi->arguments << TypeInfo("name", "PIString &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIEvaluator"] = ci; - ci->name = "PIEvaluator"; - ci->variables << TypeInfo("content", "PIEvaluatorContent"); - ci->variables << TypeInfo("elements", "PIVector"); - ci->variables << TypeInfo("currentVariables", "PIVector"); - ci->variables << TypeInfo("variables", "PIVector"); - ci->variables << TypeInfo("tmpvars", "PIVector"); - ci->variables << TypeInfo("kvars", "PIVector*"); - ci->variables << TypeInfo("instructions", "PIVector"); - ci->variables << TypeInfo("unknownVars", "PIStringList"); - ci->variables << TypeInfo("currentString", "PIString"); - ci->variables << TypeInfo("lastError", "PIString"); - ci->variables << TypeInfo("out", "complexd"); - ci->variables << TypeInfo("correct", "bool"); - ci->variables << TypeInfo("data_", "void*"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "data"; fi->return_type = TypeInfo("", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("_data", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "check"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("string", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isCorrect"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setVariable"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("value", "complexd"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("index", "int"); - fi->arguments << TypeInfo("value", "complexd"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setCustomVariableValue"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("index", "int"); - fi->arguments << TypeInfo("value", "complexd"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "evaluate"; fi->return_type = TypeInfo("", "complexd"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeVariable"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clearCustomVariables"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "variableIndex"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "unknownVariables"; fi->return_type = TypeInfo("", "const PIStringList &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "expression"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "error"; fi->return_type = TypeInfo("", "const PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "lastResult"; fi->return_type = TypeInfo("", "const complexd &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "prepare"; fi->return_type = TypeInfo("", "const PIString &"); - fi->arguments << TypeInfo("string", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "preprocess"; fi->return_type = TypeInfo("", "const PIString &"); - fi->arguments << TypeInfo("string", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "parse"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("string", "PIString &", Const); - fi->arguments << TypeInfo("offset", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "convert"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checkBrackets"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeSpaces"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findUnknownVariables"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeJunk"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "replaceOperators"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "makeOutput"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("string", "PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fillElements"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSignes"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isSign"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("ch", "PIChar &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "inverse"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("string", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "check"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "execInstructions"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "inBrackets"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("string", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "operationChar"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("operation", "PIEvaluatorTypes::Operation &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "operationInOrder"; fi->return_type = TypeInfo("", "PIEvaluatorTypes::Operation"); - fi->arguments << TypeInfo("index", "int &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "value"; fi->return_type = TypeInfo("", "complexd"); - fi->arguments << TypeInfo("index", "int &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "residue"; fi->return_type = TypeInfo("", "complexd"); - fi->arguments << TypeInfo("f", "complexd &", Const); - fi->arguments << TypeInfo("s", "complexd &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "execFunction"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ci", "PIEvaluatorTypes::Instruction &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIMultiProtocol"] = ci; - ci->name = "PIMultiProtocol"; - ci->parents << "PIMultiProtocolBase"; - ci->variables << TypeInfo("prots", "PIVector"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addProtocol"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prot", "PIProtocol &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addProtocol"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prot", "PIProtocol *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addProtocol"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("config", "PIString &", Const); - fi->arguments << TypeInfo("name", "PIString &", Const); - fi->arguments << TypeInfo("recHeaderPtr", "void *"); - fi->arguments << TypeInfo("recHeaderSize", "int"); - fi->arguments << TypeInfo("recDataPtr", "void *"); - fi->arguments << TypeInfo("recDataSize", "int"); - fi->arguments << TypeInfo("sendDataPtr", "void *"); - fi->arguments << TypeInfo("sendDataSize", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "protocol"; fi->return_type = TypeInfo("", "PIProtocol *"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "protocol"; fi->return_type = TypeInfo("", "PIProtocol *"); - fi->arguments << TypeInfo("index", "int", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startSend"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "startReceive"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "start"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stopSend"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stopReceive"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "stop"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "worseQuality"; fi->return_type = TypeInfo("", "PIProtocol::Quality"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "bestQuality"; fi->return_type = TypeInfo("", "PIProtocol::Quality"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "count"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clear"; fi->return_type = TypeInfo("", "void"); - - ci = new ClassInfo(); - (*classesInfo)["PIRepeater"] = ci; - ci->name = "PIRepeater"; - ci->parents << "PIMultiProtocol"; - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "firstChannelName"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "secondChannelName"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "receiveCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCount"; fi->return_type = TypeInfo("", "ullong"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendCount_ptr"; fi->return_type = TypeInfo("", "const ullong *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "received"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prot", "PIProtocol *"); - fi->arguments << TypeInfo("ool", "b"); - fi->arguments << TypeInfo("data", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PICodec"] = ci; - ci->name = "PICodec"; - ci->parents << "PIProcess"; - ci->variables << TypeInfo("c_from", "PIString"); - ci->variables << TypeInfo("c_to", "PIString"); - ci->variables << TypeInfo("tf", "PIFile"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setFromCoding"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("from", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setToCoding"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("to", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setCodings"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("from", "PIString &", Const); - fi->arguments << TypeInfo("to", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "availableCodecs"; fi->return_type = TypeInfo("", "PIStringList"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "encode"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("str", "PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "encode"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("str", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "decode"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("str", "PIString &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "decode"; fi->return_type = TypeInfo("", "PIString"); - fi->arguments << TypeInfo("str", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "exec_iconv"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("from", "PIString &", Const); - fi->arguments << TypeInfo("to", "PIString &", Const); - fi->arguments << TypeInfo("str", "PIByteArray &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PISignals"] = ci; - ci->name = "PISignals"; - ci->variables << TypeInfo("ret_func", "PISignals::SignalEvent", Static); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setSlot"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("slot", "SignalEvent"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "grabSignals"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("signals_", "PIFlags"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "raiseSignal"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("signal", "PISignals::Signal"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "signalCode"; fi->return_type = TypeInfo("", "int", Static); - fi->arguments << TypeInfo("signal", "PISignals::Signal"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "signalFromCode"; fi->return_type = TypeInfo("", "PISignals::Signal", Static); - fi->arguments << TypeInfo("signal", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "signal_event"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("signal", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PIPeer"] = ci; - ci->name = "PIPeer"; - ci->parents << "PIObject"; - ci->variables << TypeInfo("eths", "PIVector"); - ci->variables << TypeInfo("mc_eths", "PIVector"); - ci->variables << TypeInfo("eth_send", "PIEthernet*"); - ci->variables << TypeInfo("timer", "PITimer"); - ci->variables << TypeInfo("mc_mutex", "PIMutex"); - ci->variables << TypeInfo("eth_mutex", "PIMutex"); - ci->variables << TypeInfo("rec_mc", "bool"); - ci->variables << TypeInfo("rec_bc", "bool"); - ci->variables << TypeInfo("self_info", "PIPeer::PeerInfo"); - ci->variables << TypeInfo("peers", "PIVector"); - ci->variables << TypeInfo("addresses_map", "PIMap >"); - ci->variables << TypeInfo("diag_s", "PIDiagnostics"); - ci->variables << TypeInfo("diag_d", "PIDiagnostics"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PIString &", Const); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PIString &", Const); - fi->arguments << TypeInfo("data", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PIString &", Const); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PeerInfo &", Const); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PeerInfo &", Const); - fi->arguments << TypeInfo("data", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PeerInfo &", Const); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PeerInfo *", Const); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PeerInfo *", Const); - fi->arguments << TypeInfo("data", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "send"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("to", "PeerInfo *", Const); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendToAll"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendToAll"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendToAll"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isMulticastReceive"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isBroadcastReceive"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "diagnosticService"; fi->return_type = TypeInfo("", "PIDiagnostics &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "diagnosticData"; fi->return_type = TypeInfo("", "PIDiagnostics &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "allPeers"; fi->return_type = TypeInfo("", "const PIVector &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isPeerExists"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getPeerByName"; fi->return_type = TypeInfo("", "const PIPeer::PeerInfo *"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "lock"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "unlock"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_dataReceivedEvent__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("from", "PIString &", Const); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "dataReceivedEvent"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("from", "PIString &", Const); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_peerConnectedEvent__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "peerConnectedEvent"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_peerDisconnectedEvent__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "peerDisconnectedEvent"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "dataReceived"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("from", "PIString &", Const); - fi->arguments << TypeInfo("data", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "peerConnected"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "peerDisconnected"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_dataRead__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "dataRead"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_multicastRead__"; fi->return_type = TypeInfo("", "bool", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "multicastRead"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_timerEvent__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delim", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "timerEvent"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("data", "void *"); - fi->arguments << TypeInfo("delim", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "hasPeer"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removePeer"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("name", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendPeerInfo"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("info", "PeerInfo &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendPeerRemove"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("peer", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendSelfInfo"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendSelfRemove"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "syncPeers"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "findNearestAddresses"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "initEths"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("al", "PIStringList &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "initMulticasts"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("al", "PIStringList &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "destroyMulticasts"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendMulticast"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ba", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "quickestPeer"; fi->return_type = TypeInfo("", "PIPeer::PeerInfo *"); - fi->arguments << TypeInfo("to", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "sendToNeighbour"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("peer", "PeerInfo *"); - fi->arguments << TypeInfo("ba", "PIByteArray &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIPeer::PeerData"] = ci; - ci->name = "PIPeer::PeerData"; - ci->variables << TypeInfo("data", "PIByteArray"); - ci->variables << TypeInfo("msg_count", "int"); - ci->variables << TypeInfo("msg_rec", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "clear"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEmpty"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isFullReceived"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ba", "PIByteArray &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setData"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ba", "PIByteArray &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIPeer::PeerInfo"] = ci; - ci->name = "PIPeer::PeerInfo"; - ci->variables << TypeInfo("name", "PIString"); - ci->variables << TypeInfo("addresses", "PIStringList"); - ci->variables << TypeInfo("dist", "int"); - ci->variables << TypeInfo("ping", "int"); - ci->variables << TypeInfo("nearest_address", "PIString"); - ci->variables << TypeInfo("netmasks", "PIStringList"); - ci->variables << TypeInfo("neighbours", "PIStringList"); - ci->variables << TypeInfo("sync", "int"); - ci->variables << TypeInfo("_naddress", "PIString"); - ci->variables << TypeInfo("_neth", "PIEthernet*"); - ci->variables << TypeInfo("_nuses", "PIVector"); - ci->variables << TypeInfo("_first", "PeerInfo*"); - ci->variables << TypeInfo("_data", "PeerData"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isNeighbour"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addNeighbour"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "addNeighbours"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("l", "PIStringList &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "removeNeighbour"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("n", "PIString &", Const); - - ci = new ClassInfo(); - (*classesInfo)["PIPeer::PeerPacket"] = ci; - ci->name = "PIPeer::PeerPacket"; - ci->variables << TypeInfo("header", "int"); - - ci = new ClassInfo(); - (*classesInfo)["PIBinaryLog"] = ci; - ci->name = "PIBinaryLog"; - ci->parents << "PIIODevice"; - ci->variables << TypeInfo("filterID", "PIVector"); - ci->variables << TypeInfo("file", "PIFile"); - ci->variables << TypeInfo("lastrecord", "PIBinaryLog::BinLogRecord"); - ci->variables << TypeInfo("startlogtime", "PISystemTime"); - ci->variables << TypeInfo("play_time", "double"); - ci->variables << TypeInfo("is_started", "bool"); - ci->variables << TypeInfo("is_thread_ok", "bool"); - ci->variables << TypeInfo("binlog_sig", "uchar[6]"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "copy"; fi->return_type = TypeInfo("", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "playMode"; fi->return_type = TypeInfo("", "PIBinaryLog::PlayMode"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "logDir"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "filePrefix"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "defaultID"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "playSpeed"; fi->return_type = TypeInfo("", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "rapidStart"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setPlayMode"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("mode", "PlayMode"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setLogDir"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setFilePrefix"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("prefix", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDefaultID"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("id", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setRapidStart"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("enabled", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setPlaySpeed"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("speed", "float"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinLog"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("id", "int"); - fi->arguments << TypeInfo("data", "PIByteArray"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeBinLog"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("id", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readBinLog"; fi->return_type = TypeInfo("", "PIByteArray"); - fi->arguments << TypeInfo("id", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readBinLog"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("id", "int"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEnd"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isEmpty"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "lastReadedID"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "restart"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_createNewFile__"; fi->return_type = TypeInfo("", "PIString", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "createNewFile"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_fileEnd__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fileEnd"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "__stat_eh_fileError__"; fi->return_type = TypeInfo("", "void", Static); - fi->arguments << TypeInfo("o", "void *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fileError"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullPathPrefix"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureFromFullPath"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("full_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "openDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "closeDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "threadedRead"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("readed", "uchar *"); - fi->arguments << TypeInfo("size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "writeFileHeader"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "checkFileHeader"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "readRecord"; fi->return_type = TypeInfo("", "PIBinaryLog::BinLogRecord"); - - ci = new ClassInfo(); - (*classesInfo)["PIBinaryLog::BinLogRecord"] = ci; - ci->name = "PIBinaryLog::BinLogRecord"; - ci->variables << TypeInfo("id", "int"); - ci->variables << TypeInfo("size", "int"); - ci->variables << TypeInfo("timestamp", "PISystemTime"); - ci->variables << TypeInfo("data", "PIByteArray"); - - ci = new ClassInfo(); - (*classesInfo)["PIUSB"] = ci; - ci->name = "PIUSB"; - ci->parents << "PIIODevice"; - ci->variables << TypeInfo("eps", "PIVector"); - ci->variables << TypeInfo("vid_", "ushort"); - ci->variables << TypeInfo("pid_", "ushort"); - ci->variables << TypeInfo("intefrace_", "int"); - ci->variables << TypeInfo("timeout_r", "int"); - ci->variables << TypeInfo("timeout_w", "int"); - ci->variables << TypeInfo("interface_claimed", "int"); - ci->variables << TypeInfo("ep_read", "PIUSB::Endpoint"); - ci->variables << TypeInfo("ep_write", "PIUSB::Endpoint"); - ci->variables << TypeInfo("desc_", "PIUSB::Descriptor"); - ci->variables << TypeInfo("conf_", "PIUSB::Configuration"); - ci->variables << TypeInfo("iface_", "PIUSB::Interface"); - ci->variables << TypeInfo("hdev", "usb_dev_handle*"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "className"; fi->return_type = TypeInfo("", "const char *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "copy"; fi->return_type = TypeInfo("", "PIIODevice *"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "currentDescriptor"; fi->return_type = TypeInfo("", "const PIUSB::Descriptor &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "currentConfiguration"; fi->return_type = TypeInfo("", "const PIUSB::Configuration &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "currentInterface"; fi->return_type = TypeInfo("", "const PIUSB::Interface &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "vendorID"; fi->return_type = TypeInfo("", "ushort"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "productID"; fi->return_type = TypeInfo("", "ushort"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "deviceNumber"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "timeoutRead"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "timeoutWrite"; fi->return_type = TypeInfo("", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "endpointRead"; fi->return_type = TypeInfo("", "const PIUSB::Endpoint &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "endpointWrite"; fi->return_type = TypeInfo("", "const PIUSB::Endpoint &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "endpoints"; fi->return_type = TypeInfo("", "const PIVector &"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "endpointsRead"; fi->return_type = TypeInfo("", "PIVector"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "endpointsWrite"; fi->return_type = TypeInfo("", "PIVector"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "getEndpointByAddress"; fi->return_type = TypeInfo("", "PIUSB::Endpoint"); - fi->arguments << TypeInfo("address", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setVendorID"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("vid", "ushort"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setProductID"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("pid", "ushort"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setConfiguration"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("value", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setInterface"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("value", "uchar"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setEndpointRead"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ep", "PIUSB::Endpoint &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setEndpointWrite"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("ep", "PIUSB::Endpoint &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setDeviceNumber"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("dn", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setTimeoutRead"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("t", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "setTimeoutWrite"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("t", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "read"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("read_to", "void *"); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "write"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "controlWrite"; fi->return_type = TypeInfo("", "int"); - fi->arguments << TypeInfo("data", "void *", Const); - fi->arguments << TypeInfo("max_size", "int"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "flush"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "fullPathPrefix"; fi->return_type = TypeInfo("", "PIString"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureFromFullPath"; fi->return_type = TypeInfo("", "void"); - fi->arguments << TypeInfo("full_path", "PIString &", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "configureDevice"; fi->return_type = TypeInfo("", "bool"); - fi->arguments << TypeInfo("e_main", "void *", Const); - fi->arguments << TypeInfo("e_parent", "void *", Const); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "openDevice"; fi->return_type = TypeInfo("", "bool"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "closeDevice"; fi->return_type = TypeInfo("", "bool"); - - ci = new ClassInfo(); - (*classesInfo)["PIUSB::Endpoint"] = ci; - ci->name = "PIUSB::Endpoint"; - ci->variables << TypeInfo("address", "uchar"); - ci->variables << TypeInfo("attributes", "uchar"); - ci->variables << TypeInfo("max_packet_size", "ushort"); - ci->variables << TypeInfo("direction", "PIUSB::Endpoint::Direction"); - ci->variables << TypeInfo("transfer_type", "PIUSB::Endpoint::TransferType"); - ci->variables << TypeInfo("synchronisation_type", "PIUSB::Endpoint::SynchronisationType"); - ci->variables << TypeInfo("usage_type", "PIUSB::Endpoint::UsageType"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "parse"; fi->return_type = TypeInfo("", "void"); - ci->functions.push_back(FunctionInfo()); fi = &(ci->functions.back()); - fi->name = "isNull"; fi->return_type = TypeInfo("", "bool"); - - ci = new ClassInfo(); - (*classesInfo)["PIUSB::Interface"] = ci; - ci->name = "PIUSB::Interface"; - ci->variables << TypeInfo("index", "uchar"); - ci->variables << TypeInfo("value_to_select", "uchar"); - ci->variables << TypeInfo("class_code", "ushort"); - ci->variables << TypeInfo("subclass_code", "ushort"); - ci->variables << TypeInfo("protocol_code", "ushort"); - ci->variables << TypeInfo("endpoints", "PIVector"); - - ci = new ClassInfo(); - (*classesInfo)["PIUSB::Configuration"] = ci; - ci->name = "PIUSB::Configuration"; - ci->variables << TypeInfo("index", "uchar"); - ci->variables << TypeInfo("value_to_select", "uchar"); - ci->variables << TypeInfo("attributes", "uchar"); - ci->variables << TypeInfo("max_power", "ushort"); - ci->variables << TypeInfo("self_powered", "bool"); - ci->variables << TypeInfo("remote_wakeup", "bool"); - ci->variables << TypeInfo("interfaces", "PIVector"); - - ci = new ClassInfo(); - (*classesInfo)["PIUSB::Descriptor"] = ci; - ci->name = "PIUSB::Descriptor"; - ci->variables << TypeInfo("usb_spec_number", "ushort"); - ci->variables << TypeInfo("device_class", "uchar"); - ci->variables << TypeInfo("device_subclass", "uchar"); - ci->variables << TypeInfo("device_protocol", "uchar"); - ci->variables << TypeInfo("max_packet_size", "uchar"); - ci->variables << TypeInfo("id_vendor", "ushort"); - ci->variables << TypeInfo("id_product", "ushort"); - ci->variables << TypeInfo("id_device_release", "ushort"); - ci->variables << TypeInfo("index_manufacturer", "uchar"); - ci->variables << TypeInfo("index_product", "uchar"); - ci->variables << TypeInfo("index_serial", "uchar"); - ci->variables << TypeInfo("configurations", "PIVector"); - -// Enums - - ei = new EnumInfo(); - (*enumsInfo)["PICoutSpecialChar"] = ei; - ei->name = "PICoutSpecialChar"; - ei->members << PICodeInfo::EnumeratorInfo("Null", 0); - ei->members << PICodeInfo::EnumeratorInfo("NewLine", 1); - ei->members << PICodeInfo::EnumeratorInfo("Tab", 2); - ei->members << PICodeInfo::EnumeratorInfo("Esc", 3); - ei->members << PICodeInfo::EnumeratorInfo("Quote", 4); - - ei = new EnumInfo(); - (*enumsInfo)["PICoutAction"] = ei; - ei->name = "PICoutAction"; - ei->members << PICodeInfo::EnumeratorInfo("Flush", 0); - ei->members << PICodeInfo::EnumeratorInfo("Backspace", 1); - ei->members << PICodeInfo::EnumeratorInfo("ShowCursor", 2); - ei->members << PICodeInfo::EnumeratorInfo("HideCursor", 3); - ei->members << PICodeInfo::EnumeratorInfo("ClearScreen", 4); - ei->members << PICodeInfo::EnumeratorInfo("SaveContol", 5); - ei->members << PICodeInfo::EnumeratorInfo("RestoreControl", 6); - - ei = new EnumInfo(); - (*enumsInfo)["PICoutControl"] = ei; - ei->name = "PICoutControl"; - ei->members << PICodeInfo::EnumeratorInfo("AddNone", 0); - ei->members << PICodeInfo::EnumeratorInfo("AddSpaces", 1); - ei->members << PICodeInfo::EnumeratorInfo("AddNewLine", 2); - ei->members << PICodeInfo::EnumeratorInfo("AddQuotes", 4); - ei->members << PICodeInfo::EnumeratorInfo("AddAll", -1); - - ei = new EnumInfo(); - (*enumsInfo)["PICoutFormat"] = ei; - ei->name = "PICoutFormat"; - ei->members << PICodeInfo::EnumeratorInfo("Bin", 1); - ei->members << PICodeInfo::EnumeratorInfo("Oct", 2); - ei->members << PICodeInfo::EnumeratorInfo("Dec", 4); - ei->members << PICodeInfo::EnumeratorInfo("Hex", 8); - ei->members << PICodeInfo::EnumeratorInfo("Bold", 16); - ei->members << PICodeInfo::EnumeratorInfo("Faint", 32); - ei->members << PICodeInfo::EnumeratorInfo("Italic", 64); - ei->members << PICodeInfo::EnumeratorInfo("Underline", 128); - ei->members << PICodeInfo::EnumeratorInfo("Blink", 256); - ei->members << PICodeInfo::EnumeratorInfo("Black", 1024); - ei->members << PICodeInfo::EnumeratorInfo("Red", 2048); - ei->members << PICodeInfo::EnumeratorInfo("Green", 4096); - ei->members << PICodeInfo::EnumeratorInfo("Blue", 8192); - ei->members << PICodeInfo::EnumeratorInfo("Yellow", 16384); - ei->members << PICodeInfo::EnumeratorInfo("Magenta", 32768); - ei->members << PICodeInfo::EnumeratorInfo("Cyan", 65536); - ei->members << PICodeInfo::EnumeratorInfo("White", 131072); - ei->members << PICodeInfo::EnumeratorInfo("BackBlack", 262144); - ei->members << PICodeInfo::EnumeratorInfo("BackRed", 524288); - ei->members << PICodeInfo::EnumeratorInfo("BackGreen", 1048576); - ei->members << PICodeInfo::EnumeratorInfo("BackBlue", 2097152); - ei->members << PICodeInfo::EnumeratorInfo("BackYellow", 4194304); - ei->members << PICodeInfo::EnumeratorInfo("BackMagenta", 8388608); - ei->members << PICodeInfo::EnumeratorInfo("BackCyan", 16777216); - ei->members << PICodeInfo::EnumeratorInfo("BackWhite", 33554432); - ei->members << PICodeInfo::EnumeratorInfo("Default", 67108864); - - ei = new EnumInfo(); - (*enumsInfo)["Solver::Method"] = ei; - ei->name = "Solver::Method"; - ei->members << PICodeInfo::EnumeratorInfo("Global", -1); - ei->members << PICodeInfo::EnumeratorInfo("Eyler_1", 1); - ei->members << PICodeInfo::EnumeratorInfo("Eyler_2", 2); - ei->members << PICodeInfo::EnumeratorInfo("EylerKoshi", 3); - ei->members << PICodeInfo::EnumeratorInfo("RungeKutta_4", 14); - ei->members << PICodeInfo::EnumeratorInfo("AdamsBashfortMoulton_2", 22); - ei->members << PICodeInfo::EnumeratorInfo("AdamsBashfortMoulton_3", 23); - ei->members << PICodeInfo::EnumeratorInfo("AdamsBashfortMoulton_4", 24); - ei->members << PICodeInfo::EnumeratorInfo("PolynomialApproximation_2", 32); - ei->members << PICodeInfo::EnumeratorInfo("PolynomialApproximation_3", 33); - ei->members << PICodeInfo::EnumeratorInfo("PolynomialApproximation_4", 34); - ei->members << PICodeInfo::EnumeratorInfo("PolynomialApproximation_5", 35); - - ei = new EnumInfo(); - (*enumsInfo)["PIVariant::Type"] = ei; - ei->name = "PIVariant::Type"; - ei->members << PICodeInfo::EnumeratorInfo("Invalid", 0); - ei->members << PICodeInfo::EnumeratorInfo("Bool", 1); - ei->members << PICodeInfo::EnumeratorInfo("Char", 2); - ei->members << PICodeInfo::EnumeratorInfo("UChar", 3); - ei->members << PICodeInfo::EnumeratorInfo("Short", 4); - ei->members << PICodeInfo::EnumeratorInfo("UShort", 5); - ei->members << PICodeInfo::EnumeratorInfo("Int", 6); - ei->members << PICodeInfo::EnumeratorInfo("UInt", 7); - ei->members << PICodeInfo::EnumeratorInfo("Long", 8); - ei->members << PICodeInfo::EnumeratorInfo("ULong", 9); - ei->members << PICodeInfo::EnumeratorInfo("LLong", 10); - ei->members << PICodeInfo::EnumeratorInfo("ULLong", 11); - ei->members << PICodeInfo::EnumeratorInfo("Float", 12); - ei->members << PICodeInfo::EnumeratorInfo("Double", 13); - ei->members << PICodeInfo::EnumeratorInfo("LDouble", 14); - ei->members << PICodeInfo::EnumeratorInfo("Complexd", 15); - ei->members << PICodeInfo::EnumeratorInfo("Complexld", 16); - ei->members << PICodeInfo::EnumeratorInfo("BitArray", 17); - ei->members << PICodeInfo::EnumeratorInfo("ByteArray", 18); - ei->members << PICodeInfo::EnumeratorInfo("String", 19); - ei->members << PICodeInfo::EnumeratorInfo("StringList", 20); - ei->members << PICodeInfo::EnumeratorInfo("Time", 21); - ei->members << PICodeInfo::EnumeratorInfo("Date", 22); - ei->members << PICodeInfo::EnumeratorInfo("DateTime", 23); - ei->members << PICodeInfo::EnumeratorInfo("SystemTime", 24); - ei->members << PICodeInfo::EnumeratorInfo("Custom", 255); - - ei = new EnumInfo(); - (*enumsInfo)["PIThread::Priority"] = ei; - ei->name = "PIThread::Priority"; - ei->members << PICodeInfo::EnumeratorInfo("piHighest", -2); - ei->members << PICodeInfo::EnumeratorInfo("piHigh", -1); - ei->members << PICodeInfo::EnumeratorInfo("piNormal", 0); - ei->members << PICodeInfo::EnumeratorInfo("piLow", 1); - ei->members << PICodeInfo::EnumeratorInfo("piLowerst", 2); - - ei = new EnumInfo(); - (*enumsInfo)["PIKbdListener::SpecialSymbol"] = ei; - ei->name = "PIKbdListener::SpecialSymbol"; - ei->members << PICodeInfo::EnumeratorInfo("UpArrow", -1); - ei->members << PICodeInfo::EnumeratorInfo("DownArrow", -2); - ei->members << PICodeInfo::EnumeratorInfo("RightArrow", -3); - ei->members << PICodeInfo::EnumeratorInfo("LeftArrow", -4); - ei->members << PICodeInfo::EnumeratorInfo("CtrlUpArrow", -5); - ei->members << PICodeInfo::EnumeratorInfo("CtrlDownArrow", -6); - ei->members << PICodeInfo::EnumeratorInfo("CtrlRightArrow", -7); - ei->members << PICodeInfo::EnumeratorInfo("CtrlLeftArrow", -8); - - ei = new EnumInfo(); - (*enumsInfo)["PIIODevice::DeviceMode"] = ei; - ei->name = "PIIODevice::DeviceMode"; - ei->members << PICodeInfo::EnumeratorInfo("ReadOnly", 1); - ei->members << PICodeInfo::EnumeratorInfo("WriteOnly", 2); - ei->members << PICodeInfo::EnumeratorInfo("ReadWrite", 3); - - ei = new EnumInfo(); - (*enumsInfo)["PISerial::Parameters"] = ei; - ei->name = "PISerial::Parameters"; - ei->members << PICodeInfo::EnumeratorInfo("ParityControl", 1); - ei->members << PICodeInfo::EnumeratorInfo("ParityOdd", 2); - ei->members << PICodeInfo::EnumeratorInfo("TwoStopBits", 4); - - ei = new EnumInfo(); - (*enumsInfo)["PISerial::Speed"] = ei; - ei->name = "PISerial::Speed"; - ei->members << PICodeInfo::EnumeratorInfo("S50", 50); - ei->members << PICodeInfo::EnumeratorInfo("S75", 75); - ei->members << PICodeInfo::EnumeratorInfo("S110", 110); - ei->members << PICodeInfo::EnumeratorInfo("S300", 300); - ei->members << PICodeInfo::EnumeratorInfo("S600", 600); - ei->members << PICodeInfo::EnumeratorInfo("S1200", 1200); - ei->members << PICodeInfo::EnumeratorInfo("S2400", 2400); - ei->members << PICodeInfo::EnumeratorInfo("S4800", 4800); - ei->members << PICodeInfo::EnumeratorInfo("S9600", 9600); - ei->members << PICodeInfo::EnumeratorInfo("S19200", 19200); - ei->members << PICodeInfo::EnumeratorInfo("S38400", 38400); - ei->members << PICodeInfo::EnumeratorInfo("S57600", 57600); - ei->members << PICodeInfo::EnumeratorInfo("S115200", 115200); - ei->members << PICodeInfo::EnumeratorInfo("S1500000", 1500000); - ei->members << PICodeInfo::EnumeratorInfo("S2000000", 2000000); - ei->members << PICodeInfo::EnumeratorInfo("S2500000", 2500000); - ei->members << PICodeInfo::EnumeratorInfo("S3000000", 3000000); - ei->members << PICodeInfo::EnumeratorInfo("S3500000", 3500000); - ei->members << PICodeInfo::EnumeratorInfo("S4000000", 4000000); - - ei = new EnumInfo(); - (*enumsInfo)["PIEthernet::Type"] = ei; - ei->name = "PIEthernet::Type"; - ei->members << PICodeInfo::EnumeratorInfo("UDP", 0); - ei->members << PICodeInfo::EnumeratorInfo("TCP_Client", 1); - ei->members << PICodeInfo::EnumeratorInfo("TCP_Server", 2); - ei->members << PICodeInfo::EnumeratorInfo("TCP_SingleTCP", 3); - - ei = new EnumInfo(); - (*enumsInfo)["PIEthernet::Parameters"] = ei; - ei->name = "PIEthernet::Parameters"; - ei->members << PICodeInfo::EnumeratorInfo("ReuseAddress", 1); - ei->members << PICodeInfo::EnumeratorInfo("Broadcast", 2); - - ei = new EnumInfo(); - (*enumsInfo)["PIEthernet::InterfaceFlag"] = ei; - ei->name = "PIEthernet::InterfaceFlag"; - ei->members << PICodeInfo::EnumeratorInfo("ifActive", 1); - ei->members << PICodeInfo::EnumeratorInfo("ifRunning", 2); - ei->members << PICodeInfo::EnumeratorInfo("ifBroadcast", 4); - ei->members << PICodeInfo::EnumeratorInfo("ifMulticast", 8); - ei->members << PICodeInfo::EnumeratorInfo("ifLoopback", 16); - ei->members << PICodeInfo::EnumeratorInfo("ifPTP", 32); - - ei = new EnumInfo(); - (*enumsInfo)["PIProtocol::Type"] = ei; - ei->name = "PIProtocol::Type"; - ei->members << PICodeInfo::EnumeratorInfo("None", 0); - ei->members << PICodeInfo::EnumeratorInfo("Serial", 1); - ei->members << PICodeInfo::EnumeratorInfo("Ethernet", 2); - - ei = new EnumInfo(); - (*enumsInfo)["PIProtocol::Quality"] = ei; - ei->name = "PIProtocol::Quality"; - ei->members << PICodeInfo::EnumeratorInfo("Unknown", 1); - ei->members << PICodeInfo::EnumeratorInfo("Failure", 2); - ei->members << PICodeInfo::EnumeratorInfo("Bad", 3); - ei->members << PICodeInfo::EnumeratorInfo("Average", 4); - ei->members << PICodeInfo::EnumeratorInfo("Good", 5); - - ei = new EnumInfo(); - (*enumsInfo)["PIDiagnostics::Quality"] = ei; - ei->name = "PIDiagnostics::Quality"; - ei->members << PICodeInfo::EnumeratorInfo("Unknown", 1); - ei->members << PICodeInfo::EnumeratorInfo("Failure", 2); - ei->members << PICodeInfo::EnumeratorInfo("Bad", 3); - ei->members << PICodeInfo::EnumeratorInfo("Average", 4); - ei->members << PICodeInfo::EnumeratorInfo("Good", 5); - - ei = new EnumInfo(); - (*enumsInfo)["PIConsole::Format"] = ei; - ei->name = "PIConsole::Format"; - ei->members << PICodeInfo::EnumeratorInfo("Normal", 1); - ei->members << PICodeInfo::EnumeratorInfo("Bold", 2); - ei->members << PICodeInfo::EnumeratorInfo("Faint", 4); - ei->members << PICodeInfo::EnumeratorInfo("Italic", 8); - ei->members << PICodeInfo::EnumeratorInfo("Underline", 16); - ei->members << PICodeInfo::EnumeratorInfo("Blink", 32); - ei->members << PICodeInfo::EnumeratorInfo("Inverse", 64); - ei->members << PICodeInfo::EnumeratorInfo("Black", 256); - ei->members << PICodeInfo::EnumeratorInfo("Red", 512); - ei->members << PICodeInfo::EnumeratorInfo("Green", 1024); - ei->members << PICodeInfo::EnumeratorInfo("Yellow", 2048); - ei->members << PICodeInfo::EnumeratorInfo("Blue", 4096); - ei->members << PICodeInfo::EnumeratorInfo("Magenta", 8192); - ei->members << PICodeInfo::EnumeratorInfo("Cyan", 16384); - ei->members << PICodeInfo::EnumeratorInfo("White", 32768); - ei->members << PICodeInfo::EnumeratorInfo("BackBlack", 65536); - ei->members << PICodeInfo::EnumeratorInfo("BackRed", 131072); - ei->members << PICodeInfo::EnumeratorInfo("BackGreen", 262144); - ei->members << PICodeInfo::EnumeratorInfo("BackYellow", 524288); - ei->members << PICodeInfo::EnumeratorInfo("BackBlue", 1048576); - ei->members << PICodeInfo::EnumeratorInfo("BackMagenta", 2097152); - ei->members << PICodeInfo::EnumeratorInfo("BackCyan", 4194304); - ei->members << PICodeInfo::EnumeratorInfo("BackWhite", 8388608); - ei->members << PICodeInfo::EnumeratorInfo("Dec", 16777216); - ei->members << PICodeInfo::EnumeratorInfo("Hex", 33554432); - ei->members << PICodeInfo::EnumeratorInfo("Oct", 67108864); - ei->members << PICodeInfo::EnumeratorInfo("Bin", 134217728); - ei->members << PICodeInfo::EnumeratorInfo("Scientific", 268435456); - ei->members << PICodeInfo::EnumeratorInfo("SystemTimeSplit", 536870912); - ei->members << PICodeInfo::EnumeratorInfo("SystemTimeSeconds", 1073741824); - - ei = new EnumInfo(); - (*enumsInfo)["PIConsole::Alignment"] = ei; - ei->name = "PIConsole::Alignment"; - ei->members << PICodeInfo::EnumeratorInfo("Nothing", 0); - ei->members << PICodeInfo::EnumeratorInfo("Left", 1); - ei->members << PICodeInfo::EnumeratorInfo("Right", 2); - - ei = new EnumInfo(); - (*enumsInfo)["PIConsole::ConnectedState"] = ei; - ei->name = "PIConsole::ConnectedState"; - ei->members << PICodeInfo::EnumeratorInfo("Disconnected", 0); - ei->members << PICodeInfo::EnumeratorInfo("FetchingData", 1); - ei->members << PICodeInfo::EnumeratorInfo("Committing", 2); - ei->members << PICodeInfo::EnumeratorInfo("Connected", 3); - - ei = new EnumInfo(); - (*enumsInfo)["eType"] = ei; - ei->name = "eType"; - ei->members << PICodeInfo::EnumeratorInfo("etNumber", 0); - ei->members << PICodeInfo::EnumeratorInfo("etOperator", 1); - ei->members << PICodeInfo::EnumeratorInfo("etVariable", 2); - ei->members << PICodeInfo::EnumeratorInfo("etFunction", 3); - - ei = new EnumInfo(); - (*enumsInfo)["Operation"] = ei; - ei->name = "Operation"; - ei->members << PICodeInfo::EnumeratorInfo("oNone", 0); - ei->members << PICodeInfo::EnumeratorInfo("oAdd", 1); - ei->members << PICodeInfo::EnumeratorInfo("oSubtract", 2); - ei->members << PICodeInfo::EnumeratorInfo("oMultiply", 3); - ei->members << PICodeInfo::EnumeratorInfo("oDivide", 4); - ei->members << PICodeInfo::EnumeratorInfo("oResidue", 5); - ei->members << PICodeInfo::EnumeratorInfo("oPower", 6); - ei->members << PICodeInfo::EnumeratorInfo("oEqual", 7); - ei->members << PICodeInfo::EnumeratorInfo("oNotEqual", 8); - ei->members << PICodeInfo::EnumeratorInfo("oGreater", 9); - ei->members << PICodeInfo::EnumeratorInfo("oSmaller", 10); - ei->members << PICodeInfo::EnumeratorInfo("oGreaterEqual", 11); - ei->members << PICodeInfo::EnumeratorInfo("oSmallerEqual", 12); - ei->members << PICodeInfo::EnumeratorInfo("oAnd", 13); - ei->members << PICodeInfo::EnumeratorInfo("oOr", 14); - ei->members << PICodeInfo::EnumeratorInfo("oFunction", 15); - - ei = new EnumInfo(); - (*enumsInfo)["BaseFunctions"] = ei; - ei->name = "BaseFunctions"; - ei->members << PICodeInfo::EnumeratorInfo("bfUnknown", 0); - ei->members << PICodeInfo::EnumeratorInfo("bfSin", 1); - ei->members << PICodeInfo::EnumeratorInfo("bfCos", 2); - ei->members << PICodeInfo::EnumeratorInfo("bfTg", 3); - ei->members << PICodeInfo::EnumeratorInfo("bfCtg", 4); - ei->members << PICodeInfo::EnumeratorInfo("bfArcsin", 5); - ei->members << PICodeInfo::EnumeratorInfo("bfArccos", 6); - ei->members << PICodeInfo::EnumeratorInfo("bfArctg", 7); - ei->members << PICodeInfo::EnumeratorInfo("bfArcctg", 8); - ei->members << PICodeInfo::EnumeratorInfo("bfExp", 9); - ei->members << PICodeInfo::EnumeratorInfo("bfRandom", 10); - ei->members << PICodeInfo::EnumeratorInfo("bfSh", 11); - ei->members << PICodeInfo::EnumeratorInfo("bfCh", 12); - ei->members << PICodeInfo::EnumeratorInfo("bfTh", 13); - ei->members << PICodeInfo::EnumeratorInfo("bfCth", 14); - ei->members << PICodeInfo::EnumeratorInfo("bfSqrt", 15); - ei->members << PICodeInfo::EnumeratorInfo("bfSqr", 16); - ei->members << PICodeInfo::EnumeratorInfo("bfPow", 17); - ei->members << PICodeInfo::EnumeratorInfo("bfAbs", 18); - ei->members << PICodeInfo::EnumeratorInfo("bfLn", 19); - ei->members << PICodeInfo::EnumeratorInfo("bfLg", 20); - ei->members << PICodeInfo::EnumeratorInfo("bfLog", 21); - ei->members << PICodeInfo::EnumeratorInfo("bfSign", 22); - ei->members << PICodeInfo::EnumeratorInfo("bfIm", 23); - ei->members << PICodeInfo::EnumeratorInfo("bfRe", 24); - ei->members << PICodeInfo::EnumeratorInfo("bfArg", 25); - ei->members << PICodeInfo::EnumeratorInfo("bfLen", 26); - ei->members << PICodeInfo::EnumeratorInfo("bfConj", 27); - ei->members << PICodeInfo::EnumeratorInfo("bfRad", 28); - ei->members << PICodeInfo::EnumeratorInfo("bfDeg", 29); - ei->members << PICodeInfo::EnumeratorInfo("bfJ0", 30); - ei->members << PICodeInfo::EnumeratorInfo("bfJ1", 31); - ei->members << PICodeInfo::EnumeratorInfo("bfJN", 32); - ei->members << PICodeInfo::EnumeratorInfo("bfY0", 33); - ei->members << PICodeInfo::EnumeratorInfo("bfY1", 34); - ei->members << PICodeInfo::EnumeratorInfo("bfYN", 35); - ei->members << PICodeInfo::EnumeratorInfo("bfMin", 36); - ei->members << PICodeInfo::EnumeratorInfo("bfMax", 37); - ei->members << PICodeInfo::EnumeratorInfo("bfClamp", 38); - ei->members << PICodeInfo::EnumeratorInfo("bfStep", 39); - ei->members << PICodeInfo::EnumeratorInfo("bfMix", 40); - ei->members << PICodeInfo::EnumeratorInfo("bfDefined", 41); - ei->members << PICodeInfo::EnumeratorInfo("bfCustom", 65535); - - ei = new EnumInfo(); - (*enumsInfo)["PISignals::Signal"] = ei; - ei->name = "PISignals::Signal"; - ei->members << PICodeInfo::EnumeratorInfo("Interrupt", 1); - ei->members << PICodeInfo::EnumeratorInfo("Illegal", 2); - ei->members << PICodeInfo::EnumeratorInfo("Abort", 4); - ei->members << PICodeInfo::EnumeratorInfo("FPE", 8); - ei->members << PICodeInfo::EnumeratorInfo("SegFault", 16); - ei->members << PICodeInfo::EnumeratorInfo("Termination", 32); - ei->members << PICodeInfo::EnumeratorInfo("Hangup", 64); - ei->members << PICodeInfo::EnumeratorInfo("Quit", 128); - ei->members << PICodeInfo::EnumeratorInfo("Kill", 256); - ei->members << PICodeInfo::EnumeratorInfo("BrokenPipe", 512); - ei->members << PICodeInfo::EnumeratorInfo("Timer", 1024); - ei->members << PICodeInfo::EnumeratorInfo("UserDefined1", 2048); - ei->members << PICodeInfo::EnumeratorInfo("UserDefined2", 4096); - ei->members << PICodeInfo::EnumeratorInfo("ChildStopped", 8192); - ei->members << PICodeInfo::EnumeratorInfo("Continue", 16384); - ei->members << PICodeInfo::EnumeratorInfo("StopProcess", 32768); - ei->members << PICodeInfo::EnumeratorInfo("StopTTY", 65536); - ei->members << PICodeInfo::EnumeratorInfo("StopTTYInput", 131072); - ei->members << PICodeInfo::EnumeratorInfo("StopTTYOutput", 262144); - ei->members << PICodeInfo::EnumeratorInfo("All", 1048575); - - ei = new EnumInfo(); - (*enumsInfo)["PIBinaryLog::PlayMode"] = ei; - ei->name = "PIBinaryLog::PlayMode"; - ei->members << PICodeInfo::EnumeratorInfo("PlayRealTime", 0); - ei->members << PICodeInfo::EnumeratorInfo("PlayVariableSpeed", 1); - - ei = new EnumInfo(); - (*enumsInfo)["PIUSB::Endpoint::Direction"] = ei; - ei->name = "PIUSB::Endpoint::Direction"; - ei->members << PICodeInfo::EnumeratorInfo("Write", 0); - ei->members << PICodeInfo::EnumeratorInfo("Read", 1); - - ei = new EnumInfo(); - (*enumsInfo)["PIUSB::Endpoint::TransferType"] = ei; - ei->name = "PIUSB::Endpoint::TransferType"; - ei->members << PICodeInfo::EnumeratorInfo("Control", 0); - ei->members << PICodeInfo::EnumeratorInfo("Isochronous", 1); - ei->members << PICodeInfo::EnumeratorInfo("Bulk", 2); - ei->members << PICodeInfo::EnumeratorInfo("Interrupt", 3); - - ei = new EnumInfo(); - (*enumsInfo)["PIUSB::Endpoint::SynchronisationType"] = ei; - ei->name = "PIUSB::Endpoint::SynchronisationType"; - ei->members << PICodeInfo::EnumeratorInfo("NoSynchonisation", 0); - ei->members << PICodeInfo::EnumeratorInfo("Asynchronous", 2); - ei->members << PICodeInfo::EnumeratorInfo("Adaptive", 1); - ei->members << PICodeInfo::EnumeratorInfo("Synchronous", 3); - - ei = new EnumInfo(); - (*enumsInfo)["PIUSB::Endpoint::UsageType"] = ei; - ei->name = "PIUSB::Endpoint::UsageType"; - ei->members << PICodeInfo::EnumeratorInfo("DataEndpoint", 0); - ei->members << PICodeInfo::EnumeratorInfo("FeedbackEndpoint", 2); - ei->members << PICodeInfo::EnumeratorInfo("ExplicitFeedbackDataEndpoint", 1); -} - - -bool __ClassInfo_TEST_H_Initializer__::_inited_ = false; diff --git a/utils/code_model_generator/test.h b/utils/code_model_generator/test.h deleted file mode 100755 index 6f7e77a3..00000000 --- a/utils/code_model_generator/test.h +++ /dev/null @@ -1,100 +0,0 @@ -// Generated by "PIP Code model generator" 29.04.2014 18:03:05 - -#ifndef TEST_H -#define TEST_H - -#include "pivariant.h" -#include "picodeinfo.h" - -class PIMutex; -class PIBitArray; -class PIHuffman; -class PIByteArray; -class PIChar; -class PIString; -class PIStringList; -class PISystemTime; -struct PITime; -struct PIDate; -struct PIDateTime; -class Solver; -class PIFFT; -class PIVariant; -class PIObject; -class PIThread; -class PITimer; -class PIKbdListener; -class PIIODevice; -class PISerial; -class PIFile; -class PIProcess; -class PIEthernet; -class PIPacketExtractor; -class PIConfig; -class PIMultiProtocolBase; -class PIProtocol; -class PIDiagnostics; -class PISystemMonitor; -class PIConsole; -class PICLI; -class PIEvaluatorContent; -class PIEvaluator; -class PIMultiProtocol; -class PIRepeater; -class PICodec; -class PIPeer; -class PIBinaryLog; -class PIUSB; - - -PIVariant execFunction(PIMutex * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIBitArray * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIHuffman * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIByteArray * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIChar * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIString * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIStringList * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PISystemTime * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PITime * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIDate * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIDateTime * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(Solver * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIFFT * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIVariant * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIObject * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIThread * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PITimer * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIKbdListener * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIIODevice * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PISerial * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIFile * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIProcess * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIEthernet * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIPacketExtractor * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIConfig * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIMultiProtocolBase * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIProtocol * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIDiagnostics * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PISystemMonitor * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIConsole * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PICLI * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIEvaluatorContent * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIEvaluator * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIMultiProtocol * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIRepeater * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PICodec * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIPeer * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIBinaryLog * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); -PIVariant execFunction(PIUSB * object, const char * function, const PIVariant & arg0 = PIVariant(), const PIVariant & arg1 = PIVariant(), const PIVariant & arg2 = PIVariant(), const PIVariant & arg3 = PIVariant()); - - -class __ClassInfo_TEST_H_Initializer__ { -public: - __ClassInfo_TEST_H_Initializer__(); - static bool _inited_; -}; - -static __ClassInfo_TEST_H_Initializer__ __classinfo_test_h_initializer__; - - -#endif // TEST_H diff --git a/utils/crypt_tool/CMakeLists.txt b/utils/crypt_tool/CMakeLists.txt index ca283a96..302631d0 100644 --- a/utils/crypt_tool/CMakeLists.txt +++ b/utils/crypt_tool/CMakeLists.txt @@ -1,7 +1,6 @@ message(STATUS "Building picrypt") add_executable(picrypt "main.cpp") target_link_libraries(picrypt pip pip_crypt) -# apple_rpath_patch(picrypt) if (DEFINED LIB) install(TARGETS picrypt DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) else() diff --git a/utils/crypt_tool/main.cpp b/utils/crypt_tool/main.cpp index c05f108b..6d7e7c80 100644 --- a/utils/crypt_tool/main.cpp +++ b/utils/crypt_tool/main.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Crypth / decrypth files utility + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pip.h" #include "picrypt.h" #include diff --git a/utils/deploy_tool/main.cpp b/utils/deploy_tool/main.cpp index afadea02..88019be2 100644 --- a/utils/deploy_tool/main.cpp +++ b/utils/deploy_tool/main.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Deploy tool + Ivan Pelipenko peri4ko@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include #include #include @@ -66,11 +85,9 @@ void usage() { piCout << "--dpkg-workdir " << Green << "- dpkg \"admindir\" path, default \"\""; piCout << "--name-tool " << Green << "- \"install_name_tool\" path, default \"install_name_tool\""; piCout << "-d " << Green << "- maximum dependepcies depth, default 8"; - //piCout << "-Q, --Qt-force " << Green << "- force add Qt root dir, default takes from \"qmake -v\""; piCout << ""; piCout << Bold << "Qt control"; piCout << "-q " << Green << "- path where Qt root dir, default takes from \"qmake -v\""; - //piCout << "-C, --Conf " << Green << "- make \"qt.conf\""; piCout << "-S " << Green << "- set Qt styles (e.g. \"oxygen,breeze\"), default \"*\""; piCout << "-P " << Green << "- set Qt platforms (e.g. \"win,mini\"), default by host system"; piCout << "--qt-plugins " << Green << "- set Qt plugins description"; @@ -341,9 +358,6 @@ void procQt() { #endif piForeachC (PIString & plugin, pdirs) { PIStringList filters = qt_filters[plugin]; - /*if (plugin == "platforms") filters = platforms; - if (plugin == "styles") filters = styles; - if (plugin == "sqldrivers") filters = sqldrivers;*/ piForeachC (PIString & f, filters) { if (f.isEmpty()) continue; copyWildcard(qdir + plugin + "/" + f, out_plugins_dir + plugin); diff --git a/utils/remote_console/main.cpp b/utils/remote_console/main.cpp index aecd6cbb..d0c89fcc 100755 --- a/utils/remote_console/main.cpp +++ b/utils/remote_console/main.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - Remote console viewer + PIP - Platform Independent Primitives + Remote console viewer Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "pip.h" @@ -50,7 +50,6 @@ int main(int argc, char * argv[]) { } } if (!selected) return 0; - //console.clearScreen(); piCout << "Connecting to" << console.selectedServer() << "..."; while (!PIKbdListener::exiting) { msleep(20); diff --git a/utils/resources_compiler/CMakeLists.txt b/utils/resources_compiler/CMakeLists.txt index 5be7005d..af7642ab 100644 --- a/utils/resources_compiler/CMakeLists.txt +++ b/utils/resources_compiler/CMakeLists.txt @@ -10,7 +10,6 @@ file(GLOB SRC "*.cpp" "*.h") add_executable(pip_rc ${SRC} ${_RC}) set (PIRC_LIBS pip) target_link_libraries(pip_rc ${PIRC_LIBS}) -# apple_rpath_patch(pip_rc) if (DEFINED LIB) install(TARGETS pip_rc DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) else() diff --git a/utils/resources_compiler/main.cpp b/utils/resources_compiler/main.cpp index 531a0212..22189afb 100644 --- a/utils/resources_compiler/main.cpp +++ b/utils/resources_compiler/main.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + Resources compiller + Ivan Pelipenko peri4ko@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "parser.h" #include "generator.h" #include "picli.h" @@ -36,8 +55,6 @@ int main (int argc, char * argv[]) { return 0; } - //piCout << "args:" << cli.rawArguments(); - PIVector files = parse(cli.argumentValue("input")); if (files.isEmpty()) { piCout << "Error: resources description file is empty"; @@ -65,7 +82,6 @@ int main (int argc, char * argv[]) { piForeachC (PIString & _a, cli.rawArguments()) outf << "// \"" << _a << "\"\n"; outf << "\n"; - //outf << "#include \"pivariant.h\"\n#include \"picodeinfo.h\""; if (!generate(init_name, outf, files)) { piCout << "Error: generate fail"; return 1; diff --git a/utils/resources_compiler/parser.cpp b/utils/resources_compiler/parser.cpp index 614ccc8f..b82c5d3f 100644 --- a/utils/resources_compiler/parser.cpp +++ b/utils/resources_compiler/parser.cpp @@ -8,7 +8,6 @@ PIVector parse(const PIString & path) { if (!f.open(path, PIIODevice::ReadOnly)) return ret; PIString ext = f.fileInfo().extension().toLowerCase(); - //PIString fc = PIString::fromUTF8(f.readAll()); PIString dir = PIDir(f.fileInfo().dir()).absolutePath() + "/"; //piCout << dir; if (ext == "conf") return parseConf(f, dir); @@ -19,7 +18,6 @@ PIVector parse(const PIString & path) { ParserEntry makeEntry(PIString filename, const PIString & dir) { ParserEntry ret; - //ret.alias = PIFile::fileInfo(filename).name(); ret.path = filename; if (!PIDir(PIFile::fileInfo(filename).dir()).isAbsolute()) { //piCout << "rel, add dir"; diff --git a/utils/system_daemon/CMakeLists.txt b/utils/system_daemon/CMakeLists.txt index e75a97b9..1eb58c6f 100755 --- a/utils/system_daemon/CMakeLists.txt +++ b/utils/system_daemon/CMakeLists.txt @@ -3,7 +3,6 @@ file(GLOB CPPS "*.cpp") file(GLOB HDRS "*.h") add_executable(pisd ${CPPS} ${HDRS}) target_link_libraries(pisd pip pip_crypt) -# apple_rpath_patch(pisd) if (DEFINED LIB) install(TARGETS pisd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) else() diff --git a/utils/system_daemon/daemon.cpp b/utils/system_daemon/daemon.cpp index 33cb59fa..8d827d24 100644 --- a/utils/system_daemon/daemon.cpp +++ b/utils/system_daemon/daemon.cpp @@ -6,7 +6,6 @@ const char self_name[] = "__self__"; extern PIScreen * screen; extern PISystemMonitor sys_mon; -//bool Daemon::inited__ = false; Daemon::Remote::Remote(const PIString & n): PIThread() { setName(n); @@ -279,10 +278,6 @@ Daemon::Daemon(): PIPeer(pisd_prefix + PISystemInfo::instance()->hostname + "_" dtimer.addDelimiter(5); dtimer.start(200); - //CONNECTU(&console, keyPressed, this, keyEvent) - //dir.setDir("/home/peri4/Documents"); - //TileSimple * tl; - tile_root = new PIScreenTile(); tile_root->direction = Vertical; @@ -406,13 +401,6 @@ void Daemon::showTile(PIScreenTile * t, const PIString & header) { lock(); if (!conn_name.isEmpty()) tile_header->content[0].first.insert(0, PIString("Daemon \"") + connectedDaemon() + "\": "); - /*PIString s; - if (!conn_name.isEmpty()) - s = "Daemon \"" + connectedDaemon() + "\": "; - s += header; - tile_header->content.resize(1); - tile_header->content[0].first = s; - tile_header->content[0].second.flags = Bold;*/ unlock(); } @@ -481,7 +469,6 @@ void Daemon::keyEvent(PIKbdListener::KeyEvent key) { void Daemon::fmKeyEvent(PIKbdListener::KeyEvent key) { PIMutexLocker ml(remote_mutex); - //Remote * r = remotes.value(conn_name); // piCoutObj << key.key << key.modifiers; switch (key.key) { case PIKbdListener::Return: @@ -619,17 +606,11 @@ PIString Daemon::connectedDaemon() const { void Daemon::peerConnected(const PIString & p_name) { while (!inited__) piMSleep(PIP_MIN_MSLEEP*5); -// PIMutexLocker ml(peers_mutex); - /*piCout << "connected" << name; - mode = 2; - conn_name = name;*/ if (!p_name.startsWith(pisd_prefix)) return; Remote * r = new Remote(p_name); piCoutObj << "peer connected" << p_name; -// piCout << r->methodsEH() << this->methodsEH(); CONNECTU(r, sendRequest, this, sendRequest) CONNECTU(r, receiveFinished, this, filesReceived) - //CONNECTU(r, receiveFinished, this, closeFileDialog) CONNECTU(r, sendFinished, this, filesSended) CONNECTU(r, changeDirFinished, this, dirChanged) PIMutexLocker ml2(remote_mutex); @@ -661,9 +642,6 @@ void Daemon::filesReceived(const PIString & p_name, bool ok) { } else { piCout << "warning, files not received fromsended" << p_name; } -// piCout << "try lock in filesReceived, now mutex is" << remote_mutex.isLocked(); -// PIMutexLocker ml(remote_mutex); -// piCout << "lock reached"; closeFileDialog(p_name, ok); Remote * r = remotes.value(p_name, 0); if (!r) return; @@ -710,22 +688,19 @@ void Daemon::closeFileDialog(const PIString & p_name, bool ok) { //piCout << "file transfer with" << p_name << (ok ? "success" : "failure"); if (tile_file_progress->conn_name != p_name) return; tile_file_progress->close(ok); -// if (ok) { - if (tile_file_progress->rec) { - fm.remoteTile()->setFocus(); - fm.clearSelectionRemote(); - fm.updateLocalDir(); - } else { - fm.localTile()->setFocus(); - fm.clearSelectionLocal(); - requestChDir("."); - } -// } + if (tile_file_progress->rec) { + fm.remoteTile()->setFocus(); + fm.clearSelectionRemote(); + fm.updateLocalDir(); + } else { + fm.localTile()->setFocus(); + fm.clearSelectionLocal(); + requestChDir("."); + } } void Daemon::dataReceived(const PIString & from, const PIByteArray & data) { - //if (conn_name != from) return; // piCout << "rec" << data.size(); if (data.size() < 4) return; PIMutexLocker ml(remote_mutex); @@ -748,7 +723,6 @@ void Daemon::dataReceived(const PIString & from, const PIByteArray & data) { //piCout << "store to" << r->dir_my.absolutePath(); piCoutObj << "cd to" << r->dir_my.absolutePath(); r->updateDir(); -// sendDirToRemote(r); break; case ReplyHostInfo: ba >> info_other; @@ -760,7 +734,6 @@ void Daemon::dataReceived(const PIString & from, const PIByteArray & data) { { PIVector fil; ba >> dir >> fil; -// r->dir_remote.setDir(dir); fm.setRemoteDir(dir); fm.setRemoteContent(fil); fm.remoteRestoreDir(); @@ -784,7 +757,6 @@ void Daemon::dataReceived(const PIString & from, const PIByteArray & data) { ba >> files; //piCout << "send" << files << "from" << r->dir_my.absolutePath(); r->removeFiles(files); - //answer_dirs = true; } break; case MkDir: @@ -910,6 +882,4 @@ void Daemon::requestChDir(const PIString & d) { PIByteArray ba; ba << int(RequestChangeDir) << d; send(conn_name, ba); -// bool ok = send(conn_name, ba); -// piCout << "request chdir" << d << conn_name << r << ok; } diff --git a/utils/system_daemon/file_manager.cpp b/utils/system_daemon/file_manager.cpp index 167f2c34..3377d7b0 100644 --- a/utils/system_daemon/file_manager.cpp +++ b/utils/system_daemon/file_manager.cpp @@ -1,8 +1,6 @@ #include "file_manager.h" #include "shared.h" -//extern PIScreen * screen; - FileManager::TileDir::TileDir(): TileList() { label_path = 0; @@ -155,7 +153,6 @@ void FileManager::TileDir::setContent(const PIVector & l) { void FileManager::TileDir::updateDir() { - //if (!enabled) return; lock(); int pc = cur, po = offset; showReading(); @@ -172,7 +169,6 @@ void FileManager::TileDir::updateDir() { void FileManager::TileDir::buildNames() { - //if (!enabled) return; lock(); PIMutexLocker ml(e_mutex); content.clear(); @@ -227,8 +223,6 @@ void FileManager::TileDir::resizeEvent(int w, int h) { FileManager::FileManager() { setName("FileManager"); - //CONNECTU(screen, keyPressed, this, keyEvent) - //dir.setDir("/home/peri4/Documents"); TileSimple * tl; tile_root = new PIScreenTile(); diff --git a/utils/system_daemon/main.cpp b/utils/system_daemon/main.cpp index 8186c095..40962fa0 100755 --- a/utils/system_daemon/main.cpp +++ b/utils/system_daemon/main.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - PIp System Daemon - Ivan Pelipenko peri4ko@yandex.ru + PIP - Platform Independent Primitives + PIP System Daemon + Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "pisingleapplication.h" @@ -35,7 +35,6 @@ _Init _pisd_init; PISystemMonitor sys_mon; PIScreen * screen = 0; -//FileManager file_manager; class MainMenu: public PITimer { @@ -63,10 +62,6 @@ public: mt->hide(); mt->name() = "local info"; center->addTile(mt); mtiles << mt; - //mt = tfm = daemon_.fm.tile(); - mt->hide(); mt->name() = "file manager"; - center->addTile(mt); mtiles << mt; - mt = tdaemon = daemon_.tile(); mt->hide(); mt->name() = "daemon"; center->addTile(mt); mtiles << mt; @@ -129,7 +124,6 @@ public: ret->addTile(diag); diag->addTile(peerdiagdata_tl); diag->addTile(peerdiagservice_tl); -// updatePeerInfo(); return ret; } PIScreenTile * peerTile() { @@ -148,7 +142,6 @@ public: ret->addTile(peerinfo_tl); ret->addTile(addrs_tl); ret->addTile(peermap_tl); -// updatePeerInfo(); return ret; } @@ -379,8 +372,6 @@ int main(int argc, char * argv[]) { args << "-a" << sip; if (!name.isEmpty()) args << "-n" << name; - //PIProcess p; - //p.exec("/bin/readlink", PIStringList() << "/proc/self/exe"); PIString exe; #ifdef WINDOWS exe = PISystemInfo::instance()->execCommand; @@ -391,12 +382,10 @@ int main(int argc, char * argv[]) { PIProcess::execIndependent(exe, args); return 0; } - //cli.addArgument(""); screen = new PIScreen(false); screen->setMouseEnabled(true); Daemon * daemon = new Daemon(); if (!sip.isEmpty()) daemon->setTcpServerIP(sip); - //sys_mon.startOnProcess(12404); screen->enableExitCapture(PIKbdListener::F10); if (!name.isEmpty()) daemon->changeName(pisd_prefix + name); diff --git a/utils/system_daemon/terminal_tile.cpp b/utils/system_daemon/terminal_tile.cpp index 85522afd..881c035f 100644 --- a/utils/system_daemon/terminal_tile.cpp +++ b/utils/system_daemon/terminal_tile.cpp @@ -11,7 +11,6 @@ TileTerminal::TileTerminal(const PIString & n): PIScreenTile(n) { void TileTerminal::drawEvent(PIScreenDrawer * d) { //piCout << "draw" << visible; - //PIVector > c = term->content(); d->fillRect(x_, y_, x_ + width_, y_ + height_, cells); } @@ -25,20 +24,11 @@ bool TileTerminal::keyEvent(PIKbdListener::KeyEvent key) { return true; } //piCout << "key"; - /*if (!term) return false; - if (PITerminal::isSpecialKey(key.key)) term->write((PIKbdListener::SpecialKey)key.key, key.modifiers); - else { - PIByteArray ba; - ba << PIChar(key.key).toConcole1Byte(); - term->write(ba); - }*/ keyPressed(key); return true; } void TileTerminal::resizeEvent(int w, int h) { - /*if (!term) return; - term->resize(w, h);*/ resizeRequest(); } diff --git a/utils/system_test/CMakeLists.txt b/utils/system_test/CMakeLists.txt index c3ade206..fe07d4bb 100755 --- a/utils/system_test/CMakeLists.txt +++ b/utils/system_test/CMakeLists.txt @@ -1,7 +1,6 @@ message(STATUS "Building pip_system_test") add_executable(pip_system_test "main.cpp") target_link_libraries(pip_system_test pip) -# apple_rpath_patch(pip_system_test) if (DEFINED LIB) install(TARGETS pip_system_test DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) endif () diff --git a/utils/system_test/main.cpp b/utils/system_test/main.cpp index ce77efb5..73ea1fc7 100755 --- a/utils/system_test/main.cpp +++ b/utils/system_test/main.cpp @@ -1,20 +1,20 @@ /* - PIP - Platform Independent Primitives - System tests program + PIP - Platform Independent Primitives + System tests program Ivan Pelipenko peri4ko@yandex.ru - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #include "pip.h" @@ -101,8 +101,6 @@ int main(int argc, char * argv[]) { sts /= stc; conf.setValue("usleep_offset_us", long(sts)); piCout << "ok," << sts << "us, average in" << stc << "series (" << (stc * times.size_s()) << "executes)"; - - //WAIT_FOR_EXIT return 0; #endif }; diff --git a/utils/udp_file_transfer/CMakeLists.txt b/utils/udp_file_transfer/CMakeLists.txt index 694ec816..6333c33a 100644 --- a/utils/udp_file_transfer/CMakeLists.txt +++ b/utils/udp_file_transfer/CMakeLists.txt @@ -1,7 +1,6 @@ message(STATUS "Building pift") add_executable(pift "main.cpp") target_link_libraries(pift pip) -# apple_rpath_patch(pift) if (DEFINED LIB) install(TARGETS pift DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) else() diff --git a/utils/udp_file_transfer/main.cpp b/utils/udp_file_transfer/main.cpp index 1db58718..67d46949 100644 --- a/utils/udp_file_transfer/main.cpp +++ b/utils/udp_file_transfer/main.cpp @@ -1,3 +1,22 @@ +/* + PIP - Platform Independent Primitives + UDP file transfer (send /receive files) utility + Andrey Bychkov work.a.b@yandex.ru + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + #include "pip.h" #include "pifiletransfer.h" #include "pidatatransfer.h" @@ -20,9 +39,7 @@ public: eth.setSendAddress(dst_ip_port); if (test_) { testt.setCRCEnabled(false); - //testt.setPacketSize(1280); testt.setName("TEST"); - //testt.setTimeout(0.1); CONNECTU(&testt, sendRequest, this, ftsend); } else { ft.setPacketSize(65000); @@ -66,7 +83,6 @@ private: ft.stopSend(); ft.stopReceive(); } - // piCout << (int)ft.diagnostic().quality(); } if (testt.isSending() || testt.isReceiving()) { ftevent(); @@ -129,7 +145,6 @@ private: ft.received(ba); } - void updatePMT() { PIString pm; if (test_) pm = testt.packetMap(); @@ -210,8 +225,6 @@ int main (int argc, char * argv[]) { src += ":"+PIString::fromNumber(port); dst += ":"+PIString::fromNumber(port); } -// PIKbdListener kbd; -// kbd.enableExitCapture(); PIScreen screen(false); screen.enableExitCapture(); screen.rootTile()->addTile(new TilePICout());