diff --git a/TODOs.md b/TODOs.md index 99b5660..ff29a86 100644 --- a/TODOs.md +++ b/TODOs.md @@ -7,14 +7,14 @@ - [x] Add documentation (install instructions, usage) - [x] Allow making 3rdparty classes/structs reflectable - [x] Add additional parameter for code generator to allow specifying relevant classes - explicitely + explicitly - [x] Fix traits currently relying on `JsonSerializable` being base class - [x] Allow exporting symbols - [x] Fix the massive number of warnings which are currently being created by the code generator (missing `-resource-dir` was the problem) - [ ] Test with libc++ (currently only tested with libstdc++) - [ ] Support templated classes - [ ] Allow (de)serialization of static members (if that makes sense?) -- [ ] Allow ignoring particular members or selecting specificly which member variables should be considered +- [ ] Allow ignoring particular members or selecting specifically which member variables should be considered * This could work similar to Qt's Signals & Slots macros. * but there should also be a way to do this for 3rdparty types. * Note that currently, *all* public member variables are (de)serialized. diff --git a/generator/codefactory.cpp b/generator/codefactory.cpp index ff5c1c7..46f7bf9 100644 --- a/generator/codefactory.cpp +++ b/generator/codefactory.cpp @@ -85,7 +85,7 @@ bool CodeFactory::generate() const } /*! - * \brief Reads (relevent) AST elements using Clang and generates code. + * \brief Reads (relevant) AST elements using Clang and generates code. */ bool CodeFactory::run() { diff --git a/generator/main.cpp b/generator/main.cpp index d10909f..e3aa4b3 100644 --- a/generator/main.cpp +++ b/generator/main.cpp @@ -123,14 +123,14 @@ int main(int argc, char *argv[]) // read AST elements from input files and run the code generator if (!factory.run()) { - cerr << Phrases::Error << "Errors occured." << Phrases::EndFlush; + cerr << Phrases::Error << "Errors occurred." << Phrases::EndFlush; return -2; } } catch (const std::ios_base::failure &failure) { const char *errorMessage = failure.what(); if (os) { - errorMessage = os->fail() || os->bad() ? "An IO error occured when writing to the output stream." : "An IO error occured."; + errorMessage = os->fail() || os->bad() ? "An IO error occurred when writing to the output stream." : "An IO error occurred."; } else { errorMessage = "An IO error when opening output stream."; } diff --git a/generator/tests/jsongenerator.cpp b/generator/tests/jsongenerator.cpp index 9b8b0f9..9b45177 100644 --- a/generator/tests/jsongenerator.cpp +++ b/generator/tests/jsongenerator.cpp @@ -84,7 +84,7 @@ void JsonGeneratorTests::testGeneratorItself() } /*! - * \brief Tests the generator CLI explicitely. + * \brief Tests the generator CLI explicitly. * \remarks Only available under UNIX (like) systems so far, because TESTUTILS_ASSERT_EXEC has not been implemented * for other platforms. */ @@ -164,7 +164,7 @@ void JsonGeneratorTests::testNesting() } /*! - * \brief Like testIncludingGeneratedHeader() but also tests single inheritence. + * \brief Like testIncludingGeneratedHeader() but also tests single inheritance. */ void JsonGeneratorTests::testSingleInheritence() { @@ -193,7 +193,7 @@ void JsonGeneratorTests::testSingleInheritence() } /*! - * \brief Like testIncludingGeneratedHeader() but also tests multiple inheritence. + * \brief Like testIncludingGeneratedHeader() but also tests multiple inheritance. */ void JsonGeneratorTests::testMultipleInheritence() { diff --git a/generator/tests/structs.h b/generator/tests/structs.h index a18aa3d..5957ecd 100644 --- a/generator/tests/structs.h +++ b/generator/tests/structs.h @@ -128,7 +128,7 @@ REFLECTIVE_RAPIDJSON_MAKE_JSON_SERIALIZABLE(NotJsonSerializable); REFLECTIVE_RAPIDJSON_MAKE_JSON_SERIALIZABLE(NestedNotJsonSerializable); /*! - * \brief The OtherNotJsonSerializable struct is used to test whether code for (de)serialization is generated for classes explicitely + * \brief The OtherNotJsonSerializable struct is used to test whether code for (de)serialization is generated for classes explicitly * specified via CMake macro (despite use of REFLECTIVE_RAPIDJSON_ADAPT_JSON_SERIALIZABLE or JsonSerializable is * missing). */ diff --git a/lib/binary/reflector.h b/lib/binary/reflector.h index 89c47d6..32aedc9 100644 --- a/lib/binary/reflector.h +++ b/lib/binary/reflector.h @@ -128,12 +128,12 @@ template (); read(*pointer); return; } - // further occurences: copy previous pointer + // further occurrences: copy previous pointer try { pointer = std::any_cast(m_pointer[id]); } catch (const std::bad_any_cast &) { diff --git a/lib/binary/serializable.h b/lib/binary/serializable.h index 741c3e2..9e65633 100644 --- a/lib/binary/serializable.h +++ b/lib/binary/serializable.h @@ -3,7 +3,7 @@ /*! * \file serializable.h - * \brief Contains only the definiation of the BinarySerializable template class which makes the reflection + * \brief Contains only the definition of the BinarySerializable template class which makes the reflection * accessible. The actual implementation is found in binaryreflector.h and generated files. */ diff --git a/lib/json/errorhandling.h b/lib/json/errorhandling.h index a885ef6..fb34ab5 100644 --- a/lib/json/errorhandling.h +++ b/lib/json/errorhandling.h @@ -110,7 +110,7 @@ struct JsonDeserializationError { JsonDeserializationError(JsonDeserializationErrorKind kind, JsonType expectedType, JsonType actualType, const char *record, const char *member = nullptr, std::size_t index = noIndex); - /// \brief Which kind of error occured. + /// \brief Which kind of error occurred. JsonDeserializationErrorKind kind; /// \brief The expected type (might not be relevant for all error kinds). JsonType expectedType; @@ -123,7 +123,7 @@ struct JsonDeserializationError { /// \brief The index in the array which was being processed when the error was ascertained. std::size_t index; - /// \brief Indicates no array was being processed when the error occured. + /// \brief Indicates no array was being processed when the error occurred. static constexpr std::size_t noIndex = std::numeric_limits::max(); }; diff --git a/lib/json/serializable.h b/lib/json/serializable.h index e27fbdb..66aa1d9 100644 --- a/lib/json/serializable.h +++ b/lib/json/serializable.h @@ -3,7 +3,7 @@ /*! * \file serializable.h - * \brief Contains only the definiation of the JsonSerializable template class which makes the reflection + * \brief Contains only the definition of the JsonSerializable template class which makes the reflection * accessible. The actual implementation is found in jsonreflector.h and generated files. */ diff --git a/lib/tests/jsonreflector.cpp b/lib/tests/jsonreflector.cpp index c016e99..3ba4286 100644 --- a/lib/tests/jsonreflector.cpp +++ b/lib/tests/jsonreflector.cpp @@ -237,7 +237,7 @@ void JsonReflectorTests::testSerializePrimitives() Document::Array array(doc.GetArray()); // string - const string foo("foo"); // musn't be destroyed until JSON is actually written + const string foo("foo"); // mustn't be destroyed until JSON is actually written JsonReflector::push(foo, array, alloc); JsonReflector::push("bar", array, alloc); // number