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
22
namespace
apollo
{
23
namespace
cyber {
24
30
class
ServiceBase
{
31
public
:
37
explicit
ServiceBase
(
const
std::string&
service_name
)
38
:
service_name_
(
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_
apollo::cyber::ServiceBase
Base class for Service
Definition
service_base.h:30
apollo::cyber::ServiceBase::service_name_
std::string service_name_
Definition
service_base.h:50
apollo::cyber::ServiceBase::~ServiceBase
virtual ~ServiceBase()
Definition
service_base.h:40
apollo::cyber::ServiceBase::destroy
virtual void destroy()=0
apollo::cyber::ServiceBase::service_name
const std::string & service_name() const
Get the service name
Definition
service_base.h:47
apollo::cyber::ServiceBase::ServiceBase
ServiceBase(const std::string &service_name)
Construct a new Service Base object
Definition
service_base.h:37
apollo
class register implement
Definition
arena_queue.h:37
cyber
service
service_base.h