提交 36bc582e 编写于 作者: Z Zhang Liangliang 提交者: Calvin Miao

added abstract optimizer class.

上级 b0bf1f0b
package(default_visibility = ["//visibility:public"])
cc_library(
name = "optimizer",
srcs = [
"optimizer.cc",
],
hdrs = [
"optimizer.h",
],
deps = [
"//modules/common/proto:error_code_proto",
],
)
/******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
/**
* @file optimizer.cc
**/
#include "modules/planning/optimizer/optimizer.h"
namespace apollo {
namespace planning {
Optimizer::Optimizer(const std::string& name) : _name(name) {}
const std::string& Optimizer::name() const { return _name; }
} // namespace planning
} // namespace apollo
/******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
/**
* @file optimizer.h
**/
#ifndef MODULES_PLANNING_OPTIMIZER_OPTIMIZER_H_
#define MODULES_PLANNING_OPTIMIZER_OPTIMIZER_H_
#include <string>
#include "modules/common/proto/error_code.pb.h"
namespace apollo {
namespace planning {
class Optimizer {
public:
explicit Optimizer(const std::string& name);
virtual ~Optimizer() = default;
virtual const std::string& name() const;
private:
const std::string _name;
};
} // namespace planning
} // namespace apollo
#endif // MODULES_PLANNING_OPTIMIZER_OPTIMIZER_H_
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册