Skip to content

Commit 391df59

Browse files
committed
better naming, unbind instead of remove.
1 parent 4b9ea2f commit 391df59

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/rpc/dispatcher.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ class dispatcher {
6060
detail::tags::nonvoid_result const &,
6161
detail::tags::nonzero_arg const &);
6262

63-
//! \brief removes a functor with given name from callable functors.
64-
void remove(std::string const &name) {
63+
//! \brief Unbind a functor with a given name from callable functors.
64+
void unbind(std::string const &name) {
6565
funcs_.erase(name);
6666
}
6767

68-
//! \brief returns a list name of all functors binded
69-
std::vector<std::string> names() {
68+
//! \brief returns a list of all names which functors are binded to
69+
std::vector<std::string> names() const {
7070
std::vector<std::string> names;
7171
for(auto it = funcs_.begin(); it != funcs_.end(); ++it)
7272
names.push_back(it->first);

include/rpc/server.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ class server {
9999
//!
100100
//! \param name The name of the functor.
101101
void unbind(std::string const &name) {
102-
disp_->remove(name);
102+
disp_->unbind(name);
103103
}
104104

105105
//! \brief Returns all binded names
106106
//!
107107
//! This function returns a list of all names which functors are binded to
108108
//!
109109
//! \param name The name of the functor.
110-
std::vector<std::string> names() {
110+
std::vector<std::string> names() const {
111111
return disp_->names();
112112
}
113113

0 commit comments

Comments
 (0)