Skip to content

Commit

Permalink
removed abstract_environment
Browse files Browse the repository at this point in the history
  • Loading branch information
kotbegemot committed Oct 2, 2019
1 parent 0fdf48e commit 1bd7277
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 663 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ include_directories(core)
add_subdirectory(core)
list(APPEND OBJECT_LISTS "$<TARGET_OBJECTS:actor-zeta-core>")

if(ENV)
include_directories(environment)
add_subdirectory(environment)
list(APPEND OBJECT_LISTS "$<TARGET_OBJECTS:actor-zeta-environment>")
endif()

find_package( Threads )

Expand Down
36 changes: 19 additions & 17 deletions core/actor-zeta/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ namespace actor_zeta {
using messaging::message;
using messaging::make_message;

template<
typename MailBox,
typename Actor = actor::cooperative_actor
>
inline auto make_actor(supervisor *ptr, const std::string &name) -> actor::actor {
return new actor::basic_actor<MailBox,Actor>(ptr,name);
}

template<
typename Actor,
typename Supervisor,
Expand All @@ -41,48 +33,58 @@ namespace actor_zeta {
return supervisor->join(new Actor(supervisor, std::forward<Args>(args)...));
}

template<typename Actor,typename... Args>
inline void send(Actor&a1,Args... args){
template<typename Sender, typename... Args>
inline void send(Sender& a1, Args... args) {
a1->enqueue(
messaging::make_message(
std::forward<Args>(args)...
)
);
}

template<typename Actor,typename... Args>
inline void send(const Actor&a1,Args... args){
template<typename Sender, typename... Args>
inline void send(const Sender& a1, Args... args) {
a1->enqueue(
messaging::make_message(
std::forward<Args>(args)...
)
);
}

inline auto link_imp(actor_zeta::actor_address&a1,actor_zeta::actor_address&a2) -> void {
template<class Sender>
inline void send(const Sender& actor, message msg) {
actor->enqueue(std::move(msg));
}

template<class Sender>
inline void send(Sender& actor, message msg) {
actor->enqueue(std::move(msg));
}

inline void link_imp(actor_zeta::actor_address& a1,actor_zeta::actor_address& a2) {
send(a1,a2,"sync_contacts",a2);
send(a2,a1,"sync_contacts",a1);
}

inline auto link(basic_async_actor &actor1,basic_async_actor &actor2) -> void {
inline void link(basic_async_actor& actor1,basic_async_actor& actor2) {
auto a1 = actor1.address();
auto a2 = actor2.address();
link_imp(a1,a2);
}

inline auto link(supervisor *actor1,supervisor *actor2) -> void {
inline void link(supervisor* actor1,supervisor* actor2) {
auto a1 = actor1->address();
auto a2 = actor2->address();
link_imp(a1,a2);
}

inline auto link(supervisor *actor1,actor_address&actor2) -> void {
inline void link(supervisor* actor1,actor_address& actor2) {
auto a1 = actor1->address();
auto a2 = actor2->address();
link_imp(a1,a2);
}

inline auto link(actor_address &actor1,actor_address&actor2) -> void {
inline void link(actor_address &actor1,actor_address&actor2) {
link_imp(actor1,actor2);
}

Expand Down
41 changes: 0 additions & 41 deletions environment/CMakeLists.txt

This file was deleted.

221 changes: 0 additions & 221 deletions environment/actor-zeta/detail/adjacency_list.hpp

This file was deleted.

Loading

0 comments on commit 1bd7277

Please sign in to comment.