Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • caosdb/src/caosdb-cpplib
1 result
Select Git revision
Show changes
Commits on Source (43)
# General # General
build/ build/
include/libcaosdbConfig.h include/liblinkaheadConfig.h
.* .*
# CMake # CMake
......
...@@ -187,49 +187,49 @@ trigger_inttest: ...@@ -187,49 +187,49 @@ trigger_inttest:
branch: $CPPINT_REF branch: $CPPINT_REF
strategy: depend strategy: depend
# After the cppinttest have been successful, also start tests for Octave... # # After the cppinttest have been successful, also start tests for Octave...
trigger_octavelib: # trigger_octavelib:
stage: deploy # stage: deploy
needs: [ trigger_prepare, trigger_inttest ] # needs: [ trigger_prepare, trigger_inttest ]
inherit: # inherit:
variables: # variables:
# List the variables that shall be inherited, which also means they will override any equally # # List the variables that shall be inherited, which also means they will override any equally
# named varibles in child pipelines. # # named varibles in child pipelines.
- TRIGGERED_BY_REPO # - TRIGGERED_BY_REPO
- TRIGGERED_BY_REF # - TRIGGERED_BY_REF
- TRIGGERED_BY_HASH # - TRIGGERED_BY_HASH
- CPPLIB_REGISTRY_IMAGE # - CPPLIB_REGISTRY_IMAGE
variables: # variables:
# dotenv variables must be set again here. # # dotenv variables must be set again here.
F_BRANCH: $F_BRANCH # F_BRANCH: $F_BRANCH
trigger: # trigger:
project: caosdb/src/caosdb-octavelib # project: caosdb/src/caosdb-octavelib
branch: $OCTAVELIB_REF # branch: $OCTAVELIB_REF
# It's ok if octave fails in case of features that might already be # # It's ok if octave fails in case of features that might already be
# implemented in proto, server, and cpplib, but not yet in Octave. # # implemented in proto, server, and cpplib, but not yet in Octave.
allow_failure: true # allow_failure: true
# ... and for Julia. # # ... and for Julia.
trigger_julialib: # trigger_julialib:
stage: deploy # stage: deploy
needs: [ trigger_prepare, trigger_inttest ] # needs: [ trigger_prepare, trigger_inttest ]
inherit: # inherit:
variables: # variables:
# List the variables that shall be inherited, which also means they will override any equally # # List the variables that shall be inherited, which also means they will override any equally
# named varibles in child pipelines. # # named varibles in child pipelines.
- TRIGGERED_BY_REPO # - TRIGGERED_BY_REPO
- TRIGGERED_BY_REF # - TRIGGERED_BY_REF
- TRIGGERED_BY_HASH # - TRIGGERED_BY_HASH
- CPPLIB_REGISTRY_IMAGE # - CPPLIB_REGISTRY_IMAGE
variables: # variables:
# dotenv variables must be set again here. # # dotenv variables must be set again here.
F_BRANCH: $F_BRANCH # F_BRANCH: $F_BRANCH
trigger: # trigger:
project: caosdb/src/caosdb-julialib # project: caosdb/src/caosdb-julialib
branch: $JULIALIB_REF # branch: $JULIALIB_REF
# It's ok if julia fails in case of features that might already be # # It's ok if julia fails in case of features that might already be
# implemented in proto, server, and cpplib, but not yet in Julia. # # implemented in proto, server, and cpplib, but not yet in Julia.
allow_failure: true # allow_failure: true
# Build the sphinx documentation and make it ready for deployment by Gitlab Pages # Build the sphinx documentation and make it ready for deployment by Gitlab Pages
# Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages # Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages
......
# #
# This file is a part of the CaosDB Project. # This file is a part of the LinkAhead Project.
# #
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 Joscha Schmiedt <joscha@schmiedt.dev> # Copyright (C) 2024 Joscha Schmiedt <joscha@schmiedt.dev>
# Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com>
# #
# #
...@@ -22,15 +22,15 @@ ...@@ -22,15 +22,15 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
set(libcaosdb_VERSION 0.3.0) set(liblinkahead_VERSION 0.3.0)
set(libcaosdb_COMPATIBLE_SERVER_VERSION_MAJOR 0) set(liblinkahead_COMPATIBLE_SERVER_VERSION_MAJOR 0)
set(libcaosdb_COMPATIBLE_SERVER_VERSION_MINOR 9) set(liblinkahead_COMPATIBLE_SERVER_VERSION_MINOR 9)
set(libcaosdb_COMPATIBLE_SERVER_VERSION_PATCH 0) set(liblinkahead_COMPATIBLE_SERVER_VERSION_PATCH 0)
set(libcaosdb_COMPATIBLE_SERVER_VERSION_PRE_RELEASE "") set(liblinkahead_COMPATIBLE_SERVER_VERSION_PRE_RELEASE "")
project(libcaosdb project(liblinkahead
VERSION ${libcaosdb_VERSION} VERSION ${liblinkahead_VERSION}
DESCRIPTION "C and C++ client libraries for CaosDB" DESCRIPTION "C and C++ client libraries for LinkAhead"
LANGUAGES CXX C) LANGUAGES CXX C)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
...@@ -141,10 +141,10 @@ message(DEBUG "GRPC_GENERATED: ${GRPC_GENERATED}") ...@@ -141,10 +141,10 @@ message(DEBUG "GRPC_GENERATED: ${GRPC_GENERATED}")
############################################################################### ###############################################################################
### Set up main targets ### Set up main targets
### * caosdb - The main library including the protobuf and grpc generated files. ### * linkahead - The main library including the protobuf and grpc generated files.
### * cxxcaosdbcli - A C++ test client. ### * cxxlinkaheadcli - A C++ test client.
### * ccaosdb - A C-Wrapper of the C++ caosdb library. ### * clinkahead - A C-Wrapper of the C++ linkahead library.
### * ccaosdbcli - A plain C test client. ### * clinkaheadcli - A plain C test client.
############################################################################### ###############################################################################
find_package(gRPC CONFIG REQUIRED) find_package(gRPC CONFIG REQUIRED)
...@@ -162,64 +162,64 @@ message(DEBUG "gRPC_INCLUDE_DIRS: ${gRPC_INCLUDE_DIRS}") ...@@ -162,64 +162,64 @@ message(DEBUG "gRPC_INCLUDE_DIRS: ${gRPC_INCLUDE_DIRS}")
message(DEBUG "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}") message(DEBUG "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(DEBUG "GTest_INCLUDE_DIRS: ${GTest_INCLUDE_DIRS}") message(DEBUG "GTest_INCLUDE_DIRS: ${GTest_INCLUDE_DIRS}")
message(DEBUG "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") message(DEBUG "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
message(DEBUG "libcaosdb_SOURCE_DIR: ${libcaosdb_SOURCE_DIR}") message(DEBUG "liblinkahead_SOURCE_DIR: ${liblinkahead_SOURCE_DIR}")
message(DEBUG "libcaosdb_BINARY_DIR: ${libcaosdb_BINARY_DIR}") message(DEBUG "liblinkahead_BINARY_DIR: ${liblinkahead_BINARY_DIR}")
# libcaosdb # liblinkahead
# --------- # ---------
add_library(caosdb SHARED add_library(linkahead SHARED
${libcaosdb_INCL} ${libcaosdb_SRC} ${GRPC_GENERATED}) ${liblinkahead_INCL} ${liblinkahead_SRC} ${GRPC_GENERATED})
target_link_libraries(caosdb PUBLIC target_link_libraries(linkahead PUBLIC
gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES} gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
) )
set(LIBCAOSDB caosdb) set(liblinkahead linkahead)
target_include_directories(caosdb PUBLIC target_include_directories(linkahead PUBLIC
$<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${liblinkahead_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<BUILD_INTERFACE:${liblinkahead_BINARY_DIR}/include>
$<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/src> $<BUILD_INTERFACE:${liblinkahead_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include>
) )
# libccaosdb # libclinkahead
# ---------- # ----------
add_library(ccaosdb SHARED src/ccaosdb.cpp ${GRPC_GENERATED}) add_library(clinkahead SHARED src/clinkahead.cpp ${GRPC_GENERATED})
target_link_libraries(ccaosdb PUBLIC target_link_libraries(clinkahead PUBLIC
caosdb linkahead
gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES} gRPC::grpc gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
) )
target_include_directories(ccaosdb PUBLIC target_include_directories(clinkahead PUBLIC
$<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${liblinkahead_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<BUILD_INTERFACE:${liblinkahead_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include>
) )
# ccaosdbcli # clinkaheadcli
# ---------- # ----------
add_executable(ccaosdbcli EXCLUDE_FROM_ALL src/ccaosdbcli.c) add_executable(clinkaheadcli EXCLUDE_FROM_ALL src/clinkaheadcli.c)
target_include_directories(ccaosdbcli PUBLIC target_include_directories(clinkaheadcli PUBLIC
$<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${liblinkahead_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<BUILD_INTERFACE:${liblinkahead_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include>
) )
target_link_libraries(ccaosdbcli PRIVATE target_link_libraries(clinkaheadcli PRIVATE
gRPC::grpc protobuf::libprotobuf ${Boost_LIBRARIES} gRPC::grpc protobuf::libprotobuf ${Boost_LIBRARIES}
ccaosdb clinkahead
) )
# cxxcaosdbcli # cxxlinkaheadcli
# ------------ # ------------
add_executable(cxxcaosdbcli EXCLUDE_FROM_ALL src/cxxcaosdbcli.cpp) add_executable(cxxlinkaheadcli EXCLUDE_FROM_ALL src/cxxlinkaheadcli.cpp)
target_include_directories(cxxcaosdbcli PUBLIC target_include_directories(cxxlinkaheadcli PUBLIC
$<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${liblinkahead_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<BUILD_INTERFACE:${liblinkahead_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include>
) )
target_link_libraries(cxxcaosdbcli PRIVATE target_link_libraries(cxxlinkaheadcli PRIVATE
caosdb gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES} linkahead gRPC::grpc++ protobuf::libprotobuf ${Boost_LIBRARIES}
) )
...@@ -273,19 +273,19 @@ if(_LINTING) ...@@ -273,19 +273,19 @@ if(_LINTING)
# add_compiler_flag("-Werror") # removed until issue #71 is resolved # add_compiler_flag("-Werror") # removed until issue #71 is resolved
message(STATUS "PEDANTIC_CMAKE_CXX_FLAGS: [${PEDANTIC_CMAKE_CXX_FLAGS}]") message(STATUS "PEDANTIC_CMAKE_CXX_FLAGS: [${PEDANTIC_CMAKE_CXX_FLAGS}]")
set(TARGET_CAOSDB_COMPILE_FLAGS "${TARGET_CAOSDB_COMPILE_FLAGS} ${PEDANTIC_CMAKE_CXX_FLAGS}") set(TARGET_LINKAHEAD_COMPILE_FLAGS "${TARGET_LINKAHEAD_COMPILE_FLAGS} ${PEDANTIC_CMAKE_CXX_FLAGS}")
set(TARGET_CCAOSDB_COMPILE_FLAGS "${TARGET_CCAOSDB_COMPILE_FLAGS} ${PEDANTIC_CMAKE_C_FLAGS}") set(TARGET_CLINKAHEAD_COMPILE_FLAGS "${TARGET_CLINKAHEAD_COMPILE_FLAGS} ${PEDANTIC_CMAKE_C_FLAGS}")
set(TARGET_CXXCAOSDBCLI_COMPILE_FLAGS "${TARGET_CXXCAOSDBCLI_COMPILE_FLAGS} ${PEDANTIC_CMAKE_CXX_FLAGS}") set(TARGET_CXXLINKAHEADCLI_COMPILE_FLAGS "${TARGET_CXXLINKAHEADCLI_COMPILE_FLAGS} ${PEDANTIC_CMAKE_CXX_FLAGS}")
set(TARGET_CCAOSDBCLI_COMPILE_FLAGS "${TARGET_CCAOSDBCLI_COMPILE_FLAGS} ${PEDANTIC_CMAKE_C_FLAGS}") set(TARGET_CLINKAHEADCLI_COMPILE_FLAGS "${TARGET_CLINKAHEADCLI_COMPILE_FLAGS} ${PEDANTIC_CMAKE_C_FLAGS}")
set_target_properties(caosdb PROPERTIES set_target_properties(linkahead PROPERTIES
COMPILE_FLAGS "${TARGET_CAOSDB_COMPILE_FLAGS}") COMPILE_FLAGS "${TARGET_LINKAHEAD_COMPILE_FLAGS}")
set_target_properties(ccaosdb PROPERTIES set_target_properties(clinkahead PROPERTIES
COMPILE_FLAGS "${TARGET_CCAOSDB_COMPILE_FLAGS}") COMPILE_FLAGS "${TARGET_CLINKAHEAD_COMPILE_FLAGS}")
set_target_properties(cxxcaosdbcli PROPERTIES set_target_properties(cxxlinkaheadcli PROPERTIES
COMPILE_FLAGS "${TARGET_CXXCAOSDBCLI_COMPILE_FLAGS}") COMPILE_FLAGS "${TARGET_CXXLINKAHEADCLI_COMPILE_FLAGS}")
set_target_properties(ccaosdbcli PROPERTIES set_target_properties(clinkaheadcli PROPERTIES
COMPILE_FLAGS "${TARGET_CCAOSDBCLI_COMPILE_FLAGS}") COMPILE_FLAGS "${TARGET_CLINKAHEADCLI_COMPILE_FLAGS}")
find_program(iwyu find_program(iwyu
NAMES include-what-you-use iwyu NAMES include-what-you-use iwyu
...@@ -297,13 +297,13 @@ if(_LINTING) ...@@ -297,13 +297,13 @@ if(_LINTING)
set(_CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${iwyu} set(_CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${iwyu}
"-Xiwyu" "--cxx17ns" "-Xiwyu" "--no_fwd_decls") "-Xiwyu" "--cxx17ns" "-Xiwyu" "--no_fwd_decls")
set_target_properties(caosdb PROPERTIES set_target_properties(linkahead PROPERTIES
CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}" CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}"
) )
set_target_properties(cxxcaosdbcli PROPERTIES set_target_properties(cxxlinkaheadcli PROPERTIES
CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}" CXX_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}"
) )
set_target_properties(ccaosdbcli PROPERTIES set_target_properties(clinkaheadcli PROPERTIES
C_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}" C_INCLUDE_WHAT_YOU_USE "${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE}"
) )
endif() endif()
...@@ -326,16 +326,16 @@ if(_LINTING) ...@@ -326,16 +326,16 @@ if(_LINTING)
endif() endif()
message(STATUS "Using clang-tidy with message(STATUS "Using clang-tidy with
'${_CMAKE_CXX_CLANG_TIDY};${_CMAKE_CXX_CLANG_TIDY_CHECKS}'") '${_CMAKE_CXX_CLANG_TIDY};${_CMAKE_CXX_CLANG_TIDY_CHECKS}'")
set_target_properties(caosdb PROPERTIES set_target_properties(linkahead PROPERTIES
CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY};${_CMAKE_CXX_CLANG_TIDY_CHECKS}" CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY};${_CMAKE_CXX_CLANG_TIDY_CHECKS}"
) )
set_target_properties(cxxcaosdbcli PROPERTIES set_target_properties(cxxlinkaheadcli PROPERTIES
CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY};${_CMAKE_CXX_CLANG_TIDY_CHECKS}" CXX_CLANG_TIDY "${_CMAKE_CXX_CLANG_TIDY};${_CMAKE_CXX_CLANG_TIDY_CHECKS}"
) )
set_target_properties(ccaosdb PROPERTIES set_target_properties(clinkahead PROPERTIES
C_CLANG_TIDY "${_CMAKE_C_CLANG_TIDY};${_CMAKE_C_CLANG_TIDY_CHECKS}" C_CLANG_TIDY "${_CMAKE_C_CLANG_TIDY};${_CMAKE_C_CLANG_TIDY_CHECKS}"
) )
set_target_properties(ccaosdbcli PROPERTIES set_target_properties(clinkaheadcli PROPERTIES
C_CLANG_TIDY "${_CMAKE_C_CLANG_TIDY};${_CMAKE_C_CLANG_TIDY_CHECKS}" C_CLANG_TIDY "${_CMAKE_C_CLANG_TIDY};${_CMAKE_C_CLANG_TIDY_CHECKS}"
) )
endif() endif()
...@@ -355,38 +355,38 @@ endif() ...@@ -355,38 +355,38 @@ endif()
# ############ INSTALLATION ##################### # ############ INSTALLATION #####################
# ############################################### # ###############################################
set(libcaosdb_INCLUDE_DEST "include/caosdb") set(liblinkahead_INCLUDE_DEST "include/linkahead")
set(libcaosdb_LIB_DEST "lib") set(liblinkahead_LIB_DEST "lib")
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local/") set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local/")
install( install(
# targets to install # targets to install
TARGETS ${LIBCAOSDB} ccaosdb TARGETS ${liblinkahead} clinkahead
# name of the CMake "export group" containing the targets we want to install # name of the CMake "export group" containing the targets we want to install
EXPORT caosdbTargets EXPORT linkaheadTargets
# Dynamic, static library and include destination locations after running # Dynamic, static library and include destination locations after running
# "make install" # "make install"
LIBRARY DESTINATION ${libcaosdb_LIB_DEST} LIBRARY DESTINATION ${liblinkahead_LIB_DEST}
ARCHIVE DESTINATION ${libcaosdb_LIB_DEST} ARCHIVE DESTINATION ${liblinkahead_LIB_DEST}
INCLUDES DESTINATION ${libcaosdb_INCLUDE_DEST} INCLUDES DESTINATION ${liblinkahead_INCLUDE_DEST}
) )
set(libcaosdb_CMAKE_DEST "${libcaosdb_LIB_DEST}/cmake/caosdb") set(liblinkahead_CMAKE_DEST "${liblinkahead_LIB_DEST}/cmake/linkahead")
install( install(
# The export we want to save (matches name defined above containing the # The export we want to save (matches name defined above containing the
# install targets) # install targets)
EXPORT caosdbTargets EXPORT linkaheadTargets
# CMake file in which to store the export's information # CMake file in which to store the export's information
FILE caosdbTargets.cmake FILE linkaheadTargets.cmake
# Namespace prepends all targets in the export (when we import later, we # Namespace prepends all targets in the export (when we import later, we
# will use caosdb::caosdb) # will use linkahead::linkahead)
NAMESPACE caosdb:: NAMESPACE linkahead::
# where to place the resulting file (here, we're putting it with the library) # where to place the resulting file (here, we're putting it with the library)
DESTINATION ${libcaosdb_CMAKE_DEST} DESTINATION ${liblinkahead_CMAKE_DEST}
) )
install(FILES ${libcaosdb_INCL} ${PROJECT_SOURCE_DIR}/include/ccaosdb.h DESTINATION ${libcaosdb_INCLUDE_DEST}) install(FILES ${liblinkahead_INCL} ${PROJECT_SOURCE_DIR}/include/clinkahead.h DESTINATION ${liblinkahead_INCLUDE_DEST})
foreach(i RANGE "${len_proto_files}") foreach(i RANGE "${len_proto_files}")
list(GET PROTO_FILES ${i} next_proto_file) list(GET PROTO_FILES ${i} next_proto_file)
...@@ -406,21 +406,21 @@ foreach(i RANGE "${len_proto_files}") ...@@ -406,21 +406,21 @@ foreach(i RANGE "${len_proto_files}")
set(next_grpc_hdr set(next_grpc_hdr
"${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${next_proto_module}/main.grpc.pb.h") "${CMAKE_CURRENT_BINARY_DIR}/include/caosdb/${next_proto_module}/main.grpc.pb.h")
install(FILES ${next_proto_hdr} ${next_grpc_hdr} DESTINATION install(FILES ${next_proto_hdr} ${next_grpc_hdr} DESTINATION
${libcaosdb_INCLUDE_DEST}/${next_proto_module}) ${liblinkahead_INCLUDE_DEST}/${next_proto_module})
endforeach() endforeach()
install(FILES ${PROJECT_SOURCE_DIR}/caosdbConfig.cmake install(FILES ${PROJECT_SOURCE_DIR}/linkaheadConfig.cmake
DESTINATION ${libcaosdb_CMAKE_DEST}) DESTINATION ${liblinkahead_CMAKE_DEST})
#set_property(TARGET caosdb PROPERTY VERSION ${libcaosdb_VERSION}) #set_property(TARGET caosdb PROPERTY VERSION ${liblinkahead_VERSION})
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
write_basic_package_version_file( write_basic_package_version_file(
"${PROJECT_SOURCE_DIR}/caosdbConfigVersion.cmake" "${PROJECT_SOURCE_DIR}/linkaheadConfigVersion.cmake"
VERSION ${libcaosdb_VERSION} VERSION ${liblinkahead_VERSION}
COMPATIBILITY AnyNewerVersion COMPATIBILITY AnyNewerVersion
) )
install(FILES ${PROJECT_SOURCE_DIR}/caosdbConfigVersion.cmake install(FILES ${PROJECT_SOURCE_DIR}/linkaheadConfigVersion.cmake
DESTINATION ${libcaosdb_CMAKE_DEST}) DESTINATION ${liblinkahead_CMAKE_DEST})
####################################################### #######################################################
### code formatting with clang-format ### code formatting with clang-format
...@@ -429,12 +429,12 @@ option(AUTOFORMATTING "call clang-format at configure time" ON) ...@@ -429,12 +429,12 @@ option(AUTOFORMATTING "call clang-format at configure time" ON)
if(AUTOFORMATTING AND NOT SKIP_LINTING) if(AUTOFORMATTING AND NOT SKIP_LINTING)
find_program(clang_format NAMES clang-format-11 clang-format) find_program(clang_format NAMES clang-format-11 clang-format)
file(GLOB format_test_sources test/*.cpp test/*.h test/*.h.in) file(GLOB format_test_sources test/*.cpp test/*.h test/*.h.in)
execute_process(COMMAND ${clang_format} -i --verbose ${libcaosdb_INCL} execute_process(COMMAND ${clang_format} -i --verbose ${liblinkahead_INCL}
${libcaosdb_SRC} ${libcaosdb_TEST_SRC} ${liblinkahead_SRC} ${liblinkahead_TEST_SRC}
${PROJECT_SOURCE_DIR}/src/cxxcaosdbcli.cpp ${PROJECT_SOURCE_DIR}/src/cxxlinkaheadcli.cpp
${PROJECT_SOURCE_DIR}/src/ccaosdbcli.c ${PROJECT_SOURCE_DIR}/src/clinkaheadcli.c
${PROJECT_SOURCE_DIR}/src/ccaosdb.cpp ${PROJECT_SOURCE_DIR}/src/clinkahead.cpp
${PROJECT_SOURCE_DIR}/include/ccaosdb.h ${PROJECT_SOURCE_DIR}/include/clinkahead.h
${format_test_sources} ${format_test_sources}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
endif() endif()
# ** header v3.0 # ** header v3.0
# This file is a part of the CaosDB Project. # This file is a part of the LinkAhead Project.
# #
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021 IndiScale GmbH <info@indiscale.com>
# Copyright (C) 2021 Daniel Hornung <d.hornung@indiscale.com> # Copyright (C) 2021 Daniel Hornung <d.hornung@indiscale.com>
...@@ -68,11 +68,11 @@ conan-install-debug: ...@@ -68,11 +68,11 @@ conan-install-debug:
.PHONY: conan-install-debug .PHONY: conan-install-debug
conan-create: conan-create:
conan create -s $(CONAN_SETTINGS) -o caosdb/*:build_acm=True . conan create -s $(CONAN_SETTINGS) -o linkahead/*:build_acm=True .
.PHONY: conan-create .PHONY: conan-create
conan-create-debug: conan-create-debug:
conan create -s $(CONAN_SETTINGS) -s build_type=Debug -o caosdb/*:build_acm=True . conan create -s $(CONAN_SETTINGS) -s build_type=Debug -o linkahead/*:build_acm=True .
.PHONY: conan-create-debug .PHONY: conan-create-debug
......
# libcaosdb # liblinkahead
## Welcome ## Welcome
This is the development repository of **caosdb-cpplib** - a C++ client library This is the development repository of **linkahead-cpplib** - a C++ client library
for CaosDB and a part of the CaosDB project. for LinkAhead and a part of the LinkAhead project.
## Setup ## Setup
...@@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md). ...@@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md).
## License ## License
* Copyright (C) 2022 Indiscale GmbH <info@indiscale.com> * Copyright (C) 2022-2024 Indiscale GmbH <info@indiscale.com>
All files in this repository are licensed under a [GNU Affero General Public All files in this repository are licensed under a [GNU Affero General Public
License](LICENSE.md) (version 3 or later). License](LICENSE.md) (version 3 or later).
# Release Guidelines for the CaosDB Python Client Library # Release Guidelines for the LinkAhead C++ Client Library
This document specifies release guidelines in addition to the generel release This document specifies release guidelines in addition to the generel release
guidelines of the CaosDB Project guidelines of the LinkAhead Project
([RELEASE_GUIDELINES.md](https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md)) ([RELEASE_GUIDELINES.md](https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md))
## General Prerequisites ## General Prerequisites
...@@ -25,7 +25,7 @@ guidelines of the CaosDB Project ...@@ -25,7 +25,7 @@ guidelines of the CaosDB Project
1. In [CMakeLists.txt](./CMakeLists.txt): Check the version variables and 1. In [CMakeLists.txt](./CMakeLists.txt): Check the version variables and
make sure that the compatible caosdb-server version is set correctly. make sure that the compatible caosdb-server version is set correctly.
2. In `conanfile.py`: Update the `version` variable. 2. In `conanfile.py`: Update the `version` variable.
3. In `caosdb-cppinttest/conanfile.py`: Update the version 3. In `linkahead-cppinttest/conanfile.py`: Update the version
5. Merge the release branch into the main branch. 5. Merge the release branch into the main branch.
......
...@@ -5,14 +5,14 @@ from conan.tools.files import copy ...@@ -5,14 +5,14 @@ from conan.tools.files import copy
from conan.errors import ConanInvalidConfiguration from conan.errors import ConanInvalidConfiguration
class CaosdbConan(ConanFile): class LinkAheadConan(ConanFile):
name = "caosdb" name = "linkahead"
version = "0.3.0-dev" version = "0.3.0-dev"
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
author = "Timm C. Fitschen <t.fitschen@indiscale.com>" author = "Timm C. Fitschen <t.fitschen@indiscale.com>"
url = "https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib.git" url = "https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib.git"
description = "C++ library for the CaosDB project" description = "C++ library for the LinkAhead project"
topics = ("data management", "caosdb") topics = ("data management", "linkahead", "caosdb")
settings = "os", "compiler", "build_type", "arch" settings = "os", "compiler", "build_type", "arch"
options = { options = {
"shared": [True, False], "shared": [True, False],
...@@ -35,11 +35,11 @@ class CaosdbConan(ConanFile): ...@@ -35,11 +35,11 @@ class CaosdbConan(ConanFile):
def build_requirements(self): def build_requirements(self):
self.tool_requires("protobuf/3.21.12") self.tool_requires("protobuf/3.21.12")
self.tool_requires("cmake/[>=3.13]") self.tool_requires("cmake/[>=3.13]")
self.tool_requires("boost/1.78.0") self.tool_requires("boost/1.80.0")
self.test_requires("gtest/1.11.0") self.test_requires("gtest/1.11.0")
self.requires("grpc/1.48.4") self.requires("grpc/1.48.4")
self.requires("protobuf/3.21.12") self.requires("protobuf/3.21.12")
self.requires("boost/1.78.0") self.requires("boost/1.80.0")
def config_options(self): def config_options(self):
if self.settings.os == "Windows": if self.settings.os == "Windows":
...@@ -71,12 +71,18 @@ class CaosdbConan(ConanFile): ...@@ -71,12 +71,18 @@ class CaosdbConan(ConanFile):
cmake = CMake(self) cmake = CMake(self)
cmake.configure() cmake.configure()
cmake.build(target=["all"]) # , "ccaosdbcli", "cxxcaosdbcli"]) cmake.build(target=["all"]) # , "clinkaheadcli", "cxxlinkaheadcli"])
def package(self): def package(self):
cmake = CMake(self) cmake = CMake(self)
cmake.install() cmake.install()
print(copy(self, pattern="*.h",
src=os.path.join(self.build_folder, "include"),
dst=os.path.join(self.package_folder, "include")))
print(copy(self, pattern="*.h",
dst=os.path.join(self.package_folder, "include"),
src=os.path.join(self.source_folder, "include")))
copy(self, pattern="*.h", copy(self, pattern="*.h",
dst=os.path.join(self.package_folder, "include"), dst=os.path.join(self.package_folder, "include"),
src=os.path.join(self.source_folder, "include")) src=os.path.join(self.source_folder, "include"))
...@@ -90,7 +96,7 @@ class CaosdbConan(ConanFile): ...@@ -90,7 +96,7 @@ class CaosdbConan(ConanFile):
dst=os.path.join(self.package_folder, "lib"), keep_path=False) dst=os.path.join(self.package_folder, "lib"), keep_path=False)
def package_info(self): def package_info(self):
self.cpp_info.libs = ["caosdb", "ccaosdb"] self.cpp_info.libs = ["linkahead", "clinkahead" ]
self.cpp_info.requires = ["boost::headers", "grpc::grpc", "protobuf::protobuf"] self.cpp_info.requires = ["boost::headers", "grpc::grpc", "protobuf::protobuf"]
def validate(self): def validate(self):
......
...@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Renamed the project to linkahead-cpplib
- Updated dependency versions. - Updated dependency versions.
- Updated Python dependencies for Conan 2 and support Python 3.12. - Updated Python dependencies for Conan 2 and support Python 3.12.
- Updated C++ package manager Conan to 2.5.0. - Updated C++ package manager Conan to 2.5.0.
...@@ -26,6 +27,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -26,6 +27,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Values can now hold empty vectors and do not silently convert them into a scalar. - Values can now hold empty vectors and do not silently convert them into a scalar.
- [indiscale#34](https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib/-/issues/34)
Building shared libraries on Windows.
### Security ### Security
......
# #
# This file is a part of the CaosDB Project. # This file is a part of the LinkAhead Project.
# #
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
...@@ -23,7 +23,7 @@ find_package(Doxygen) ...@@ -23,7 +23,7 @@ find_package(Doxygen)
if (DOXYGEN_FOUND) if (DOXYGEN_FOUND)
string(REPLACE ";" " " DOXYGEN_INPUT string(REPLACE ";" " " DOXYGEN_INPUT
"${libcaosdb_INCL} ${PROJECT_INCLUDE_DIR}/ccaosdb.h") "${liblinkahead_INCL} ${PROJECT_INCLUDE_DIR}/clinkahead.h")
configure_file(Doxyfile.in Doxyfile) configure_file(Doxyfile.in Doxyfile)
...@@ -43,10 +43,10 @@ if (DOXYGEN_FOUND) ...@@ -43,10 +43,10 @@ if (DOXYGEN_FOUND)
configure_file(cppapi/index.rst.in cppapi/index.rst) configure_file(cppapi/index.rst.in cppapi/index.rst)
# create rst pages for every header file # create rst pages for every header file
list(LENGTH libcaosdb_INCL len_header_files) list(LENGTH liblinkahead_INCL len_header_files)
math(EXPR len_header_files "${len_header_files} - 1") math(EXPR len_header_files "${len_header_files} - 1")
foreach (i RANGE "${len_header_files}") foreach (i RANGE "${len_header_files}")
list(GET libcaosdb_INCL ${i} HEADER_FILE) list(GET liblinkahead_INCL ${i} HEADER_FILE)
string(REPLACE string(REPLACE
"${PROJECT_INCLUDE_DIR}/" "${PROJECT_INCLUDE_DIR}/"
"" ""
...@@ -58,7 +58,7 @@ if (DOXYGEN_FOUND) ...@@ -58,7 +58,7 @@ if (DOXYGEN_FOUND)
HEADER_FILE_NAME HEADER_FILE_NAME
${HEADER_FILE_NAME}) ${HEADER_FILE_NAME})
string(REPLACE string(REPLACE
"caosdb/" "linkahead/"
"" ""
DOC_FILE_NAME DOC_FILE_NAME
${HEADER_FILE_NAME}) ${HEADER_FILE_NAME})
...@@ -69,11 +69,11 @@ if (DOXYGEN_FOUND) ...@@ -69,11 +69,11 @@ if (DOXYGEN_FOUND)
# create (plain) C docs # create (plain) C docs
configure_file(capi/index.rst.in capi/index.rst) configure_file(capi/index.rst.in capi/index.rst)
set(HEADER_FILE_NAME ccaosdb.h) set(HEADER_FILE_NAME clinkahead.h)
set(HEADER_FILE ccaosdb.h) set(HEADER_FILE clinkahead.h)
configure_file( configure_file(
header_file.rst.in header_file.rst.in
capi/_ccaosdb.rst) capi/_clinkahead.rst)
add_custom_target(doc-sphinx add_custom_target(doc-sphinx
COMMAND ${SPHINX_CMD} COMMAND ${SPHINX_CMD}
......
...@@ -11,7 +11,7 @@ Exact versions of some packages here are listed in `requirements.txt`. ...@@ -11,7 +11,7 @@ Exact versions of some packages here are listed in `requirements.txt`.
## Compiling ## ## Compiling ##
``` ```
>=conan-1.54.0 (e.g. with `pip install conan`) >=conan-2.5.0 (e.g. with `pip install conan`)
>=cmake-3.13 >=cmake-3.13
>=gcc-10.2.0 | >=clang-11 >=gcc-10.2.0 | >=clang-11
``` ```
......
...@@ -2,18 +2,18 @@ Examples ...@@ -2,18 +2,18 @@ Examples
======== ========
Connect to a CaosDB server Connect to a LinkAhead server
-------------------------- --------------------------
See also the hints on how to :doc:`get started<Install_develop>`, and set-up of libcaosdb. In order See also the hints on how to :doc:`get started<Install_develop>`, and set-up of liblinkahead. In order
to connect to a CaosDB server with libcaosdb you first have to configure the connection via a to connect to a LinkAhead server with liblinkahead you first have to configure the connection via a
configuration file as explained in the :ref:`"Client Configuration" section <Client configuration file as explained in the :ref:`"Client Configuration" section <Client
Configuration>`. Once the configuration is set up, connecting to the server is as easy as Configuration>`. Once the configuration is set up, connecting to the server is as easy as
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
You can print the full version of the server that you are connected to (and You can print the full version of the server that you are connected to (and
therby test the connection) via: therby test the connection) via:
...@@ -32,19 +32,19 @@ therby test the connection) via: ...@@ -32,19 +32,19 @@ therby test the connection) via:
Retrieve a Record Retrieve a Record
----------------- -----------------
With libcaosdb you can create a transaction With liblinkahead you can create a transaction
object, fill it with sub-requests, execute it, and retrieve the object, fill it with sub-requests, execute it, and retrieve the
result(s) . This result(s) . This
is handy when you want to have several requests in the same transaction. is handy when you want to have several requests in the same transaction.
However, most of the time, e.g., when retrieving one or multiple However, most of the time, e.g., when retrieving one or multiple
Records, this is not necessary. libcaosdb provides helper functions so Records, this is not necessary. liblinkahead provides helper functions so
you don’t have to worry about transactions and their executions. Assume you don’t have to worry about transactions and their executions. Assume
you want to retrieve an Entity with id=123. This is done via you want to retrieve an Entity with id=123. This is done via
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
auto transaction(connection->CreateTransaction()); auto transaction(connection->CreateTransaction());
...@@ -57,9 +57,9 @@ you want to retrieve an Entity with id=123. This is done via ...@@ -57,9 +57,9 @@ you want to retrieve an Entity with id=123. This is done via
const auto &entity = result_set.at(0) const auto &entity = result_set.at(0)
You can then use the getter methods like :cpp:any:`GetId<caosdb::entity::Entity::GetId>`, You can then use the getter methods like :cpp:any:`GetId<linkahead::entity::Entity::GetId>`,
:cpp:any:`GetParents<caosdb::entity::Entity::GetParents>`, or :cpp:any:`GetParents<linkahead::entity::Entity::GetParents>`, or
:cpp:any:`GetProperties`<caosdb::entity::Entity::GetProperties>` to get the name, the parents, or :cpp:any:`GetProperties`<linkahead::entity::Entity::GetProperties>` to get the name, the parents, or
the properties of the retrieved entity. the properties of the retrieved entity.
Retrieving multiple entities works in the same way. Type Retrieving multiple entities works in the same way. Type
...@@ -78,7 +78,7 @@ transaction manually. This is done by ...@@ -78,7 +78,7 @@ transaction manually. This is done by
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
auto transaction(connection->CreateTransaction()); auto transaction(connection->CreateTransaction());
transaction->RetrieveById("1231"); transaction->RetrieveById("1231");
...@@ -86,7 +86,7 @@ transaction manually. This is done by ...@@ -86,7 +86,7 @@ transaction manually. This is done by
auto status = transaction->Execute(); auto status = transaction->Execute();
A result set can be obtained via A result set can be obtained via
:cpp:any:`GetResultSet`<caosdb::transaction::Transaction::GetResultSet>` which contains the :cpp:any:`GetResultSet`<linkahead::transaction::Transaction::GetResultSet>` which contains the
resulting entities and can, e.g., be checked for length. resulting entities and can, e.g., be checked for length.
Execute queries Execute queries
...@@ -98,12 +98,12 @@ ids. ...@@ -98,12 +98,12 @@ ids.
FIND and SELECT queries FIND and SELECT queries
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
In general, entities can be found using CaosDB’s query language like In general, entities can be found using LinkAhead’s query language like
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
auto query_transaction(connection->CreateTransaction()); auto query_transaction(connection->CreateTransaction());
query_transaction->Query("FIND ENTITY WITH id = 1222"); query_transaction->Query("FIND ENTITY WITH id = 1222");
...@@ -119,7 +119,7 @@ inspected as above. ...@@ -119,7 +119,7 @@ inspected as above.
:: ::
SELECT queries haven't been implemented in the C++ client yet and SELECT queries haven't been implemented in the C++ client yet and
thus cannot be executed from libcaosdb right now. SELECT queries thus cannot be executed from liblinkahead right now. SELECT queries
will be added in a future release. will be added in a future release.
COUNT queries COUNT queries
...@@ -129,12 +129,12 @@ COUNT queries are different from FIND or SELECT queries in two ways. ...@@ -129,12 +129,12 @@ COUNT queries are different from FIND or SELECT queries in two ways.
Firstly, they do not return entities but a single number which is why, Firstly, they do not return entities but a single number which is why,
secondly, they do not have a result set that could be returned. secondly, they do not have a result set that could be returned.
The result of the count is The result of the count is
obtained using the :cpp:any:`GetCountResult<caosdb::transaction::Transaction::GetCountResult>` function: obtained using the :cpp:any:`GetCountResult<linkahead::transaction::Transaction::GetCountResult>` function:
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
auto query_transaction(connection->CreateTransaction()); auto query_transaction(connection->CreateTransaction());
query_transaction->Query("COUNT RECORD person WITH NAME LIKE '*Baggins'"); query_transaction->Query("COUNT RECORD person WITH NAME LIKE '*Baggins'");
...@@ -151,7 +151,7 @@ task is added to a transaction and the transaction is executed. ...@@ -151,7 +151,7 @@ task is added to a transaction and the transaction is executed.
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
// ######## INSERT ######## // ######## INSERT ########
...@@ -210,7 +210,7 @@ Up- and Download a file ...@@ -210,7 +210,7 @@ Up- and Download a file
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
Entity file; Entity file;
file.SetRole(Role::FILE); file.SetRole(Role::FILE);
......
# Features # Features
This library provides a client for communication with a CaosDB server over the This library provides a client for communication with a LinkAhead server over the
CaosDB GRPC-APIs. The client supports LinkAhead GRPC-APIs. The client supports
* Transaction of entities and file transmission. * Transaction of entities and file transmission.
* Authentication via Username/Password. * Authentication via Username/Password.
...@@ -11,18 +11,18 @@ CaosDB GRPC-APIs. The client supports ...@@ -11,18 +11,18 @@ CaosDB GRPC-APIs. The client supports
* File-based configuration. * File-based configuration.
The core is written in C++ and makes heavy use of object-oriented patterns. It The core is written in C++ and makes heavy use of object-oriented patterns. It
results in a c++ library -- libcaosdb. results in a c++ library -- liblinkahead.
For using the library in a plain C context, a thin wrapper is included For using the library in a plain C context, a thin wrapper is included
-- libccaosdb. It wrapps the C++ classes into structs and the member methods -- libclinkahead. It wrapps the C++ classes into structs and the member methods
into functions which operate on the wrapped C++ instances. into functions which operate on the wrapped C++ instances.
Minimal testing executables in C++ and C are included as well, but they only Minimal testing executables in C++ and C are included as well, but they only
serve as just that -- minimal testing. serve as just that -- minimal testing.
## CaosDB Entitiy API ## LinkAhead Entitiy API
This library implements a subset of the CaosDB Entitiy API (caosdb.entity.v1) This library implements a subset of the LinkAhead Entitiy API (caosdb.entity.v1)
as a client. as a client.
Current limitations: The implementation does not support mixing retrievals with Current limitations: The implementation does not support mixing retrievals with
...@@ -32,12 +32,12 @@ write-transactions. ...@@ -32,12 +32,12 @@ write-transactions.
Support for `FIND`, `SELECT` and `COUNT` queries. Support for `FIND`, `SELECT` and `COUNT` queries.
## CaosDB Info API ## LinkAhead Info API
This library implements the CaosDB Info API (caosdb.info.v1) as a client This library implements the LinkAhead Info API (caosdb.info.v1) as a client
without limitations. without limitations.
## CaosDB ACM (Access Control Management) API ## LinkAhead ACM (Access Control Management) API
This library implements small parts of the experimental ACM API This library implements small parts of the experimental ACM API
(caosdb.acm.v1alpha1) as a client. (caosdb.acm.v1alpha1) as a client.
...@@ -46,7 +46,7 @@ This library implements small parts of the experimental ACM API ...@@ -46,7 +46,7 @@ This library implements small parts of the experimental ACM API
Currently, the library should not be considered thread-safe. Currently, the library should not be considered thread-safe.
The `caosdb::transaction::Transaction` class is designed with an with an The `linkahead::transaction::Transaction` class is designed with an with an
interface ready for concurrent and asyncronous transactions. While it is interface ready for concurrent and asyncronous transactions. While it is
possible to execute transactions in non-blocking mode and call `GetStatus` possible to execute transactions in non-blocking mode and call `GetStatus`
concurrently, it is not possible to use any of the non-const methods of the concurrently, it is not possible to use any of the non-const methods of the
......
How to use and develop libcaosdb How to use and develop liblinkahead
================================ ================================
Dependencies Dependencies
...@@ -31,7 +31,7 @@ package manager. The compiler must support the C++17 standard. ...@@ -31,7 +31,7 @@ package manager. The compiler must support the C++17 standard.
4. ``cmake -S ../.. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release`` 4. ``cmake -S ../.. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release``
5. ``cmake --build .`` 5. ``cmake --build .``
You may also want to install libcaosdb system-wide to You may also want to install liblinkahead system-wide to
``CMAKE_INSTALL_PREFIX/lib`` by ``CMAKE_INSTALL_PREFIX/lib`` by
1. ``cmake --install .`` 1. ``cmake --install .``
...@@ -42,13 +42,13 @@ command (4.). ...@@ -42,13 +42,13 @@ command (4.).
.. Note:: .. Note::
The C++ CaosDB library links against other libraries which are installed by Conan. So if you want The C++ LinkAhead library links against other libraries which are installed by Conan. So if you want
to switch to newer versions of those libraries (possible reasons may be security releases or bug to switch to newer versions of those libraries (possible reasons may be security releases or bug
fixes), it is not sufficient to update your system libraries, but you have to update your Conan fixes), it is not sufficient to update your system libraries, but you have to update your Conan
content and then rebuild libcaosdb. content and then rebuild liblinkahead.
If you want to build or install libcaosdb without the use of Conan, feel If you want to build or install liblinkahead without the use of Conan, feel
free to rewrite the CMakeLists.txt as needed. The CaosDB project is open free to rewrite the CMakeLists.txt as needed. The LinkAhead project is open
to merge requests which support multiple ways of installation. to merge requests which support multiple ways of installation.
Optional: Building with ``vcpkg`` Optional: Building with ``vcpkg``
...@@ -111,12 +111,12 @@ as compiler. We use `cmake <https://cmake.org/download/>`__ as build ...@@ -111,12 +111,12 @@ as compiler. We use `cmake <https://cmake.org/download/>`__ as build
tool. tool.
1. Install Python and create a virtual environment with the dependencies in `requirements.txt`. 1. Install Python and create a virtual environment with the dependencies in `requirements.txt`.
2. Activate the environment run in the repository folder: :code:``conan install . --build=missing -s build_type=Release`` 2. Activate the environment run in the repository folder: ``conan install . --build=missing -s build_type=Release``
3. ``cmake --preset conan-default`` 3. ``cmake --preset conan-default``
4. Open ``libcaosdb.sln`` with Visual Studio, change the buildtype to 4. Open ``build/liblinkahead.sln`` with Visual Studio, change the
``Release`` and build the project (ALL_BUILD). (You can open Tools/Command buildtype to ``Release`` and build the project (ALL_BUILD). (You
Line/Developer Command Prompt and execute can open Tools/Command Line/Developer Command Prompt and execute
``msbuild libcaosdb.sln /property:Configuration=Release``) ``msbuild liblinkahead.sln /property:Configuration=Release``)
5. Try running the cli clients in ``.\build\Release\``. 5. Try running the cli clients in ``.\build\Release\``.
Known problems Known problems
...@@ -182,23 +182,31 @@ Client Configuration ...@@ -182,23 +182,31 @@ Client Configuration
-------------------- --------------------
You can use a json file for the configuration of the client. See You can use a json file for the configuration of the client. See
``test/test_data/test_caosdb_client.json`` for an example. You may use ``test/test_data/test_linkahead_client.json`` for an example. You may use
``caosdb-client-configuration-schema.json`` to validate your schema. ``linkahead-client-configuration-schema.json`` to validate your schema.
Typically, you will need to provide the path to your SSL certificate. Typically, you will need to provide the path to your SSL certificate.
The client will load the configuration file from the first existing file The client will load the configuration file from the first existing file
in the following locations (precedence from highest to lowest): in the following locations (precedence from highest to lowest):
1. A file specified by the environment variable 1. A file specified by the environment variable ``$LINKAHEAD_CLIENT_CONFIGURATION``.
``$CAOSDB_CLIENT_CONFIGURATION``. 2. ``$PWD/linkahead_client.json``
2. ``$PWD/caosdb_client.json`` 3. ``$PWD/linkahead-client.json``
3. ``$PWD/caosdb-client.json`` 4. ``$PWD/.linkahead_client.json``
4. ``$PWD/.caosdb_client.json`` 5. ``$PWD/.linkahead-client.json``
5. ``$PWD/.caosdb-client.json`` 6. ``$HOME/linkahead_client.json``
6. ``$HOME/caosdb_client.json`` 7. ``$HOME/linkahead-client.json``
7. ``$HOME/caosdb-client.json`` 8. ``$HOME/.linkahead_client.json``
8. ``$HOME/.caosdb_client.json`` 9. ``$HOME/.linkahead-client.json``
9. ``$HOME/.caosdb-client.json`` 10. A file specified by the environment variable ``$CAOSDB_CLIENT_CONFIGURATION``.
11. ``$PWD/caosdb_client.json``
12. ``$PWD/caosdb-client.json``
13. ``$PWD/.caosdb_client.json``
14. ``$PWD/.caosdb-client.json``
15. ``$HOME/caosdb_client.json``
16. ``$HOME/caosdb-client.json``
17. ``$HOME/.caosdb_client.json``
18. ``$HOME/.caosdb-client.json``
Develop Develop
------- -------
......
.. ..
# #
# This file is a part of the CaosDB Project. # This file is a part of the LinkAhead Project.
# #
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
.. note:: .. note::
When working with libcaosdb's C API keep the following in mind: When working with liblinkahead's C API keep the following in mind:
Delete all objects (transactions, entities, properties, parents, ...) that you created using a Delete all objects (transactions, entities, properties, parents, ...) that you created using a
call to ``caosdb_..._create_...`` or released using ``caosdb_..._release_...`` and only those. call to ``linkahead_..._create_...`` or released using ``linkahead_..._release_...`` and only those.
Specifically, any objects set by a ``caosdb_..._get_...`` function are managed by another owning Specifically, any objects set by a ``linkahead_..._get_...`` function are managed by another owning
object (e.g., a connection object is managed by the connection manager) and thus should not be object (e.g., a connection object is managed by the connection manager) and thus should not be
deleted manually. deleted manually.
......
.. ..
# #
# This file is a part of the CaosDB Project. # This file is a part of the LinkAhead Project.
# #
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
C++ API C++ API
========= =========
This is the C++ library for connecting to CaosDB. If you are interested in code examples, please This is the C++ library for connecting to LinkAhead. If you are interested in code examples, please
refer to the corresponding :doc:`documentation section<examples.rst>`. refer to the corresponding :doc:`documentation section<examples.rst>`.
......
.. ..
# #
# This file is a part of the CaosDB Project. # This file is a part of the LinkAhead Project.
# #
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
...@@ -29,4 +29,4 @@ ...@@ -29,4 +29,4 @@
:hidden: :hidden:
.. doxygenfile:: @HEADER_FILE@ .. doxygenfile:: @HEADER_FILE@
:project: libcaosdb :project: liblinkahead
.. ..
# #
# This file is a part of the CaosDB Project. # This file is a part of the LinkAhead Project.
# #
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
......
# #
# This file is a part of the CaosDB Project. # This file is a part of the LinkAhead Project.
# #
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021-2024 IndiScale GmbH <info@indiscale.com>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
...@@ -19,47 +19,47 @@ ...@@ -19,47 +19,47 @@
# #
# add all header files to this list # add all header files to this list
set(libcaosdb_INCL set(liblinkahead_INCL
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/authentication.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/authentication.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/certificate_provider.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/certificate_provider.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/configuration.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/configuration.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/connection.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/connection.h
${CMAKE_CURRENT_BINARY_DIR}/caosdb/constants.h ${CMAKE_CURRENT_BINARY_DIR}/linkahead/constants.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/data_type.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/data_type.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/entity.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/entity.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/exceptions.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/exceptions.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_descriptor.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/file_descriptor.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/handler_interface.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/handler_interface.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/info.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/info.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/log_level.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/log_level.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/logging.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/logging.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/message_code.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/message_code.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/protobuf_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/protobuf_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/result_table.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/result_table.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/result_set.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/result_set.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/status_code.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/status_code.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/transaction.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/transaction.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/transaction_handler.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/transaction_handler.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/transaction_status.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/transaction_status.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/unary_rpc_handler.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/unary_rpc_handler.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/utility.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/utility.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/value.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/value.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/register_file_upload_handler.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/file_transmission/register_file_upload_handler.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/upload_request_handler.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/file_transmission/upload_request_handler.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/download_request_handler.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/file_transmission/download_request_handler.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/file_writer.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/file_transmission/file_writer.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/file_reader.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/file_transmission/file_reader.h
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/file_error.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/file_transmission/file_error.h
) )
IF(BUILD_ACM) IF(BUILD_ACM)
list(APPEND libcaosdb_INCL list(APPEND liblinkahead_INCL
${CMAKE_CURRENT_SOURCE_DIR}/caosdb/acm/user.h ${CMAKE_CURRENT_SOURCE_DIR}/linkahead/acm/user.h
) )
ENDIF() ENDIF()
# pass variable to parent scope # pass variable to parent scope
set(libcaosdb_INCL ${libcaosdb_INCL} PARENT_SCOPE) set(liblinkahead_INCL ${liblinkahead_INCL} PARENT_SCOPE)
# initialize constants # initialize constants
configure_file(caosdb/constants.h.in caosdb/constants.h) configure_file(linkahead/constants.h.in linkahead/constants.h)
This diff is collapsed.
This diff is collapsed.