rename stuff

This commit is contained in:
Green Sky 2022-12-22 15:20:32 +01:00
parent e486d79dc3
commit 175042eb7c
No known key found for this signature in database
7 changed files with 20 additions and 20 deletions

View File

@ -10,17 +10,17 @@ target_include_directories(crdt_version0 INTERFACE "${PROJECT_SOURCE_DIR}")
######################################## ########################################
add_executable(test1 add_executable(v0_test1
./test1.cpp ./test1.cpp
) )
target_link_libraries(test1 PUBLIC crdt_version0) target_link_libraries(v0_test1 PUBLIC crdt_version0)
######################################## ########################################
add_executable(test2 add_executable(v0_test2
./test2.cpp ./test2.cpp
) )
target_link_libraries(test2 PUBLIC crdt_version0) target_link_libraries(v0_test2 PUBLIC crdt_version0)

View File

@ -8,7 +8,7 @@
#include <cassert> #include <cassert>
namespace GreenCRDT { namespace GreenCRDT::V0 {
template<typename ValueType, typename AgentType> template<typename ValueType, typename AgentType>
struct List { struct List {
@ -243,5 +243,5 @@ struct List {
} }
}; };
} // GreenCRDT } // GreenCRDT::V0

View File

@ -6,7 +6,7 @@
//#include <iostream> // debug //#include <iostream> // debug
namespace GreenCRDT { namespace GreenCRDT::V0 {
template<typename AgentType> template<typename AgentType>
struct TextDocument { struct TextDocument {
@ -281,5 +281,5 @@ struct TextDocument {
} }
}; };
} // GreenCRDT } // GreenCRDT::V0

View File

@ -1,5 +1,5 @@
#include <crdt/list.hpp> #include <green_crdt/v0/list.hpp>
#include <crdt/text_document.hpp> #include <green_crdt/v0/text_document.hpp>
#include <numeric> #include <numeric>
#include <random> #include <random>
@ -8,7 +8,7 @@
// single letter agent, for testing only // single letter agent, for testing only
using Agent = char; using Agent = char;
using DocType = GreenCRDT::TextDocument<Agent>; using DocType = GreenCRDT::V0::TextDocument<Agent>;
using ListType = DocType::ListType; using ListType = DocType::ListType;
void testSingle1(void) { void testSingle1(void) {

View File

@ -1,4 +1,4 @@
#include <crdt/text_document.hpp> #include <green_crdt/v0/text_document.hpp>
#include <numeric> #include <numeric>
#include <optional> #include <optional>
@ -9,8 +9,8 @@
// single letter agent, for testing only // single letter agent, for testing only
using Agent = char; using Agent = char;
using Doc = GreenCRDT::TextDocument<Agent>; using Doc = GreenCRDT::V0::TextDocument<Agent>;
using Op = GreenCRDT::TextDocument<Agent>::Op; using Op = Doc::Op;
using ListType = Doc::ListType; using ListType = Doc::ListType;
// maybe switch it up? // maybe switch it up?

View File

@ -1,4 +1,4 @@
#include <crdt/text_document.hpp> #include <green_crdt/v0/text_document.hpp>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
extern "C" { extern "C" {
@ -15,7 +15,7 @@ extern "C" {
// single letter agent, for testing only // single letter agent, for testing only
//using Agent = char; //using Agent = char;
using Agent = uint16_t; // tmp local port using Agent = uint16_t; // tmp local port
using Doc = GreenCRDT::TextDocument<Agent>; using Doc = GreenCRDT::V0::TextDocument<Agent>;
using ListType = Doc::ListType; using ListType = Doc::ListType;
std::ostream& operator<<(std::ostream& out, const std::optional<ListType::ListID>& id) { std::ostream& operator<<(std::ostream& out, const std::optional<ListType::ListID>& id) {

View File

@ -1,4 +1,4 @@
#include <crdt/text_document.hpp> #include <green_crdt/v0/text_document.hpp>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
extern "C" { extern "C" {
@ -59,7 +59,7 @@ struct std::hash<ToxPubKey> {
//using Agent = char; //using Agent = char;
//using Agent = uint16_t; // tmp local port //using Agent = uint16_t; // tmp local port
using Agent = ToxPubKey; using Agent = ToxPubKey;
using Doc = GreenCRDT::TextDocument<Agent>; using Doc = GreenCRDT::V0::TextDocument<Agent>;
using ListType = Doc::ListType; using ListType = Doc::ListType;
struct Command { struct Command {
@ -89,7 +89,7 @@ namespace std {
} }
} // namespace std } // namespace std
namespace GreenCRDT { namespace GreenCRDT::V0 {
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ListType::ListID, NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ListType::ListID,
id, id,
@ -107,7 +107,7 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ListType::OpDel,
id id
) )
} // namespace GreenCRDT } // namespace GreenCRDT::V0
// bc variant <.< // bc variant <.<
namespace std { namespace std {