Apollo 10.0
自动驾驶开放平台
service_base.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#ifndef CYBER_SERVICE_SERVICE_BASE_H_
18#define CYBER_SERVICE_SERVICE_BASE_H_
19
20#include <string>
21
22namespace apollo {
23namespace cyber {
24
31 public:
37 explicit ServiceBase(const std::string& service_name)
39
40 virtual ~ServiceBase() {}
41
42 virtual void destroy() = 0;
43
47 const std::string& service_name() const { return service_name_; }
48
49 protected:
50 std::string service_name_;
51};
52
53} // namespace cyber
54} // namespace apollo
55
56#endif // CYBER_SERVICE_SERVICE_BASE_H_
Base class for Service
virtual void destroy()=0
const std::string & service_name() const
Get the service name
ServiceBase(const std::string &service_name)
Construct a new Service Base object
class register implement
Definition arena_queue.h:37