• R/O
  • HTTP
  • SSH
  • HTTPS

libcore: コミット

GikoMonaのソフトウェアの基幹部分を集めて1つのライブラリに集約したものです。gikomona/pnutsのコンパイルにはこのライブラリが必須です。


コミットメタ情報

リビジョン1059bd3228e28580442eb8b2c9e240c47f383b0e (tree)
日時2014-04-29 21:13:00
作者caprice <caprice@user...>
コミッターcaprice

ログメッセージ

namespace、typdefの変更など

変更サマリ

差分

--- a/include/communication/shmem.hpp
+++ b/include/communication/shmem.hpp
@@ -14,31 +14,31 @@
1414
1515 namespace monazilla { namespace GikoMona { namespace core { namespace communication {
1616
17-namespace process = boost::interprocess;
17+namespace ipc = boost::interprocess;
1818
19-typedef process::managed_shared_memory shared_memory;
19+typedef ipc::managed_shared_memory shared_memory;
20+typedef ipc::shared_memory_object shared_object;
2021 typedef shared_memory::segment_manager segment_manager;
2122
2223 template <typename T>
23-using shared_memory_allocator = process::allocator<T, segment_manager>;
24+using shared_memory_allocator = ipc::allocator<T, segment_manager>;
2425
2526 template <typename T>
26-using shared_list = process::list<T, shared_memory_allocator<T>>;
27+using shared_list = ipc::list<T, shared_memory_allocator<T>>;
2728
28-template <class MessageType>
29-bool communication::send(const communicate_id to, MessageType&& msg) {
30- static_assert(is_satisfied_message_concept_v<MessageType>(),
31- "`MessageType' does not satisfy the `message_concept'");
32-
33- return send_string(to, msg.to_string());
29+template <typename T>
30+T *find(shared_memory& shmem, const std::string& name) {
31+ return shmem.find<T>(name.c_str()).first;
32+}
33+
34+template <typename T>
35+T *construct(shared_memory& shmem, const std::string& name) {
36+ return shmem.construct<T>(name.c_str())(shm.get_segment_manager());
3437 }
3538
36-template <class MessageType>
37-bool communication::send_async(const communicate_id to, MessageType&& msg) {
38- static_assert(is_satisfied_message_concept_v<MessageType>(),
39- "`MessageType' does not satisfy the `message_concept'");
40-
41- return send_string(to, msg.to_string());
39+template <typename T>
40+void destruct(shared_memory& shmem, const std::string& name) {
41+ shared_object::remove(name.c_str());
4242 }
4343
4444 } } } }
旧リポジトリブラウザで表示