blob: 6bb5e5d41b28af1e6db3243b15e1067a48077010 [file] [log] [blame]
Mark Slee31985722006-05-24 21:45:31 +00001#ifndef T_SERVICE_H
2#define T_SERVICE_H
3
4#include "t_function.h"
5#include <vector>
6
Mark Sleef5377b32006-10-10 01:42:59 +00007/**
8 * A service consists of a set of functions.
9 *
10 * @author Mark Slee <mcslee@facebook.com>
11 */
Mark Slee31985722006-05-24 21:45:31 +000012class t_service {
13 public:
14 t_service() {}
Mark Slee31985722006-05-24 21:45:31 +000015
Mark Sleef5377b32006-10-10 01:42:59 +000016 void set_name(std::string name) {
17 name_ = name;
18 }
Mark Slee31985722006-05-24 21:45:31 +000019
Mark Sleef5377b32006-10-10 01:42:59 +000020 void add_function(t_function* func) {
21 functions_.push_back(func);
22 }
23
24 const std::string& get_name() const {
25 return name_;
26 }
27
28 const std::vector<t_function*>& get_functions() const {
29 return functions_;
30 }
Mark Slee31985722006-05-24 21:45:31 +000031
32 private:
33 std::string name_;
34 std::vector<t_function*> functions_;
35};
36
37#endif