Skip to content

Commit

Permalink
Update to use latest build of ThorsSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Astari committed Sep 19, 2024
1 parent b88adc9 commit 3ce98ef
Show file tree
Hide file tree
Showing 14 changed files with 140 additions and 35 deletions.
18 changes: 9 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[submodule "docSource/themes/documentation"]
path = docSource/themes/documentation
url = ../andvari-theme-documentation.git
url = ../../Loki-Astari/andvari-theme-documentation.git
[submodule ".build"]
path = build
url = ../ThorMaker.git
url = ../../Loki-Astari/ThorMaker.git
[submodule "third/ThorsStorage"]
path = third/ThorsStorage
url = ../ThorsStorage.git
url = ../../Loki-Astari/ThorsStorage.git
[submodule "third/ThorsCrypto"]
path = third/ThorsCrypto
url = ../ThorsCrypto.git
url = ../../Loki-Astari/ThorsCrypto.git
[submodule "third/ThorsSocket"]
path = third/ThorsSocket
url = ../ThorsSocket.git
url = ../../Loki-Astari/ThorsSocket.git
[submodule "third/ThorsLogging"]
path = third/ThorsLogging
url = ../ThorsLogging.git
url = ../../Loki-Astari/ThorsLogging.git
[submodule "third/ThorsIOUtil"]
path = third/ThorsIOUtil
url = ../ThorsIOUtil.git
url = ../../Loki-Astari/ThorsIOUtil.git
[submodule "third/ThorsMongoAPI"]
path = third/ThorsMongoAPI
url = ../ThorsMongoAPI.git
url = ../../Loki-Astari/ThorsMongoAPI.git
[submodule "third/ThorsSerializer"]
path = third/ThorsSerializer
url = ../ThorsSerializer
url = ../../Loki-Astari/ThorsSerializer
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This library provides a simple and intuitive library for interacting with a Mong

There are two main parts:

1. [ThorsSerializer](https://github.com/Loki-Astari/ThorsSerializer) automatically converts C++ objects into BSON (JSON/YANL).
1. [ThorsSerializer](https://github.com/Loki-Astari/ThorsSerializer) automatically converts C++ objects into BSON (JSON/YAML).
2. [ThorsMongoAPI](https://github.com/Loki-Astari/ThorsMongoAPI) sends and receives MongoDB wire protocol messages.

The main goal of this project is to remove the need to write boilerplate code to save/ restore C++ objects into a MongoDB. Using a declarative style an engineer can define the C++ classes and members that need to be serialized into BSON thus allowing them to be inserted into or retrieved directly to/from a MongoDB.
Expand Down
2 changes: 1 addition & 1 deletion build
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
/* We have found package ZLIB */
#undef HAVE_ZLIB

/* Check for older build tools and use simpler code with old tools */
#undef HOMEBREW_OLD_VERSION_OF_MAC

/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR

Expand Down
117 changes: 101 additions & 16 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ am__quote'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_coverage
enable_vera
enable_colour
enable_dark_mode
Expand Down Expand Up @@ -1465,6 +1466,8 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-coverage Disable coverage tool checks

--disable-vera Disable vera. Disable Static analysis of source.

--disable-colour Turns off text colouring in the makefile output
Expand Down Expand Up @@ -3698,25 +3701,35 @@ fi



# Check whether --enable-coverage was given.
if test ${enable_coverage+y}
then :
enableval=$enable_coverage;
fi

if test "x$enable_coverage" != "xno"
then :

subconfigure="${subconfigure} --disable-coverage"
echo "STARTING COVERAGE CHECK"
if test "x${COV}x" = "xx"
if test "x${COV}x" = "xx"
then :

CXXTOOL=${CXX% *}
if test "${CXXTOOL}" = "g++"
CXXTOOL=${CXX% *}
if test "${CXXTOOL}" = "g++"
then :
COV=gcov

else case e in #(
e)
echo "STARTING COVERAGE CHECK: CHECKING CLANG"
if test "${CXXTOOL}" = "clang++"
if test "${CXXTOOL}" = "clang++"
then :
COV=llvm-cov

else case e in #(
e)
as_fn_error $? "
as_fn_error $? "

Could not determine the coverage tool.

Expand All @@ -3733,27 +3746,30 @@ Another alternative is to explicitly specify the coverage tool to use.

COV=gcov ./confgiure

" "$LINENO" 5
" "$LINENO" 5

;;
;;
esac
fi

;;
;;
esac
fi


fi
${COV} --version 2>&1 | grep -Eo '([[:digit:]]+\.)+[[:digit:]]+' || ${COV} --version 2>&1 | grep -Po '(\d+\.)+\d+' > /dev/null
if test $? != 0
${COV} --version 2>&1 | grep -Eo '([[:digit:]]+\.)+[[:digit:]]+' || ${COV} --version 2>&1 | grep -Po '(\d+\.)+\d+' > /dev/null
if test $? != 0
then :

as_fn_error $? "
as_fn_error $? "

The coverage tool \"${COV}\" does not seem to be working.
The coverage tool \"${COV}\" does not seem to be working.

" "$LINENO" 5
" "$LINENO" 5


fi


fi
Expand Down Expand Up @@ -5681,6 +5697,7 @@ fi




if test "
#include <utility>
int main() {
Expand Down Expand Up @@ -5710,18 +5727,86 @@ _ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: good" >&5

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: good" >&5
printf "%s\n" "good" >&6; }


else case e in #(
e)
as_fn_error $? "

