Commit d660c9f1 authored by Corentin Bocquillon's avatar Corentin Bocquillon

Protobuf

parent 39b612f2
File mode changed from 100644 to 100755
......@@ -76,11 +76,7 @@ main (int argc, char *argv[])
print_help ();
exit (EXIT_SUCCESS);
break;
// L’option pour spécifier l’IP du serveur auquel on veut se
// connecter.
// case 's':
// IP = optarg;
// break;
case 'v':
print_version ();
exit(EXIT_SUCCESS);
......@@ -98,12 +94,11 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
if (run_gui () != 0)
{
return 1;
}
return 0;
int r = run_gui ();
if (r != 0)
return 1;
else
return 0;
}
static void
......
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: player-data.proto
// source: src/player-data.proto
#include "player-data.pb.h"
#include "src/player-data.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
......@@ -19,20 +18,16 @@
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
class player_dataDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<player_data>
_instance;
} _player_data_default_instance_;
namespace protobuf_player_2ddata_2eproto {
void InitDefaultsplayer_dataImpl() {
namespace protobuf_src_2fplayer_2ddata_2eproto {
static void InitDefaultsplayer_data() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::_player_data_default_instance_;
new (ptr) ::player_data();
......@@ -41,9 +36,11 @@ void InitDefaultsplayer_dataImpl() {
::player_data::InitAsDefaultInstance();
}
void InitDefaultsplayer_data() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsplayer_dataImpl);
::google::protobuf::internal::SCCInfo<0> scc_info_player_data =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsplayer_data}, {}};
void InitDefaults() {
::google::protobuf::internal::InitSCC(&scc_info_player_data.base);
}
::google::protobuf::Metadata file_level_metadata[1];
......@@ -85,15 +82,14 @@ static ::google::protobuf::Message const * const file_default_instances[] = {
void protobuf_AssignDescriptors() {
AddDescriptors();
::google::protobuf::MessageFactory* factory = NULL;
AssignDescriptors(
"player-data.proto", schemas, file_default_instances, TableStruct::offsets, factory,
"src/player-data.proto", schemas, file_default_instances, TableStruct::offsets,
file_level_metadata, NULL, NULL);
}
void protobuf_AssignDescriptorsOnce() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
static ::google::protobuf::internal::once_flag once;
::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
......@@ -105,23 +101,23 @@ void protobuf_RegisterTypes(const ::std::string&) {
void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n\021player-data.proto\"\340\001\n\013player_data\022\014\n\004n"
"ame\030\001 \002(\t\022\016\n\006health\030\002 \002(\005\022\t\n\001x\030\003 \002(\022\022\t\n\001"
"y\030\004 \002(\022\022\020\n\010velocity\030\005 \002(\005\022\035\n\021inventory_i"
"tem_id\030\006 \003(\005B\002\020\001\022\034\n\020inventory_number\030\007 \003"
"(\005B\002\020\001\022\033\n\017toolbar_item_id\030\010 \003(\005B\002\020\001\022\032\n\016t"
"oolbar_number\030\t \003(\005B\002\020\001\022\025\n\rselected_tool"
"\030\n \002(\005"
"\n\025src/player-data.proto\"\340\001\n\013player_data\022"
"\014\n\004name\030\001 \002(\t\022\016\n\006health\030\002 \002(\005\022\t\n\001x\030\003 \002(\022"
"\022\t\n\001y\030\004 \002(\022\022\020\n\010velocity\030\005 \002(\005\022\035\n\021invento"
"ry_item_id\030\006 \003(\005B\002\020\001\022\034\n\020inventory_number"
"\030\007 \003(\005B\002\020\001\022\033\n\017toolbar_item_id\030\010 \003(\005B\002\020\001\022"
"\032\n\016toolbar_number\030\t \003(\005B\002\020\001\022\025\n\rselected_"
"tool\030\n \002(\005"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
descriptor, 246);
descriptor, 250);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"player-data.proto", &protobuf_RegisterTypes);
"src/player-data.proto", &protobuf_RegisterTypes);
}
void AddDescriptors() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
static ::google::protobuf::internal::once_flag once;
::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
......@@ -129,7 +125,7 @@ struct StaticDescriptorInitializer {
AddDescriptors();
}
} static_descriptor_initializer;
} // namespace protobuf_player_2ddata_2eproto
} // namespace protobuf_src_2fplayer_2ddata_2eproto
// ===================================================================
......@@ -150,9 +146,8 @@ const int player_data::kSelectedToolFieldNumber;
player_data::player_data()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_player_2ddata_2eproto::InitDefaultsplayer_data();
}
::google::protobuf::internal::InitSCC(
&protobuf_src_2fplayer_2ddata_2eproto::scc_info_player_data.base);
SharedCtor();
// @@protoc_insertion_point(constructor:player_data)
}
......@@ -160,7 +155,6 @@ player_data::player_data(const player_data& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
inventory_item_id_(from.inventory_item_id_),
inventory_number_(from.inventory_number_),
toolbar_item_id_(from.toolbar_item_id_),
......@@ -177,7 +171,6 @@ player_data::player_data(const player_data& from)
}
void player_data::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&x_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&selected_tool_) -
......@@ -194,27 +187,18 @@ void player_data::SharedDtor() {
}
void player_data::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
_cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* player_data::descriptor() {
::protobuf_player_2ddata_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_player_2ddata_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
::protobuf_src_2fplayer_2ddata_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_src_2fplayer_2ddata_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const player_data& player_data::default_instance() {
::protobuf_player_2ddata_2eproto::InitDefaultsplayer_data();
::google::protobuf::internal::InitSCC(&protobuf_src_2fplayer_2ddata_2eproto::scc_info_player_data.base);
return *internal_default_instance();
}
player_data* player_data::New(::google::protobuf::Arena* arena) const {
player_data* n = new player_data;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void player_data::Clear() {
// @@protoc_insertion_point(message_clear_start:player_data)
......@@ -228,8 +212,7 @@ void player_data::Clear() {
toolbar_number_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
name_.ClearNonDefaultToEmptyNoArena();
}
if (cached_has_bits & 62u) {
::memset(&x_, 0, static_cast<size_t>(
......@@ -246,7 +229,7 @@ bool player_data::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:player_data)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
......@@ -785,9 +768,7 @@ size_t player_data::ByteSizeLong() const {
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
SetCachedSize(cached_size);
return total_size;
}
......@@ -871,7 +852,8 @@ void player_data::InternalSwap(player_data* other) {
inventory_number_.InternalSwap(&other->inventory_number_);
toolbar_item_id_.InternalSwap(&other->toolbar_item_id_);
toolbar_number_.InternalSwap(&other->toolbar_number_);
name_.Swap(&other->name_);
name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(x_, other->x_);
swap(health_, other->health_);
swap(velocity_, other->velocity_);
......@@ -879,15 +861,21 @@ void player_data::InternalSwap(player_data* other) {
swap(selected_tool_, other->selected_tool_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata player_data::GetMetadata() const {
protobuf_player_2ddata_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_player_2ddata_2eproto::file_level_metadata[kIndexInFileMessages];
protobuf_src_2fplayer_2ddata_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_src_2fplayer_2ddata_2eproto::file_level_metadata[kIndexInFileMessages];
}
// @@protoc_insertion_point(namespace_scope)
namespace google {
namespace protobuf {
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::player_data* Arena::CreateMaybeMessage< ::player_data >(Arena* arena) {
return Arena::CreateInternal< ::player_data >(arena);
}
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: player-data.proto
// source: src/player-data.proto
#ifndef PROTOBUF_player_2ddata_2eproto__INCLUDED
#define PROTOBUF_player_2ddata_2eproto__INCLUDED
#ifndef PROTOBUF_INCLUDED_src_2fplayer_2ddata_2eproto
#define PROTOBUF_INCLUDED_src_2fplayer_2ddata_2eproto
#include <string>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 3005000
#if GOOGLE_PROTOBUF_VERSION < 3006001
#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
#if 3006001 < 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.
......@@ -24,14 +24,16 @@
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.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)
#define PROTOBUF_INTERNAL_EXPORT_protobuf_src_2fplayer_2ddata_2eproto
namespace protobuf_player_2ddata_2eproto {
namespace protobuf_src_2fplayer_2ddata_2eproto {
// Internal implementation detail -- do not use these members.
struct TableStruct {
static const ::google::protobuf::internal::ParseTableField entries[];
......@@ -42,15 +44,15 @@ struct TableStruct {
static const ::google::protobuf::uint32 offsets[];
};
void AddDescriptors();
void InitDefaultsplayer_dataImpl();
void InitDefaultsplayer_data();
inline void InitDefaults() {
InitDefaultsplayer_data();
}
} // namespace protobuf_player_2ddata_2eproto
} // namespace protobuf_src_2fplayer_2ddata_2eproto
class player_data;
class player_dataDefaultTypeInternal;
extern player_dataDefaultTypeInternal _player_data_default_instance_;
namespace google {
namespace protobuf {
template<> ::player_data* Arena::CreateMaybeMessage<::player_data>(Arena*);
} // namespace protobuf
} // namespace google
// ===================================================================
......@@ -95,7 +97,7 @@ class player_data : public ::google::protobuf::Message /* @@protoc_insertion_poi
return reinterpret_cast<const player_data*>(
&_player_data_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
static constexpr int kIndexInFileMessages =
0;
void Swap(player_data* other);
......@@ -105,28 +107,33 @@ class player_data : public ::google::protobuf::Message /* @@protoc_insertion_poi
// implements Message ----------------------------------------------
inline player_data* New() const PROTOBUF_FINAL { return New(NULL); }
inline player_data* New() const final {
return CreateMaybeMessage<player_data>(NULL);
}
player_data* 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;
player_data* New(::google::protobuf::Arena* arena) const final {
return CreateMaybeMessage<player_data>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) final;
void MergeFrom(const ::google::protobuf::Message& from) final;
void CopyFrom(const player_data& from);
void MergeFrom(const player_data& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const PROTOBUF_FINAL;
size_t ByteSizeLong() const final;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
::google::protobuf::io::CodedInputStream* input) final;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::io::CodedOutputStream* output) const final;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
bool deterministic, ::google::protobuf::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void SetCachedSize(int size) const final;
void InternalSwap(player_data* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
......@@ -137,7 +144,7 @@ class player_data : public ::google::protobuf::Message /* @@protoc_insertion_poi
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
::google::protobuf::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
......@@ -261,7 +268,7 @@ class player_data : public ::google::protobuf::Message /* @@protoc_insertion_poi
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_;
mutable int _cached_size_;
mutable ::google::protobuf::internal::CachedSize _cached_size_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > inventory_item_id_;
mutable int _inventory_item_id_cached_byte_size_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > inventory_number_;
......@@ -276,8 +283,7 @@ class player_data : public ::google::protobuf::Message /* @@protoc_insertion_poi
::google::protobuf::int32 velocity_;
::google::protobuf::int64 y_;
::google::protobuf::int32 selected_tool_;
friend struct ::protobuf_player_2ddata_2eproto::TableStruct;
friend void ::protobuf_player_2ddata_2eproto::InitDefaultsplayer_dataImpl();
friend struct ::protobuf_src_2fplayer_2ddata_2eproto::TableStruct;
};
// ===================================================================
......@@ -340,8 +346,11 @@ inline ::std::string* player_data::mutable_name() {
}
inline ::std::string* player_data::release_name() {
// @@protoc_insertion_point(field_release:player_data.name)
if (!has_name()) {
return NULL;
}
clear_has_name();
return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
return name_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void player_data::set_allocated_name(::std::string* name) {
if (name != NULL) {
......@@ -602,4 +611,4 @@ inline void player_data::set_selected_tool(::google::protobuf::int32 value) {
// @@protoc_insertion_point(global_scope)
#endif // PROTOBUF_player_2ddata_2eproto__INCLUDED
#endif // PROTOBUF_INCLUDED_src_2fplayer_2ddata_2eproto
......@@ -162,13 +162,17 @@ Game::run ()
m_window.setKeyRepeatEnabled (false);
display_a_frame ();
int r = 1;
sf::Clock last_displayed_frame_time;
while (true)
{
this->handle_events ();
save_if_necessary ();
if (m_quit)
break;
{
r = 0;
break;
}
move_player_if_necessary ();
handle_clicks ();
......@@ -179,7 +183,7 @@ Game::run ()
}
m_window.setKeyRepeatEnabled (true);
return 1;
return r;
}
void
......
......@@ -60,7 +60,7 @@
int run_gui ();
/**
* Blit the players in “players” on the renderer “renderer”
* Blit the players in “players”.
*
* @param players is the vector containing every players.
* @param screen_origin is the offset in pixels from the origin of the map.
......
......@@ -24,6 +24,8 @@
* Displaying an inventory interface.
*/
#pragma once
#include <SFML/Graphics.hpp>
#include "../player.h"
......
This diff is collapsed.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tile.proto
// source: src/tile.proto
#ifndef PROTOBUF_tile_2eproto__INCLUDED
#define PROTOBUF_tile_2eproto__INCLUDED
#ifndef PROTOBUF_INCLUDED_src_2ftile_2eproto
#define PROTOBUF_INCLUDED_src_2ftile_2eproto
#include <string>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 3005000
#if GOOGLE_PROTOBUF_VERSION < 3006001
#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
#if 3006001 < 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.
......@@ -24,14 +24,16 @@
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.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)
#define PROTOBUF_INTERNAL_EXPORT_protobuf_src_2ftile_2eproto
namespace protobuf_tile_2eproto {
namespace protobuf_src_2ftile_2eproto {
// Internal implementation detail -- do not use these members.
struct TableStruct {
static const ::google::protobuf::internal::ParseTableField entries[];
......@@ -42,18 +44,7 @@ struct TableStruct {
static const ::google::protobuf::uint32 offsets[];
};
void AddDescriptors();
void InitDefaultssquare_protoImpl();
void InitDefaultssquare_proto();
void InitDefaultschunk_protoImpl();
void InitDefaultschunk_proto();
void InitDefaultstile_protoImpl();
void InitDefaultstile_proto();
inline void InitDefaults() {
InitDefaultssquare_proto();
InitDefaultschunk_proto();
InitDefaultstile_proto();
}
} // namespace protobuf_tile_2eproto
} // namespace protobuf_src_2ftile_2eproto
class chunk_proto;
class chunk_protoDefaultTypeInternal;
extern chunk_protoDefaultTypeInternal _chunk_proto_default_instance_;
......@@ -63,6 +54,13 @@ extern square_protoDefaultTypeInternal _square_proto_default_instance_;
class tile_proto;
class tile_protoDefaultTypeInternal;
extern tile_protoDefaultTypeInternal _tile_proto_default_instance_;
namespace google {
namespace protobuf {
template<> ::chunk_proto* Arena::CreateMaybeMessage<::chunk_proto>(Arena*);
template<> ::square_proto* Arena::CreateMaybeMessage<::square_proto>(Arena*);
template<> ::tile_proto* Arena::CreateMaybeMessage<::tile_proto>(Arena*);
} // namespace protobuf
} // namespace google
// ===================================================================
......@@ -107,7 +105,7 @@ class square_proto : public ::google::protobuf::Message /* @@protoc_insertion_po
return reinterpret_cast<const square_proto*>(
&_square_proto_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
static constexpr int kIndexInFileMessages =
0;
void Swap(square_proto* other);
......@@ -117,28 +115,33 @@ class square_proto : public ::google::protobuf::Message /* @@protoc_insertion_po
// implements Message ----------------------------------------------
inline square_proto* New() const PROTOBUF_FINAL { return New(NULL); }
inline square_proto* New() const final {
return CreateMaybeMessage<square_proto>(NULL);
}
square_proto* 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;
square_proto* New(::google::protobuf::Arena* arena) const final {
return CreateMaybeMessage<square_proto>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) final;
void MergeFrom(const ::google::protobuf::Message& from) final;
void CopyFrom(const square_proto& from);
void MergeFrom(const square_proto& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const PROTOBUF_FINAL;
size_t ByteSizeLong() const final;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
::google::protobuf::io::CodedInputStream* input) final;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::io::CodedOutputStream* output) const final;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
bool deterministic, ::google::protobuf::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void SetCachedSize(int size) const final;
void InternalSwap(square_proto* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
......@@ -149,7 +152,7 @@ class square_proto : public ::google::protobuf::Message /* @@protoc_insertion_po
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
::google::protobuf::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
......@@ -208,14 +211,13 @@ class square_proto : public ::google::protobuf::Message /* @@protoc_insertion_po
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_;
mutable int _cached_size_;
mutable ::google::protobuf::internal::CachedSize _cached_size_;
::google::protobuf::int32 floor_;
::google::protobuf::int32 item_;
::google::protobuf::int32 quantity_;
::google::protobuf::int32 x_;
::google::protobuf::int32 y_;
friend struct ::protobuf_tile_2eproto::TableStruct;
friend void ::protobuf_tile_2eproto::InitDefaultssquare_protoImpl();
friend struct ::protobuf_src_2ftile_2eproto::TableStruct;
};
// -------------------------------------------------------------------
......@@ -260,7 +262,7 @@ class chunk_proto : public ::google::protobuf::Message /* @@protoc_insertion_poi
return reinterpret_cast<const chunk_proto*>(
&_chunk_proto_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
static constexpr int kIndexInFileMessages =
1;
void Swap(chunk_proto* other);
......@@ -270,28 +272,33 @@ class chunk_proto : public ::google::protobuf::Message /* @@protoc_insertion_poi
// implements Message ----------------------------------------------
inline chunk_proto* New() const PROTOBUF_FINAL { return New(NULL); }
inline chunk_proto* New() const final {