diff options
author | Josh Blum | 2013-07-05 18:50:01 -0700 |
---|---|---|
committer | Josh Blum | 2013-07-05 18:50:01 -0700 |
commit | fc80d2c0acec4f668b58a05bd5a3a06b0a2a2280 (patch) | |
tree | 29433c49392b458aa40b318b11a3afb34b918625 /lib/gras_impl | |
parent | df32957fb259989b6c269c10808e550e0913b652 (diff) | |
download | sandhi-fc80d2c0acec4f668b58a05bd5a3a06b0a2a2280.tar.gz sandhi-fc80d2c0acec4f668b58a05bd5a3a06b0a2a2280.tar.bz2 sandhi-fc80d2c0acec4f668b58a05bd5a3a06b0a2a2280.zip |
gras: begin replacing set/get with callable
Diffstat (limited to 'lib/gras_impl')
-rw-r--r-- | lib/gras_impl/block_actor.hpp | 4 | ||||
-rw-r--r-- | lib/gras_impl/block_data.hpp | 10 | ||||
-rw-r--r-- | lib/gras_impl/messages.hpp | 8 |
3 files changed, 6 insertions, 16 deletions
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp index 9a5c7b8..cfbc2c0 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -52,7 +52,7 @@ struct BlockActor : Theron::Actor this->RegisterHandler(this, &BlockActor::handle_output_alloc); this->RegisterHandler(this, &BlockActor::handle_output_update); - this->RegisterHandler(this, &BlockActor::handle_prop_access); + this->RegisterHandler(this, &BlockActor::handle_callable); this->RegisterHandler(this, &BlockActor::handle_self_kick); this->RegisterHandler(this, &BlockActor::handle_get_stats); } @@ -82,7 +82,7 @@ struct BlockActor : Theron::Actor void handle_output_alloc(const OutputAllocMessage &, const Theron::Address); void handle_output_update(const OutputUpdateMessage &, const Theron::Address); - void handle_prop_access(const PropAccessMessage &, const Theron::Address); + void handle_callable(const CallableMessage &, const Theron::Address); void handle_self_kick(const SelfKickMessage &, const Theron::Address); void handle_get_stats(const GetStatsMessage &, const Theron::Address); diff --git a/lib/gras_impl/block_data.hpp b/lib/gras_impl/block_data.hpp index cbc657e..d6af53d 100644 --- a/lib/gras_impl/block_data.hpp +++ b/lib/gras_impl/block_data.hpp @@ -18,13 +18,6 @@ namespace gras { -typedef boost::shared_ptr<PropertyRegistry> PropertyRegistrySptr; -struct PropertyRegistryPair -{ - PropertyRegistrySptr setter; - PropertyRegistrySptr getter; -}; - enum BlockState { BLOCK_STATE_INIT, @@ -80,9 +73,6 @@ struct BlockData std::vector<std::vector<OutputHintMessage> > output_allocation_hints; - //property stuff - std::map<std::string, PropertyRegistryPair> property_registry; - BlockStats stats; }; diff --git a/lib/gras_impl/messages.hpp b/lib/gras_impl/messages.hpp index a959bef..88d0d79 100644 --- a/lib/gras_impl/messages.hpp +++ b/lib/gras_impl/messages.hpp @@ -131,12 +131,12 @@ struct OutputUpdateMessage //-- do not ack //---------------------------------------------------------------------- -struct PropAccessMessage +struct CallableMessage { Token prio_token; - bool set; std::string key; - PMCC value; + PMCC *args; + PMCC ret; std::string error; }; @@ -182,7 +182,7 @@ THERON_DECLARE_REGISTERED_MESSAGE(gras::OutputHintMessage); THERON_DECLARE_REGISTERED_MESSAGE(gras::OutputAllocMessage); THERON_DECLARE_REGISTERED_MESSAGE(gras::OutputUpdateMessage); -THERON_DECLARE_REGISTERED_MESSAGE(gras::PropAccessMessage); +THERON_DECLARE_REGISTERED_MESSAGE(gras::CallableMessage); THERON_DECLARE_REGISTERED_MESSAGE(gras::SelfKickMessage); THERON_DECLARE_REGISTERED_MESSAGE(gras::GetStatsMessage); |