diff --git a/MDB/imm_mongodb/CMakeLists.txt b/MDB/imm_mongodb/CMakeLists.txt index 8f65fc9..fe2b443 100644 --- a/MDB/imm_mongodb/CMakeLists.txt +++ b/MDB/imm_mongodb/CMakeLists.txt @@ -12,5 +12,7 @@ add_library(imm_mongodb target_link_libraries(imm_mongodb mongocxx +# mongoc-static-1.0 bsoncxx + bson-static-1.0 ) \ No newline at end of file diff --git a/MDB/imm_mongodb/lib/libbson-static-1.0.a b/MDB/imm_mongodb/lib/libbson-static-1.0.a new file mode 100644 index 0000000..2bb7741 Binary files /dev/null and b/MDB/imm_mongodb/lib/libbson-static-1.0.a differ diff --git a/MDB/imm_mongodb/lib/libmongoc-static-1.0.a b/MDB/imm_mongodb/lib/libmongoc-static-1.0.a new file mode 100644 index 0000000..3ad4680 Binary files /dev/null and b/MDB/imm_mongodb/lib/libmongoc-static-1.0.a differ diff --git a/MDB/imm_mongodb/mongocxx/options/create_collection.hpp b/MDB/imm_mongodb/mongocxx/options/create_collection.hpp index 8da3338..7b3e5a5 100644 --- a/MDB/imm_mongodb/mongocxx/options/create_collection.hpp +++ b/MDB/imm_mongodb/mongocxx/options/create_collection.hpp @@ -161,12 +161,12 @@ class MONGOCXX_API create_collection_deprecated { const stdx::optional& size() const; /// - /// Specify configuration to the storage on a per-collection basis. + /// Specify configuration to the message_base on a per-collection basis. /// - /// @note This option is currently only available with the WiredTiger storage engine. + /// @note This option is currently only available with the WiredTiger message_base engine. /// /// @param storage_engine_opts - /// Configuration options specific to the storage engine. + /// Configuration options specific to the message_base engine. /// /// @return /// A reference to the object on which this member function is being called. This facilitates @@ -176,10 +176,10 @@ class MONGOCXX_API create_collection_deprecated { bsoncxx::document::view_or_value storage_engine_opts); /// - /// Gets the current storage engine configuration for this collection. + /// Gets the current message_base engine configuration for this collection. /// /// @return - /// Configuration options specific to the storage engine. + /// Configuration options specific to the message_base engine. /// const stdx::optional& storage_engine() const; diff --git a/MDB/imm_mongodb/mongocxx/options/index.hpp b/MDB/imm_mongodb/mongocxx/options/index.hpp index 001cf43..519862c 100644 --- a/MDB/imm_mongodb/mongocxx/options/index.hpp +++ b/MDB/imm_mongodb/mongocxx/options/index.hpp @@ -41,7 +41,7 @@ namespace options { class MONGOCXX_API index { public: /// - /// Base class representing the optional storage engine options for indexes. + /// Base class representing the optional message_base engine options for indexes. /// class MONGOCXX_API base_storage_options { public: @@ -53,7 +53,7 @@ class MONGOCXX_API index { }; /// - /// Class representing the optional WiredTiger storage engine options for indexes. + /// Class representing the optional WiredTiger message_base engine options for indexes. /// class MONGOCXX_API wiredtiger_storage_options final : public base_storage_options { public: @@ -216,11 +216,11 @@ class MONGOCXX_API index { const stdx::optional& sparse() const; /// - /// Optionally used only in MongoDB 3.0.0 and higher. Specifies the storage engine options for + /// Optionally used only in MongoDB 3.0.0 and higher. Specifies the message_base engine options for /// the index. /// /// @param storage_options - /// The storage engine options for the index. + /// The message_base engine options for the index. /// /// @return /// A reference to the object on which this member function is being called. This facilitates @@ -229,11 +229,11 @@ class MONGOCXX_API index { index& storage_options(std::unique_ptr storage_options); /// - /// Optionally used only in MongoDB 3.0.0 and higher. Specifies the WiredTiger-specific storage + /// Optionally used only in MongoDB 3.0.0 and higher. Specifies the WiredTiger-specific message_base /// engine options for the index. /// /// @param storage_options - /// The storage engine options for the index. + /// The message_base engine options for the index. /// index& storage_options(std::unique_ptr storage_options); diff --git a/MDB/imm_mongodb/mongocxx/read_concern.hpp b/MDB/imm_mongodb/mongocxx/read_concern.hpp index 5e1855d..0e58b7f 100644 --- a/MDB/imm_mongodb/mongocxx/read_concern.hpp +++ b/MDB/imm_mongodb/mongocxx/read_concern.hpp @@ -37,7 +37,7 @@ class uri; /// collection level. The read concern can also be provided via connection string, and will be /// parsed and set on the client constructed for the URI. /// -/// For the WiredTiger storage engine, MongoDB 3.2 introduced the readConcern option for replica +/// For the WiredTiger message_base engine, MongoDB 3.2 introduced the readConcern option for replica /// sets and replica set shards. The readConcern option allows clients to choose a level of /// isolation for their reads. You can specify a readConcern of "majority" to read data that has /// been written to a majority of nodes and thus cannot be rolled back. By default, MongoDB uses a @@ -45,7 +45,7 @@ class uri; /// /// MongoDB 3.4 introduces a read concern level of "linearizable" to read data that has been written /// to a majority of nodes (i.e. cannot be rolled back) @b and is not stale. Linearizable read -/// concern is available for all MongoDB supported storage engines and applies to read operations on +/// concern is available for all MongoDB supported message_base engines and applies to read operations on /// a single document. Note that writes must be made with majority write concern in order for reads /// to be linearizable. /// diff --git a/MDB/imm_mongodb/template/MsgTemplate.h b/MDB/imm_mongodb/template/MsgTemplate.h index f039d96..c0f2728 100644 --- a/MDB/imm_mongodb/template/MsgTemplate.h +++ b/MDB/imm_mongodb/template/MsgTemplate.h @@ -18,20 +18,31 @@ using bsoncxx::builder::basic::make_document; class MsgTemplate { public: - static bsoncxx::document::view session_msg(mp::MP_SUB_TYPE msg_type, mp::MP_SUB_TYPE session_type, + + /** + * 对于 mongo 的 通用消息 插入模板 + * @param msg_type 消息类型 + * @param session_type 会话类型 + * @param message_id 消息id + * @param time 消息时间 + * @param account 消息来源 + * @param msg_data 消息数据 + * @return make_document -》 mongocxx + */ + static bsoncxx::document::value session_msg(mp::MP_SUB_TYPE msg_type, mp::MP_SUB_TYPE session_type, int64_t message_id, time_t time, int64_t account, const std::string& msg_data) { // 要插入的视图 auto doc_value = make_document( kvp("msg_type", msg_type), // 200 text消息 kvp("session_type", session_type), // 300 单体会话 - kvp("message_id", message_id), // 0 会话级id - kvp("date", time), // 时间 + kvp("msg_id", message_id), // 0 会话级id + kvp("time", time), // 时间 kvp("account", account), // 目标/来源 kvp("msg_data", msg_data.c_str()) // 消息内容 ); - return doc_value.view(); + return doc_value; } }; diff --git a/MS/works/service/PEVerifCodeService.cpp b/MS/works/service/PEVerifCodeService.cpp index 90099d2..537471d 100644 --- a/MS/works/service/PEVerifCodeService.cpp +++ b/MS/works/service/PEVerifCodeService.cpp @@ -21,9 +21,15 @@ mp::sri* PEVerifCodeService::send_email(const std::string &target_email, const s sri_clear(); emailcode = code == "0" ? emailcode : code; + // 检查发送验证码 bool state = send_email_def(target_email, emailcode); + // 检查邮箱 + auto [is_exist, user] = userDb.select_user(target_email, "email"); - if (state) { + if (is_exist) { + sri->set_subcommand(mp::MP_SUB_TYPE::MP_REGISTER_FAIL); + sri->set_msg("邮箱已使用!"); + } else if (state) { sri->set_subcommand(mp::MP_SUB_TYPE::MP_CODE_SUCCESS); sri->set_msg("验证码已发送"); } else { diff --git a/MS/works/service/PEVerifCodeService.h b/MS/works/service/PEVerifCodeService.h index b4e5eef..019e5cb 100644 --- a/MS/works/service/PEVerifCodeService.h +++ b/MS/works/service/PEVerifCodeService.h @@ -15,6 +15,7 @@ public: private: std::string emailcode; + UserDB userDb; }; diff --git a/MessageSystem/CMakeLists.txt b/MessageSystem/CMakeLists.txt index c2439e1..3fdbe62 100644 --- a/MessageSystem/CMakeLists.txt +++ b/MessageSystem/CMakeLists.txt @@ -1,17 +1,18 @@ project(MessageSystem) aux_source_directory(message_push PUSH) -aux_source_directory(storage STORAGE) -aux_source_directory(synchronization SYN) +aux_source_directory(message_base BASE) +aux_source_directory(message_pull PULL) +aux_source_directory(timeline_safe SAFE_QUEUE) include_directories(${CMAKE_SOURCE_DIR}/MP) include_directories(${CMAKE_SOURCE_DIR}/MDB/imm_mongodb) add_library(MessageSystem ${PUSH} - ${STORAGE} - ${SYN} - TimeLine.cpp + ${BASE} + ${PULL} + ${SAFE_QUEUE} ) target_link_libraries(MessageSystem diff --git a/MessageSystem/message_base/Storage.cpp b/MessageSystem/message_base/Storage.cpp new file mode 100644 index 0000000..705aed2 --- /dev/null +++ b/MessageSystem/message_base/Storage.cpp @@ -0,0 +1,66 @@ +// +// Created by dongl on 23-5-29. +// + +#include "Storage.h" +#include "template/MsgTemplate.h" + +#include +#include + +MSG::Storage::Storage(TimeLine *timeLine, db_base* db) + : m_timeLine(timeLine), m_db(db), m_db_name(""), m_table("") { + storage_push_queue(); +} + +MSG::Storage::Storage(std::string&& db_name, std::string&& table) : m_db_name(db_name), m_table(table) { + m_timeLine = new TimeLine(); + m_db = new db_base(); + storage_push_queue(); +} + +// 储存库 push +void MSG::Storage::push(StorageMsg* msg) { + // 添加至队列 + m_timeLine->push(msg); +} + +void MSG::Storage::pull() { + auto coll = m_db->hit_db_coll(m_db_name, m_table); +} + + +void MSG::Storage::storage_push_queue() { + std::function fun = [&] { + // 取mongo链接 + auto coll = m_db->hit_db_coll(m_db_name, m_table); + + while (true) { + while (!m_timeLine->value().empty()) { +// if (m_timeLine->value().size() > 10) { +// /// 插入多个 +// } else +// { + /// 插入单个 + // 弹出msg队列 此cpp只负责储存库 不负责同步库 + auto msg = m_timeLine->pull(); + // 执行插入 + auto insert_one_result = coll.insert_one(MsgTemplate::session_msg(msg->msg_type, msg->session_type, + msg->message_id, msg->time, msg->account, msg->im_msg_data)); + + auto doc_id = insert_one_result->inserted_id(); + printf("[msg insert mongo] %s\n", doc_id.type() == bsoncxx::type::k_oid ? "msg insert" : "not msg insert"); +// } + } + } + }; + + for (int i = 0; i < 2; ++i) { + std::thread t(fun); + printf("%ld", t.get_id()); + t.detach(); + } +} + + + diff --git a/MessageSystem/storage/Storage.h b/MessageSystem/message_base/Storage.h similarity index 93% rename from MessageSystem/storage/Storage.h rename to MessageSystem/message_base/Storage.h index 3f24a56..0b3a9d8 100644 --- a/MessageSystem/storage/Storage.h +++ b/MessageSystem/message_base/Storage.h @@ -7,7 +7,7 @@ #include "db_base.h" -#include "../TimeLine.h" +#include "../timeline_safe/TimeLine.h" namespace MSG { class Storage { diff --git a/MessageSystem/storage/Syn.cpp b/MessageSystem/message_base/Syn.cpp similarity index 100% rename from MessageSystem/storage/Syn.cpp rename to MessageSystem/message_base/Syn.cpp diff --git a/MessageSystem/storage/Syn.h b/MessageSystem/message_base/Syn.h similarity index 70% rename from MessageSystem/storage/Syn.h rename to MessageSystem/message_base/Syn.h index 2630151..3d9b142 100644 --- a/MessageSystem/storage/Syn.h +++ b/MessageSystem/message_base/Syn.h @@ -5,10 +5,10 @@ #ifndef IM2_SYN_H #define IM2_SYN_H +namespace MSG { + class Syn { -class Syn { - -}; - + }; +} #endif //IM2_SYN_H diff --git a/MessageSystem/storage/db_base.cpp b/MessageSystem/message_base/db_base.cpp similarity index 100% rename from MessageSystem/storage/db_base.cpp rename to MessageSystem/message_base/db_base.cpp diff --git a/MessageSystem/storage/db_base.h b/MessageSystem/message_base/db_base.h similarity index 100% rename from MessageSystem/storage/db_base.h rename to MessageSystem/message_base/db_base.h diff --git a/MessageSystem/storage/Storage.cpp b/MessageSystem/storage/Storage.cpp deleted file mode 100644 index ceee36a..0000000 --- a/MessageSystem/storage/Storage.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// -// Created by dongl on 23-5-29. -// - -#include "Storage.h" -#include "template/MsgTemplate.h" - -#include -#include - -MSG::Storage::Storage(TimeLine *timeLine, db_base* db) - : m_timeLine(timeLine), m_db(db), m_db_name(""), m_table("") {} - -MSG::Storage::Storage(std::string&& db_name, std::string&& table) : m_db_name(db_name), m_table(table) { - m_timeLine = new TimeLine(); - m_db = new db_base(); -} - -// 储存库 push -void MSG::Storage::push(StorageMsg* msg) { - // 添加至信箱 同步库 - m_timeLine->push(msg); -} - -void MSG::Storage::pull() { - auto coll = m_db->hit_db_coll(m_db_name, m_table); -} - - -void MSG::Storage::storage_push_queue() { - // 取mongo链接 - auto coll = m_db->hit_db_coll(m_db_name, m_table); - - std::function fun = [&] { - while (true) { - while (!m_timeLine->value().empty()) { - // 弹出msg队列 此cpp只负责储存库 不负责同步库 - auto msg = m_timeLine->pull(); - // 执行插入 - coll.insert_one(MsgTemplate::session_msg(msg->msg_type, msg->session_type, - msg->message_id, msg->time, msg->account, msg->im_msg_data)); - } - } - }; - - for (int i = 0; i < 2; ++i) { - std::thread t(fun); - printf("%ld", t.get_id()); - t.detach(); - } -} - - - diff --git a/MessageSystem/TimeLine.cpp b/MessageSystem/timeline_safe/TimeLine.cpp similarity index 75% rename from MessageSystem/TimeLine.cpp rename to MessageSystem/timeline_safe/TimeLine.cpp index 42039dc..70a8202 100644 --- a/MessageSystem/TimeLine.cpp +++ b/MessageSystem/timeline_safe/TimeLine.cpp @@ -3,3 +3,5 @@ // #include "TimeLine.h" + +#include diff --git a/MessageSystem/TimeLine.h b/MessageSystem/timeline_safe/TimeLine.h similarity index 97% rename from MessageSystem/TimeLine.h rename to MessageSystem/timeline_safe/TimeLine.h index f7a705b..7f55e95 100644 --- a/MessageSystem/TimeLine.h +++ b/MessageSystem/timeline_safe/TimeLine.h @@ -37,7 +37,7 @@ public: T pull() { std::lock_guard lockGuard(mutex); auto ele = queue.front(); - queue.back(); + queue.pop(); return ele; } diff --git a/TEST/main.cpp b/TEST/main.cpp index e30d67a..b44d1ef 100644 --- a/TEST/main.cpp +++ b/TEST/main.cpp @@ -11,6 +11,7 @@ #include "smtp/send_email.h" #include "storage/Storage.h" #include "IMDataPacket.h" +#include "template/MsgTemplate.h" int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); @@ -112,11 +113,6 @@ TEST(select_friends_fdb, fecth_frinds_Test) { } -TEST(MSG_PULL, MSG_PULL__Test) { - MSG::Storage* storage = new MSG::Storage(); - storage->pull(); -} - TEST(selsct_is_friend, fecth_frinds_Test) { auto i = UserFriendsDB(); auto user = i.select_friend(2725096176, 783556037); @@ -138,4 +134,17 @@ TEST (MP_IM_PUSH_MSG, MP_IM_PUSH_MSG_TEST) { ); std::cout << temp->packet() << std::endl; + + MSG::Storage* storage = new MSG::Storage("im_session", "chat"); + + StorageMsg* msg = new StorageMsg(); + msg->msg_type = mp::MP_SUB_TYPE::MP_IM_TEXT; + msg->session_type = mp::MP_SUB_TYPE::MP_SESSION_FRIEND; + msg->message_id = 1; + msg->time = time(nullptr); + msg->account = 783556037; + msg->im_msg_data = "hello test msg!"; + storage->push(msg); + + sleep(10); } \ No newline at end of file diff --git a/include/google/protobuf/arena.h b/include/google/protobuf/arena.h index 038553c..0c9ac7d 100644 --- a/include/google/protobuf/arena.h +++ b/include/google/protobuf/arena.h @@ -357,7 +357,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { // the call to this method. uint64 SpaceUsed() const { return impl_.SpaceUsed(); } - // Frees all storage allocated by this arena after calling destructors + // Frees all message_base allocated by this arena after calling destructors // registered with OwnDestructor() and freeing objects registered with Own(). // Any objects allocated on this arena are unusable after this call. It also // returns the total space used by the arena which is the sums of the sizes diff --git a/include/google/protobuf/arena_impl.h b/include/google/protobuf/arena_impl.h index 5a95124..7ade732 100644 --- a/include/google/protobuf/arena_impl.h +++ b/include/google/protobuf/arena_impl.h @@ -289,7 +289,7 @@ class PROTOBUF_EXPORT ArenaImpl { static std::atomic lifecycle_id_generator_; #if defined(GOOGLE_PROTOBUF_NO_THREADLOCAL) // Android ndk does not support GOOGLE_THREAD_LOCAL keyword so we use a custom thread - // local storage class we implemented. + // local message_base class we implemented. // iOS also does not support the GOOGLE_THREAD_LOCAL keyword. static ThreadCache& thread_cache(); #elif defined(PROTOBUF_USE_DLLS) diff --git a/include/google/protobuf/arenastring.h b/include/google/protobuf/arenastring.h index 122f391..18400d2 100644 --- a/include/google/protobuf/arenastring.h +++ b/include/google/protobuf/arenastring.h @@ -206,7 +206,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { #endif } - // Frees storage (if not on an arena). + // Frees message_base (if not on an arena). inline void Destroy(const ::std::string* default_value, Arena* arena) { if (arena == NULL && ptr_ != default_value) { delete ptr_; diff --git a/include/google/protobuf/io/coded_stream.h b/include/google/protobuf/io/coded_stream.h index 5f9feb8..5f98119 100644 --- a/include/google/protobuf/io/coded_stream.h +++ b/include/google/protobuf/io/coded_stream.h @@ -1219,7 +1219,7 @@ class PROTOBUF_EXPORT CodedOutputStream { // Note that this is *not* canonical across languages. It is also unstable // across different builds with intervening message definition changes, due to // unknown fields. Users who need canonical serialization (e.g. persistent - // storage in a canonical form, fingerprinting) should define their own + // message_base in a canonical form, fingerprinting) should define their own // canonicalization specification and implement the serializer using // reflection APIs rather than relying on this API. void SetSerializationDeterministic(bool value) { diff --git a/include/google/protobuf/map_field_inl.h b/include/google/protobuf/map_field_inl.h index 7baaa5f..1e6555e 100644 --- a/include/google/protobuf/map_field_inl.h +++ b/include/google/protobuf/map_field_inl.h @@ -323,7 +323,7 @@ void MapField::iterator it = repeated_field->begin(); it != repeated_field->end(); ++it) { - // Cast is needed because Map's api and internal storage is different when + // Cast is needed because Map's api and internal message_base is different when // value is enum. For enum, we cannot cast an int to enum. Thus, we have to // copy value. For other types, they have same exposed api type and internal // stored type. We should not introduce value copy for them. We achieve this diff --git a/include/google/protobuf/metadata_lite.h b/include/google/protobuf/metadata_lite.h index 781a1f5..3ff8241 100644 --- a/include/google/protobuf/metadata_lite.h +++ b/include/google/protobuf/metadata_lite.h @@ -50,7 +50,7 @@ namespace internal { // uses a tagged pointer to either store the Arena pointer, if there are no // unknown fields, or a pointer to a block of memory with both the Arena pointer // and the UnknownFieldSet, if there are unknown fields. This optimization -// allows for "zero-overhead" storage of the Arena pointer, relative to the +// allows for "zero-overhead" message_base of the Arena pointer, relative to the // above baseline implementation. // // The tagged pointer uses the LSB to disambiguate cases, and uses bit 0 == 0 to diff --git a/include/google/protobuf/repeated_field.h b/include/google/protobuf/repeated_field.h index fd01a66..d2d9763 100644 --- a/include/google/protobuf/repeated_field.h +++ b/include/google/protobuf/repeated_field.h @@ -343,7 +343,7 @@ class RepeatedField final { static const size_t kRepHeaderSize; // If total_size_ == 0 this points to an Arena otherwise it points to the - // elements member of a Rep struct. Using this invariant allows the storage of + // elements member of a Rep struct. Using this invariant allows the message_base of // the arena pointer without an extra allocation in the constructor. void* arena_or_elements_; @@ -380,7 +380,7 @@ class RepeatedField final { // Copy the elements of |from| into |to|. void CopyArray(Element* to, const Element* from, int size); - // Internal helper to delete all elements and deallocate the storage. + // Internal helper to delete all elements and deallocate the message_base. // If Element has a trivial destructor (for example, if it's a fundamental // type, like int32), the loop will be removed by the optimizer. void InternalDeallocate(Rep* rep, int size) { @@ -1571,7 +1571,7 @@ void RepeatedField::Reserve(int new_size) { arena_or_elements_ = new_rep->elements; // Invoke placement-new on newly allocated elements. We shouldn't have to do // this, since Element is supposed to be POD, but a previous version of this - // code allocated storage with "new Element[size]" and some code uses + // code allocated message_base with "new Element[size]" and some code uses // RepeatedField with non-POD types, relying on constructor invocation. If // Element has a trivial constructor (e.g., int32), gcc (tested with -O2) // completely removes this loop because the loop body is empty, so this has no diff --git a/include/google/protobuf/stubs/map_util.h b/include/google/protobuf/stubs/map_util.h index 24e098a..ca98fef 100644 --- a/include/google/protobuf/stubs/map_util.h +++ b/include/google/protobuf/stubs/map_util.h @@ -63,7 +63,7 @@ template struct RemoveConst : RemoveConst {}; // operator[] for lookup is discouraged for several reasons: // * It has a side-effect of inserting missing keys // * It is not thread-safe (even when it is not inserting, it can still -// choose to resize the underlying storage) +// choose to resize the underlying message_base) // * It invalidates iterators (when it chooses to resize) // * It default constructs a value object even if it doesn't need to // diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 005a0c0..9b5e533 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -1503,7 +1503,7 @@ class ThreadWithParam : public ThreadWithParamBase { ThreadWithParam& operator=(const ThreadWithParam&) = delete; }; -// Implements thread-local storage on Windows systems. +// Implements thread-local message_base on Windows systems. // // // Thread 1 // ThreadLocal tl(100); // 100 is the default value for each thread. @@ -1724,7 +1724,7 @@ extern "C" inline void DeleteThreadLocalValue(void* value_holder) { delete static_cast(value_holder); } -// Implements thread-local storage on pthreads-based systems. +// Implements thread-local message_base on pthreads-based systems. template class GTEST_API_ ThreadLocal { public: diff --git a/include/ini/SimpleIni.h b/include/ini/SimpleIni.h index 39fcd73..36565a5 100644 --- a/include/ini/SimpleIni.h +++ b/include/ini/SimpleIni.h @@ -423,7 +423,7 @@ public: #endif // SI_SUPPORT_IOSTREAMS /** Characterset conversion utility class to convert strings to the - same format as is used for the storage. + same format as is used for the message_base. */ class Converter : private SI_CONVERTER { public: @@ -480,14 +480,14 @@ public: /*-----------------------------------------------------------------------*/ /** @{ @name Settings */ - /** Set the storage format of the INI data. This affects both the loading + /** Set the message_base format of the INI data. This affects both the loading and saving of the INI data using all of the Load/Save API functions. This value cannot be changed after any INI data has been loaded. If the file is not set to Unicode (UTF-8), then the data encoding is assumed to be the OS native encoding. This encoding is the system locale on Linux/Unix and the legacy MBCS encoding on Windows NT/2K/XP. - If the storage format is set to Unicode then the file will be loaded + If the message_base format is set to Unicode then the file will be loaded as UTF-8 encoded data regardless of the native file encoding. If SI_CHAR == char then all of the char* parameters take and return UTF-8 encoded data regardless of the system locale. @@ -498,7 +498,7 @@ public: if (!m_pData) m_bStoreIsUtf8 = a_bIsUtf8; } - /** Get the storage format of the INI data. */ + /** Get the message_base format of the INI data. */ bool IsUnicode() const { return m_bStoreIsUtf8; } /** Should multiple identical keys be permitted in the file. If set to false @@ -523,7 +523,7 @@ public: m_bAllowMultiKey = a_bAllowMultiKey; } - /** Get the storage format of the INI data. */ + /** Get the message_base format of the INI data. */ bool IsMultiKey() const { return m_bAllowMultiKey; } /** Should data values be permitted to span multiple lines in the file. If @@ -2904,10 +2904,10 @@ public: } /** Calculate the number of SI_CHAR required for converting the input - * from the storage format. The storage format is always UTF-8 or MBCS. + * from the message_base format. The message_base format is always UTF-8 or MBCS. * - * @param a_pInputData Data in storage format to be converted to SI_CHAR. - * @param a_uInputDataLen Length of storage format data in bytes. This + * @param a_pInputData Data in message_base format to be converted to SI_CHAR. + * @param a_uInputDataLen Length of message_base format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is required. * @return Number of SI_CHAR required by the string when @@ -2927,11 +2927,11 @@ public: return a_uInputDataLen; } - /** Convert the input string from the storage format to SI_CHAR. - * The storage format is always UTF-8 or MBCS. + /** Convert the input string from the message_base format to SI_CHAR. + * The message_base format is always UTF-8 or MBCS. * - * @param a_pInputData Data in storage format to be converted to SI_CHAR. - * @param a_uInputDataLen Length of storage format data in bytes. This + * @param a_pInputData Data in message_base format to be converted to SI_CHAR. + * @param a_uInputDataLen Length of message_base format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is required. * @param a_pOutputData Pointer to the output buffer to received the @@ -2954,13 +2954,13 @@ public: return true; } - /** Calculate the number of char required by the storage format of this - * data. The storage format is always UTF-8 or MBCS. + /** Calculate the number of char required by the message_base format of this + * data. The message_base format is always UTF-8 or MBCS. * * @param a_pInputData NULL terminated string to calculate the number of - * bytes required to be converted to storage format. + * bytes required to be converted to message_base format. * @return Number of bytes required by the string when - * converted to storage format. This size always + * converted to message_base format. This size always * includes space for the terminating NULL character. * @return -1 cast to size_t on a conversion error. */ @@ -2971,8 +2971,8 @@ public: return strlen((const char *)a_pInputData) + 1; } - /** Convert the input string to the storage format of this data. - * The storage format is always UTF-8 or MBCS. + /** Convert the input string to the message_base format of this data. + * The message_base format is always UTF-8 or MBCS. * * @param a_pInputData NULL terminated source string to convert. All of * the data will be converted including the @@ -3033,10 +3033,10 @@ public: } /** Calculate the number of SI_CHAR required for converting the input - * from the storage format. The storage format is always UTF-8 or MBCS. + * from the message_base format. The message_base format is always UTF-8 or MBCS. * - * @param a_pInputData Data in storage format to be converted to SI_CHAR. - * @param a_uInputDataLen Length of storage format data in bytes. This + * @param a_pInputData Data in message_base format to be converted to SI_CHAR. + * @param a_uInputDataLen Length of message_base format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is required. * @return Number of SI_CHAR required by the string when @@ -3069,11 +3069,11 @@ public: #endif } - /** Convert the input string from the storage format to SI_CHAR. - * The storage format is always UTF-8 or MBCS. + /** Convert the input string from the message_base format to SI_CHAR. + * The message_base format is always UTF-8 or MBCS. * - * @param a_pInputData Data in storage format to be converted to SI_CHAR. - * @param a_uInputDataLen Length of storage format data in bytes. This + * @param a_pInputData Data in message_base format to be converted to SI_CHAR. + * @param a_uInputDataLen Length of message_base format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is required. * @param a_pOutputData Pointer to the output buffer to received the @@ -3119,13 +3119,13 @@ public: return retval != (size_t)(-1); } - /** Calculate the number of char required by the storage format of this - * data. The storage format is always UTF-8 or MBCS. + /** Calculate the number of char required by the message_base format of this + * data. The message_base format is always UTF-8 or MBCS. * * @param a_pInputData NULL terminated string to calculate the number of - * bytes required to be converted to storage format. + * bytes required to be converted to message_base format. * @return Number of bytes required by the string when - * converted to storage format. This size always + * converted to message_base format. This size always * includes space for the terminating NULL character. * @return -1 cast to size_t on a conversion error. */ @@ -3149,8 +3149,8 @@ public: } } - /** Convert the input string to the storage format of this data. - * The storage format is always UTF-8 or MBCS. + /** Convert the input string to the message_base format of this data. + * The message_base format is always UTF-8 or MBCS. * * @param a_pInputData NULL terminated source string to convert. All of * the data will be converted including the @@ -3244,10 +3244,10 @@ public: ~SI_ConvertW() { if (m_pConverter) ucnv_close(m_pConverter); } /** Calculate the number of UChar required for converting the input - * from the storage format. The storage format is always UTF-8 or MBCS. + * from the message_base format. The message_base format is always UTF-8 or MBCS. * - * @param a_pInputData Data in storage format to be converted to UChar. - * @param a_uInputDataLen Length of storage format data in bytes. This + * @param a_pInputData Data in message_base format to be converted to UChar. + * @param a_uInputDataLen Length of message_base format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is required. * @return Number of UChar required by the string when @@ -3282,11 +3282,11 @@ public: return (size_t) nLen; } - /** Convert the input string from the storage format to UChar. - * The storage format is always UTF-8 or MBCS. + /** Convert the input string from the message_base format to UChar. + * The message_base format is always UTF-8 or MBCS. * - * @param a_pInputData Data in storage format to be converted to UChar. - * @param a_uInputDataLen Length of storage format data in bytes. This + * @param a_pInputData Data in message_base format to be converted to UChar. + * @param a_uInputDataLen Length of message_base format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is required. * @param a_pOutputData Pointer to the output buffer to received the @@ -3322,13 +3322,13 @@ public: return true; } - /** Calculate the number of char required by the storage format of this - * data. The storage format is always UTF-8 or MBCS. + /** Calculate the number of char required by the message_base format of this + * data. The message_base format is always UTF-8 or MBCS. * * @param a_pInputData NULL terminated string to calculate the number of - * bytes required to be converted to storage format. + * bytes required to be converted to message_base format. * @return Number of bytes required by the string when - * converted to storage format. This size always + * converted to message_base format. This size always * includes space for the terminating NULL character. * @return -1 cast to size_t on a conversion error. */ @@ -3355,8 +3355,8 @@ public: return (size_t) nLen + 1; } - /** Convert the input string to the storage format of this data. - * The storage format is always UTF-8 or MBCS. + /** Convert the input string to the message_base format of this data. + * The message_base format is always UTF-8 or MBCS. * * @param a_pInputData NULL terminated source string to convert. All of * the data will be converted including the @@ -3465,10 +3465,10 @@ public: } /** Calculate the number of SI_CHAR required for converting the input - * from the storage format. The storage format is always UTF-8 or MBCS. + * from the message_base format. The message_base format is always UTF-8 or MBCS. * - * @param a_pInputData Data in storage format to be converted to SI_CHAR. - * @param a_uInputDataLen Length of storage format data in bytes. This + * @param a_pInputData Data in message_base format to be converted to SI_CHAR. + * @param a_uInputDataLen Length of message_base format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is required. * @return Number of SI_CHAR required by the string when @@ -3490,11 +3490,11 @@ public: return (size_t)(retval > 0 ? retval : -1); } - /** Convert the input string from the storage format to SI_CHAR. - * The storage format is always UTF-8 or MBCS. + /** Convert the input string from the message_base format to SI_CHAR. + * The message_base format is always UTF-8 or MBCS. * - * @param a_pInputData Data in storage format to be converted to SI_CHAR. - * @param a_uInputDataLen Length of storage format data in bytes. This + * @param a_pInputData Data in message_base format to be converted to SI_CHAR. + * @param a_uInputDataLen Length of message_base format data in bytes. This * must be the actual length of the data, including * NULL byte if NULL terminated string is required. * @param a_pOutputData Pointer to the output buffer to received the @@ -3516,13 +3516,13 @@ public: return (nSize > 0); } - /** Calculate the number of char required by the storage format of this - * data. The storage format is always UTF-8. + /** Calculate the number of char required by the message_base format of this + * data. The message_base format is always UTF-8. * * @param a_pInputData NULL terminated string to calculate the number of - * bytes required to be converted to storage format. + * bytes required to be converted to message_base format. * @return Number of bytes required by the string when - * converted to storage format. This size always + * converted to message_base format. This size always * includes space for the terminating NULL character. * @return -1 cast to size_t on a conversion error. */ @@ -3536,8 +3536,8 @@ public: return (size_t) (retval > 0 ? retval : -1); } - /** Convert the input string to the storage format of this data. - * The storage format is always UTF-8 or MBCS. + /** Convert the input string to the message_base format of this data. + * The message_base format is always UTF-8 or MBCS. * * @param a_pInputData NULL terminated source string to convert. All of * the data will be converted including the diff --git a/include/libevent/event2/buffer.h b/include/libevent/event2/buffer.h index 5a76cf2..783ccb1 100644 --- a/include/libevent/event2/buffer.h +++ b/include/libevent/event2/buffer.h @@ -143,7 +143,7 @@ struct evbuffer_iovec { #endif /** - Allocate storage for a new evbuffer. + Allocate message_base for a new evbuffer. @return a pointer to a newly allocated evbuffer struct, or NULL if an error occurred @@ -151,7 +151,7 @@ struct evbuffer_iovec { EVENT2_EXPORT_SYMBOL struct evbuffer *evbuffer_new(void); /** - Deallocate storage for an evbuffer. + Deallocate message_base for an evbuffer. @param buf pointer to the evbuffer to be freed */ diff --git a/include/libevent/event2/bufferevent.h b/include/libevent/event2/bufferevent.h index a50944f..b47342c 100644 --- a/include/libevent/event2/bufferevent.h +++ b/include/libevent/event2/bufferevent.h @@ -316,7 +316,7 @@ EVENT2_EXPORT_SYMBOL int bufferevent_get_priority(const struct bufferevent *bufev); /** - Deallocate the storage associated with a bufferevent structure. + Deallocate the message_base associated with a bufferevent structure. If there is pending data to write on the bufferevent, it probably won't be flushed before the bufferevent is freed. @@ -820,7 +820,7 @@ struct ev_token_bucket_cfg *ev_token_bucket_cfg_new( size_t write_rate, size_t write_burst, const struct timeval *tick_len); -/** Free all storage held in 'cfg'. +/** Free all message_base held in 'cfg'. Note: 'cfg' is not currently reference-counted; it is not safe to free it until no bufferevent is using it. diff --git a/include/libevent/event2/thread.h b/include/libevent/event2/thread.h index 481a02f..b8946a1 100644 --- a/include/libevent/event2/thread.h +++ b/include/libevent/event2/thread.h @@ -107,7 +107,7 @@ struct evthread_lock_callbacks { /** Function to allocate and initialize new lock of type 'locktype'. * Returns NULL on failure. */ void *(*alloc)(unsigned locktype); - /** Funtion to release all storage held in 'lock', which was created + /** Funtion to release all message_base held in 'lock', which was created * with type 'locktype'. */ void (*free)(void *lock, unsigned locktype); /** Acquire an already-allocated lock at 'lock' with mode 'mode'. diff --git a/include/libevent/event2/util.h b/include/libevent/event2/util.h index 60ff4cc..03e1694 100644 --- a/include/libevent/event2/util.h +++ b/include/libevent/event2/util.h @@ -808,7 +808,7 @@ EVENT2_EXPORT_SYMBOL int evutil_getaddrinfo(const char *nodename, const char *servname, const struct evutil_addrinfo *hints_in, struct evutil_addrinfo **res); -/** Release storage allocated by evutil_getaddrinfo or evdns_getaddrinfo. */ +/** Release message_base allocated by evutil_getaddrinfo or evdns_getaddrinfo. */ EVENT2_EXPORT_SYMBOL void evutil_freeaddrinfo(struct evutil_addrinfo *ai); diff --git a/include/mysql++/mysql/mysql_com.h b/include/mysql++/mysql/mysql_com.h index a924041..3b55f79 100644 --- a/include/mysql++/mysql/mysql_com.h +++ b/include/mysql++/mysql/mysql_com.h @@ -181,7 +181,7 @@ */ #define FIELD_IN_ADD_INDEX (1 << 20) #define FIELD_IS_RENAMED (1 << 21) /**< Intern: Field is being renamed */ -#define FIELD_FLAGS_STORAGE_MEDIA 22 /**< Field storage media, bit 22-23 */ +#define FIELD_FLAGS_STORAGE_MEDIA 22 /**< Field message_base media, bit 22-23 */ #define FIELD_FLAGS_STORAGE_MEDIA_MASK (3 << FIELD_FLAGS_STORAGE_MEDIA) #define FIELD_FLAGS_COLUMN_FORMAT 24 /**< Field column format, bit 24-25 */ #define FIELD_FLAGS_COLUMN_FORMAT_MASK (3 << FIELD_FLAGS_COLUMN_FORMAT) @@ -232,7 +232,7 @@ 128 /**< Remove all bin logs in the index \ and truncate the index, RESET MASTER */ #define REFRESH_ERROR_LOG 256 /**< Rotate only the error log */ -#define REFRESH_ENGINE_LOG 512 /**< Flush all storage engine logs */ +#define REFRESH_ENGINE_LOG 512 /**< Flush all message_base engine logs */ #define REFRESH_BINARY_LOG 1024 /**< Flush the binary log */ #define REFRESH_RELAY_LOG 2048 /**< Flush the relay log */ #define REFRESH_GENERAL_LOG 4096 /**< Flush the general log */ @@ -1009,9 +1009,9 @@ enum mysql_enum_shutdown_level { SHUTDOWN_WAIT_TRANSACTIONS = MYSQL_SHUTDOWN_KILLABLE_TRANS, /** Wait for existing updates to finish (=> no partial MyISAM update) */ SHUTDOWN_WAIT_UPDATES = MYSQL_SHUTDOWN_KILLABLE_UPDATE, - /** Flush InnoDB buffers and other storage engines' buffers*/ + /** Flush InnoDB buffers and other message_base engines' buffers*/ SHUTDOWN_WAIT_ALL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), - /** Don't flush InnoDB buffers, flush other storage engines' buffers*/ + /** Don't flush InnoDB buffers, flush other message_base engines' buffers*/ SHUTDOWN_WAIT_CRITICAL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, /** Query level of the KILL command */ KILL_QUERY = 254, diff --git a/include/mysql++/transaction.h b/include/mysql++/transaction.h index d5fbb82..1b2e7bf 100644 --- a/include/mysql++/transaction.h +++ b/include/mysql++/transaction.h @@ -106,7 +106,7 @@ public: /// This commits all updates to the database using the connection /// we were created with since this object was created. This is a /// no-op if the table isn't stored using a transaction-aware - /// storage engine. See CREATE TABLE in the MySQL manual for + /// message_base engine. See CREATE TABLE in the MySQL manual for /// details. void commit(); @@ -114,7 +114,7 @@ public: /// /// This abandons all SQL statements made on the connection since /// this object was created. This only works on tables stored using - /// a transaction-aware storage engine. See CREATE TABLE in the + /// a transaction-aware message_base engine. See CREATE TABLE in the /// MySQL manual for details. void rollback(); diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 2cd9a70..434fa21 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -1231,7 +1231,7 @@ public: RAPIDJSON_ASSERT(false); // see above note #if RAPIDJSON_HAS_CXX11 - // Use thread-local storage to prevent races between threads. + // Use thread-local message_base to prevent races between threads. // Use static buffer and placement-new to prevent destruction, with // alignas() to ensure proper alignment. alignas(GenericValue) thread_local static char buffer[sizeof(GenericValue)]; @@ -2490,7 +2490,7 @@ typedef GenericValue > Value; //! A document for parsing JSON text as DOM. /*! \note implements Handler concept - \tparam Encoding Encoding for both parsing and string storage. + \tparam Encoding Encoding for both parsing and string message_base. \tparam Allocator Allocator for allocating memory for the DOM \tparam StackAllocator Allocator for allocating memory for stack during parsing. \warning Although GenericDocument inherits from GenericValue, the API does \b not provide any virtual functions, especially no virtual destructor. To avoid memory leaks, do not \c delete a GenericDocument object via a pointer to a GenericValue. diff --git a/include/tbb/oneapi/tbb/cache_aligned_allocator.h b/include/tbb/oneapi/tbb/cache_aligned_allocator.h index 0ff3972..d17cb47 100644 --- a/include/tbb/oneapi/tbb/cache_aligned_allocator.h +++ b/include/tbb/oneapi/tbb/cache_aligned_allocator.h @@ -128,7 +128,7 @@ private: // Round up to the next cache line (align the base address) std::uintptr_t result = (base + cache_line_alignment) & ~(cache_line_alignment - 1); __TBB_ASSERT((result - base) >= sizeof(std::uintptr_t), "Can`t store a base pointer to the header"); - __TBB_ASSERT(space - (result - base) >= bytes, "Not enough space for the storage"); + __TBB_ASSERT(space - (result - base) >= bytes, "Not enough space for the message_base"); // Record where block actually starts. (reinterpret_cast(result))[-1] = base; diff --git a/include/tbb/oneapi/tbb/collaborative_call_once.h b/include/tbb/oneapi/tbb/collaborative_call_once.h index db082f8..65dc8da 100644 --- a/include/tbb/oneapi/tbb/collaborative_call_once.h +++ b/include/tbb/oneapi/tbb/collaborative_call_once.h @@ -95,7 +95,7 @@ public: template void run_once(F&& f) { - __TBB_ASSERT(!m_is_ready.load(std::memory_order_relaxed), "storage with task_arena and wait_context is already initialized"); + __TBB_ASSERT(!m_is_ready.load(std::memory_order_relaxed), "message_base with task_arena and wait_context is already initialized"); // Initialize internal state new(&m_storage) storage_t(); m_storage.m_arena.execute([&] { diff --git a/include/tbb/oneapi/tbb/combinable.h b/include/tbb/oneapi/tbb/combinable.h index b676a30..c5cc172 100644 --- a/include/tbb/oneapi/tbb/combinable.h +++ b/include/tbb/oneapi/tbb/combinable.h @@ -27,7 +27,7 @@ namespace detail { namespace d1 { /** \name combinable **/ //@{ -//! Thread-local storage with optional reduction +//! Thread-local message_base with optional reduction /** @ingroup containers */ template class combinable { diff --git a/include/tbb/oneapi/tbb/concurrent_lru_cache.h b/include/tbb/oneapi/tbb/concurrent_lru_cache.h index 29ee3bd..8616c31 100644 --- a/include/tbb/oneapi/tbb/concurrent_lru_cache.h +++ b/include/tbb/oneapi/tbb/concurrent_lru_cache.h @@ -83,7 +83,7 @@ private: value_function_type my_value_function; aggregator_type my_aggregator; - storage_map_type my_storage_map; // storage map for used objects + storage_map_type my_storage_map; // message_base map for used objects history_list_type my_history_list; // history list for unused objects const std::size_t my_history_list_capacity; // history list's allowed capacity @@ -186,7 +186,7 @@ private: }; //----------------------------------------------------------------------------- -// Value type for storage map in concurrent LRU cache +// Value type for message_base map in concurrent LRU cache //----------------------------------------------------------------------------- template diff --git a/include/tbb/oneapi/tbb/enumerable_thread_specific.h b/include/tbb/oneapi/tbb/enumerable_thread_specific.h index 34bcab6..d7b1ff0 100644 --- a/include/tbb/oneapi/tbb/enumerable_thread_specific.h +++ b/include/tbb/oneapi/tbb/enumerable_thread_specific.h @@ -651,7 +651,7 @@ struct construct_by_args: no_assign { construct_by_args( P&& ... args ) : pack(std::forward

(args)...) {} }; -// storage for initialization function pointer +// message_base for initialization function pointer // TODO: consider removing the template parameter T here and in callback_leaf class callback_base { public: @@ -734,7 +734,7 @@ template using is_callable_no_args = supportsets_base::table_swap(other);