Refactored CMakeLists.txt
* new pip_module() macro * fixed exports * automatic gather all exports and pass them to Doxygen and PICodeParser
This commit is contained in:
444
CMakeLists.txt
444
CMakeLists.txt
@@ -3,7 +3,7 @@ cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
|||||||
project(pip)
|
project(pip)
|
||||||
set(_PIP_MAJOR 1)
|
set(_PIP_MAJOR 1)
|
||||||
set(_PIP_MINOR 99)
|
set(_PIP_MINOR 99)
|
||||||
set(_PIP_REVISION 2)
|
set(_PIP_REVISION 3)
|
||||||
set(_PIP_SUFFIX _prebeta)
|
set(_PIP_SUFFIX _prebeta)
|
||||||
set(_PIP_COMPANY SHS)
|
set(_PIP_COMPANY SHS)
|
||||||
set(_PIP_DOMAIN org.SHS)
|
set(_PIP_DOMAIN org.SHS)
|
||||||
@@ -14,6 +14,7 @@ endif()
|
|||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
set(PIP_BUILD 1)
|
set(PIP_BUILD 1)
|
||||||
include(CheckFunctionExists)
|
include(CheckFunctionExists)
|
||||||
|
include(GenerateExportHeader)
|
||||||
include(DeployMacros)
|
include(DeployMacros)
|
||||||
include(PIPMacros)
|
include(PIPMacros)
|
||||||
if(NOT DEFINED BUILD_NUMBER)
|
if(NOT DEFINED BUILD_NUMBER)
|
||||||
@@ -45,60 +46,89 @@ set(CMAKE_CXX_STANDARD 11)
|
|||||||
|
|
||||||
|
|
||||||
# Basic
|
# Basic
|
||||||
macro(gather_src DIR CPP H H_P)
|
set(PIP_MODULES)
|
||||||
set(CS)
|
|
||||||
set(HS)
|
|
||||||
set(PHS)
|
|
||||||
file(GLOB CS "${DIR}/*.cpp")
|
|
||||||
file(GLOB HS "${DIR}/*.h")
|
|
||||||
file(GLOB PHS "${DIR}/*_p.h")
|
|
||||||
list(REMOVE_ITEM HS "${PHS}")
|
|
||||||
list(APPEND ${CPP} ${CS})
|
|
||||||
list(APPEND ${H} ${HS})
|
|
||||||
list(APPEND ${H_P} ${PHS})
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
set(PIP_SRC_MAIN "lib/main")
|
|
||||||
set(PIP_SRC_CONSOLE "lib/console")
|
|
||||||
set(PIP_SRC_CRYPT "lib/crypt")
|
|
||||||
set(PIP_SRC_COMPRESS "lib/compress")
|
|
||||||
set(PIP_SRC_USB "lib/usb")
|
|
||||||
set(PIP_SRC_FFTW "lib/fftw")
|
|
||||||
set(PIP_SRC_OPENCL "lib/opencl")
|
|
||||||
set(PIP_SRC_IO_UTILS "lib/io_utils")
|
|
||||||
set(PIP_SRC_CLOUD "lib/cloud")
|
|
||||||
set(PIP_SRC_LUA "lib/lua")
|
|
||||||
set(PIP_SRC_DIRS ${PIP_SRC_MAIN}
|
|
||||||
${PIP_SRC_CONSOLE}
|
|
||||||
${PIP_SRC_CRYPT}
|
|
||||||
${PIP_SRC_COMPRESS}
|
|
||||||
${PIP_SRC_USB}
|
|
||||||
${PIP_SRC_FFTW}
|
|
||||||
${PIP_SRC_OPENCL}
|
|
||||||
${PIP_SRC_IO_UTILS}
|
|
||||||
${PIP_SRC_CLOUD}
|
|
||||||
${PIP_SRC_LUA}
|
|
||||||
)
|
|
||||||
set(PIP_LIBS_TARGETS pip)
|
|
||||||
set(LIBS_MAIN)
|
set(LIBS_MAIN)
|
||||||
set(LIBS_STATUS)
|
set(LIBS_STATUS)
|
||||||
set(HDRS)
|
set(HDRS)
|
||||||
set(PHDRS)
|
set(PHDRS)
|
||||||
set(HDR_DIRS)
|
set(HDR_DIRS)
|
||||||
|
|
||||||
set(PIP_STD_IOSTREAM "no")
|
|
||||||
set(PIP_ICU "no")
|
|
||||||
set(PIP_INTROSPECTION "no")
|
|
||||||
set(PIP_USB "no")
|
|
||||||
set(PIP_CRYPT "no")
|
|
||||||
set(PIP_CLOUD "no")
|
|
||||||
set(PIP_COMPRESS "no")
|
|
||||||
set(PIP_FFTW "no")
|
|
||||||
set(PIP_OPENCL "no")
|
|
||||||
set(PIP_LUA "no")
|
|
||||||
set(PIP_IOUTILS "yes")
|
|
||||||
set(PIP_UTILS_LIST)
|
set(PIP_UTILS_LIST)
|
||||||
set(PIP_TESTS_LIST)
|
set(PIP_TESTS_LIST)
|
||||||
|
set(PIP_EXPORTS)
|
||||||
|
|
||||||
|
set(PIP_SRC_MODULES "console;crypt;compress;usb;fftw;opencl;io_utils;cloud;lua")
|
||||||
|
foreach(_m ${PIP_SRC_MODULES})
|
||||||
|
set(PIP_MSG_${_m} "no")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
macro(pip_module NAME LIBS LABEL INCLUDES MSG)
|
||||||
|
set(CPPS)
|
||||||
|
set(HS)
|
||||||
|
set(PHS)
|
||||||
|
set(CRES)
|
||||||
|
file(GLOB_RECURSE CPPS "lib/${NAME}/*.cpp")
|
||||||
|
file(GLOB_RECURSE HS "lib/${NAME}/*.h")
|
||||||
|
file(GLOB_RECURSE PHS "lib/${NAME}/*_p.h")
|
||||||
|
file(GLOB_RECURSE RES "lib/${NAME}/*conf.h")
|
||||||
|
list(REMOVE_ITEM HS "${PHS}")
|
||||||
|
list(APPEND HDRS ${HS})
|
||||||
|
list(APPEND PHDRS ${PHS})
|
||||||
|
|
||||||
|
set(_target "pip_${NAME}")
|
||||||
|
set(_libs "${LIBS}")
|
||||||
|
if ("${NAME}" STREQUAL "main")
|
||||||
|
set(_target "pip")
|
||||||
|
else()
|
||||||
|
list(APPEND _libs "pip")
|
||||||
|
endif()
|
||||||
|
string(TOUPPER "${_target}" DEF_NAME)
|
||||||
|
|
||||||
|
set(PIP_MSG_${NAME} "yes${MSG}")
|
||||||
|
import_version(${_target} PIP)
|
||||||
|
set_deploy_property(${_target} ${PIP_LIB_TYPE}
|
||||||
|
LABEL "${LABEL}"
|
||||||
|
FULLNAME "${_PIP_DOMAIN}.${_target}"
|
||||||
|
COMPANY "${_PIP_COMPANY}"
|
||||||
|
INFO "Platform-Independent Primitives")
|
||||||
|
make_rc(${_target} _RC)
|
||||||
|
|
||||||
|
set(LINK_LIBS)
|
||||||
|
foreach (_l ${_libs})
|
||||||
|
if (${${_l}_FOUND})
|
||||||
|
list(APPEND LINK_LIBS ${${_l}_LIBRARIES})
|
||||||
|
else()
|
||||||
|
list(APPEND LINK_LIBS ${_l})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if (NOT "${RES}" STREQUAL "")
|
||||||
|
pip_resources(CRES "${RES}")
|
||||||
|
endif()
|
||||||
|
add_definitions(-D${DEF_NAME})
|
||||||
|
add_library(${_target} ${PIP_LIB_TYPE} ${CPPS} ${CRES} ${_RC})
|
||||||
|
if (NOT "${RES}" STREQUAL "")
|
||||||
|
add_dependencies(${_target} pip_rc)
|
||||||
|
endif()
|
||||||
|
if (NOT "${INCLUDES}" STREQUAL "")
|
||||||
|
target_include_directories(${_target} PRIVATE ${INCLUDES})
|
||||||
|
endif()
|
||||||
|
generate_export_header(${_target})
|
||||||
|
list(APPEND HDRS "${CMAKE_CURRENT_BINARY_DIR}/${_target}_export.h")
|
||||||
|
list(APPEND PIP_EXPORTS "${DEF_NAME}_EXPORT")
|
||||||
|
target_link_libraries(${_target} ${LINK_LIBS})
|
||||||
|
list(APPEND PIP_MODULES ${_target})
|
||||||
|
if (NOT "${LIBS}" STREQUAL "")
|
||||||
|
list(APPEND LIBS_STATUS ${LIBS})
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(pip_find_lib NAME)
|
||||||
|
find_library(${NAME}_LIBRARIES ${NAME} ${ARGN})
|
||||||
|
set(${NAME}_FOUND FALSE)
|
||||||
|
if(${NAME}_LIBRARIES)
|
||||||
|
set(${NAME}_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
if (DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
|
if (DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
|
||||||
set(STATIC_LIB ON)
|
set(STATIC_LIB ON)
|
||||||
@@ -122,11 +152,6 @@ set_version(PIP
|
|||||||
BUILD "${BUILD_NUMBER}"
|
BUILD "${BUILD_NUMBER}"
|
||||||
SUFFIX "${_PIP_SUFFIX}"
|
SUFFIX "${_PIP_SUFFIX}"
|
||||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/piversion.h")
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/piversion.h")
|
||||||
set_deploy_property(pip ${PIP_LIB_TYPE}
|
|
||||||
LABEL "PIP main library"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PIP_SRC_MAIN}/piversion.h")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PIP_SRC_MAIN}/piversion.h")
|
||||||
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/${PIP_SRC_MAIN}/piversion.h")
|
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/${PIP_SRC_MAIN}/piversion.h")
|
||||||
endif()
|
endif()
|
||||||
@@ -184,49 +209,25 @@ endif()
|
|||||||
get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME)
|
get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME)
|
||||||
|
|
||||||
|
|
||||||
# Sources
|
|
||||||
|
|
||||||
# Main lib
|
# Main lib
|
||||||
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "cloud" "lua")
|
#set(PIP_FOLDERS ".;core;containers;thread;system;io_devices;io_utils;console;math;code;geo;resources;opencl;crypt;introspection;cloud;lua")
|
||||||
include_directories("${PIP_SRC_MAIN}")
|
file(GLOB PIP_FOLDERS LIST_DIRECTORIES TRUE "${CMAKE_CURRENT_SOURCE_DIR}/lib/main/*")
|
||||||
|
list(APPEND PIP_FOLDERS "${CMAKE_CURRENT_SOURCE_DIR}/lib/main")
|
||||||
set(PIP_MAIN_FOLDERS)
|
set(PIP_MAIN_FOLDERS)
|
||||||
foreach(F ${PIP_FOLDERS})
|
foreach(F ${PIP_FOLDERS})
|
||||||
list(APPEND PIP_MAIN_FOLDERS "\"${PROJECT_SOURCE_DIR}/${PIP_SRC_MAIN}/${F}\"")
|
if (IS_DIRECTORY "${F}")
|
||||||
include_directories("${PIP_SRC_MAIN}/${F}")
|
list(APPEND PIP_MAIN_FOLDERS "${F}")
|
||||||
gather_src("${PIP_SRC_MAIN}/${F}" CPP_LIB_MAIN HDRS PHDRS)
|
include_directories("${F}")
|
||||||
|
endif()
|
||||||
endforeach(F)
|
endforeach(F)
|
||||||
|
if (DEFINED LIBPROJECT)
|
||||||
|
set(PIP_MAIN_FOLDERS "${PIP_MAIN_FOLDERS}" PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (TESTS)
|
if (TESTS)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Crypt lib
|
|
||||||
gather_src("${PIP_SRC_CRYPT}" CPP_LIB_CRYPT HDRS PHDRS)
|
|
||||||
|
|
||||||
# Console lib
|
|
||||||
gather_src("${PIP_SRC_CONSOLE}" CPP_LIB_CONSOLE HDRS PHDRS)
|
|
||||||
|
|
||||||
# Compress lib
|
|
||||||
gather_src("${PIP_SRC_COMPRESS}" CPP_LIB_COMPRESS HDRS PHDRS)
|
|
||||||
|
|
||||||
# USB lib
|
|
||||||
gather_src("${PIP_SRC_USB}" CPP_LIB_USB HDRS PHDRS)
|
|
||||||
|
|
||||||
# FFTW lib
|
|
||||||
gather_src("${PIP_SRC_FFTW}" CPP_LIB_FFTW HDRS PHDRS)
|
|
||||||
|
|
||||||
# OpenCL lib
|
|
||||||
gather_src("${PIP_SRC_OPENCL}" CPP_LIB_OPENCL HDRS PHDRS)
|
|
||||||
|
|
||||||
# IO Utils lib
|
|
||||||
gather_src("${PIP_SRC_IO_UTILS}" CPP_LIB_IO_UTILS HDRS PHDRS)
|
|
||||||
|
|
||||||
# Cloud lib
|
|
||||||
gather_src("${PIP_SRC_CLOUD}" CPP_LIB_CLOUD HDRS PHDRS)
|
|
||||||
|
|
||||||
# LUA lib
|
|
||||||
gather_src("${PIP_SRC_LUA}" CPP_LIB_LUA HDRS PHDRS)
|
|
||||||
|
|
||||||
if(PIP_FREERTOS)
|
if(PIP_FREERTOS)
|
||||||
add_definitions(-DPIP_FREERTOS)
|
add_definitions(-DPIP_FREERTOS)
|
||||||
set(ICU OFF)
|
set(ICU OFF)
|
||||||
@@ -269,9 +270,9 @@ if((NOT DEFINED ENV{QNX_HOST}) AND (NOT APPLE) AND (NOT WIN32) AND (NOT DEFINED
|
|||||||
list(APPEND LIBS_MAIN rt)
|
list(APPEND LIBS_MAIN rt)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES rt)
|
set(CMAKE_REQUIRED_LIBRARIES rt)
|
||||||
endif()
|
endif()
|
||||||
CHECK_FUNCTION_EXISTS(timer_create PIP_TIMER_RT_0)
|
CHECK_FUNCTION_EXISTS(timer_create PIP_TIMER_RT_0)
|
||||||
CHECK_FUNCTION_EXISTS(timer_settime PIP_TIMER_RT_1)
|
CHECK_FUNCTION_EXISTS(timer_settime PIP_TIMER_RT_1)
|
||||||
CHECK_FUNCTION_EXISTS(timer_delete PIP_TIMER_RT_2)
|
CHECK_FUNCTION_EXISTS(timer_delete PIP_TIMER_RT_2)
|
||||||
|
|
||||||
|
|
||||||
# Check if build debug version
|
# Check if build debug version
|
||||||
@@ -286,6 +287,7 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
# Check if std::iostream operators support
|
# Check if std::iostream operators support
|
||||||
|
set(PIP_STD_IOSTREAM "no")
|
||||||
if(STD_IOSTREAM)
|
if(STD_IOSTREAM)
|
||||||
set(PIP_STD_IOSTREAM "yes")
|
set(PIP_STD_IOSTREAM "yes")
|
||||||
add_definitions(-DPIP_STD_IOSTREAM)
|
add_definitions(-DPIP_STD_IOSTREAM)
|
||||||
@@ -293,6 +295,7 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
# Check if ICU used for PIString and PIChar
|
# Check if ICU used for PIString and PIChar
|
||||||
|
set(PIP_ICU "no")
|
||||||
if(ICU)
|
if(ICU)
|
||||||
set(PIP_ICU "yes")
|
set(PIP_ICU "yes")
|
||||||
add_definitions(-DPIP_ICU)
|
add_definitions(-DPIP_ICU)
|
||||||
@@ -303,6 +306,7 @@ endif()
|
|||||||
# Check if PIP should be built with introspection
|
# Check if PIP should be built with introspection
|
||||||
set(_PIP_DEFS "")
|
set(_PIP_DEFS "")
|
||||||
set(_PIP_DEFS_FILE "${CMAKE_CURRENT_BINARY_DIR}/pip_defs.h")
|
set(_PIP_DEFS_FILE "${CMAKE_CURRENT_BINARY_DIR}/pip_defs.h")
|
||||||
|
set(PIP_INTROSPECTION "no")
|
||||||
if(INTROSPECTION)
|
if(INTROSPECTION)
|
||||||
set(PIP_INTROSPECTION "yes")
|
set(PIP_INTROSPECTION "yes")
|
||||||
add_definitions(-DPIP_INTROSPECTION)
|
add_definitions(-DPIP_INTROSPECTION)
|
||||||
@@ -360,21 +364,12 @@ if(PIP_FREERTOS)
|
|||||||
set(PIP_LIBS ${LIBS_MAIN})
|
set(PIP_LIBS ${LIBS_MAIN})
|
||||||
else()
|
else()
|
||||||
foreach(LIB_ ${LIBS_MAIN})
|
foreach(LIB_ ${LIBS_MAIN})
|
||||||
find_library(${LIB_}_LIBRARIES ${LIB_})
|
pip_find_lib(${LIB_})
|
||||||
set(${LIB_}_FOUND FALSE)
|
|
||||||
if(${LIB_}_LIBRARIES)
|
|
||||||
set(${LIB_}_FOUND TRUE)
|
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${${LIB_}_LIBRARIES})
|
|
||||||
list(APPEND PIP_LIBS ${${LIB_}_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
list(APPEND LIBS_STATUS ${LIBS_MAIN})
|
|
||||||
import_version(pip PIP)
|
import_version(pip PIP)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
make_rc(pip _RC)
|
|
||||||
add_definitions(-DPSAPI_VERSION=1)
|
add_definitions(-DPSAPI_VERSION=1)
|
||||||
add_library(pip ${PIP_LIB_TYPE} ${CPP_LIB_MAIN} ${HDRS} ${PHDRS} ${_RC})
|
|
||||||
if(${C_COMPILER} STREQUAL "cl.exe")
|
if(${C_COMPILER} STREQUAL "cl.exe")
|
||||||
set(CMAKE_CXX_FLAGS "/O2 /Ob2 /Ot /W0")
|
set(CMAKE_CXX_FLAGS "/O2 /Ob2 /Ot /W0")
|
||||||
endif()
|
endif()
|
||||||
@@ -382,93 +377,37 @@ else()
|
|||||||
set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} -fPIC")
|
set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} -fPIC")
|
||||||
if(DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
|
if(DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
|
||||||
else()
|
|
||||||
endif()
|
endif()
|
||||||
add_library(pip ${PIP_LIB_TYPE} ${CPP_LIB_MAIN})
|
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
include(GenerateExportHeader)
|
|
||||||
generate_export_header(pip)
|
|
||||||
list(APPEND HDRS "${CMAKE_CURRENT_BINARY_DIR}/pip_export.h")
|
pip_module(main "${LIBS_MAIN}" "PIP main library" "" "")
|
||||||
target_link_libraries(pip ${PIP_LIBS})
|
|
||||||
|
|
||||||
if (NOT CROSSTOOLS)
|
if (NOT CROSSTOOLS)
|
||||||
if (NOT PIP_FREERTOS)
|
if (NOT PIP_FREERTOS)
|
||||||
# Check if USB is supported
|
|
||||||
find_library(usb_LIBRARIES usb SHARED)
|
|
||||||
set(usb_FOUND FALSE)
|
pip_module(console "" "PIP console support" "" "")
|
||||||
if(usb_LIBRARIES)
|
|
||||||
set(usb_FOUND TRUE)
|
|
||||||
set(PIP_USB "yes")
|
pip_find_lib(usb)
|
||||||
import_version(pip_usb pip)
|
if(usb_FOUND)
|
||||||
set_deploy_property(pip_usb ${PIP_LIB_TYPE}
|
pip_module(usb "usb" "PIP usb support" "" "")
|
||||||
LABEL "PIP usb support"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_usb"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_usb _RC)
|
|
||||||
add_definitions(-DPIP_USB)
|
|
||||||
add_library(pip_usb ${PIP_LIB_TYPE} ${CPP_LIB_USB} ${_RC})
|
|
||||||
target_link_libraries(pip_usb pip ${usb_LIBRARIES})
|
|
||||||
list(APPEND LIBS_STATUS usb)
|
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_usb)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Add console library
|
pip_find_lib(zlib NAMES z zlib)
|
||||||
import_version(pip_console pip)
|
if(zlib_FOUND)
|
||||||
set_deploy_property(pip_console ${PIP_LIB_TYPE}
|
pip_module(compress "zlib" "PIP compression support" "" "")
|
||||||
LABEL "PIP console support"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_console"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_console _RC)
|
|
||||||
add_library(pip_console ${PIP_LIB_TYPE} ${CPP_LIB_CONSOLE} ${_RC})
|
|
||||||
target_link_libraries(pip_console pip)
|
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_console)
|
|
||||||
|
|
||||||
|
|
||||||
# Check if PIP support cryptographic encryption/decryption using sodium library
|
|
||||||
find_library(sodium_LIBRARIES sodium)
|
|
||||||
set(sodium_FOUND FALSE)
|
|
||||||
if(sodium_LIBRARIES)
|
|
||||||
set(sodium_FOUND TRUE)
|
|
||||||
set(PIP_CRYPT "yes")
|
|
||||||
set(PIP_IOUTILS "yes (+crypt)")
|
|
||||||
set(PIP_CLOUD "yes")
|
|
||||||
import_version(pip_crypt pip)
|
|
||||||
set_deploy_property(pip_crypt ${PIP_LIB_TYPE}
|
|
||||||
LABEL "PIP crypt support"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_crypt"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_crypt _RC)
|
|
||||||
add_definitions(-DPIP_CRYPT)
|
|
||||||
add_library(pip_crypt ${PIP_LIB_TYPE} ${CPP_LIB_CRYPT} ${_RC})
|
|
||||||
target_link_libraries(pip_crypt pip ${sodium_LIBRARIES})
|
|
||||||
list(APPEND LIBS_STATUS sodium)
|
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Check if PIP support compress/decompress using zlib library
|
pip_find_lib(sodium)
|
||||||
find_library(zlib_LIBRARIES NAMES z zlib)
|
if(sodium_FOUND)
|
||||||
set(zlib_FOUND FALSE)
|
pip_module(crypt "sodium" "PIP crypt support" "" "")
|
||||||
if(zlib_LIBRARIES)
|
pip_module(cloud "pip_crypt" "PIP crypt support" "" "")
|
||||||
set(zlib_FOUND TRUE)
|
|
||||||
set(PIP_COMPRESS "yes")
|
|
||||||
import_version(pip_compress pip)
|
|
||||||
set_deploy_property(pip_compress ${PIP_LIB_TYPE}
|
|
||||||
LABEL "PIP compression support"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_compress"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_compress _RC)
|
|
||||||
add_definitions(-DPIP_COMPRESS)
|
|
||||||
add_library(pip_compress ${PIP_LIB_TYPE} ${CPP_LIB_COMPRESS} ${_RC})
|
|
||||||
target_link_libraries(pip_compress pip ${zlib_LIBRARIES})
|
|
||||||
list(APPEND LIBS_STATUS zlib)
|
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_compress)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@@ -513,106 +452,38 @@ if (NOT CROSSTOOLS)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
if(FFTW_LIBS)
|
if(FFTW_LIBS)
|
||||||
set(PIP_FFTW "yes (${FFTW_LIBS})")
|
pip_module(fftw "${FFTW_LIBS}" "PIP FFTW support" "" "")
|
||||||
import_version(pip_fftw pip)
|
|
||||||
set_deploy_property(pip_fftw ${PIP_LIB_TYPE}
|
|
||||||
LABEL "PIP FFTW support"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_fftw"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_fftw _RC)
|
|
||||||
add_library(pip_fftw ${PIP_LIB_TYPE} ${CPP_LIB_FFTW} ${_RC})
|
|
||||||
target_link_libraries(pip_fftw pip ${FFTW_ABS_LIBS})
|
|
||||||
list(APPEND LIBS_STATUS ${FFTW_LIBS})
|
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_fftw)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Check if PIP support OpenCL
|
find_package(OpenCL QUIET) #OpenCL_VERSION_STRING
|
||||||
find_package(OpenCL QUIET)
|
|
||||||
if(OpenCL_FOUND)
|
if(OpenCL_FOUND)
|
||||||
set(PIP_OPENCL "yes (${OpenCL_VERSION_STRING})")
|
set(_opencl_lib OpenCL::OpenCL)
|
||||||
import_version(pip_opencl pip)
|
|
||||||
set_deploy_property(pip_opencl ${PIP_LIB_TYPE}
|
|
||||||
LABEL "PIP OpenCL support"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_opencl"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_opencl _RC)
|
|
||||||
if(APPLE)
|
|
||||||
include_directories(${OpenCL_INCLUDE_DIRS}/Headers)
|
|
||||||
else()
|
|
||||||
include_directories(${OpenCL_INCLUDE_DIRS})
|
|
||||||
endif()
|
|
||||||
add_definitions(-DPIP_OPENCL)
|
|
||||||
pip_resources(CL_RES "${PIP_SRC_OPENCL}/resources.conf")
|
|
||||||
add_library(pip_opencl ${PIP_LIB_TYPE} ${CPP_LIB_OPENCL} ${CL_RES} ${_RC})
|
|
||||||
add_dependencies(pip_opencl pip_rc)
|
|
||||||
if(${CMAKE_VERSION} VERSION_LESS "3.7.0")
|
if(${CMAKE_VERSION} VERSION_LESS "3.7.0")
|
||||||
target_link_libraries(pip_opencl pip OpenCL)
|
target_link_libraries(_opencl_lib OpenCL)
|
||||||
else()
|
|
||||||
target_link_libraries(pip_opencl pip OpenCL::OpenCL)
|
|
||||||
endif()
|
endif()
|
||||||
list(APPEND LIBS_STATUS OpenCL)
|
pip_module(opencl "${_opencl_lib}" "PIP OpenCL support" "" " (${OpenCL_VERSION_STRING})")
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_opencl)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Check if PIP IO Utils library supports crypt
|
|
||||||
set(IO_UTILS_LIBS pip)
|
|
||||||
import_version(pip_io_utils pip)
|
|
||||||
set_deploy_property(pip_io_utils ${PIP_LIB_TYPE}
|
|
||||||
LABEL "PIP I/O utilites"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_io_utils"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_io_utils _RC)
|
|
||||||
add_library(pip_io_utils ${PIP_LIB_TYPE} ${CPP_LIB_IO_UTILS} ${_RC})
|
|
||||||
if(sodium_FOUND)
|
if(sodium_FOUND)
|
||||||
list(APPEND IO_UTILS_LIBS pip_crypt)
|
pip_module(io_utils "pip_crypt" "PIP I/O support" "" " (+crypt)")
|
||||||
|
else()
|
||||||
|
pip_module(io_utils "" "PIP I/O support" "" "")
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
|
||||||
|
|
||||||
|
|
||||||
# Build cloud library if crypt enabled
|
|
||||||
if(sodium_FOUND)
|
|
||||||
import_version(pip_cloud pip)
|
|
||||||
set_deploy_property(pip_cloud ${PIP_LIB_TYPE}
|
|
||||||
LABEL "PIP cloud transport support"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_cloud"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_cloud _RC)
|
|
||||||
add_definitions(-DPIP_CLOUD)
|
|
||||||
add_library(pip_cloud ${PIP_LIB_TYPE} ${CPP_LIB_CLOUD} ${_RC})
|
|
||||||
target_link_libraries(pip_cloud pip pip_crypt)
|
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_cloud)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check Lua support
|
# Check Lua support
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set(LUA_INCLUDE_DIR ${MINGW_INCLUDE})
|
set(LUA_INCLUDE_DIR ${MINGW_INCLUDE})
|
||||||
endif()
|
endif()
|
||||||
find_package(Lua QUIET)
|
find_package(Lua QUIET)
|
||||||
if (LUA_FOUND)
|
if (LUA_FOUND)
|
||||||
set(PIP_LUA "yes (${LUA_VERSION_STRING})")
|
pip_module(lua "LUA" "PIP Lua support" "${LUA_INCLUDE_DIR};${CMAKE_CURRENT_SOURCE_DIR}/lib/lua/3rd" " (${LUA_VERSION_STRING})")
|
||||||
import_version(pip_lua pip)
|
|
||||||
set_deploy_property(pip_lua ${PIP_LIB_TYPE}
|
|
||||||
LABEL "PIP Lua support"
|
|
||||||
FULLNAME "${_PIP_DOMAIN}.pip_lua"
|
|
||||||
COMPANY "${_PIP_COMPANY}"
|
|
||||||
INFO "Platform-Independent Primitives")
|
|
||||||
make_rc(pip_lua _RC)
|
|
||||||
add_definitions(-DPIP_LUA)
|
|
||||||
include_directories(${LUA_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib/lua/3rd)
|
|
||||||
list(APPEND HDR_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/lib/lua/3rd/LuaBridge")
|
list(APPEND HDR_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/lib/lua/3rd/LuaBridge")
|
||||||
add_library(pip_lua ${PIP_LIB_TYPE} ${CPP_LIB_LUA} ${_RC})
|
|
||||||
target_link_libraries(pip_lua pip ${LUA_LIBRARIES})
|
|
||||||
list(APPEND LIBS_STATUS LUA)
|
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_lua)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Test program
|
# Test program
|
||||||
if(PIP_UTILS)
|
if(PIP_UTILS)
|
||||||
add_executable(pip_test "main.cpp")
|
add_executable(pip_test "main.cpp")
|
||||||
@@ -624,25 +495,29 @@ if (NOT CROSSTOOLS)
|
|||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
set(PIP_CRYPT "yes")
|
set(PIP_MSG_crypt "yes")
|
||||||
set(PIP_COMPRESS "yes")
|
set(PIP_MSG_compress "yes")
|
||||||
|
set(PIP_MODULES pip)
|
||||||
add_definitions(-DPIP_CRYPT)
|
add_definitions(-DPIP_CRYPT)
|
||||||
add_library(pip_crypt ${PIP_LIB_TYPE} ${CPP_LIB_CRYPT})
|
add_library(pip_crypt ${PIP_LIB_TYPE} ${CPP_LIB_CRYPT})
|
||||||
target_link_libraries(pip_crypt pip)
|
target_link_libraries(pip_crypt pip)
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
list(APPEND PIP_MODULES pip_crypt)
|
||||||
set(IO_UTILS_LIBS pip)
|
set(IO_UTILS_LIBS pip)
|
||||||
add_library(pip_io_utils ${PIP_LIB_TYPE} ${CPP_LIB_IO_UTILS})
|
add_library(pip_io_utils ${PIP_LIB_TYPE} ${CPP_LIB_IO_UTILS})
|
||||||
list(APPEND IO_UTILS_LIBS pip_crypt)
|
list(APPEND IO_UTILS_LIBS pip_crypt)
|
||||||
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
list(APPEND PIP_MODULES pip_io_utils)
|
||||||
add_definitions(-DPIP_COMPRESS)
|
add_definitions(-DPIP_COMPRESS)
|
||||||
add_library(pip_compress ${PIP_LIB_TYPE} ${CPP_LIB_COMPRESS})
|
add_library(pip_compress ${PIP_LIB_TYPE} ${CPP_LIB_COMPRESS})
|
||||||
target_link_libraries(pip_compress pip)
|
target_link_libraries(pip_compress pip)
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_compress)
|
list(APPEND PIP_MODULES pip_compress)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
string(REPLACE ";" "," PIP_EXPORTS_STR "${PIP_EXPORTS}")
|
||||||
|
target_compile_definitions(pip PRIVATE "PICODE_DEFINES=\"${PIP_EXPORTS_STR}\"")
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
# Check if system or local install will be used (to system install use "-DLIB=" argument of cmake)
|
# Check if system or local install will be used (to system install use "-DLIB=" argument of cmake)
|
||||||
if(LIB)
|
if(LIB)
|
||||||
@@ -654,9 +529,9 @@ if(LIB)
|
|||||||
if(HDR_DIRS)
|
if(HDR_DIRS)
|
||||||
install(DIRECTORY ${HDR_DIRS} DESTINATION ${MINGW_INCLUDE}/pip)
|
install(DIRECTORY ${HDR_DIRS} DESTINATION ${MINGW_INCLUDE}/pip)
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${PIP_LIBS_TARGETS} ARCHIVE DESTINATION ${MINGW_LIB})
|
install(TARGETS ${PIP_MODULES} ARCHIVE DESTINATION ${MINGW_LIB})
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${PIP_LIBS_TARGETS} RUNTIME DESTINATION ${MINGW_BIN})
|
install(TARGETS ${PIP_MODULES} RUNTIME DESTINATION ${MINGW_BIN})
|
||||||
find_library(STDLIB "stdc++-6" PATHS ${MINGW_BIN} NO_DEFAULT_PATH)
|
find_library(STDLIB "stdc++-6" PATHS ${MINGW_BIN} NO_DEFAULT_PATH)
|
||||||
find_library(STDLIB "stdc++-6")
|
find_library(STDLIB "stdc++-6")
|
||||||
#message("${STDLIB}")
|
#message("${STDLIB}")
|
||||||
@@ -675,17 +550,17 @@ if(LIB)
|
|||||||
install(DIRECTORY ${HDR_DIRS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
|
install(DIRECTORY ${HDR_DIRS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${PIP_LIBS_TARGETS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
install(TARGETS ${PIP_MODULES} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in" "cmake/android_debug.keystore")
|
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in" "cmake/android_debug.keystore")
|
||||||
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
||||||
else()
|
else()
|
||||||
if(NOT PIP_FREERTOS)
|
if(NOT PIP_FREERTOS)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
install(TARGETS ${PIP_LIBS_TARGETS} RUNTIME DESTINATION bin)
|
install(TARGETS ${PIP_MODULES} RUNTIME DESTINATION bin)
|
||||||
install(TARGETS ${PIP_LIBS_TARGETS} ARCHIVE DESTINATION lib)
|
install(TARGETS ${PIP_MODULES} ARCHIVE DESTINATION lib)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PIP_LIBS_TARGETS} DESTINATION lib)
|
install(TARGETS ${PIP_MODULES} DESTINATION lib)
|
||||||
endif()
|
endif()
|
||||||
install(FILES ${HDRS} DESTINATION include/pip)
|
install(FILES ${HDRS} DESTINATION include/pip)
|
||||||
if(HDR_DIRS)
|
if(HDR_DIRS)
|
||||||
@@ -698,7 +573,7 @@ if(NOT PIP_FREERTOS)
|
|||||||
|
|
||||||
# Auxiliary
|
# Auxiliary
|
||||||
if (NOT CROSSTOOLS)
|
if (NOT CROSSTOOLS)
|
||||||
add_subdirectory("${PIP_SRC_MAIN}/auxiliary/piterminal")
|
add_subdirectory("utils/piterminal")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Utils
|
# Utils
|
||||||
@@ -720,8 +595,8 @@ endif()
|
|||||||
|
|
||||||
# Libraries messages
|
# Libraries messages
|
||||||
if(DEFINED LIBPROJECT)
|
if(DEFINED LIBPROJECT)
|
||||||
set(PIP_LIBS_TARGETS ${PIP_LIBS_TARGETS} PARENT_SCOPE)
|
set(PIP_MODULES ${PIP_MODULES} PARENT_SCOPE)
|
||||||
list(APPEND _ALL_TARGETS ${PIP_LIBS_TARGETS})
|
list(APPEND _ALL_TARGETS ${PIP_MODULES})
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -735,8 +610,9 @@ if ((NOT PIP_FREERTOS) AND (NOT CROSSTOOLS))
|
|||||||
set(DOXY_PROJECT_NUMBER "${PIP_VERSION}")
|
set(DOXY_PROJECT_NUMBER "${PIP_VERSION}")
|
||||||
set(DOXY_QHP_CUST_FILTER_ATTRS "\"PIP ${PIP_VERSION}\"")
|
set(DOXY_QHP_CUST_FILTER_ATTRS "\"PIP ${PIP_VERSION}\"")
|
||||||
set(DOXY_QHP_SECT_FILTER_ATTRS "\"PIP ${PIP_VERSION}\"")
|
set(DOXY_QHP_SECT_FILTER_ATTRS "\"PIP ${PIP_VERSION}\"")
|
||||||
set(DOXY_EXAMPLE_PATH "\"${PROJECT_SOURCE_DIR}/doc/examples\"")
|
set(DOXY_EXAMPLE_PATH "\"${CMAKE_CURRENT_SOURCE_DIR}/doc/examples\"")
|
||||||
set(DOXY_IMAGE_PATH "\"${PROJECT_SOURCE_DIR}/doc/images\"")
|
set(DOXY_IMAGE_PATH "\"${CMAKE_CURRENT_SOURCE_DIR}/doc/images\"")
|
||||||
|
set(DOXY_EXCLUDE "\"${CMAKE_CURRENT_SOURCE_DIR}/lib/lua/3rd\"")
|
||||||
if(DOXYGEN_DOT_EXECUTABLE)
|
if(DOXYGEN_DOT_EXECUTABLE)
|
||||||
string(REPLACE "\\" "" _DOT_PATH "${DOXYGEN_DOT_PATH}")
|
string(REPLACE "\\" "" _DOT_PATH "${DOXYGEN_DOT_PATH}")
|
||||||
set(DOXY_DOT_PATH "\"${_DOT_PATH}\"")
|
set(DOXY_DOT_PATH "\"${_DOT_PATH}\"")
|
||||||
@@ -744,11 +620,12 @@ if ((NOT PIP_FREERTOS) AND (NOT CROSSTOOLS))
|
|||||||
set(DOXY_DIA_PATH "\"${_DOT_PATH}\"")
|
set(DOXY_DIA_PATH "\"${_DOT_PATH}\"")
|
||||||
endif()
|
endif()
|
||||||
set(DOXY_INPUT)
|
set(DOXY_INPUT)
|
||||||
foreach(F ${PIP_SRC_DIRS})
|
foreach(F ${PIP_MAIN_FOLDERS})
|
||||||
list(APPEND DOXY_INPUT "\"${PROJECT_SOURCE_DIR}/${F}\"")
|
list(APPEND DOXY_INPUT "\"${F}\"")
|
||||||
endforeach(F)
|
endforeach(F)
|
||||||
string(REPLACE ";" " " DOXY_INPUT "${DOXY_INPUT}")
|
string(REPLACE ";" " " DOXY_INPUT "\"${CMAKE_CURRENT_SOURCE_DIR}/lib\"")
|
||||||
string(REPLACE ";" " " DOXY_INCLUDE_PATH "${PIP_MAIN_FOLDERS}")
|
string(REPLACE ";" " " DOXY_INCLUDE_PATH "${DOXY_INPUT}")
|
||||||
|
string(REPLACE ";" " " DOXY_DEFINES "${PIP_EXPORTS};DOXYGEN;PIOBJECT;PIOBJECT_SUBCLASS")
|
||||||
add_documentation(doc doc/Doxyfile.in)
|
add_documentation(doc doc/Doxyfile.in)
|
||||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html DESTINATION ../share/doc/pip COMPONENT doc EXCLUDE_FROM_ALL OPTIONAL)
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html DESTINATION ../share/doc/pip COMPONENT doc EXCLUDE_FROM_ALL OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
@@ -756,6 +633,7 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
list(REMOVE_ITEM LIBS_STATUS ${PIP_MODULES})
|
||||||
message("----------PIP----------")
|
message("----------PIP----------")
|
||||||
message(" Version: ${PIP_VERSION} ")
|
message(" Version: ${PIP_VERSION} ")
|
||||||
message(" Linkage: ${PIP_LIB_TYPE_MSG}")
|
message(" Linkage: ${PIP_LIB_TYPE_MSG}")
|
||||||
@@ -778,15 +656,9 @@ if(INTROSPECTION)
|
|||||||
endif()
|
endif()
|
||||||
message("")
|
message("")
|
||||||
message(" Modules:")
|
message(" Modules:")
|
||||||
message(" USB : ${PIP_USB}")
|
foreach(_m ${PIP_SRC_MODULES})
|
||||||
message(" Console : yes")
|
message(" ${_m}: ${PIP_MSG_${_m}}")
|
||||||
message(" Crypt : ${PIP_CRYPT}")
|
endforeach()
|
||||||
message(" Compress : ${PIP_COMPRESS}")
|
|
||||||
message(" FFTW : ${PIP_FFTW}")
|
|
||||||
message(" OpenCL : ${PIP_OPENCL}")
|
|
||||||
message(" IOUtils : ${PIP_IOUTILS}")
|
|
||||||
message(" Cloud : ${PIP_CLOUD}")
|
|
||||||
message(" Lua : ${PIP_LUA}")
|
|
||||||
if (PIP_TESTS_LIST)
|
if (PIP_TESTS_LIST)
|
||||||
message("")
|
message("")
|
||||||
message(" Tests:")
|
message(" Tests:")
|
||||||
@@ -803,10 +675,12 @@ if(NOT PIP_FREERTOS)
|
|||||||
message("")
|
message("")
|
||||||
message(" Using libraries:")
|
message(" Using libraries:")
|
||||||
foreach(LIB_ ${LIBS_STATUS})
|
foreach(LIB_ ${LIBS_STATUS})
|
||||||
if(${LIB_}_FOUND)
|
if (NOT TARGET ${LIB_})
|
||||||
message(" ${LIB_} -> ${${LIB_}_LIBRARIES}")
|
if(${LIB_}_FOUND)
|
||||||
else()
|
message(" ${LIB_} -> ${${LIB_}_LIBRARIES}")
|
||||||
message(" ${LIB_} not found, may fail")
|
else()
|
||||||
|
message(" ${LIB_} not found, may fail")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,27 +1,6 @@
|
|||||||
macro(CONFIGURE_DOXYGEN_FILE DOXYGEN_CONFIG_FILE FILE_NAME_SUFFIX)
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE})
|
|
||||||
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/doxyfile-${FILE_NAME_SUFFIX}")
|
|
||||||
file(READ ${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE} DOXYFILE_CONTENTS)
|
|
||||||
string(REPLACE "\\\n" " " DOXYFILE_CONTENTS "${DOXYFILE_CONTENTS}")
|
|
||||||
string(REPLACE "\n" ";" DOXYFILE_LINES "${DOXYFILE_CONTENTS}")
|
|
||||||
foreach(LINE IN LISTS DOXYFILE_LINES)
|
|
||||||
if(LINE STRGREATER "")
|
|
||||||
string(REGEX MATCH "^[a-zA-Z]([^ ])+" DOXY_PARAM ${LINE})
|
|
||||||
if(DEFINED DOXY_${DOXY_PARAM})
|
|
||||||
STRING(REGEX REPLACE "=([^\n])+" "= ${DOXY_${DOXY_PARAM}}" LINE ${LINE})
|
|
||||||
endif(DEFINED DOXY_${DOXY_PARAM})
|
|
||||||
endif()
|
|
||||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-${FILE_NAME_SUFFIX} "${LINE}\n")
|
|
||||||
endforeach()
|
|
||||||
else()
|
|
||||||
MESSAGE(SEND_ERROR "Doxygen configuration file '${DOXYGEN_CONFIG_FILE}' not found, can`t generate documentation")
|
|
||||||
endif()
|
|
||||||
endmacro(CONFIGURE_DOXYGEN_FILE)
|
|
||||||
|
|
||||||
|
|
||||||
macro(ADD_DOCUMENTATION TARGET DOXYGEN_CONFIG_FILE)
|
macro(ADD_DOCUMENTATION TARGET DOXYGEN_CONFIG_FILE)
|
||||||
if(DOXYGEN_FOUND)
|
if(DOXYGEN_FOUND)
|
||||||
configure_doxygen_file(${DOXYGEN_CONFIG_FILE} ${TARGET})
|
configure_file("${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE}" "${CMAKE_CURRENT_BINARY_DIR}/doxyfile-${TARGET}")
|
||||||
add_custom_target("genereate.${TARGET}" COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-${TARGET})
|
add_custom_target("genereate.${TARGET}" COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-${TARGET})
|
||||||
add_custom_target("${TARGET}" COMMAND ${CMAKE_COMMAND} -D COMPONENT=doc -P cmake_install.cmake)
|
add_custom_target("${TARGET}" COMMAND ${CMAKE_COMMAND} -D COMPONENT=doc -P cmake_install.cmake)
|
||||||
add_dependencies("${TARGET}" "genereate.${TARGET}")
|
add_dependencies("${TARGET}" "genereate.${TARGET}")
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ PROJECT_NAME = PIP
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 1.8.0
|
PROJECT_NUMBER = ${DOXY_PROJECT_NUMBER}
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
@@ -816,13 +816,7 @@ WARN_LOGFILE =
|
|||||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||||
# Note: If this tag is empty the current directory is searched.
|
# Note: If this tag is empty the current directory is searched.
|
||||||
|
|
||||||
INPUT = src_main \
|
INPUT = ${DOXY_INPUT}
|
||||||
src_crypt \
|
|
||||||
src_fftw \
|
|
||||||
src_io_utils \
|
|
||||||
src_compress \
|
|
||||||
src_opencl \
|
|
||||||
src_usb
|
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||||
@@ -895,7 +889,7 @@ RECURSIVE = YES
|
|||||||
# Note that relative paths are relative to the directory from which doxygen is
|
# Note that relative paths are relative to the directory from which doxygen is
|
||||||
# run.
|
# run.
|
||||||
|
|
||||||
EXCLUDE =
|
EXCLUDE = ${DOXY_EXCLUDE}
|
||||||
|
|
||||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||||
@@ -928,7 +922,7 @@ EXCLUDE_SYMBOLS =
|
|||||||
# that contain example code fragments that are included (see the \include
|
# that contain example code fragments that are included (see the \include
|
||||||
# command).
|
# command).
|
||||||
|
|
||||||
EXAMPLE_PATH = doc/examples
|
EXAMPLE_PATH = ${DOXY_EXAMPLE_PATH}
|
||||||
|
|
||||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
|
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
|
||||||
@@ -948,7 +942,7 @@ EXAMPLE_RECURSIVE = NO
|
|||||||
# that contain images that are to be included in the documentation (see the
|
# that contain images that are to be included in the documentation (see the
|
||||||
# \image command).
|
# \image command).
|
||||||
|
|
||||||
IMAGE_PATH = doc/images
|
IMAGE_PATH = ${DOXY_IMAGE_PATH}
|
||||||
|
|
||||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||||
@@ -1459,14 +1453,14 @@ QHP_CUST_FILTER_NAME = PIP
|
|||||||
# filters).
|
# filters).
|
||||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||||
|
|
||||||
QHP_CUST_FILTER_ATTRS = PIP
|
QHP_CUST_FILTER_ATTRS = ${DOXY_QHP_CUST_FILTER_ATTRS}
|
||||||
|
|
||||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||||
# http://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
# http://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
||||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||||
|
|
||||||
QHP_SECT_FILTER_ATTRS = PIP
|
QHP_SECT_FILTER_ATTRS = ${DOXY_QHP_SECT_FILTER_ATTRS}
|
||||||
|
|
||||||
# The QHG_LOCATION tag can be used to specify the location of Qt's
|
# The QHG_LOCATION tag can be used to specify the location of Qt's
|
||||||
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
|
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
|
||||||
@@ -2152,15 +2146,7 @@ SEARCH_INCLUDES = YES
|
|||||||
# preprocessor.
|
# preprocessor.
|
||||||
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
||||||
|
|
||||||
INCLUDE_PATH = src_main/code \
|
INCLUDE_PATH = ${DOXY_INCLUDE_PATH}
|
||||||
src_main/containers \
|
|
||||||
src_main/core \
|
|
||||||
src_main/math \
|
|
||||||
src_main/system \
|
|
||||||
src_main/thread \
|
|
||||||
src_main/console \
|
|
||||||
src_main/io_devices \
|
|
||||||
src_main/io_utils
|
|
||||||
|
|
||||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||||
@@ -2178,8 +2164,8 @@ INCLUDE_FILE_PATTERNS =
|
|||||||
# recursively expanded use the := operator instead of the = operator.
|
# recursively expanded use the := operator instead of the = operator.
|
||||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||||
|
|
||||||
PREDEFINED = DOXYGEN \
|
PREDEFINED = ${DOXY_DEFINES}
|
||||||
PIP_EXPORT
|
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||||
# tag can be used to specify a list of macro names that should be expanded. The
|
# tag can be used to specify a list of macro names that should be expanded. The
|
||||||
@@ -2272,14 +2258,14 @@ CLASS_DIAGRAMS = YES
|
|||||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||||
# default search path.
|
# default search path.
|
||||||
|
|
||||||
MSCGEN_PATH = "C:/Program Files/doxygen/graphviz/bin"
|
MSCGEN_PATH = ${DOXY_MSCGEN_PATH}
|
||||||
|
|
||||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||||
# then run dia to produce the diagram and insert it in the documentation. The
|
# then run dia to produce the diagram and insert it in the documentation. The
|
||||||
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
||||||
# If left empty dia is assumed to be found in the default search path.
|
# If left empty dia is assumed to be found in the default search path.
|
||||||
|
|
||||||
DIA_PATH = "C:/Program Files/doxygen/graphviz/bin"
|
DIA_PATH = ${DOXY_DIA_PATH}
|
||||||
|
|
||||||
# If set to YES the inheritance and collaboration graphs will hide inheritance
|
# If set to YES the inheritance and collaboration graphs will hide inheritance
|
||||||
# and usage relations if the target is undocumented or is not a class.
|
# and usage relations if the target is undocumented or is not a class.
|
||||||
@@ -2472,7 +2458,7 @@ INTERACTIVE_SVG = NO
|
|||||||
# found. If left blank, it is assumed the dot tool can be found in the path.
|
# found. If left blank, it is assumed the dot tool can be found in the path.
|
||||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||||
|
|
||||||
DOT_PATH = "C:/Program Files/doxygen/graphviz/bin"
|
DOT_PATH = ${DOXY_DOT_PATH}
|
||||||
|
|
||||||
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||||
# contain dot files that are included in the documentation (see the \dotfile
|
# contain dot files that are included in the documentation (see the \dotfile
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class PIP_EXPORT PIFFTW_Private
|
class PIFFTW_Private
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit PIFFTW_Private() {
|
explicit PIFFTW_Private() {
|
||||||
|
|||||||
@@ -23,10 +23,11 @@
|
|||||||
#ifndef PICCLOUDCLIENT_H
|
#ifndef PICCLOUDCLIENT_H
|
||||||
#define PICCLOUDCLIENT_H
|
#define PICCLOUDCLIENT_H
|
||||||
|
|
||||||
|
#include "pip_cloud_export.h"
|
||||||
#include "piiodevice.h"
|
#include "piiodevice.h"
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT PICloudClient {
|
class PIP_CLOUD_EXPORT PICloudClient {
|
||||||
public:
|
public:
|
||||||
//!
|
//!
|
||||||
explicit PICloudClient();
|
explicit PICloudClient();
|
||||||
|
|||||||
@@ -23,10 +23,11 @@
|
|||||||
#ifndef PICCLOUDSERVER_H
|
#ifndef PICCLOUDSERVER_H
|
||||||
#define PICCLOUDSERVER_H
|
#define PICCLOUDSERVER_H
|
||||||
|
|
||||||
|
#include "pip_cloud_export.h"
|
||||||
#include "piiodevice.h"
|
#include "piiodevice.h"
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT PICloudServer {
|
class PIP_CLOUD_EXPORT PICloudServer {
|
||||||
public:
|
public:
|
||||||
//!
|
//!
|
||||||
explicit PICloudServer();
|
explicit PICloudServer();
|
||||||
|
|||||||
@@ -23,9 +23,10 @@
|
|||||||
#ifndef PICCLOUDTCP_H
|
#ifndef PICCLOUDTCP_H
|
||||||
#define PICCLOUDTCP_H
|
#define PICCLOUDTCP_H
|
||||||
|
|
||||||
|
#include "pip_cloud_export.h"
|
||||||
#include "pistring.h"
|
#include "pistring.h"
|
||||||
|
|
||||||
class PIP_EXPORT PICloudTCP {
|
class PIP_CLOUD_EXPORT PICloudTCP {
|
||||||
public:
|
public:
|
||||||
//!
|
//!
|
||||||
PICloudTCP();
|
PICloudTCP();
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class PIVariant;
|
|||||||
|
|
||||||
namespace PICodeInfo {
|
namespace PICodeInfo {
|
||||||
|
|
||||||
enum PIP_EXPORT TypeFlag {
|
enum TypeFlag {
|
||||||
NoFlag,
|
NoFlag,
|
||||||
Const = 0x01,
|
Const = 0x01,
|
||||||
Static = 0x02,
|
Static = 0x02,
|
||||||
@@ -153,10 +153,10 @@ inline PICout operator <<(PICout s, const PICodeInfo::EnumInfo & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern PIMap<PIString, PICodeInfo::ClassInfo * > * classesInfo;
|
extern PIP_EXPORT PIMap<PIString, PICodeInfo::ClassInfo * > * classesInfo;
|
||||||
extern PIMap<PIString, PICodeInfo::EnumInfo * > * enumsInfo;
|
extern PIP_EXPORT PIMap<PIString, PICodeInfo::EnumInfo * > * enumsInfo;
|
||||||
extern PIMap<PIString, PICodeInfo::AccessValueFunction> * accessValueFunctions;
|
extern PIP_EXPORT PIMap<PIString, PICodeInfo::AccessValueFunction> * accessValueFunctions;
|
||||||
extern PIMap<PIString, PICodeInfo::AccessTypeFunction> * accessTypeFunctions;
|
extern PIP_EXPORT PIMap<PIString, PICodeInfo::AccessTypeFunction> * accessTypeFunctions;
|
||||||
|
|
||||||
inline PIByteArray getMemberValue(const void * p, const char * class_name, const char * member_name) {
|
inline PIByteArray getMemberValue(const void * p, const char * class_name, const char * member_name) {
|
||||||
if (!p || !class_name || !member_name || !accessValueFunctions) return PIByteArray();
|
if (!p || !class_name || !member_name || !accessValueFunctions) return PIByteArray();
|
||||||
@@ -172,11 +172,11 @@ inline const char * getMemberType(const char * class_name, const char * member_n
|
|||||||
return af(member_name);
|
return af(member_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
PIVariant getMemberAsVariant(const void * p, const char * class_name, const char * member_name);
|
PIP_EXPORT PIVariant getMemberAsVariant(const void * p, const char * class_name, const char * member_name);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class __PICodeInfoInitializer__ {
|
class PIP_EXPORT __PICodeInfoInitializer__ {
|
||||||
public:
|
public:
|
||||||
__PICodeInfoInitializer__() {
|
__PICodeInfoInitializer__() {
|
||||||
if (_inited_) return;
|
if (_inited_) return;
|
||||||
|
|||||||
@@ -186,6 +186,9 @@ void PICodeParser::clear() {
|
|||||||
evaluator.clearCustomVariables();
|
evaluator.clearCustomVariables();
|
||||||
cur_def_vis = Global;
|
cur_def_vis = Global;
|
||||||
anon_num = 0;
|
anon_num = 0;
|
||||||
|
PIStringList defs = PIStringAscii(PICODE_DEFINES).split(",");
|
||||||
|
piForeachC (PIString & d, defs)
|
||||||
|
defines << Define(d, "");
|
||||||
defines << Define(PIStringAscii("PICODE"), "") << custom_defines;
|
defines << Define(PIStringAscii("PICODE"), "") << custom_defines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ class PIP_EXPORT PICodeParser {
|
|||||||
public:
|
public:
|
||||||
PICodeParser();
|
PICodeParser();
|
||||||
|
|
||||||
enum PIP_EXPORT Visibility {Global, Public, Protected, Private};
|
enum Visibility {Global, Public, Protected, Private};
|
||||||
enum PIP_EXPORT Attribute {
|
enum Attribute {
|
||||||
NoAttributes = 0x0,
|
NoAttributes = 0x0,
|
||||||
Const = 0x01,
|
Const = 0x01,
|
||||||
Static = 0x02,
|
Static = 0x02,
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ private:
|
|||||||
static const EscSeq esc_seq[];
|
static const EscSeq esc_seq[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
KBFunc ret_func;
|
KBFunc ret_func;
|
||||||
int exit_key;
|
int exit_key;
|
||||||
bool exit_enabled, is_active;
|
bool exit_enabled, is_active;
|
||||||
|
|||||||
@@ -23,11 +23,12 @@
|
|||||||
#ifndef PISCREEN_H
|
#ifndef PISCREEN_H
|
||||||
#define PISCREEN_H
|
#define PISCREEN_H
|
||||||
|
|
||||||
|
#include "pip_console_export.h"
|
||||||
#include "piscreentile.h"
|
#include "piscreentile.h"
|
||||||
#include "piscreendrawer.h"
|
#include "piscreendrawer.h"
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT PIScreen: public PIThread, public PIScreenTypes::PIScreenBase
|
class PIP_CONSOLE_EXPORT PIScreen: public PIThread, public PIScreenTypes::PIScreenBase
|
||||||
{
|
{
|
||||||
PIOBJECT_SUBCLASS(PIScreen, PIThread)
|
PIOBJECT_SUBCLASS(PIScreen, PIThread)
|
||||||
class SystemConsole;
|
class SystemConsole;
|
||||||
@@ -100,7 +101,7 @@ public:
|
|||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class SystemConsole {
|
class PIP_CONSOLE_EXPORT SystemConsole {
|
||||||
public:
|
public:
|
||||||
SystemConsole();
|
SystemConsole();
|
||||||
~SystemConsole();
|
~SystemConsole();
|
||||||
@@ -124,7 +125,7 @@ private:
|
|||||||
#else
|
#else
|
||||||
PIString formatString(const PIScreenTypes::Cell & c);
|
PIString formatString(const PIScreenTypes::Cell & c);
|
||||||
#endif
|
#endif
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_CONSOLE_EXPORT)
|
||||||
int width, height, pwidth, pheight;
|
int width, height, pwidth, pheight;
|
||||||
int mouse_x, mouse_y;
|
int mouse_x, mouse_y;
|
||||||
PIVector<PIVector<PIScreenTypes::Cell> > cells, pcells;
|
PIVector<PIVector<PIScreenTypes::Cell> > cells, pcells;
|
||||||
|
|||||||
@@ -25,12 +25,13 @@
|
|||||||
#ifndef PISCREENCONSOLE_H
|
#ifndef PISCREENCONSOLE_H
|
||||||
#define PISCREENCONSOLE_H
|
#define PISCREENCONSOLE_H
|
||||||
|
|
||||||
|
#include "pip_console_export.h"
|
||||||
#include "piscreentiles.h"
|
#include "piscreentiles.h"
|
||||||
|
|
||||||
/// NOTE: incomplete class
|
/// NOTE: incomplete class
|
||||||
/// TODO: write TileVars
|
/// TODO: write TileVars
|
||||||
|
|
||||||
class PIP_EXPORT TileVars: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileVars: public PIScreenTile {
|
||||||
public:
|
public:
|
||||||
TileVars(const PIString & n = PIString());
|
TileVars(const PIString & n = PIString());
|
||||||
protected:
|
protected:
|
||||||
@@ -68,7 +69,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT PIScreenConsoleTile : public PIScreenTile
|
class PIP_CONSOLE_EXPORT PIScreenConsoleTile : public PIScreenTile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PIScreenConsoleTile();
|
PIScreenConsoleTile();
|
||||||
|
|||||||
@@ -23,10 +23,11 @@
|
|||||||
#ifndef PISCREENDRAWER_H
|
#ifndef PISCREENDRAWER_H
|
||||||
#define PISCREENDRAWER_H
|
#define PISCREENDRAWER_H
|
||||||
|
|
||||||
|
#include "pip_console_export.h"
|
||||||
#include "piscreentypes.h"
|
#include "piscreentypes.h"
|
||||||
#include "pistring.h"
|
#include "pistring.h"
|
||||||
|
|
||||||
class PIP_EXPORT PIScreenDrawer
|
class PIP_CONSOLE_EXPORT PIScreenDrawer
|
||||||
{
|
{
|
||||||
friend class PIScreen;
|
friend class PIScreen;
|
||||||
PIScreenDrawer(PIVector<PIVector<PIScreenTypes::Cell> > & c);
|
PIScreenDrawer(PIVector<PIVector<PIScreenTypes::Cell> > & c);
|
||||||
|
|||||||
@@ -23,12 +23,13 @@
|
|||||||
#ifndef PISCREENTILE_H
|
#ifndef PISCREENTILE_H
|
||||||
#define PISCREENTILE_H
|
#define PISCREENTILE_H
|
||||||
|
|
||||||
|
#include "pip_console_export.h"
|
||||||
#include "piscreentypes.h"
|
#include "piscreentypes.h"
|
||||||
#include "pikbdlistener.h"
|
#include "pikbdlistener.h"
|
||||||
|
|
||||||
class PIScreenDrawer;
|
class PIScreenDrawer;
|
||||||
|
|
||||||
class PIP_EXPORT PIScreenTile: public PIObject {
|
class PIP_CONSOLE_EXPORT PIScreenTile: public PIObject {
|
||||||
friend class PIScreen;
|
friend class PIScreen;
|
||||||
PIOBJECT_SUBCLASS(PIScreenTile, PIObject)
|
PIOBJECT_SUBCLASS(PIScreenTile, PIObject)
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -23,10 +23,11 @@
|
|||||||
#ifndef PISCREENTILES_H
|
#ifndef PISCREENTILES_H
|
||||||
#define PISCREENTILES_H
|
#define PISCREENTILES_H
|
||||||
|
|
||||||
|
#include "pip_console_export.h"
|
||||||
#include "piscreentile.h"
|
#include "piscreentile.h"
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT TileSimple: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileSimple: public PIScreenTile {
|
||||||
PIOBJECT_SUBCLASS(TileSimple, PIScreenTile)
|
PIOBJECT_SUBCLASS(TileSimple, PIScreenTile)
|
||||||
public:
|
public:
|
||||||
typedef PIPair<PIString, PIScreenTypes::CellFormat> Row;
|
typedef PIPair<PIString, PIScreenTypes::CellFormat> Row;
|
||||||
@@ -43,7 +44,7 @@ protected:
|
|||||||
|
|
||||||
class TileList;
|
class TileList;
|
||||||
|
|
||||||
class PIP_EXPORT TileScrollBar: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileScrollBar: public PIScreenTile {
|
||||||
PIOBJECT_SUBCLASS(TileScrollBar, PIScreenTile)
|
PIOBJECT_SUBCLASS(TileScrollBar, PIScreenTile)
|
||||||
friend class TileList;
|
friend class TileList;
|
||||||
public:
|
public:
|
||||||
@@ -66,7 +67,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT TileList: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileList: public PIScreenTile {
|
||||||
PIOBJECT_SUBCLASS(TileList, PIScreenTile)
|
PIOBJECT_SUBCLASS(TileList, PIScreenTile)
|
||||||
public:
|
public:
|
||||||
TileList(const PIString & n = PIString());
|
TileList(const PIString & n = PIString());
|
||||||
@@ -98,7 +99,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT TileButton: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileButton: public PIScreenTile {
|
||||||
PIOBJECT_SUBCLASS(TileButton, PIScreenTile)
|
PIOBJECT_SUBCLASS(TileButton, PIScreenTile)
|
||||||
public:
|
public:
|
||||||
TileButton(const PIString & n = PIString());
|
TileButton(const PIString & n = PIString());
|
||||||
@@ -118,7 +119,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT TileButtons: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileButtons: public PIScreenTile {
|
||||||
PIOBJECT_SUBCLASS(TileButtons, PIScreenTile)
|
PIOBJECT_SUBCLASS(TileButtons, PIScreenTile)
|
||||||
public:
|
public:
|
||||||
TileButtons(const PIString & n = PIString());
|
TileButtons(const PIString & n = PIString());
|
||||||
@@ -143,7 +144,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT TileCheck: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileCheck: public PIScreenTile {
|
||||||
PIOBJECT_SUBCLASS(TileCheck, PIScreenTile)
|
PIOBJECT_SUBCLASS(TileCheck, PIScreenTile)
|
||||||
public:
|
public:
|
||||||
TileCheck(const PIString & n = PIString());
|
TileCheck(const PIString & n = PIString());
|
||||||
@@ -162,7 +163,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT TileProgress: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileProgress: public PIScreenTile {
|
||||||
PIOBJECT_SUBCLASS(TileProgress, PIScreenTile)
|
PIOBJECT_SUBCLASS(TileProgress, PIScreenTile)
|
||||||
public:
|
public:
|
||||||
TileProgress(const PIString & n = PIString());
|
TileProgress(const PIString & n = PIString());
|
||||||
@@ -178,7 +179,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT TilePICout: public TileList {
|
class PIP_CONSOLE_EXPORT TilePICout: public TileList {
|
||||||
PIOBJECT_SUBCLASS(TilePICout, PIScreenTile)
|
PIOBJECT_SUBCLASS(TilePICout, PIScreenTile)
|
||||||
public:
|
public:
|
||||||
TilePICout(const PIString & n = PIString());
|
TilePICout(const PIString & n = PIString());
|
||||||
@@ -191,7 +192,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT TileInput: public PIScreenTile {
|
class PIP_CONSOLE_EXPORT TileInput: public PIScreenTile {
|
||||||
PIOBJECT_SUBCLASS(TileInput, PIScreenTile)
|
PIOBJECT_SUBCLASS(TileInput, PIScreenTile)
|
||||||
public:
|
public:
|
||||||
TileInput(const PIString & n = PIString());
|
TileInput(const PIString & n = PIString());
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#ifndef PISCREENTYPES_H
|
#ifndef PISCREENTYPES_H
|
||||||
#define PISCREENTYPES_H
|
#define PISCREENTYPES_H
|
||||||
|
|
||||||
|
#include "pip_console_export.h"
|
||||||
#include "pivariant.h"
|
#include "pivariant.h"
|
||||||
|
|
||||||
class PIScreenTile;
|
class PIScreenTile;
|
||||||
@@ -30,7 +31,7 @@ class PIScreenTile;
|
|||||||
namespace PIScreenTypes {
|
namespace PIScreenTypes {
|
||||||
|
|
||||||
//! Color for chars or background
|
//! Color for chars or background
|
||||||
enum PIP_EXPORT Color {
|
enum Color {
|
||||||
Default /** Default */,
|
Default /** Default */,
|
||||||
Black /** Black */,
|
Black /** Black */,
|
||||||
Red /** Red */,
|
Red /** Red */,
|
||||||
@@ -44,7 +45,7 @@ namespace PIScreenTypes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Flags for chars
|
//! Flags for chars
|
||||||
enum PIP_EXPORT CharFlag {
|
enum CharFlag {
|
||||||
Bold /** Bold or bright */ = 0x1,
|
Bold /** Bold or bright */ = 0x1,
|
||||||
Blink /** Blink text */ = 0x2,
|
Blink /** Blink text */ = 0x2,
|
||||||
Underline /** Underline text */ = 0x4,
|
Underline /** Underline text */ = 0x4,
|
||||||
@@ -52,14 +53,14 @@ namespace PIScreenTypes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Alignment
|
//! Alignment
|
||||||
enum PIP_EXPORT Alignment {
|
enum Alignment {
|
||||||
Left /** Left */ ,
|
Left /** Left */ ,
|
||||||
Center /** Center */ ,
|
Center /** Center */ ,
|
||||||
Right /** Right */
|
Right /** Right */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Size policy
|
//! Size policy
|
||||||
enum PIP_EXPORT SizePolicy {
|
enum SizePolicy {
|
||||||
Fixed /** Fixed size */ ,
|
Fixed /** Fixed size */ ,
|
||||||
Preferred /** Preferred size */ ,
|
Preferred /** Preferred size */ ,
|
||||||
Expanding /** Maximum available size */ ,
|
Expanding /** Maximum available size */ ,
|
||||||
@@ -67,13 +68,13 @@ namespace PIScreenTypes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Direction
|
//! Direction
|
||||||
enum PIP_EXPORT Direction {
|
enum Direction {
|
||||||
Horizontal /** Horizontal */ ,
|
Horizontal /** Horizontal */ ,
|
||||||
Vertical /** Vertical */
|
Vertical /** Vertical */
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Focus flags
|
//! Focus flags
|
||||||
enum PIP_EXPORT FocusFlag {
|
enum FocusFlag {
|
||||||
CanHasFocus /** Tile can has focus */ = 0x1,
|
CanHasFocus /** Tile can has focus */ = 0x1,
|
||||||
NextByTab /** Focus passed to next tile by tab key */ = 0x2,
|
NextByTab /** Focus passed to next tile by tab key */ = 0x2,
|
||||||
NextByArrowsHorizontal /** Focus passed to next tile by arrow keys left or right */ = 0x4,
|
NextByArrowsHorizontal /** Focus passed to next tile by arrow keys left or right */ = 0x4,
|
||||||
@@ -87,7 +88,7 @@ namespace PIScreenTypes {
|
|||||||
typedef PIFlags<CharFlag> CharFlags;
|
typedef PIFlags<CharFlag> CharFlags;
|
||||||
typedef PIFlags<FocusFlag> FocusFlags;
|
typedef PIFlags<FocusFlag> FocusFlags;
|
||||||
|
|
||||||
union PIP_EXPORT CellFormat {
|
union PIP_CONSOLE_EXPORT CellFormat {
|
||||||
CellFormat(ushort f = 0) {raw_format = f;}
|
CellFormat(ushort f = 0) {raw_format = f;}
|
||||||
CellFormat(Color col_char, Color col_back = Default, CharFlags flags_ = 0) {
|
CellFormat(Color col_char, Color col_back = Default, CharFlags flags_ = 0) {
|
||||||
color_char = col_char;
|
color_char = col_char;
|
||||||
@@ -104,7 +105,7 @@ namespace PIScreenTypes {
|
|||||||
bool operator !=(const CellFormat & c) const {return raw_format != c.raw_format;}
|
bool operator !=(const CellFormat & c) const {return raw_format != c.raw_format;}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PIP_EXPORT Cell {
|
struct PIP_CONSOLE_EXPORT Cell {
|
||||||
Cell(PIChar c = PIChar(' '), CellFormat f = CellFormat()) {symbol = c; format = f;}
|
Cell(PIChar c = PIChar(' '), CellFormat f = CellFormat()) {symbol = c; format = f;}
|
||||||
CellFormat format;
|
CellFormat format;
|
||||||
PIChar symbol;
|
PIChar symbol;
|
||||||
@@ -120,7 +121,7 @@ namespace PIScreenTypes {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PIP_EXPORT TileEvent {
|
struct PIP_CONSOLE_EXPORT TileEvent {
|
||||||
TileEvent(int t = -1, const PIVariant & d = PIVariant()): type(t), data(d) {}
|
TileEvent(int t = -1, const PIVariant & d = PIVariant()): type(t), data(d) {}
|
||||||
int type;
|
int type;
|
||||||
PIVariant data;
|
PIVariant data;
|
||||||
|
|||||||
@@ -23,11 +23,12 @@
|
|||||||
#ifndef PITERMINAL_H
|
#ifndef PITERMINAL_H
|
||||||
#define PITERMINAL_H
|
#define PITERMINAL_H
|
||||||
|
|
||||||
|
#include "pip_console_export.h"
|
||||||
#include "pikbdlistener.h"
|
#include "pikbdlistener.h"
|
||||||
#include "piscreentypes.h"
|
#include "piscreentypes.h"
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT PITerminal: public PIThread
|
class PIP_CONSOLE_EXPORT PITerminal: public PIThread
|
||||||
{
|
{
|
||||||
PIOBJECT_SUBCLASS(PITerminal, PIThread)
|
PIOBJECT_SUBCLASS(PITerminal, PIThread)
|
||||||
public:
|
public:
|
||||||
@@ -63,7 +64,7 @@ private:
|
|||||||
int termType(const PIString & t);
|
int termType(const PIString & t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_CONSOLE_EXPORT)
|
||||||
int dsize_x, dsize_y;
|
int dsize_x, dsize_y;
|
||||||
int size_x, size_y, cursor_x, cursor_y;
|
int size_x, size_y, cursor_x, cursor_y;
|
||||||
bool cursor_blink, cursor_visible;
|
bool cursor_blink, cursor_visible;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
class PICout;
|
class PICout;
|
||||||
|
|
||||||
template<typename Type0, typename Type1>
|
template<typename Type0, typename Type1>
|
||||||
class PIP_EXPORT PIPair {
|
class PIPair {
|
||||||
public:
|
public:
|
||||||
PIPair() {first = Type0(); second = Type1();}
|
PIPair() {first = Type0(); second = Type1();}
|
||||||
PIPair(const Type0 & value0, const Type1 & value1) {first = value0; second = value1;}
|
PIPair(const Type0 & value0, const Type1 & value1) {first = value0; second = value1;}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class PIP_EXPORT PIQueue: public PIDeque<T> {
|
class PIQueue: public PIDeque<T> {
|
||||||
public:
|
public:
|
||||||
PIQueue() {}
|
PIQueue() {}
|
||||||
virtual ~PIQueue() {}
|
virtual ~PIQueue() {}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
* has logarithmic complexity.
|
* has logarithmic complexity.
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class PIP_EXPORT PISet: public PIMap<T, uchar> {
|
class PISet: public PIMap<T, uchar> {
|
||||||
typedef PIMap<T, uchar> _CSet;
|
typedef PIMap<T, uchar> _CSet;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#include "pivector.h"
|
#include "pivector.h"
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class PIP_EXPORT PIStack: public PIVector<T> {
|
class PIStack: public PIVector<T> {
|
||||||
public:
|
public:
|
||||||
PIStack() {;}
|
PIStack() {;}
|
||||||
virtual ~PIStack() {;}
|
virtual ~PIStack() {;}
|
||||||
|
|||||||
@@ -192,10 +192,10 @@
|
|||||||
|
|
||||||
// Private data macros
|
// Private data macros
|
||||||
|
|
||||||
#define PRIVATE_DECLARATION \
|
#define PRIVATE_DECLARATION(e) \
|
||||||
struct __Private__; \
|
struct __Private__; \
|
||||||
friend struct __Private__; \
|
friend struct __Private__; \
|
||||||
struct __PrivateInitializer__ { \
|
struct e __PrivateInitializer__ { \
|
||||||
__PrivateInitializer__(); \
|
__PrivateInitializer__(); \
|
||||||
__PrivateInitializer__(const __PrivateInitializer__ & o); \
|
__PrivateInitializer__(const __PrivateInitializer__ & o); \
|
||||||
~__PrivateInitializer__(); \
|
~__PrivateInitializer__(); \
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ inline std::ostream & operator <<(std::ostream & s, const PIByteArray & ba);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! \relatesalso PIByteArray \brief Output to PICout operator
|
//! \relatesalso PIByteArray \brief Output to PICout operator
|
||||||
PICout operator <<(PICout s, const PIByteArray & ba);
|
PIP_EXPORT PICout operator <<(PICout s, const PIByteArray & ba);
|
||||||
|
|
||||||
#define PBA_OPERATOR_TO int os = s.size_s(); s.enlarge(sizeof(v)); memcpy(s.data(os), &v, sizeof(v));
|
#define PBA_OPERATOR_TO int os = s.size_s(); s.enlarge(sizeof(v)); memcpy(s.data(os), &v, sizeof(v));
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ inline PIByteArray & operator >>(PIByteArray & s, ldouble & v) {assert(s.size()
|
|||||||
//! \relatesalso PIByteArray \brief Restore operator
|
//! \relatesalso PIByteArray \brief Restore operator
|
||||||
template<typename T> inline PIByteArray & operator >>(PIByteArray & s, PIFlags<T> & v) {PBA_OPERATOR_FROM return s;}
|
template<typename T> inline PIByteArray & operator >>(PIByteArray & s, PIFlags<T> & v) {PBA_OPERATOR_FROM return s;}
|
||||||
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
|
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
|
||||||
PIByteArray & operator >>(PIByteArray & s, PIByteArray & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PIByteArray & v);
|
||||||
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
|
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
|
||||||
inline PIByteArray & operator >>(PIByteArray & s, PIByteArray::RawData v) {assert(s.size_s() >= v.s); if (v.s > 0) memcpy((void*)(v.d), s.data(), v.s); s.remove(0, v.s); return s;}
|
inline PIByteArray & operator >>(PIByteArray & s, PIByteArray::RawData v) {assert(s.size_s() >= v.s); if (v.s > 0) memcpy((void*)(v.d), s.data(), v.s); s.remove(0, v.s); return s;}
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
|
|
||||||
#include "piincludes.h"
|
#include "piincludes.h"
|
||||||
|
|
||||||
extern char * __syslocname__;
|
extern PIP_EXPORT char * __syslocname__;
|
||||||
extern char * __sysoemname__;
|
extern PIP_EXPORT char * __sysoemname__;
|
||||||
extern char * __utf8name__;
|
extern PIP_EXPORT char * __utf8name__;
|
||||||
|
|
||||||
class PIP_EXPORT PIChar
|
class PIP_EXPORT PIChar
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class PIObject;
|
|||||||
namespace PICoutManipulators {
|
namespace PICoutManipulators {
|
||||||
|
|
||||||
//! \brief Enum contains special characters
|
//! \brief Enum contains special characters
|
||||||
enum PIP_EXPORT PICoutSpecialChar {
|
enum PICoutSpecialChar {
|
||||||
Null /*! Null-character, '\\0' */,
|
Null /*! Null-character, '\\0' */,
|
||||||
NewLine /*! New line character, '\\n' */,
|
NewLine /*! New line character, '\\n' */,
|
||||||
Tab /*! Tab character, '\\t' */,
|
Tab /*! Tab character, '\\t' */,
|
||||||
@@ -55,7 +55,7 @@ namespace PICoutManipulators {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Enum contains immediate action
|
//! \brief Enum contains immediate action
|
||||||
enum PIP_EXPORT PICoutAction {
|
enum PICoutAction {
|
||||||
Flush /*! Flush the output */,
|
Flush /*! Flush the output */,
|
||||||
Backspace /*! Remove last symbol */,
|
Backspace /*! Remove last symbol */,
|
||||||
ShowCursor /*! Show cursor */,
|
ShowCursor /*! Show cursor */,
|
||||||
@@ -67,7 +67,7 @@ namespace PICoutManipulators {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Enum contains control of PICout
|
//! \brief Enum contains control of PICout
|
||||||
enum PIP_EXPORT PICoutControl {
|
enum PICoutControl {
|
||||||
AddNone /*! No controls */ = 0x0,
|
AddNone /*! No controls */ = 0x0,
|
||||||
AddSpaces /*! Spaces will be appear after each output */ = 0x1,
|
AddSpaces /*! Spaces will be appear after each output */ = 0x1,
|
||||||
AddNewLine /*! New line will be appear after all output */ = 0x2,
|
AddNewLine /*! New line will be appear after all output */ = 0x2,
|
||||||
@@ -78,7 +78,7 @@ namespace PICoutManipulators {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Enum contains output format
|
//! \brief Enum contains output format
|
||||||
enum PIP_EXPORT PICoutFormat {
|
enum PICoutFormat {
|
||||||
Bin /*! Binary representation of integers */ = 0x01,
|
Bin /*! Binary representation of integers */ = 0x01,
|
||||||
Oct /*! Octal representation of integers */ = 0x02,
|
Oct /*! Octal representation of integers */ = 0x02,
|
||||||
Dec /*! Decimal representation of integers */ = 0x04,
|
Dec /*! Decimal representation of integers */ = 0x04,
|
||||||
@@ -128,7 +128,7 @@ public:
|
|||||||
|
|
||||||
~PICout();
|
~PICout();
|
||||||
|
|
||||||
class Notifier {
|
class PIP_EXPORT Notifier {
|
||||||
public:
|
public:
|
||||||
static Notifier * instance();
|
static Notifier * instance();
|
||||||
static PIObject * object();
|
static PIObject * object();
|
||||||
@@ -291,7 +291,7 @@ private:
|
|||||||
void applyFormat(PICoutManipulators::PICoutFormat f);
|
void applyFormat(PICoutManipulators::PICoutFormat f);
|
||||||
|
|
||||||
static OutputDevices devs;
|
static OutputDevices devs;
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
bool fo_, cc_, fc_, act_;
|
bool fo_, cc_, fc_, act_;
|
||||||
int cnb_, attr_, id_;
|
int cnb_, attr_, id_;
|
||||||
PIString * buffer_;
|
PIString * buffer_;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
* \snippet piincludes.cpp flags
|
* \snippet piincludes.cpp flags
|
||||||
*/
|
*/
|
||||||
template<typename Enum>
|
template<typename Enum>
|
||||||
class PIP_EXPORT PIFlags {
|
class PIFlags {
|
||||||
public:
|
public:
|
||||||
//! Constructor with flags = 0
|
//! Constructor with flags = 0
|
||||||
PIFlags(): flags(0) {;}
|
PIFlags(): flags(0) {;}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class PICout;
|
|||||||
|
|
||||||
struct lconv;
|
struct lconv;
|
||||||
|
|
||||||
extern lconv * currentLocale;
|
extern PIP_EXPORT lconv * currentLocale;
|
||||||
|
|
||||||
/*! \fn errorString()
|
/*! \fn errorString()
|
||||||
* \brief Return readable error description in format "code <number> - <description>" */
|
* \brief Return readable error description in format "code <number> - <description>" */
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ private:
|
|||||||
explicit PIInit();
|
explicit PIInit();
|
||||||
void setFileCharset(const char *charset);
|
void setFileCharset(const char *charset);
|
||||||
bool fileExists(const PIString & p);
|
bool fileExists(const PIString & p);
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
char * file_charset;
|
char * file_charset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -800,7 +800,7 @@ public:
|
|||||||
static bool isTypeOf(const void * o) {return isTypeOf<T>((PIObject*)o);}
|
static bool isTypeOf(const void * o) {return isTypeOf<T>((PIObject*)o);}
|
||||||
static PIString simplifyType(const char * a);
|
static PIString simplifyType(const char * a);
|
||||||
|
|
||||||
struct __MetaFunc {
|
struct PIP_EXPORT __MetaFunc {
|
||||||
__MetaFunc(): addr(0), addrV(0) {;}
|
__MetaFunc(): addr(0), addrV(0) {;}
|
||||||
bool isNull() const {return addr == 0;}
|
bool isNull() const {return addr == 0;}
|
||||||
PIString arguments() const;
|
PIString arguments() const;
|
||||||
@@ -813,7 +813,7 @@ public:
|
|||||||
PIStringList types;
|
PIStringList types;
|
||||||
PIStringList names;
|
PIStringList names;
|
||||||
};
|
};
|
||||||
struct __MetaData {
|
struct PIP_EXPORT __MetaData {
|
||||||
__MetaData() {scope_list << PIStringAscii("PIObject"); scope_id << PIStringAscii("PIObject").hash();}
|
__MetaData() {scope_list << PIStringAscii("PIObject"); scope_id << PIStringAscii("PIObject").hash();}
|
||||||
void addScope(const PIString & s, uint shash);
|
void addScope(const PIString & s, uint shash);
|
||||||
PIStringList scope_list;
|
PIStringList scope_list;
|
||||||
@@ -919,7 +919,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void dumpApplication();
|
PIP_EXPORT void dumpApplication();
|
||||||
bool dumpApplicationToFile(const PIString & path);
|
PIP_EXPORT bool dumpApplicationToFile(const PIString & path);
|
||||||
|
|
||||||
#endif // PIOBJECT_H
|
#endif // PIOBJECT_H
|
||||||
|
|||||||
@@ -32,14 +32,14 @@
|
|||||||
* contains unique name and you can identify property by name with propertyValueByName(), propertyByName().
|
* contains unique name and you can identify property by name with propertyValueByName(), propertyByName().
|
||||||
* You can add property using addProperty(const Property&), addProperty(const PIString&, const PIVariant&, const PIString&, int).
|
* You can add property using addProperty(const Property&), addProperty(const PIString&, const PIVariant&, const PIString&, int).
|
||||||
*/
|
*/
|
||||||
class PIPropertyStorage {
|
class PIP_EXPORT PIPropertyStorage {
|
||||||
public:
|
public:
|
||||||
PIPropertyStorage() {}
|
PIPropertyStorage() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief PIPropertyStorage element.
|
* @brief PIPropertyStorage element.
|
||||||
*/
|
*/
|
||||||
struct Property {
|
struct PIP_EXPORT Property {
|
||||||
Property(const PIString & n = PIString(), const PIString & c = PIString(), const PIVariant & v = PIVariant(), int f = 0):
|
Property(const PIString & n = PIString(), const PIString & c = PIString(), const PIVariant & v = PIVariant(), int f = 0):
|
||||||
name(n), comment(c), value(v), flags(f) {}
|
name(n), comment(c), value(v), flags(f) {}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class PIP_EXPORT __PIVariantFunctions__ {
|
class __PIVariantFunctions__ {
|
||||||
public:
|
public:
|
||||||
static PIString typeNameHelper() {return PIStringAscii("");}
|
static PIString typeNameHelper() {return PIStringAscii("");}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ struct PIP_EXPORT __PIVariantInfo__ {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct PIP_EXPORT __PIVariantTypeInfo__ {
|
struct __PIVariantTypeInfo__ {
|
||||||
typedef T PureType;
|
typedef T PureType;
|
||||||
typedef const T ConstPureType;
|
typedef const T ConstPureType;
|
||||||
typedef T * PointerType;
|
typedef T * PointerType;
|
||||||
@@ -102,7 +102,7 @@ REGISTER_VARIANT_TYPEINFO(ns::classname)
|
|||||||
|
|
||||||
#define REGISTER_VARIANT_CPP(classname) \
|
#define REGISTER_VARIANT_CPP(classname) \
|
||||||
template <typename T> \
|
template <typename T> \
|
||||||
class PIP_EXPORT __##classname##_PIVariantInitializer__ { \
|
class __##classname##_PIVariantInitializer__ { \
|
||||||
public: \
|
public: \
|
||||||
__##classname##_PIVariantInitializer__(const PIString & name) { \
|
__##classname##_PIVariantInitializer__(const PIString & name) { \
|
||||||
if (__PIVariantInfoStorage__::get()->map->contains(name)) \
|
if (__PIVariantInfoStorage__::get()->map->contains(name)) \
|
||||||
@@ -115,7 +115,7 @@ public: \
|
|||||||
|
|
||||||
#define REGISTER_NS_VARIANT_CPP(ns, classname) \
|
#define REGISTER_NS_VARIANT_CPP(ns, classname) \
|
||||||
template <typename T> \
|
template <typename T> \
|
||||||
class PIP_EXPORT __##ns##classname##_PIVariantInitializer__ { \
|
class __##ns##classname##_PIVariantInitializer__ { \
|
||||||
public: \
|
public: \
|
||||||
__##ns##classname##_PIVariantInitializer__(const PIString & name) { \
|
__##ns##classname##_PIVariantInitializer__(const PIString & name) { \
|
||||||
if (__PIVariantInfoStorage__::get()->map->contains(name)) \
|
if (__PIVariantInfoStorage__::get()->map->contains(name)) \
|
||||||
@@ -155,7 +155,7 @@ PIByteArray __PIVariantFunctions__<classname_from>::castHelper<classname_to>(PIB
|
|||||||
PIByteArray ret; ret << t; \
|
PIByteArray ret; ret << t; \
|
||||||
return ret;} \
|
return ret;} \
|
||||||
template <typename T, typename C> \
|
template <typename T, typename C> \
|
||||||
class PIP_EXPORT __##classname_from##_##classname_to##_PIVariantCastInitializer__ { \
|
class __##classname_from##_##classname_to##_PIVariantCastInitializer__ { \
|
||||||
public: \
|
public: \
|
||||||
__##classname_from##_##classname_to##_PIVariantCastInitializer__(const PIString & name, const PIString & cname) { \
|
__##classname_from##_##classname_to##_PIVariantCastInitializer__(const PIString & name, const PIString & cname) { \
|
||||||
__PIVariantInfo__ * vi(__PIVariantInfoStorage__::get()->map->value(name, 0)); \
|
__PIVariantInfo__ * vi(__PIVariantInfoStorage__::get()->map->value(name, 0)); \
|
||||||
@@ -206,7 +206,7 @@ class PIP_EXPORT PIVariant {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//! Type of %PIVariant content
|
//! Type of %PIVariant content
|
||||||
enum PIP_EXPORT Type {
|
enum Type {
|
||||||
pivInvalid /** Invalid type , default type of empty contructor */ = 0 ,
|
pivInvalid /** Invalid type , default type of empty contructor */ = 0 ,
|
||||||
pivBool /** bool */ ,
|
pivBool /** bool */ ,
|
||||||
pivChar /** char */ ,
|
pivChar /** char */ ,
|
||||||
|
|||||||
@@ -23,11 +23,12 @@
|
|||||||
#ifndef PIAUTH_H
|
#ifndef PIAUTH_H
|
||||||
#define PIAUTH_H
|
#define PIAUTH_H
|
||||||
|
|
||||||
|
#include "pip_crypt_export.h"
|
||||||
#include "piobject.h"
|
#include "piobject.h"
|
||||||
#include "picrypt.h"
|
#include "picrypt.h"
|
||||||
|
|
||||||
|
|
||||||
class PIP_EXPORT PIAuth : public PIObject
|
class PIP_CRYPT_EXPORT PIAuth : public PIObject
|
||||||
{
|
{
|
||||||
PIOBJECT(PIAuth)
|
PIOBJECT(PIAuth)
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -23,9 +23,10 @@
|
|||||||
#ifndef PICRYPT_H
|
#ifndef PICRYPT_H
|
||||||
#define PICRYPT_H
|
#define PICRYPT_H
|
||||||
|
|
||||||
|
#include "pip_crypt_export.h"
|
||||||
#include "pistring.h"
|
#include "pistring.h"
|
||||||
|
|
||||||
class PIP_EXPORT PICrypt {
|
class PIP_CRYPT_EXPORT PICrypt {
|
||||||
public:
|
public:
|
||||||
//! Construct and generate random key
|
//! Construct and generate random key
|
||||||
PICrypt();
|
PICrypt();
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ class PIP_EXPORT PIGeoPosition : public PIMathVectorT3d
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum CoordinateSystem
|
enum CoordinateSystem {
|
||||||
{
|
|
||||||
Unknown=0, /// Unknown coordinate system
|
Unknown=0, /// Unknown coordinate system
|
||||||
Geodetic, /// Geodetic latitude, longitude, and height above ellipsoid
|
Geodetic, /// Geodetic latitude, longitude, and height above ellipsoid
|
||||||
Geocentric, /// Geocentric (regular spherical coordinates)
|
Geocentric, /// Geocentric (regular spherical coordinates)
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
PIVector<TypeInfo> getInfo() const;
|
PIVector<TypeInfo> getInfo() const;
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct _Type {
|
struct PIP_EXPORT _Type {
|
||||||
_Type();
|
_Type();
|
||||||
uint id;
|
uint id;
|
||||||
uint count;
|
uint count;
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
struct TypeInfo: _Type {
|
struct PIP_EXPORT TypeInfo: _Type {
|
||||||
PIString name;
|
PIString name;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
mutable PIMutex mutex;
|
mutable PIMutex mutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
PIByteArray & operator <<(PIByteArray & s, const PIIntrospectionContainers::TypeInfo & v);
|
PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PIIntrospectionContainers::TypeInfo & v);
|
||||||
PIByteArray & operator >>(PIByteArray & s, PIIntrospectionContainers::TypeInfo & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PIIntrospectionContainers::TypeInfo & v);
|
||||||
|
|
||||||
#endif // PIINTROSPECTION_CONTAINERS_P_H
|
#endif // PIINTROSPECTION_CONTAINERS_P_H
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#include "pisystemmonitor.h"
|
#include "pisystemmonitor.h"
|
||||||
|
|
||||||
|
|
||||||
class PIIntrospection {
|
class PIP_EXPORT PIIntrospection {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum InfoTypes {
|
enum InfoTypes {
|
||||||
@@ -38,12 +38,12 @@ public:
|
|||||||
itThreads = 0x10,
|
itThreads = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RequiredInfo {
|
struct PIP_EXPORT RequiredInfo {
|
||||||
RequiredInfo();
|
RequiredInfo();
|
||||||
PIFlags<InfoTypes> types;
|
PIFlags<InfoTypes> types;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ProcessInfo {
|
struct PIP_EXPORT ProcessInfo {
|
||||||
ProcessInfo();
|
ProcessInfo();
|
||||||
|
|
||||||
PIString execCommand, hostname, user, OS_name, OS_version, architecture;
|
PIString execCommand, hostname, user, OS_name, OS_version, architecture;
|
||||||
@@ -53,14 +53,14 @@ public:
|
|||||||
PIStringList build_options;
|
PIStringList build_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ProcessStat {
|
struct PIP_EXPORT ProcessStat {
|
||||||
ProcessStat() {}
|
ProcessStat() {}
|
||||||
|
|
||||||
PISystemMonitor::ProcessStats proc;
|
PISystemMonitor::ProcessStats proc;
|
||||||
PIVector<PISystemMonitor::ThreadStats> threads;
|
PIVector<PISystemMonitor::ThreadStats> threads;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ObjectInfo {
|
struct PIP_EXPORT ObjectInfo {
|
||||||
ObjectInfo();
|
ObjectInfo();
|
||||||
|
|
||||||
PIString classname, name;
|
PIString classname, name;
|
||||||
@@ -91,13 +91,13 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::RequiredInfo & v);
|
PIP_EXPORT PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::RequiredInfo & v);
|
||||||
PIByteArray & operator >>(PIByteArray & b, PIIntrospection::RequiredInfo & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & b, PIIntrospection::RequiredInfo & v);
|
||||||
|
|
||||||
PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::ProcessInfo & v);
|
PIP_EXPORT PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::ProcessInfo & v);
|
||||||
PIByteArray & operator >>(PIByteArray & b, PIIntrospection::ProcessInfo & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & b, PIIntrospection::ProcessInfo & v);
|
||||||
|
|
||||||
PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::ObjectInfo & v);
|
PIP_EXPORT PIByteArray & operator <<(PIByteArray & b, const PIIntrospection::ObjectInfo & v);
|
||||||
PIByteArray & operator >>(PIByteArray & b, PIIntrospection::ObjectInfo & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & b, PIIntrospection::ObjectInfo & v);
|
||||||
|
|
||||||
#endif // PIINTROSPECTION_SERVER_P_H
|
#endif // PIINTROSPECTION_SERVER_P_H
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
sWaiting,
|
sWaiting,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ThreadInfo {
|
struct PIP_EXPORT ThreadInfo {
|
||||||
ThreadInfo();
|
ThreadInfo();
|
||||||
PIString classname, name;
|
PIString classname, name;
|
||||||
int id, delay;
|
int id, delay;
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PIByteArray & operator <<(PIByteArray & b, const PIIntrospectionThreads::ThreadInfo & v);
|
PIP_EXPORT PIByteArray & operator <<(PIByteArray & b, const PIIntrospectionThreads::ThreadInfo & v);
|
||||||
PIByteArray & operator >>(PIByteArray & b, PIIntrospectionThreads::ThreadInfo & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & b, PIIntrospectionThreads::ThreadInfo & v);
|
||||||
|
|
||||||
#endif // PIINTROSPECTION_THREADS_P_H
|
#endif // PIINTROSPECTION_THREADS_P_H
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Struct contains information about all records with same ID
|
//! \brief Struct contains information about all records with same ID
|
||||||
struct BinLogRecordInfo {
|
struct PIP_EXPORT BinLogRecordInfo {
|
||||||
BinLogRecordInfo() {
|
BinLogRecordInfo() {
|
||||||
id = count = 0;
|
id = count = 0;
|
||||||
minimum_size = maximum_size = 0;
|
minimum_size = maximum_size = 0;
|
||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Struct contains full information about Binary Log file and about all Records using map of \a BinLogRecordInfo
|
//! \brief Struct contains full information about Binary Log file and about all Records using map of \a BinLogRecordInfo
|
||||||
struct BinLogInfo {
|
struct PIP_EXPORT BinLogInfo {
|
||||||
PIString path;
|
PIString path;
|
||||||
int records_count;
|
int records_count;
|
||||||
llong log_size;
|
llong log_size;
|
||||||
@@ -80,7 +80,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Struct contains position, ID and timestamp of record in file
|
//! \brief Struct contains position, ID and timestamp of record in file
|
||||||
struct BinLogIndex {
|
struct PIP_EXPORT BinLogIndex {
|
||||||
int id;
|
int id;
|
||||||
llong pos;
|
llong pos;
|
||||||
PISystemTime timestamp;
|
PISystemTime timestamp;
|
||||||
@@ -293,7 +293,7 @@ protected:
|
|||||||
DeviceInfoFlags deviceInfoFlags() const {return PIIODevice::Reliable;}
|
DeviceInfoFlags deviceInfoFlags() const {return PIIODevice::Reliable;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct BinLogRecord {
|
struct PIP_EXPORT BinLogRecord {
|
||||||
int id;
|
int id;
|
||||||
int size;
|
int size;
|
||||||
PISystemTime timestamp;
|
PISystemTime timestamp;
|
||||||
|
|||||||
@@ -505,8 +505,8 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
#ifdef PIP_STD_IOSTREAM
|
#ifdef PIP_STD_IOSTREAM
|
||||||
std::ostream & operator <<(std::ostream & s, const PIConfig::Branch & v);
|
PIP_EXPORT std::ostream & operator <<(std::ostream & s, const PIConfig::Branch & v);
|
||||||
std::ostream & operator <<(std::ostream & s, const PIConfig::Entry & v);
|
PIP_EXPORT std::ostream & operator <<(std::ostream & s, const PIConfig::Entry & v);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline PICout operator <<(PICout s, const PIConfig::Branch & v) {s.setControl(0, true); v.piCoutt(s, ""); s.restoreControl(); return s;}
|
inline PICout operator <<(PICout s, const PIConfig::Branch & v) {s.setControl(0, true); v.piCoutt(s, ""); s.restoreControl(); return s;}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public:
|
|||||||
explicit PIEthernet();
|
explicit PIEthernet();
|
||||||
|
|
||||||
//! \brief Type of %PIEthernet
|
//! \brief Type of %PIEthernet
|
||||||
enum PIP_EXPORT Type {
|
enum Type {
|
||||||
UDP /** UDP - User Datagram Protocol */ ,
|
UDP /** UDP - User Datagram Protocol */ ,
|
||||||
TCP_Client /** TCP client - allow connection to TCP server */ ,
|
TCP_Client /** TCP client - allow connection to TCP server */ ,
|
||||||
TCP_Server /** TCP server - receive connections from TCP clients */ ,
|
TCP_Server /** TCP server - receive connections from TCP clients */ ,
|
||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Parameters of %PIEthernet
|
//! \brief Parameters of %PIEthernet
|
||||||
enum PIP_EXPORT Parameters {
|
enum Parameters {
|
||||||
ReuseAddress /** Rebind address if there is already binded. Enabled by default */ = 0x1,
|
ReuseAddress /** Rebind address if there is already binded. Enabled by default */ = 0x1,
|
||||||
Broadcast /** Broadcast send. Disabled by default */ = 0x2,
|
Broadcast /** Broadcast send. Disabled by default */ = 0x2,
|
||||||
SeparateSockets /** If this parameter is set, %PIEthernet will initialize two different sockets,
|
SeparateSockets /** If this parameter is set, %PIEthernet will initialize two different sockets,
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//! \brief IPv4 network address, IP and port
|
//! \brief IPv4 network address, IP and port
|
||||||
class Address {
|
class PIP_EXPORT Address {
|
||||||
friend class PIEthernet;
|
friend class PIEthernet;
|
||||||
friend inline PIByteArray & operator <<(PIByteArray & s, const PIEthernet::Address & v);
|
friend inline PIByteArray & operator <<(PIByteArray & s, const PIEthernet::Address & v);
|
||||||
friend inline PIByteArray & operator >>(PIByteArray & s, PIEthernet::Address & v);
|
friend inline PIByteArray & operator >>(PIByteArray & s, PIEthernet::Address & v);
|
||||||
@@ -322,7 +322,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//! Flags of network interface
|
//! Flags of network interface
|
||||||
enum PIP_EXPORT InterfaceFlag {
|
enum InterfaceFlag {
|
||||||
ifActive /** Is active */ = 0x1,
|
ifActive /** Is active */ = 0x1,
|
||||||
ifRunning /** Is running */ = 0x2,
|
ifRunning /** Is running */ = 0x2,
|
||||||
ifBroadcast /** Support broadcast */ = 0x4,
|
ifBroadcast /** Support broadcast */ = 0x4,
|
||||||
@@ -485,7 +485,7 @@ protected:
|
|||||||
void applyTimeout(int fd, int opt, double ms);
|
void applyTimeout(int fd, int opt, double ms);
|
||||||
void applyOptInt(int level, int opt, int val);
|
void applyOptInt(int level, int opt, int val);
|
||||||
|
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
int sock, sock_s;
|
int sock, sock_s;
|
||||||
bool connected_, connecting_, listen_threaded, server_bounded;
|
bool connected_, connecting_, listen_threaded, server_bounded;
|
||||||
mutable Address addr_r, addr_s, addr_lr;
|
mutable Address addr_r, addr_s, addr_lr;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
struct PIP_EXPORT FileInfo {
|
struct PIP_EXPORT FileInfo {
|
||||||
FileInfo() {size = 0; id_group = id_user = 0;}
|
FileInfo() {size = 0; id_group = id_user = 0;}
|
||||||
|
|
||||||
enum PIP_EXPORT Flag {
|
enum Flag {
|
||||||
File = 0x01,
|
File = 0x01,
|
||||||
Dir = 0x02,
|
Dir = 0x02,
|
||||||
Dot = 0x04,
|
Dot = 0x04,
|
||||||
@@ -292,7 +292,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
PIString strType(const PIIODevice::DeviceMode type);
|
PIString strType(const PIIODevice::DeviceMode type);
|
||||||
|
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
int ret, prec_, fdi;
|
int ret, prec_, fdi;
|
||||||
PIString prec_str;
|
PIString prec_str;
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "pithread.h"
|
#include "pithread.h"
|
||||||
|
|
||||||
|
|
||||||
class PIGPIO: public PIThread
|
class PIP_EXPORT PIGPIO: public PIThread
|
||||||
{
|
{
|
||||||
PIOBJECT_SUBCLASS(PIGPIO, PIThread)
|
PIOBJECT_SUBCLASS(PIGPIO, PIThread)
|
||||||
public:
|
public:
|
||||||
@@ -85,7 +85,7 @@ public:
|
|||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct GPIOData {
|
struct PIP_EXPORT GPIOData {
|
||||||
GPIOData() {dir = PIGPIO::In; num = fd = -1;}
|
GPIOData() {dir = PIGPIO::In; num = fd = -1;}
|
||||||
PIString name;
|
PIString name;
|
||||||
int dir;
|
int dir;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public:
|
|||||||
explicit PIPeer(const PIString & name = PIString());
|
explicit PIPeer(const PIString & name = PIString());
|
||||||
virtual ~PIPeer();
|
virtual ~PIPeer();
|
||||||
|
|
||||||
class PeerInfo {
|
class PIP_EXPORT PeerInfo {
|
||||||
friend class PIPeer;
|
friend class PIPeer;
|
||||||
friend PIByteArray & operator <<(PIByteArray & s, const PIPeer::PeerInfo & v);
|
friend PIByteArray & operator <<(PIByteArray & s, const PIPeer::PeerInfo & v);
|
||||||
friend PIByteArray & operator >>(PIByteArray & s, PIPeer::PeerInfo & v);
|
friend PIByteArray & operator >>(PIByteArray & s, PIPeer::PeerInfo & v);
|
||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
PeerInfo() {dist = sync = cnt = 0; trace = -1; was_update = false; _data = 0;}
|
PeerInfo() {dist = sync = cnt = 0; trace = -1; was_update = false; _data = 0;}
|
||||||
~PeerInfo() {}
|
~PeerInfo() {}
|
||||||
|
|
||||||
struct PeerAddress {
|
struct PIP_EXPORT PeerAddress {
|
||||||
PeerAddress(const PIEthernet::Address & a = PIEthernet::Address(), const PIEthernet::Address & m = PIEthernet::Address("255.255.255.0"));
|
PeerAddress(const PIEthernet::Address & a = PIEthernet::Address(), const PIEthernet::Address & m = PIEthernet::Address("255.255.255.0"));
|
||||||
bool isAvailable() const {return ping > 0;}
|
bool isAvailable() const {return ping > 0;}
|
||||||
PIEthernet::Address address;
|
PIEthernet::Address address;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Information about serial device
|
//! \brief Information about serial device
|
||||||
struct DeviceInfo {
|
struct PIP_EXPORT DeviceInfo {
|
||||||
DeviceInfo();
|
DeviceInfo();
|
||||||
|
|
||||||
//! \brief String representation of USB ID in format \"xxxx:xxxx\"
|
//! \brief String representation of USB ID in format \"xxxx:xxxx\"
|
||||||
@@ -246,7 +246,7 @@ protected:
|
|||||||
bool openDevice();
|
bool openDevice();
|
||||||
bool closeDevice();
|
bool closeDevice();
|
||||||
|
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
int fd, vtime;
|
int fd, vtime;
|
||||||
bool sending;
|
bool sending;
|
||||||
PITimeMeasurer tm_;
|
PITimeMeasurer tm_;
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ private:
|
|||||||
void initPrivate();
|
void initPrivate();
|
||||||
|
|
||||||
int dsize;
|
int dsize;
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ private:
|
|||||||
uchar spi_bits;
|
uchar spi_bits;
|
||||||
PIByteArray tx_buf, rx_buf;
|
PIByteArray tx_buf, rx_buf;
|
||||||
PIByteArray recv_buf;
|
PIByteArray recv_buf;
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PISPI_H
|
#endif // PISPI_H
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
explicit PIUSB(ushort vid = 0, ushort pid = 0);
|
explicit PIUSB(ushort vid = 0, ushort pid = 0);
|
||||||
~PIUSB() {closeDevice();}
|
~PIUSB() {closeDevice();}
|
||||||
|
|
||||||
struct Endpoint {
|
struct PIP_EXPORT Endpoint {
|
||||||
Endpoint(uchar a = 0, uchar at = 0, ushort mps = 0) {address = a; attributes = at; max_packet_size = mps; parse();}
|
Endpoint(uchar a = 0, uchar at = 0, ushort mps = 0) {address = a; attributes = at; max_packet_size = mps; parse();}
|
||||||
|
|
||||||
enum Direction {Write = 0, Read = 1};
|
enum Direction {Write = 0, Read = 1};
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
UsageType usage_type;
|
UsageType usage_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Interface {
|
struct PIP_EXPORT Interface {
|
||||||
Interface() {index = value_to_select = class_code = subclass_code = protocol_code = 0;}
|
Interface() {index = value_to_select = class_code = subclass_code = protocol_code = 0;}
|
||||||
uchar index;
|
uchar index;
|
||||||
uchar value_to_select;
|
uchar value_to_select;
|
||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
PIVector<PIUSB::Endpoint> endpoints;
|
PIVector<PIUSB::Endpoint> endpoints;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Configuration {
|
struct PIP_EXPORT Configuration {
|
||||||
Configuration() {index = value_to_select = attributes = max_power = 0; self_powered = remote_wakeup = false;}
|
Configuration() {index = value_to_select = attributes = max_power = 0; self_powered = remote_wakeup = false;}
|
||||||
uchar index;
|
uchar index;
|
||||||
uchar value_to_select;
|
uchar value_to_select;
|
||||||
@@ -75,7 +75,7 @@ public:
|
|||||||
PIVector<PIUSB::Interface> interfaces;
|
PIVector<PIUSB::Interface> interfaces;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Descriptor {
|
struct PIP_EXPORT Descriptor {
|
||||||
Descriptor() {usb_spec_number = 0; device_class = device_subclass = device_protocol = max_packet_size = 0; id_vendor = id_product = id_device_release = 0; index_manufacturer = index_product = index_serial = 0;}
|
Descriptor() {usb_spec_number = 0; device_class = device_subclass = device_protocol = max_packet_size = 0; id_vendor = id_product = id_device_release = 0; index_manufacturer = index_product = index_serial = 0;}
|
||||||
ushort usb_spec_number;
|
ushort usb_spec_number;
|
||||||
uchar device_class;
|
uchar device_class;
|
||||||
@@ -148,6 +148,6 @@ protected:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PICout operator <<(PICout s, const PIUSB::Endpoint & v);
|
PIP_EXPORT PICout operator <<(PICout s, const PIUSB::Endpoint & v);
|
||||||
|
|
||||||
#endif // PIUSB_H
|
#endif // PIUSB_H
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ protected:
|
|||||||
llong bytes_all, bytes_cur;
|
llong bytes_all, bytes_cur;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum PIP_EXPORT PacketType {pt_Unknown, pt_Data, pt_ReplySuccess, pt_ReplyInvalid, pt_Break, pt_Start, pt_Pause};
|
enum PacketType {pt_Unknown, pt_Data, pt_ReplySuccess, pt_ReplyInvalid, pt_Break, pt_Start, pt_Pause};
|
||||||
|
|
||||||
# pragma pack(push,1)
|
# pragma pack(push,1)
|
||||||
struct PIP_EXPORT StartRequest {
|
struct PIP_EXPORT StartRequest {
|
||||||
|
|||||||
@@ -23,11 +23,12 @@
|
|||||||
#ifndef PIBROADCAST_H
|
#ifndef PIBROADCAST_H
|
||||||
#define PIBROADCAST_H
|
#define PIBROADCAST_H
|
||||||
|
|
||||||
|
#include "pip_io_utils_export.h"
|
||||||
#include "piethutilbase.h"
|
#include "piethutilbase.h"
|
||||||
#include "piethernet.h"
|
#include "piethernet.h"
|
||||||
|
|
||||||
|
|
||||||
class PIBroadcast: public PIThread, public PIEthUtilBase {
|
class PIP_IO_UTILS_EXPORT PIBroadcast: public PIThread, public PIEthUtilBase {
|
||||||
PIOBJECT_SUBCLASS(PIBroadcast, PIThread)
|
PIOBJECT_SUBCLASS(PIBroadcast, PIThread)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ private:
|
|||||||
void __DevicePool_threadReadDP(void * ddp);
|
void __DevicePool_threadReadDP(void * ddp);
|
||||||
|
|
||||||
|
|
||||||
extern PIConnection::DevicePool * __device_pool__;
|
extern PIP_EXPORT PIConnection::DevicePool * __device_pool__;
|
||||||
|
|
||||||
class PIP_EXPORT __DevicePoolContainer__ {
|
class PIP_EXPORT __DevicePoolContainer__ {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Information about current diagnostics state
|
//! Information about current diagnostics state
|
||||||
struct State {
|
struct PIP_EXPORT State {
|
||||||
State();
|
State();
|
||||||
float immediate_freq;
|
float immediate_freq;
|
||||||
float integral_freq;
|
float integral_freq;
|
||||||
@@ -123,7 +123,7 @@ public:
|
|||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Entry {
|
struct PIP_EXPORT Entry {
|
||||||
Entry() {bytes_ok = bytes_fail = 0; cnt_ok = cnt_fail = 0; empty = true;}
|
Entry() {bytes_ok = bytes_fail = 0; cnt_ok = cnt_fail = 0; empty = true;}
|
||||||
ullong bytes_ok;
|
ullong bytes_ok;
|
||||||
ullong bytes_fail;
|
ullong bytes_fail;
|
||||||
|
|||||||
@@ -23,9 +23,10 @@
|
|||||||
#ifndef PIETHUTILBASE_H
|
#ifndef PIETHUTILBASE_H
|
||||||
#define PIETHUTILBASE_H
|
#define PIETHUTILBASE_H
|
||||||
|
|
||||||
|
#include "pip_io_utils_export.h"
|
||||||
#include "pibytearray.h"
|
#include "pibytearray.h"
|
||||||
|
|
||||||
class PIEthUtilBase {
|
class PIP_IO_UTILS_EXPORT PIEthUtilBase {
|
||||||
public:
|
public:
|
||||||
PIEthUtilBase();
|
PIEthUtilBase();
|
||||||
~PIEthUtilBase();
|
~PIEthUtilBase();
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
PIFileTransfer();
|
PIFileTransfer();
|
||||||
~PIFileTransfer();
|
~PIFileTransfer();
|
||||||
|
|
||||||
enum PIP_EXPORT StepType {pft_None, pft_Description, pft_Data};
|
enum StepType {pft_None, pft_Description, pft_Data};
|
||||||
|
|
||||||
struct PIP_EXPORT PFTFileInfo: public PIFile::FileInfo {
|
struct PIP_EXPORT PFTFileInfo: public PIFile::FileInfo {
|
||||||
PFTFileInfo(const PIFile::FileInfo &fi = PIFile::FileInfo()): PIFile::FileInfo(fi) {}
|
PFTFileInfo(const PIFile::FileInfo &fi = PIFile::FileInfo()): PIFile::FileInfo(fi) {}
|
||||||
|
|||||||
@@ -23,20 +23,21 @@
|
|||||||
#ifndef PISTREAMPACKER_H
|
#ifndef PISTREAMPACKER_H
|
||||||
#define PISTREAMPACKER_H
|
#define PISTREAMPACKER_H
|
||||||
|
|
||||||
|
#include "pip_io_utils_export.h"
|
||||||
#include "piobject.h"
|
#include "piobject.h"
|
||||||
#include "piethutilbase.h"
|
#include "piethutilbase.h"
|
||||||
|
|
||||||
|
|
||||||
class PIIODevice;
|
class PIIODevice;
|
||||||
|
|
||||||
class PIP_EXPORT PIStreamPacker: public PIObject, public PIEthUtilBase {
|
class PIP_IO_UTILS_EXPORT PIStreamPacker: public PIObject, public PIEthUtilBase {
|
||||||
PIOBJECT(PIStreamPacker)
|
PIOBJECT(PIStreamPacker)
|
||||||
public:
|
public:
|
||||||
//! Contructs packer and try to assign \"dev\"
|
//! Contructs packer and try to assign \"dev\"
|
||||||
PIStreamPacker(PIIODevice * dev = 0);
|
PIStreamPacker(PIIODevice * dev = 0);
|
||||||
|
|
||||||
//! Progress info
|
//! Progress info
|
||||||
struct Progress {
|
struct PIP_IO_UTILS_EXPORT Progress {
|
||||||
Progress();
|
Progress();
|
||||||
|
|
||||||
//! Is send/receive in progress
|
//! Is send/receive in progress
|
||||||
|
|||||||
@@ -23,9 +23,10 @@
|
|||||||
#ifndef PILUAPROGRAM_H
|
#ifndef PILUAPROGRAM_H
|
||||||
#define PILUAPROGRAM_H
|
#define PILUAPROGRAM_H
|
||||||
|
|
||||||
|
#include "pip_lua_export.h"
|
||||||
#include "pip_lua.h"
|
#include "pip_lua.h"
|
||||||
|
|
||||||
class PILuaProgram
|
class PIP_LUA_EXPORT PILuaProgram
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructs an empty PILuaProgram, initialize Lua context
|
//! Constructs an empty PILuaProgram, initialize Lua context
|
||||||
@@ -44,7 +45,7 @@ public:
|
|||||||
luabridge::Namespace getGlobalNamespace();
|
luabridge::Namespace getGlobalNamespace();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_LUA_EXPORT)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PILUAPROGRAM_H
|
#endif // PILUAPROGRAM_H
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
#include "pibytearray.h"
|
#include "pibytearray.h"
|
||||||
|
|
||||||
PIByteArray piCompress(const PIByteArray & ba, int level = 6);
|
PIP_EXPORT PIByteArray piCompress(const PIByteArray & ba, int level = 6);
|
||||||
|
|
||||||
PIByteArray piDecompress(const PIByteArray & zba);
|
PIP_EXPORT PIByteArray piDecompress(const PIByteArray & zba);
|
||||||
|
|
||||||
#endif // PICOMPRESS_H
|
#endif // PICOMPRESS_H
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ typedef complexd (*FuncFunc)(void * , int, complexd * );
|
|||||||
|
|
||||||
namespace PIEvaluatorTypes {
|
namespace PIEvaluatorTypes {
|
||||||
|
|
||||||
enum PIP_EXPORT eType {etNumber, etOperator, etVariable, etFunction};
|
enum eType {etNumber, etOperator, etVariable, etFunction};
|
||||||
enum PIP_EXPORT Operation {oNone, oAdd, oSubtract, oMultiply, oDivide, oResidue, oPower,
|
enum Operation {oNone, oAdd, oSubtract, oMultiply, oDivide, oResidue, oPower,
|
||||||
oEqual, oNotEqual, oGreater, oSmaller, oGreaterEqual, oSmallerEqual,
|
oEqual, oNotEqual, oGreater, oSmaller, oGreaterEqual, oSmallerEqual,
|
||||||
oAnd, oOr, oFunction
|
oAnd, oOr, oFunction
|
||||||
};
|
};
|
||||||
enum PIP_EXPORT BaseFunctions {bfUnknown, bfSin, bfCos, bfTg, bfCtg,
|
enum BaseFunctions {bfUnknown, bfSin, bfCos, bfTg, bfCtg,
|
||||||
bfArcsin, bfArccos, bfArctg, bfArcctg,
|
bfArcsin, bfArccos, bfArctg, bfArcctg,
|
||||||
bfExp, bfRandom, bfRandomn,
|
bfExp, bfRandom, bfRandomn,
|
||||||
bfSh, bfCh, bfTh, bfCth,
|
bfSh, bfCh, bfTh, bfCth,
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#ifndef PIFFT_H
|
#ifndef PIFFT_H
|
||||||
#define PIFFT_H
|
#define PIFFT_H
|
||||||
|
|
||||||
|
#include "pip_fftw_export.h"
|
||||||
#include "pimathcomplex.h"
|
#include "pimathcomplex.h"
|
||||||
|
|
||||||
class PIP_EXPORT PIFFT_double
|
class PIP_EXPORT PIFFT_double
|
||||||
@@ -123,7 +124,7 @@ typedef PIFFT_float PIFFTf;
|
|||||||
|
|
||||||
#ifndef CC_VC
|
#ifndef CC_VC
|
||||||
|
|
||||||
#define _PIFFTW_H(type) class _PIFFTW_P_##type##_ { \
|
#define _PIFFTW_H(type) class PIP_FFTW_EXPORT _PIFFTW_P_##type##_ { \
|
||||||
public: \
|
public: \
|
||||||
_PIFFTW_P_##type##_(); \
|
_PIFFTW_P_##type##_(); \
|
||||||
~_PIFFTW_P_##type##_(); \
|
~_PIFFTW_P_##type##_(); \
|
||||||
@@ -138,7 +139,7 @@ _PIFFTW_H(double)
|
|||||||
_PIFFTW_H(ldouble)
|
_PIFFTW_H(ldouble)
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class PIP_EXPORT PIFFTW
|
class PIFFTW
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit PIFFTW() {p = 0; newP(p);}
|
explicit PIFFTW() {p = 0; newP(p);}
|
||||||
|
|||||||
@@ -103,21 +103,21 @@ inline float sqr(const float & v) {return v * v;}
|
|||||||
inline double sqr(const double & v) {return v * v;}
|
inline double sqr(const double & v) {return v * v;}
|
||||||
inline double sinc(const double & v) {if (v == 0.) return 1.; double t = M_PI * v; return sin(t) / t;}
|
inline double sinc(const double & v) {if (v == 0.) return 1.; double t = M_PI * v; return sin(t) / t;}
|
||||||
|
|
||||||
double piJ0(const double & v);
|
PIP_EXPORT double piJ0(const double & v);
|
||||||
double piJ1(const double & v);
|
PIP_EXPORT double piJ1(const double & v);
|
||||||
double piJn(int n, const double & v);
|
PIP_EXPORT double piJn(int n, const double & v);
|
||||||
double piY0(const double & v);
|
PIP_EXPORT double piY0(const double & v);
|
||||||
double piY1(const double & v);
|
PIP_EXPORT double piY1(const double & v);
|
||||||
double piYn(int n, const double & v);
|
PIP_EXPORT double piYn(int n, const double & v);
|
||||||
inline double toDb(double val) {return 10. * log10(val);}
|
inline double toDb(double val) {return 10. * log10(val);}
|
||||||
inline double fromDb(double val) {return pow(10., val / 10.);}
|
inline double fromDb(double val) {return pow(10., val / 10.);}
|
||||||
inline double toRad(double deg) {return deg * M_PI_180;}
|
inline double toRad(double deg) {return deg * M_PI_180;}
|
||||||
inline double toDeg(double rad) {return rad * M_180_PI;}
|
inline double toDeg(double rad) {return rad * M_180_PI;}
|
||||||
|
|
||||||
// [-1 ; 1]
|
// [-1 ; 1]
|
||||||
double randomd();
|
PIP_EXPORT double randomd();
|
||||||
// [-1 ; 1] normal
|
// [-1 ; 1] normal
|
||||||
double randomn(double dv = 0., double sv = 1.);
|
PIP_EXPORT double randomn(double dv = 0., double sv = 1.);
|
||||||
|
|
||||||
|
|
||||||
inline PIVector<double> abs(const PIVector<double> & v) {
|
inline PIVector<double> abs(const PIVector<double> & v) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
/// Differential evaluations
|
/// Differential evaluations
|
||||||
|
|
||||||
struct TransferFunction {
|
struct PIP_EXPORT TransferFunction {
|
||||||
PIVector<double> vector_Bm, vector_An;
|
PIVector<double> vector_Bm, vector_An;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "pimathmatrix.h"
|
#include "pimathmatrix.h"
|
||||||
|
|
||||||
class PIQuaternion
|
class PIP_EXPORT PIQuaternion
|
||||||
{
|
{
|
||||||
friend PIQuaternion operator*(const PIQuaternion & q0, const PIQuaternion & q1);
|
friend PIQuaternion operator*(const PIQuaternion & q0, const PIQuaternion & q1);
|
||||||
friend PIQuaternion operator*(const double & a, const PIQuaternion & q);
|
friend PIQuaternion operator*(const double & a, const PIQuaternion & q);
|
||||||
@@ -57,8 +57,8 @@ protected:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PIQuaternion operator *(const double & a, const PIQuaternion & q);
|
PIP_EXPORT PIQuaternion operator *(const double & a, const PIQuaternion & q);
|
||||||
PIQuaternion operator *(const PIQuaternion & q0, const PIQuaternion & q1);
|
PIP_EXPORT 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());}
|
||||||
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());}
|
||||||
inline PIQuaternion operator -(const PIQuaternion & q0) {return PIQuaternion(-q0.vector(), -q0.scalar());}
|
inline PIQuaternion operator -(const PIQuaternion & q0) {return PIQuaternion(-q0.vector(), -q0.scalar());}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "pimathbase.h"
|
#include "pimathbase.h"
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class PIP_EXPORT PIStatistic {
|
class PIStatistic {
|
||||||
public:
|
public:
|
||||||
PIStatistic() {mean = variance = skewness = kurtosis = T();}
|
PIStatistic() {mean = variance = skewness = kurtosis = T();}
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,11 @@
|
|||||||
#ifndef PIOPENCL_H
|
#ifndef PIOPENCL_H
|
||||||
#define PIOPENCL_H
|
#define PIOPENCL_H
|
||||||
|
|
||||||
|
#include "pip_opencl_export.h"
|
||||||
#include "pivariant.h"
|
#include "pivariant.h"
|
||||||
|
|
||||||
|
|
||||||
class PIOpenCL {
|
class PIP_OPENCL_EXPORT PIOpenCL {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
struct KernelArg;
|
struct KernelArg;
|
||||||
@@ -69,7 +70,7 @@ public:
|
|||||||
Double,
|
Double,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct KernelArg {
|
struct PIP_OPENCL_EXPORT KernelArg {
|
||||||
KernelArg();
|
KernelArg();
|
||||||
AddressQualifier address_qualifier;
|
AddressQualifier address_qualifier;
|
||||||
AccessQualifier access_qualifier;
|
AccessQualifier access_qualifier;
|
||||||
@@ -85,7 +86,7 @@ public:
|
|||||||
void init(void * _k, uint index);
|
void init(void * _k, uint index);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Device {
|
struct PIP_OPENCL_EXPORT Device {
|
||||||
Device() {id = platform_id = 0; max_compute_units = max_clock_frequency = 0; max_memory_size = 0;}
|
Device() {id = platform_id = 0; max_compute_units = max_clock_frequency = 0; max_memory_size = 0;}
|
||||||
bool isValid() const {return id != 0;}
|
bool isValid() const {return id != 0;}
|
||||||
PIString displayText() const {return name.trimmed() + " (" + device_version.trimmed() + ")";}
|
PIString displayText() const {return name.trimmed() + " (" + device_version.trimmed() + ")";}
|
||||||
@@ -100,7 +101,7 @@ public:
|
|||||||
ullong max_memory_size;
|
ullong max_memory_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Platform {
|
struct PIP_OPENCL_EXPORT Platform {
|
||||||
Platform() {id = 0;}
|
Platform() {id = 0;}
|
||||||
bool isValid() const {return id != 0;}
|
bool isValid() const {return id != 0;}
|
||||||
PIString displayText() const {return name.trimmed() + " (" + version.trimmed() + ", " + profile.trimmed() + ")";}
|
PIString displayText() const {return name.trimmed() + " (" + version.trimmed() + ", " + profile.trimmed() + ")";}
|
||||||
@@ -113,7 +114,7 @@ public:
|
|||||||
PIVector<Device> devices;
|
PIVector<Device> devices;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Context {
|
class PIP_OPENCL_EXPORT Context {
|
||||||
friend class Program;
|
friend class Program;
|
||||||
public:
|
public:
|
||||||
~Context();
|
~Context();
|
||||||
@@ -125,10 +126,10 @@ public:
|
|||||||
void zero();
|
void zero();
|
||||||
void deletePrograms();
|
void deletePrograms();
|
||||||
PIVector<Program * > programs_;
|
PIVector<Program * > programs_;
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_OPENCL_EXPORT)
|
||||||
};
|
};
|
||||||
|
|
||||||
class Program {
|
class PIP_OPENCL_EXPORT Program {
|
||||||
friend class Context;
|
friend class Context;
|
||||||
friend class Kernel;
|
friend class Kernel;
|
||||||
public:
|
public:
|
||||||
@@ -143,10 +144,10 @@ public:
|
|||||||
Context * context_;
|
Context * context_;
|
||||||
PIString source_;
|
PIString source_;
|
||||||
PIVector<Kernel * > kernels_;
|
PIVector<Kernel * > kernels_;
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_OPENCL_EXPORT)
|
||||||
};
|
};
|
||||||
|
|
||||||
class Kernel {
|
class PIP_OPENCL_EXPORT Kernel {
|
||||||
friend class Program;
|
friend class Program;
|
||||||
public:
|
public:
|
||||||
const PIString & name() const {return name_;}
|
const PIString & name() const {return name_;}
|
||||||
@@ -165,7 +166,7 @@ public:
|
|||||||
Program * program_;
|
Program * program_;
|
||||||
PIString name_;
|
PIString name_;
|
||||||
PIVector<KernelArg> args_;
|
PIVector<KernelArg> args_;
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_OPENCL_EXPORT)
|
||||||
};
|
};
|
||||||
|
|
||||||
static void init();
|
static void init();
|
||||||
@@ -177,7 +178,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
static PIString prog_header;
|
static PIString prog_header;
|
||||||
PIOpenCL() {;}
|
PIOpenCL() {;}
|
||||||
class Initializer {
|
class PIP_OPENCL_EXPORT Initializer {
|
||||||
public:
|
public:
|
||||||
Initializer();
|
Initializer();
|
||||||
static Initializer * instance();
|
static Initializer * instance();
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
#ifndef PIPLATFORM_H
|
#ifndef PIPLATFORM_H
|
||||||
#define PIPLATFORM_H
|
#define PIPLATFORM_H
|
||||||
|
|
||||||
|
#include <pip_export.h>
|
||||||
|
|
||||||
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
|
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
|
||||||
# define WINDOWS
|
# define WINDOWS
|
||||||
# define ARCH_BITS_64
|
# define ARCH_BITS_64
|
||||||
@@ -90,11 +92,5 @@
|
|||||||
# define typeof __typeof__
|
# define typeof __typeof__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(DOXYGEN) || defined(CC_GCC) || defined(PICODE)
|
|
||||||
# undef PIP_EXPORT
|
|
||||||
# define PIP_EXPORT
|
|
||||||
# undef DEPRECATED
|
|
||||||
# define DEPRECATED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // PIPLATFORM_H
|
#endif // PIPLATFORM_H
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ private:
|
|||||||
bool loadInternal();
|
bool loadInternal();
|
||||||
void getLastError();
|
void getLastError();
|
||||||
|
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
PIString libpath, liberror;
|
PIString libpath, liberror;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ private:
|
|||||||
void exec_();
|
void exec_();
|
||||||
void startProc(bool detached);
|
void startProc(bool detached);
|
||||||
|
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
PIStringList args, env;
|
PIStringList args, env;
|
||||||
PIString wd;
|
PIString wd;
|
||||||
PIByteArray out;
|
PIByteArray out;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class PIP_EXPORT PISystemInfo {
|
|||||||
public:
|
public:
|
||||||
PISystemInfo();
|
PISystemInfo();
|
||||||
|
|
||||||
struct MountInfo {
|
struct PIP_EXPORT MountInfo {
|
||||||
MountInfo();
|
MountInfo();
|
||||||
PIString mount_point;
|
PIString mount_point;
|
||||||
PIString device;
|
PIString device;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
~PISystemMonitor();
|
~PISystemMonitor();
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct ProcessStatsFixed {
|
struct PIP_EXPORT ProcessStatsFixed {
|
||||||
ProcessStatsFixed();
|
ProcessStatsFixed();
|
||||||
int ID;
|
int ID;
|
||||||
int parent_ID;
|
int parent_ID;
|
||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
float cpu_load_user;
|
float cpu_load_user;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ThreadStatsFixed {
|
struct PIP_EXPORT ThreadStatsFixed {
|
||||||
ThreadStatsFixed();
|
ThreadStatsFixed();
|
||||||
llong id;
|
llong id;
|
||||||
PISystemTime work_time;
|
PISystemTime work_time;
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
struct ProcessStats: ProcessStatsFixed {
|
struct PIP_EXPORT ProcessStats: ProcessStatsFixed {
|
||||||
void makeStrings();
|
void makeStrings();
|
||||||
PIString exec_name;
|
PIString exec_name;
|
||||||
PIString state;
|
PIString state;
|
||||||
@@ -74,7 +74,7 @@ public:
|
|||||||
PIString data_memsize_readable;
|
PIString data_memsize_readable;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ThreadStats: ThreadStatsFixed {
|
struct PIP_EXPORT ThreadStats: ThreadStatsFixed {
|
||||||
PIString name;
|
PIString name;
|
||||||
PIDateTime created;
|
PIDateTime created;
|
||||||
};
|
};
|
||||||
@@ -107,10 +107,10 @@ private:
|
|||||||
mutable PIMutex stat_mutex;
|
mutable PIMutex stat_mutex;
|
||||||
int pID_, page_size, cpu_count, cycle;
|
int pID_, page_size, cpu_count, cycle;
|
||||||
#ifndef FREERTOS
|
#ifndef FREERTOS
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class Pool {
|
class PIP_EXPORT Pool {
|
||||||
friend class PISystemMonitor;
|
friend class PISystemMonitor;
|
||||||
public:
|
public:
|
||||||
static Pool * instance();
|
static Pool * instance();
|
||||||
@@ -136,9 +136,9 @@ inline PICout operator <<(PICout s, const PISystemMonitor::ThreadStats & v) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
PIByteArray & operator <<(PIByteArray & s, const PISystemMonitor::ProcessStats & v);
|
PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PISystemMonitor::ProcessStats & v);
|
||||||
PIByteArray & operator >>(PIByteArray & s, PISystemMonitor::ProcessStats & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PISystemMonitor::ProcessStats & v);
|
||||||
PIByteArray & operator <<(PIByteArray & s, const PISystemMonitor::ThreadStats & v);
|
PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PISystemMonitor::ThreadStats & v);
|
||||||
PIByteArray & operator >>(PIByteArray & s, PISystemMonitor::ThreadStats & v);
|
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PISystemMonitor::ThreadStats & v);
|
||||||
|
|
||||||
#endif // PISYSTEMMONITOR_H
|
#endif // PISYSTEMMONITOR_H
|
||||||
|
|||||||
@@ -23,16 +23,16 @@
|
|||||||
#include "pibase.h"
|
#include "pibase.h"
|
||||||
|
|
||||||
namespace PISystemTests {
|
namespace PISystemTests {
|
||||||
PIP_EXPORT extern long time_resolution_ns;
|
extern PIP_EXPORT long time_resolution_ns;
|
||||||
PIP_EXPORT extern long time_elapsed_ns;
|
extern PIP_EXPORT long time_elapsed_ns;
|
||||||
PIP_EXPORT extern long usleep_offset_us;
|
extern PIP_EXPORT long usleep_offset_us;
|
||||||
|
|
||||||
class PISystemTestReader {
|
class PIP_EXPORT PISystemTestReader {
|
||||||
public:
|
public:
|
||||||
PISystemTestReader();
|
PISystemTestReader();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern PISystemTestReader pisystestreader;
|
extern PIP_EXPORT PISystemTestReader pisystestreader;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // PISYSTEMTESTS_H
|
#endif // PISYSTEMTESTS_H
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public:
|
|||||||
virtual bool waitFor(PIMutex& lk, int timeoutMs, const std::function<bool()>& condition);
|
virtual bool waitFor(PIMutex& lk, int timeoutMs, const std::function<bool()>& condition);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
template<typename T = PIByteArray>
|
template<typename T = PIByteArray>
|
||||||
class PIP_EXPORT PIGrabberBase: public PIThread
|
class PIGrabberBase: public PIThread
|
||||||
{
|
{
|
||||||
PIOBJECT_SUBCLASS(PIGrabberBase, PIThread)
|
PIOBJECT_SUBCLASS(PIGrabberBase, PIThread)
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ private:
|
|||||||
void init();
|
void init();
|
||||||
void destroy();
|
void destroy();
|
||||||
|
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ protected:
|
|||||||
PITimeMeasurer tmf_, tms_, tmr_;
|
PITimeMeasurer tmf_, tms_, tmr_;
|
||||||
PIThread::Priority priority_;
|
PIThread::Priority priority_;
|
||||||
ThreadFunc ret_func;
|
ThreadFunc ret_func;
|
||||||
PRIVATE_DECLARATION
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _startThread(void * func);
|
bool _startThread(void * func);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
|
|
||||||
class PIThreadPoolExecutor {
|
class PIP_EXPORT PIThreadPoolExecutor {
|
||||||
public:
|
public:
|
||||||
explicit PIThreadPoolExecutor(size_t corePoolSize = -1, PIBlockingDequeue<std::function<void()> > * taskQueue_ = 0);
|
explicit PIThreadPoolExecutor(size_t corePoolSize = -1, PIBlockingDequeue<std::function<void()> > * taskQueue_ = 0);
|
||||||
|
|
||||||
|
|||||||
2
main.cpp
2
main.cpp
@@ -49,7 +49,7 @@ int main() {
|
|||||||
piCout << s.replaceAll(' ', '1');*/
|
piCout << s.replaceAll(' ', '1');*/
|
||||||
piDebug = false;
|
piDebug = false;
|
||||||
double min = -1, max = -1, mean = 0;
|
double min = -1, max = -1, mean = 0;
|
||||||
for (int i = 0; i < 50; ++i) {
|
for (int i = 0; i < 1; ++i) {
|
||||||
PICodeParser cp;
|
PICodeParser cp;
|
||||||
PITimeMeasurer tm;
|
PITimeMeasurer tm;
|
||||||
cp.parseFile("SH_plugin_base.h");
|
cp.parseFile("SH_plugin_base.h");
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
include(DownloadGTest)
|
include(DownloadGTest)
|
||||||
|
|
||||||
macro(pip_test NAME LIBS)
|
macro(pip_test NAME LIBS)
|
||||||
gather_src("${NAME}" CPP_${NAME}_TEST _T_H _T_PH)
|
file(GLOB _CPPS "${NAME}/*.cpp")
|
||||||
|
file(GLOB _HDRS "${NAME}/*.h")
|
||||||
set(_target pip_${NAME}_test)
|
set(_target pip_${NAME}_test)
|
||||||
add_executable(${_target} ${CPP_${NAME}_TEST})
|
add_executable(${_target} ${_CPPS} ${_HDRS})
|
||||||
target_link_libraries(${_target} pip ${LIBS} gtest_main gmock_main)
|
target_link_libraries(${_target} pip ${LIBS} gtest_main gmock_main)
|
||||||
add_test(NAME ${_target} COMMAND tests)
|
add_test(NAME ${_target} COMMAND tests)
|
||||||
add_custom_target(${_target}_perform ALL COMMAND ${_target})
|
add_custom_target(${_target}_perform ALL COMMAND ${_target})
|
||||||
|
|||||||
@@ -2,4 +2,6 @@ add_executable(piterminal "main.cpp")
|
|||||||
target_link_libraries(piterminal pip pip_console)
|
target_link_libraries(piterminal pip pip_console)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
install(TARGETS piterminal DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS piterminal DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
endif ()
|
else()
|
||||||
|
install(TARGETS piterminal DESTINATION bin)
|
||||||
|
endif()
|
||||||
@@ -25,9 +25,9 @@ int main (int argc, char * argv[]) {
|
|||||||
#else
|
#else
|
||||||
# include "piscreentypes.h"
|
# include "piscreentypes.h"
|
||||||
# include "pisharedmemory.h"
|
# include "pisharedmemory.h"
|
||||||
# include "../../lib/console/piterminal.cpp"
|
|
||||||
# include "pifile.h"
|
# include "pifile.h"
|
||||||
# include <wincon.h>
|
# include <wincon.h>
|
||||||
|
# include "../../lib/console/piterminal.cpp"
|
||||||
|
|
||||||
|
|
||||||
PIVector<PIVector<PIScreenTypes::Cell> > cells;
|
PIVector<PIVector<PIScreenTypes::Cell> > cells;
|
||||||
Reference in New Issue
Block a user