as_fn_error $? "

Error: Your compiler does not seem to support the language features required.
Try updating your compiler to use a more recent version.

Compiler used: ${CXX} ${CXX_STD_FLAG}
" "$LINENO" 5
" "$LINENO" 5



;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CXXFLAGS=${CXXFLAGS_SAVE}



fi




if test "
#include <charconv>
int main() {
char buffer[100];
double value = 12.345;
auto result = std::to_chars(buffer, buffer+100, value, std::chars_format::fixed, 6);
}" != ""
then :

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Checking Compiler Compatibility ${CXX} ${CXX_STD_FLAG}" >&5
printf %s "checking Checking Compiler Compatibility ${CXX} ${CXX_STD_FLAG}... " >&6; }
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

CXXFLAGS_SAVE="${CXXFLAGS}"
CXXFLAGS=${CXX_STD_FLAG}

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

#include <charconv>
int main() {
char buffer[100];
double value = 12.345;
auto result = std::to_chars(buffer, buffer+100, value, std::chars_format::fixed, 6);
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Supports std::to_chars(beigin, end, 12.4" >&5
printf "%s\n" "$as_me: Supports std::to_chars(beigin, end, 12.4" >&6;}


else case e in #(
e)

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Setting HOMEBREW_OLD_VERSION_OF_MAC" >&5
printf "%s\n" "$as_me: Setting HOMEBREW_OLD_VERSION_OF_MAC" >&6;}

printf "%s\n" "#define HOMEBREW_OLD_VERSION_OF_MAC 1" >>confdefs.h

subconfigure="${subconfigure} --with-homebrewCLT=${with_homebrewCLT}"



;;
esac
Expand Down
17 changes: 17 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ int main() {
std::index_sequence<1,2,3,4> seq;
}])

AX_THOR_FUNC_TEST_COMP_ACTION([[
#include <charconv>
int main() {
char buffer[100];
double value = 12.345;
auto result = std::to_chars(buffer, buffer+100, value, std::chars_format::fixed, 6);
}]],
[
AC_MSG_NOTICE([Supports std::to_chars(beigin, end, 12.4])
],
[
AC_MSG_NOTICE([Setting HOMEBREW_OLD_VERSION_OF_MAC])
AC_DEFINE([HOMEBREW_OLD_VERSION_OF_MAC], [1], [Check for older build tools and use simpler code with old tools])
subconfigure="${subconfigure} --with-homebrewCLT=${with_homebrewCLT}"
]
)
LT_INIT
subconfigure="${subconfigure} --with-thorserialize-root=$(pwd)/build "
Expand Down
2 changes: 1 addition & 1 deletion docSource/source/group/usageDeclarationsPointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ No extra work needs to be done to serialize pointers. If the pointer is `nullptr
The `std::unique_ptr<>` behaves just like a pointer during serialization.

#### std::shared_ptr
The `std::shared_ptr` is not currently supported.
The `std::shared_ptr` is correctly de-dupped. i.e. If you have two (or more) shared pointers pointing at the same object then the object is only serialized once (the second time we serialize an id). When de-serializing shared_ptr the reference id is used to reconnect the objects so that the shared pointers now continue to use a shared object.

#### Polymorphic Objects
````C++
Expand Down
2 changes: 1 addition & 1 deletion third/ThorsCrypto
Submodule ThorsCrypto updated 3 files
+1 −1 .gitmodules
+1 −1 build
+34 −13 configure
2 changes: 1 addition & 1 deletion third/ThorsIOUtil
Submodule ThorsIOUtil updated 3 files
+2 −2 .gitmodules
+1 −1 build
+34 −13 configure
2 changes: 1 addition & 1 deletion third/ThorsLogging
Submodule ThorsLogging updated 3 files
+2 −2 .gitmodules
+1 −1 build
+33 −13 configure
2 changes: 1 addition & 1 deletion third/ThorsMongoAPI
2 changes: 1 addition & 1 deletion third/ThorsSerializer
2 changes: 1 addition & 1 deletion third/ThorsSocket
Submodule ThorsSocket updated 3 files
+1 −1 .gitmodules
+1 −1 build
+34 −13 configure
2 changes: 1 addition & 1 deletion third/ThorsStorage
Submodule ThorsStorage updated 3 files
+1 −1 .gitmodules
+1 −1 build
+34 −13 configure

0 comments on commit 3ce98ef

Please sign in to comment.