Commit b785b362 authored by JasonChmn's avatar JasonChmn Committed by Pierre Fernbach
Browse files

Remove protobuf

parent 184902f6
......@@ -18,7 +18,6 @@ SET(CXX_DISABLE_WERROR True)
SETUP_HPP_PROJECT()
ADD_REQUIRED_DEPENDENCY(eigen3)
ADD_REQUIRED_DEPENDENCY(protobuf)
SET(BOOST_COMPONENTS unit_test_framework)
......
......@@ -20,4 +20,3 @@ INSTALL(FILES
)
ADD_SUBDIRECTORY(helpers)
ADD_SUBDIRECTORY(proto)
INCLUDE(FindProtobuf)
FIND_PACKAGE(Protobuf REQUIRED)
INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})
PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER Curves_proto.proto)
ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC})
This diff is collapsed.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Curves_proto.proto
#ifndef PROTOBUF_Curves_5fproto_2eproto__INCLUDED
#define PROTOBUF_Curves_5fproto_2eproto__INCLUDED
#include <string>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 3005000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
namespace protobuf_Curves_5fproto_2eproto {
// Internal implementation detail -- do not use these members.
struct TableStruct {
static const ::google::protobuf::internal::ParseTableField entries[];
static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
static const ::google::protobuf::internal::ParseTable schema[2];
static const ::google::protobuf::internal::FieldMetadata field_metadata[];
static const ::google::protobuf::internal::SerializationTable serialization_table[];
static const ::google::protobuf::uint32 offsets[];
};
void AddDescriptors();
void InitDefaultsMatrixImpl();
void InitDefaultsMatrix();
void InitDefaultsPiecewise_polynomial_curveImpl();
void InitDefaultsPiecewise_polynomial_curve();
inline void InitDefaults() {
InitDefaultsMatrix();
InitDefaultsPiecewise_polynomial_curve();
}
} // namespace protobuf_Curves_5fproto_2eproto
namespace Curves_proto {
class Matrix;
class MatrixDefaultTypeInternal;
extern MatrixDefaultTypeInternal _Matrix_default_instance_;
class Piecewise_polynomial_curve;
class Piecewise_polynomial_curveDefaultTypeInternal;
extern Piecewise_polynomial_curveDefaultTypeInternal _Piecewise_polynomial_curve_default_instance_;
} // namespace Curves_proto
namespace Curves_proto {
// ===================================================================
class Matrix : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Curves_proto.Matrix) */ {
public:
Matrix();
virtual ~Matrix();
Matrix(const Matrix& from);
inline Matrix& operator=(const Matrix& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
Matrix(Matrix&& from) noexcept
: Matrix() {
*this = ::std::move(from);
}
inline Matrix& operator=(Matrix&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const Matrix& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Matrix* internal_default_instance() {
return reinterpret_cast<const Matrix*>(
&_Matrix_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
0;
void Swap(Matrix* other);
friend void swap(Matrix& a, Matrix& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline Matrix* New() const PROTOBUF_FINAL { return New(NULL); }
Matrix* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const Matrix& from);
void MergeFrom(const Matrix& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(Matrix* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// repeated double data = 3 [packed = true];
int data_size() const;
void clear_data();
static const int kDataFieldNumber = 3;
double data(int index) const;
void set_data(int index, double value);
void add_data(double value);
const ::google::protobuf::RepeatedField< double >&
data() const;
::google::protobuf::RepeatedField< double >*
mutable_data();
// uint32 rows = 1;
void clear_rows();
static const int kRowsFieldNumber = 1;
::google::protobuf::uint32 rows() const;
void set_rows(::google::protobuf::uint32 value);
// uint32 cols = 2;
void clear_cols();
static const int kColsFieldNumber = 2;
::google::protobuf::uint32 cols() const;
void set_cols(::google::protobuf::uint32 value);
// @@protoc_insertion_point(class_scope:Curves_proto.Matrix)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::RepeatedField< double > data_;
mutable int _data_cached_byte_size_;
::google::protobuf::uint32 rows_;
::google::protobuf::uint32 cols_;
mutable int _cached_size_;
friend struct ::protobuf_Curves_5fproto_2eproto::TableStruct;
friend void ::protobuf_Curves_5fproto_2eproto::InitDefaultsMatrixImpl();
};
// -------------------------------------------------------------------
class Piecewise_polynomial_curve : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Curves_proto.Piecewise_polynomial_curve) */ {
public:
Piecewise_polynomial_curve();
virtual ~Piecewise_polynomial_curve();
Piecewise_polynomial_curve(const Piecewise_polynomial_curve& from);
inline Piecewise_polynomial_curve& operator=(const Piecewise_polynomial_curve& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
Piecewise_polynomial_curve(Piecewise_polynomial_curve&& from) noexcept
: Piecewise_polynomial_curve() {
*this = ::std::move(from);
}
inline Piecewise_polynomial_curve& operator=(Piecewise_polynomial_curve&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const Piecewise_polynomial_curve& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Piecewise_polynomial_curve* internal_default_instance() {
return reinterpret_cast<const Piecewise_polynomial_curve*>(
&_Piecewise_polynomial_curve_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
1;
void Swap(Piecewise_polynomial_curve* other);
friend void swap(Piecewise_polynomial_curve& a, Piecewise_polynomial_curve& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline Piecewise_polynomial_curve* New() const PROTOBUF_FINAL { return New(NULL); }
Piecewise_polynomial_curve* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const Piecewise_polynomial_curve& from);
void MergeFrom(const Piecewise_polynomial_curve& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(Piecewise_polynomial_curve* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// repeated double time = 3 [packed = true];
int time_size() const;
void clear_time();
static const int kTimeFieldNumber = 3;
double time(int index) const;
void set_time(int index, double value);
void add_time(double value);
const ::google::protobuf::RepeatedField< double >&
time() const;
::google::protobuf::RepeatedField< double >*
mutable_time();
// repeated .Curves_proto.Matrix curves = 4;
int curves_size() const;
void clear_curves();
static const int kCurvesFieldNumber = 4;
const ::Curves_proto::Matrix& curves(int index) const;
::Curves_proto::Matrix* mutable_curves(int index);
::Curves_proto::Matrix* add_curves();
::google::protobuf::RepeatedPtrField< ::Curves_proto::Matrix >*
mutable_curves();
const ::google::protobuf::RepeatedPtrField< ::Curves_proto::Matrix >&
curves() const;
// uint32 number_of_curves = 1;
void clear_number_of_curves();
static const int kNumberOfCurvesFieldNumber = 1;
::google::protobuf::uint32 number_of_curves() const;
void set_number_of_curves(::google::protobuf::uint32 value);
// uint32 dimension = 2;
void clear_dimension();
static const int kDimensionFieldNumber = 2;
::google::protobuf::uint32 dimension() const;
void set_dimension(::google::protobuf::uint32 value);
// @@protoc_insertion_point(class_scope:Curves_proto.Piecewise_polynomial_curve)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::RepeatedField< double > time_;
mutable int _time_cached_byte_size_;
::google::protobuf::RepeatedPtrField< ::Curves_proto::Matrix > curves_;
::google::protobuf::uint32 number_of_curves_;
::google::protobuf::uint32 dimension_;
mutable int _cached_size_;
friend struct ::protobuf_Curves_5fproto_2eproto::TableStruct;
friend void ::protobuf_Curves_5fproto_2eproto::InitDefaultsPiecewise_polynomial_curveImpl();
};
// ===================================================================
// ===================================================================
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// Matrix
// uint32 rows = 1;
inline void Matrix::clear_rows() {
rows_ = 0u;
}
inline ::google::protobuf::uint32 Matrix::rows() const {
// @@protoc_insertion_point(field_get:Curves_proto.Matrix.rows)
return rows_;
}
inline void Matrix::set_rows(::google::protobuf::uint32 value) {
rows_ = value;
// @@protoc_insertion_point(field_set:Curves_proto.Matrix.rows)
}
// uint32 cols = 2;
inline void Matrix::clear_cols() {
cols_ = 0u;
}
inline ::google::protobuf::uint32 Matrix::cols() const {
// @@protoc_insertion_point(field_get:Curves_proto.Matrix.cols)
return cols_;
}
inline void Matrix::set_cols(::google::protobuf::uint32 value) {
cols_ = value;
// @@protoc_insertion_point(field_set:Curves_proto.Matrix.cols)
}
// repeated double data = 3 [packed = true];
inline int Matrix::data_size() const {
return data_.size();
}
inline void Matrix::clear_data() {
data_.Clear();
}
inline double Matrix::data(int index) const {
// @@protoc_insertion_point(field_get:Curves_proto.Matrix.data)
return data_.Get(index);
}
inline void Matrix::set_data(int index, double value) {
data_.Set(index, value);
// @@protoc_insertion_point(field_set:Curves_proto.Matrix.data)
}
inline void Matrix::add_data(double value) {
data_.Add(value);
// @@protoc_insertion_point(field_add:Curves_proto.Matrix.data)
}
inline const ::google::protobuf::RepeatedField< double >&
Matrix::data() const {
// @@protoc_insertion_point(field_list:Curves_proto.Matrix.data)
return data_;
}
inline ::google::protobuf::RepeatedField< double >*
Matrix::mutable_data() {
// @@protoc_insertion_point(field_mutable_list:Curves_proto.Matrix.data)
return &data_;
}
// -------------------------------------------------------------------
// Piecewise_polynomial_curve
// uint32 number_of_curves = 1;
inline void Piecewise_polynomial_curve::clear_number_of_curves() {
number_of_curves_ = 0u;
}
inline ::google::protobuf::uint32 Piecewise_polynomial_curve::number_of_curves() const {
// @@protoc_insertion_point(field_get:Curves_proto.Piecewise_polynomial_curve.number_of_curves)
return number_of_curves_;
}
inline void Piecewise_polynomial_curve::set_number_of_curves(::google::protobuf::uint32 value) {
number_of_curves_ = value;
// @@protoc_insertion_point(field_set:Curves_proto.Piecewise_polynomial_curve.number_of_curves)
}
// uint32 dimension = 2;
inline void Piecewise_polynomial_curve::clear_dimension() {
dimension_ = 0u;
}
inline ::google::protobuf::uint32 Piecewise_polynomial_curve::dimension() const {
// @@protoc_insertion_point(field_get:Curves_proto.Piecewise_polynomial_curve.dimension)
return dimension_;
}
inline void Piecewise_polynomial_curve::set_dimension(::google::protobuf::uint32 value) {
dimension_ = value;
// @@protoc_insertion_point(field_set:Curves_proto.Piecewise_polynomial_curve.dimension)
}
// repeated double time = 3 [packed = true];
inline int Piecewise_polynomial_curve::time_size() const {
return time_.size();
}
inline void Piecewise_polynomial_curve::clear_time() {
time_.Clear();
}
inline double Piecewise_polynomial_curve::time(int index) const {
// @@protoc_insertion_point(field_get:Curves_proto.Piecewise_polynomial_curve.time)
return time_.Get(index);
}
inline void Piecewise_polynomial_curve::set_time(int index, double value) {
time_.Set(index, value);
// @@protoc_insertion_point(field_set:Curves_proto.Piecewise_polynomial_curve.time)
}
inline void Piecewise_polynomial_curve::add_time(double value) {
time_.Add(value);
// @@protoc_insertion_point(field_add:Curves_proto.Piecewise_polynomial_curve.time)
}
inline const ::google::protobuf::RepeatedField< double >&
Piecewise_polynomial_curve::time() const {
// @@protoc_insertion_point(field_list:Curves_proto.Piecewise_polynomial_curve.time)
return time_;
}
inline ::google::protobuf::RepeatedField< double >*
Piecewise_polynomial_curve::mutable_time() {
// @@protoc_insertion_point(field_mutable_list:Curves_proto.Piecewise_polynomial_curve.time)
return &time_;
}
// repeated .Curves_proto.Matrix curves = 4;
inline int Piecewise_polynomial_curve::curves_size() const {
return curves_.size();
}
inline void Piecewise_polynomial_curve::clear_curves() {
curves_.Clear();
}
inline const ::Curves_proto::Matrix& Piecewise_polynomial_curve::curves(int index) const {
// @@protoc_insertion_point(field_get:Curves_proto.Piecewise_polynomial_curve.curves)
return curves_.Get(index);
}
inline ::Curves_proto::Matrix* Piecewise_polynomial_curve::mutable_curves(int index) {
// @@protoc_insertion_point(field_mutable:Curves_proto.Piecewise_polynomial_curve.curves)
return curves_.Mutable(index);
}
inline ::Curves_proto::Matrix* Piecewise_polynomial_curve::add_curves() {
// @@protoc_insertion_point(field_add:Curves_proto.Piecewise_polynomial_curve.curves)
return curves_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::Curves_proto::Matrix >*
Piecewise_polynomial_curve::mutable_curves() {
// @@protoc_insertion_point(field_mutable_list:Curves_proto.Piecewise_polynomial_curve.curves)
return &curves_;
}
inline const ::google::protobuf::RepeatedPtrField< ::Curves_proto::Matrix >&
Piecewise_polynomial_curve::curves() const {
// @@protoc_insertion_point(field_list:Curves_proto.Piecewise_polynomial_curve.curves)
return curves_;
}
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif // __GNUC__
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
} // namespace Curves_proto
// @@protoc_insertion_point(global_scope)
#endif // PROTOBUF_Curves_5fproto_2eproto__INCLUDED
syntax = "proto3";
package Curves_proto;
message Matrix {
uint32 rows = 1; // Total number of rows
uint32 cols = 2; // Total number of columns
// Array of coeffs can be seen as a matrix : data[col*rows+row]
repeated double data = 3 [packed=true];
}
message Piecewise_polynomial_curve {
uint32 number_of_curves = 1; // Total number of curves (segments)
uint32 dimension = 2; // Size of dimension
// Array of times : time[j]
// With j<=number_of_curves
repeated double time = 3 [packed=true];
repeated Matrix curves = 4;
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment