text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: diplomacy_tensorflow/python/saved_model/saved_object_graph.proto

#ifndef PROTOBUF_INCLUDED_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto
#define PROTOBUF_INCLUDED_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto

#include <string>

#include <google/protobuf/stubs/common.h>

#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 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.
#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/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>
#include "diplomacy_tensorflow/core/protobuf/checkpointable_object_graph.pb.h"
// @@protoc_insertion_point(includes)
#define PROTOBUF_INTERNAL_EXPORT_protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto

namespace protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_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[6];
  static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  static const ::google::protobuf::internal::SerializationTable serialization_table[];
  static const ::google::protobuf::uint32 offsets[];
};
void AddDescriptors();
}  // namespace protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto
namespace diplomacy {
namespace tensorflow {
class SavedAsset;
class SavedAssetDefaultTypeInternal;
extern SavedAssetDefaultTypeInternal _SavedAsset_default_instance_;
class SavedMonomorphicFunction;
class SavedMonomorphicFunctionDefaultTypeInternal;
extern SavedMonomorphicFunctionDefaultTypeInternal _SavedMonomorphicFunction_default_instance_;
class SavedObject;
class SavedObjectDefaultTypeInternal;
extern SavedObjectDefaultTypeInternal _SavedObject_default_instance_;
class SavedObjectGraph;
class SavedObjectGraphDefaultTypeInternal;
extern SavedObjectGraphDefaultTypeInternal _SavedObjectGraph_default_instance_;
class SavedPolymorphicFunction;
class SavedPolymorphicFunctionDefaultTypeInternal;
extern SavedPolymorphicFunctionDefaultTypeInternal _SavedPolymorphicFunction_default_instance_;
class SavedUserObject;
class SavedUserObjectDefaultTypeInternal;
extern SavedUserObjectDefaultTypeInternal _SavedUserObject_default_instance_;
}  // namespace tensorflow
}  // namespace diplomacy
namespace google {
namespace protobuf {
template<> ::diplomacy::tensorflow::SavedAsset* Arena::CreateMaybeMessage<::diplomacy::tensorflow::SavedAsset>(Arena*);
template<> ::diplomacy::tensorflow::SavedMonomorphicFunction* Arena::CreateMaybeMessage<::diplomacy::tensorflow::SavedMonomorphicFunction>(Arena*);
template<> ::diplomacy::tensorflow::SavedObject* Arena::CreateMaybeMessage<::diplomacy::tensorflow::SavedObject>(Arena*);
template<> ::diplomacy::tensorflow::SavedObjectGraph* Arena::CreateMaybeMessage<::diplomacy::tensorflow::SavedObjectGraph>(Arena*);
template<> ::diplomacy::tensorflow::SavedPolymorphicFunction* Arena::CreateMaybeMessage<::diplomacy::tensorflow::SavedPolymorphicFunction>(Arena*);
template<> ::diplomacy::tensorflow::SavedUserObject* Arena::CreateMaybeMessage<::diplomacy::tensorflow::SavedUserObject>(Arena*);
}  // namespace protobuf
}  // namespace google
namespace diplomacy {
namespace tensorflow {

// ===================================================================

class SavedObjectGraph : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:diplomacy.tensorflow.SavedObjectGraph) */ {
 public:
  SavedObjectGraph();
  virtual ~SavedObjectGraph();

  SavedObjectGraph(const SavedObjectGraph& from);

  inline SavedObjectGraph& operator=(const SavedObjectGraph& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  SavedObjectGraph(SavedObjectGraph&& from) noexcept
    : SavedObjectGraph() {
    *this = ::std::move(from);
  }

  inline SavedObjectGraph& operator=(SavedObjectGraph&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline ::google::protobuf::Arena* GetArena() const final {
    return GetArenaNoVirtual();
  }
  inline void* GetMaybeArenaPointer() const final {
    return MaybeArenaPtr();
  }
  static const ::google::protobuf::Descriptor* descriptor();
  static const SavedObjectGraph& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const SavedObjectGraph* internal_default_instance() {
    return reinterpret_cast<const SavedObjectGraph*>(
               &_SavedObjectGraph_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    0;

  void UnsafeArenaSwap(SavedObjectGraph* other);
  void Swap(SavedObjectGraph* other);
  friend void swap(SavedObjectGraph& a, SavedObjectGraph& b) {
    a.Swap(&b);
  }

  // implements Message ----------------------------------------------

  inline SavedObjectGraph* New() const final {
    return CreateMaybeMessage<SavedObjectGraph>(NULL);
  }

  SavedObjectGraph* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<SavedObjectGraph>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const SavedObjectGraph& from);
  void MergeFrom(const SavedObjectGraph& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      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 final;
  void InternalSwap(SavedObjectGraph* other);
  protected:
  explicit SavedObjectGraph(::google::protobuf::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // repeated .diplomacy.tensorflow.SavedObject nodes = 1;
  int nodes_size() const;
  void clear_nodes();
  static const int kNodesFieldNumber = 1;
  ::diplomacy::tensorflow::SavedObject* mutable_nodes(int index);
  ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedObject >*
      mutable_nodes();
  const ::diplomacy::tensorflow::SavedObject& nodes(int index) const;
  ::diplomacy::tensorflow::SavedObject* add_nodes();
  const ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedObject >&
      nodes() const;

  // @@protoc_insertion_point(class_scope:diplomacy.tensorflow.SavedObjectGraph)
 private:

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedObject > nodes_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class SavedObject : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:diplomacy.tensorflow.SavedObject) */ {
 public:
  SavedObject();
  virtual ~SavedObject();

  SavedObject(const SavedObject& from);

  inline SavedObject& operator=(const SavedObject& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  SavedObject(SavedObject&& from) noexcept
    : SavedObject() {
    *this = ::std::move(from);
  }

  inline SavedObject& operator=(SavedObject&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline ::google::protobuf::Arena* GetArena() const final {
    return GetArenaNoVirtual();
  }
  inline void* GetMaybeArenaPointer() const final {
    return MaybeArenaPtr();
  }
  static const ::google::protobuf::Descriptor* descriptor();
  static const SavedObject& default_instance();

  enum KindCase {
    kUserObject = 4,
    kAsset = 5,
    kFunction = 6,
    KIND_NOT_SET = 0,
  };

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const SavedObject* internal_default_instance() {
    return reinterpret_cast<const SavedObject*>(
               &_SavedObject_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    1;

  void UnsafeArenaSwap(SavedObject* other);
  void Swap(SavedObject* other);
  friend void swap(SavedObject& a, SavedObject& b) {
    a.Swap(&b);
  }

  // implements Message ----------------------------------------------

  inline SavedObject* New() const final {
    return CreateMaybeMessage<SavedObject>(NULL);
  }

  SavedObject* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<SavedObject>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const SavedObject& from);
  void MergeFrom(const SavedObject& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      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 final;
  void InternalSwap(SavedObject* other);
  protected:
  explicit SavedObject(::google::protobuf::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // repeated .diplomacy.tensorflow.CheckpointableObjectGraph.CheckpointableObject.ObjectReference children = 1;
  int children_size() const;
  void clear_children();
  static const int kChildrenFieldNumber = 1;
  ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference* mutable_children(int index);
  ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference >*
      mutable_children();
  const ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference& children(int index) const;
  ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference* add_children();
  const ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference >&
      children() const;

  // repeated .diplomacy.tensorflow.CheckpointableObjectGraph.CheckpointableObject.SlotVariableReference slot_variables = 3;
  int slot_variables_size() const;
  void clear_slot_variables();
  static const int kSlotVariablesFieldNumber = 3;
  ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference* mutable_slot_variables(int index);
  ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference >*
      mutable_slot_variables();
  const ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference& slot_variables(int index) const;
  ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference* add_slot_variables();
  const ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference >&
      slot_variables() const;

  // .diplomacy.tensorflow.SavedUserObject user_object = 4;
  bool has_user_object() const;
  void clear_user_object();
  static const int kUserObjectFieldNumber = 4;
  private:
  const ::diplomacy::tensorflow::SavedUserObject& _internal_user_object() const;
  public:
  const ::diplomacy::tensorflow::SavedUserObject& user_object() const;
  ::diplomacy::tensorflow::SavedUserObject* release_user_object();
  ::diplomacy::tensorflow::SavedUserObject* mutable_user_object();
  void set_allocated_user_object(::diplomacy::tensorflow::SavedUserObject* user_object);
  void unsafe_arena_set_allocated_user_object(
      ::diplomacy::tensorflow::SavedUserObject* user_object);
  ::diplomacy::tensorflow::SavedUserObject* unsafe_arena_release_user_object();

  // .diplomacy.tensorflow.SavedAsset asset = 5;
  bool has_asset() const;
  void clear_asset();
  static const int kAssetFieldNumber = 5;
  private:
  const ::diplomacy::tensorflow::SavedAsset& _internal_asset() const;
  public:
  const ::diplomacy::tensorflow::SavedAsset& asset() const;
  ::diplomacy::tensorflow::SavedAsset* release_asset();
  ::diplomacy::tensorflow::SavedAsset* mutable_asset();
  void set_allocated_asset(::diplomacy::tensorflow::SavedAsset* asset);
  void unsafe_arena_set_allocated_asset(
      ::diplomacy::tensorflow::SavedAsset* asset);
  ::diplomacy::tensorflow::SavedAsset* unsafe_arena_release_asset();

  // .diplomacy.tensorflow.SavedPolymorphicFunction function = 6;
  bool has_function() const;
  void clear_function();
  static const int kFunctionFieldNumber = 6;
  private:
  const ::diplomacy::tensorflow::SavedPolymorphicFunction& _internal_function() const;
  public:
  const ::diplomacy::tensorflow::SavedPolymorphicFunction& function() const;
  ::diplomacy::tensorflow::SavedPolymorphicFunction* release_function();
  ::diplomacy::tensorflow::SavedPolymorphicFunction* mutable_function();
  void set_allocated_function(::diplomacy::tensorflow::SavedPolymorphicFunction* function);
  void unsafe_arena_set_allocated_function(
      ::diplomacy::tensorflow::SavedPolymorphicFunction* function);
  ::diplomacy::tensorflow::SavedPolymorphicFunction* unsafe_arena_release_function();

  void clear_kind();
  KindCase kind_case() const;
  // @@protoc_insertion_point(class_scope:diplomacy.tensorflow.SavedObject)
 private:
  void set_has_user_object();
  void set_has_asset();
  void set_has_function();

  inline bool has_kind() const;
  inline void clear_has_kind();

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference > children_;
  ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference > slot_variables_;
  union KindUnion {
    KindUnion() {}
    ::diplomacy::tensorflow::SavedUserObject* user_object_;
    ::diplomacy::tensorflow::SavedAsset* asset_;
    ::diplomacy::tensorflow::SavedPolymorphicFunction* function_;
  } kind_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  ::google::protobuf::uint32 _oneof_case_[1];

  friend struct ::protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class SavedUserObject : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:diplomacy.tensorflow.SavedUserObject) */ {
 public:
  SavedUserObject();
  virtual ~SavedUserObject();

  SavedUserObject(const SavedUserObject& from);

  inline SavedUserObject& operator=(const SavedUserObject& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  SavedUserObject(SavedUserObject&& from) noexcept
    : SavedUserObject() {
    *this = ::std::move(from);
  }

  inline SavedUserObject& operator=(SavedUserObject&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline ::google::protobuf::Arena* GetArena() const final {
    return GetArenaNoVirtual();
  }
  inline void* GetMaybeArenaPointer() const final {
    return MaybeArenaPtr();
  }
  static const ::google::protobuf::Descriptor* descriptor();
  static const SavedUserObject& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const SavedUserObject* internal_default_instance() {
    return reinterpret_cast<const SavedUserObject*>(
               &_SavedUserObject_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    2;

  void UnsafeArenaSwap(SavedUserObject* other);
  void Swap(SavedUserObject* other);
  friend void swap(SavedUserObject& a, SavedUserObject& b) {
    a.Swap(&b);
  }

  // implements Message ----------------------------------------------

  inline SavedUserObject* New() const final {
    return CreateMaybeMessage<SavedUserObject>(NULL);
  }

  SavedUserObject* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<SavedUserObject>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const SavedUserObject& from);
  void MergeFrom(const SavedUserObject& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      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 final;
  void InternalSwap(SavedUserObject* other);
  protected:
  explicit SavedUserObject(::google::protobuf::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // @@protoc_insertion_point(class_scope:diplomacy.tensorflow.SavedUserObject)
 private:

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class SavedAsset : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:diplomacy.tensorflow.SavedAsset) */ {
 public:
  SavedAsset();
  virtual ~SavedAsset();

  SavedAsset(const SavedAsset& from);

  inline SavedAsset& operator=(const SavedAsset& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  SavedAsset(SavedAsset&& from) noexcept
    : SavedAsset() {
    *this = ::std::move(from);
  }

  inline SavedAsset& operator=(SavedAsset&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline ::google::protobuf::Arena* GetArena() const final {
    return GetArenaNoVirtual();
  }
  inline void* GetMaybeArenaPointer() const final {
    return MaybeArenaPtr();
  }
  static const ::google::protobuf::Descriptor* descriptor();
  static const SavedAsset& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const SavedAsset* internal_default_instance() {
    return reinterpret_cast<const SavedAsset*>(
               &_SavedAsset_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    3;

  void UnsafeArenaSwap(SavedAsset* other);
  void Swap(SavedAsset* other);
  friend void swap(SavedAsset& a, SavedAsset& b) {
    a.Swap(&b);
  }

  // implements Message ----------------------------------------------

  inline SavedAsset* New() const final {
    return CreateMaybeMessage<SavedAsset>(NULL);
  }

  SavedAsset* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<SavedAsset>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const SavedAsset& from);
  void MergeFrom(const SavedAsset& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      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 final;
  void InternalSwap(SavedAsset* other);
  protected:
  explicit SavedAsset(::google::protobuf::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // uint32 asset_file_def_index = 1;
  void clear_asset_file_def_index();
  static const int kAssetFileDefIndexFieldNumber = 1;
  ::google::protobuf::uint32 asset_file_def_index() const;
  void set_asset_file_def_index(::google::protobuf::uint32 value);

  // @@protoc_insertion_point(class_scope:diplomacy.tensorflow.SavedAsset)
 private:

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::google::protobuf::uint32 asset_file_def_index_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class SavedPolymorphicFunction : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:diplomacy.tensorflow.SavedPolymorphicFunction) */ {
 public:
  SavedPolymorphicFunction();
  virtual ~SavedPolymorphicFunction();

  SavedPolymorphicFunction(const SavedPolymorphicFunction& from);

  inline SavedPolymorphicFunction& operator=(const SavedPolymorphicFunction& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  SavedPolymorphicFunction(SavedPolymorphicFunction&& from) noexcept
    : SavedPolymorphicFunction() {
    *this = ::std::move(from);
  }

  inline SavedPolymorphicFunction& operator=(SavedPolymorphicFunction&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline ::google::protobuf::Arena* GetArena() const final {
    return GetArenaNoVirtual();
  }
  inline void* GetMaybeArenaPointer() const final {
    return MaybeArenaPtr();
  }
  static const ::google::protobuf::Descriptor* descriptor();
  static const SavedPolymorphicFunction& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const SavedPolymorphicFunction* internal_default_instance() {
    return reinterpret_cast<const SavedPolymorphicFunction*>(
               &_SavedPolymorphicFunction_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    4;

  void UnsafeArenaSwap(SavedPolymorphicFunction* other);
  void Swap(SavedPolymorphicFunction* other);
  friend void swap(SavedPolymorphicFunction& a, SavedPolymorphicFunction& b) {
    a.Swap(&b);
  }

  // implements Message ----------------------------------------------

  inline SavedPolymorphicFunction* New() const final {
    return CreateMaybeMessage<SavedPolymorphicFunction>(NULL);
  }

  SavedPolymorphicFunction* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<SavedPolymorphicFunction>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const SavedPolymorphicFunction& from);
  void MergeFrom(const SavedPolymorphicFunction& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      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 final;
  void InternalSwap(SavedPolymorphicFunction* other);
  protected:
  explicit SavedPolymorphicFunction(::google::protobuf::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // repeated .diplomacy.tensorflow.SavedMonomorphicFunction monomorphic_function = 1;
  int monomorphic_function_size() const;
  void clear_monomorphic_function();
  static const int kMonomorphicFunctionFieldNumber = 1;
  ::diplomacy::tensorflow::SavedMonomorphicFunction* mutable_monomorphic_function(int index);
  ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedMonomorphicFunction >*
      mutable_monomorphic_function();
  const ::diplomacy::tensorflow::SavedMonomorphicFunction& monomorphic_function(int index) const;
  ::diplomacy::tensorflow::SavedMonomorphicFunction* add_monomorphic_function();
  const ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedMonomorphicFunction >&
      monomorphic_function() const;

  // @@protoc_insertion_point(class_scope:diplomacy.tensorflow.SavedPolymorphicFunction)
 private:

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedMonomorphicFunction > monomorphic_function_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto::TableStruct;
};
// -------------------------------------------------------------------

class SavedMonomorphicFunction : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:diplomacy.tensorflow.SavedMonomorphicFunction) */ {
 public:
  SavedMonomorphicFunction();
  virtual ~SavedMonomorphicFunction();

  SavedMonomorphicFunction(const SavedMonomorphicFunction& from);

  inline SavedMonomorphicFunction& operator=(const SavedMonomorphicFunction& from) {
    CopyFrom(from);
    return *this;
  }
  #if LANG_CXX11
  SavedMonomorphicFunction(SavedMonomorphicFunction&& from) noexcept
    : SavedMonomorphicFunction() {
    *this = ::std::move(from);
  }

  inline SavedMonomorphicFunction& operator=(SavedMonomorphicFunction&& from) noexcept {
    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }
  #endif
  inline ::google::protobuf::Arena* GetArena() const final {
    return GetArenaNoVirtual();
  }
  inline void* GetMaybeArenaPointer() const final {
    return MaybeArenaPtr();
  }
  static const ::google::protobuf::Descriptor* descriptor();
  static const SavedMonomorphicFunction& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const SavedMonomorphicFunction* internal_default_instance() {
    return reinterpret_cast<const SavedMonomorphicFunction*>(
               &_SavedMonomorphicFunction_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    5;

  void UnsafeArenaSwap(SavedMonomorphicFunction* other);
  void Swap(SavedMonomorphicFunction* other);
  friend void swap(SavedMonomorphicFunction& a, SavedMonomorphicFunction& b) {
    a.Swap(&b);
  }

  // implements Message ----------------------------------------------

  inline SavedMonomorphicFunction* New() const final {
    return CreateMaybeMessage<SavedMonomorphicFunction>(NULL);
  }

  SavedMonomorphicFunction* New(::google::protobuf::Arena* arena) const final {
    return CreateMaybeMessage<SavedMonomorphicFunction>(arena);
  }
  void CopyFrom(const ::google::protobuf::Message& from) final;
  void MergeFrom(const ::google::protobuf::Message& from) final;
  void CopyFrom(const SavedMonomorphicFunction& from);
  void MergeFrom(const SavedMonomorphicFunction& from);
  void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) final;
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const final;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      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 final;
  void InternalSwap(SavedMonomorphicFunction* other);
  protected:
  explicit SavedMonomorphicFunction(::google::protobuf::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // string concrete_function = 1;
  void clear_concrete_function();
  static const int kConcreteFunctionFieldNumber = 1;
  const ::std::string& concrete_function() const;
  void set_concrete_function(const ::std::string& value);
  #if LANG_CXX11
  void set_concrete_function(::std::string&& value);
  #endif
  void set_concrete_function(const char* value);
  void set_concrete_function(const char* value, size_t size);
  ::std::string* mutable_concrete_function();
  ::std::string* release_concrete_function();
  void set_allocated_concrete_function(::std::string* concrete_function);
  PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
  "    string fields are deprecated and will be removed in a"
  "    future release.")
  ::std::string* unsafe_arena_release_concrete_function();
  PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
  "    string fields are deprecated and will be removed in a"
  "    future release.")
  void unsafe_arena_set_allocated_concrete_function(
      ::std::string* concrete_function);

  // @@protoc_insertion_point(class_scope:diplomacy.tensorflow.SavedMonomorphicFunction)
 private:

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::google::protobuf::internal::ArenaStringPtr concrete_function_;
  mutable ::google::protobuf::internal::CachedSize _cached_size_;
  friend struct ::protobuf_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto::TableStruct;
};
// ===================================================================

// ===================================================================

#ifdef __GNUC__
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif  // __GNUC__
// SavedObjectGraph

// repeated .diplomacy.tensorflow.SavedObject nodes = 1;
inline int SavedObjectGraph::nodes_size() const {
  return nodes_.size();
}
inline void SavedObjectGraph::clear_nodes() {
  nodes_.Clear();
}
inline ::diplomacy::tensorflow::SavedObject* SavedObjectGraph::mutable_nodes(int index) {
  // @@protoc_insertion_point(field_mutable:diplomacy.tensorflow.SavedObjectGraph.nodes)
  return nodes_.Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedObject >*
SavedObjectGraph::mutable_nodes() {
  // @@protoc_insertion_point(field_mutable_list:diplomacy.tensorflow.SavedObjectGraph.nodes)
  return &nodes_;
}
inline const ::diplomacy::tensorflow::SavedObject& SavedObjectGraph::nodes(int index) const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedObjectGraph.nodes)
  return nodes_.Get(index);
}
inline ::diplomacy::tensorflow::SavedObject* SavedObjectGraph::add_nodes() {
  // @@protoc_insertion_point(field_add:diplomacy.tensorflow.SavedObjectGraph.nodes)
  return nodes_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedObject >&
SavedObjectGraph::nodes() const {
  // @@protoc_insertion_point(field_list:diplomacy.tensorflow.SavedObjectGraph.nodes)
  return nodes_;
}

// -------------------------------------------------------------------

// SavedObject

// repeated .diplomacy.tensorflow.CheckpointableObjectGraph.CheckpointableObject.ObjectReference children = 1;
inline int SavedObject::children_size() const {
  return children_.size();
}
inline ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference* SavedObject::mutable_children(int index) {
  // @@protoc_insertion_point(field_mutable:diplomacy.tensorflow.SavedObject.children)
  return children_.Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference >*
SavedObject::mutable_children() {
  // @@protoc_insertion_point(field_mutable_list:diplomacy.tensorflow.SavedObject.children)
  return &children_;
}
inline const ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference& SavedObject::children(int index) const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedObject.children)
  return children_.Get(index);
}
inline ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference* SavedObject::add_children() {
  // @@protoc_insertion_point(field_add:diplomacy.tensorflow.SavedObject.children)
  return children_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_ObjectReference >&
SavedObject::children() const {
  // @@protoc_insertion_point(field_list:diplomacy.tensorflow.SavedObject.children)
  return children_;
}

// repeated .diplomacy.tensorflow.CheckpointableObjectGraph.CheckpointableObject.SlotVariableReference slot_variables = 3;
inline int SavedObject::slot_variables_size() const {
  return slot_variables_.size();
}
inline ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference* SavedObject::mutable_slot_variables(int index) {
  // @@protoc_insertion_point(field_mutable:diplomacy.tensorflow.SavedObject.slot_variables)
  return slot_variables_.Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference >*
SavedObject::mutable_slot_variables() {
  // @@protoc_insertion_point(field_mutable_list:diplomacy.tensorflow.SavedObject.slot_variables)
  return &slot_variables_;
}
inline const ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference& SavedObject::slot_variables(int index) const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedObject.slot_variables)
  return slot_variables_.Get(index);
}
inline ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference* SavedObject::add_slot_variables() {
  // @@protoc_insertion_point(field_add:diplomacy.tensorflow.SavedObject.slot_variables)
  return slot_variables_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::CheckpointableObjectGraph_CheckpointableObject_SlotVariableReference >&
SavedObject::slot_variables() const {
  // @@protoc_insertion_point(field_list:diplomacy.tensorflow.SavedObject.slot_variables)
  return slot_variables_;
}

// .diplomacy.tensorflow.SavedUserObject user_object = 4;
inline bool SavedObject::has_user_object() const {
  return kind_case() == kUserObject;
}
inline void SavedObject::set_has_user_object() {
  _oneof_case_[0] = kUserObject;
}
inline void SavedObject::clear_user_object() {
  if (has_user_object()) {
    if (GetArenaNoVirtual() == NULL) {
      delete kind_.user_object_;
    }
    clear_has_kind();
  }
}
inline const ::diplomacy::tensorflow::SavedUserObject& SavedObject::_internal_user_object() const {
  return *kind_.user_object_;
}
inline ::diplomacy::tensorflow::SavedUserObject* SavedObject::release_user_object() {
  // @@protoc_insertion_point(field_release:diplomacy.tensorflow.SavedObject.user_object)
  if (has_user_object()) {
    clear_has_kind();
      ::diplomacy::tensorflow::SavedUserObject* temp = kind_.user_object_;
    if (GetArenaNoVirtual() != NULL) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    kind_.user_object_ = NULL;
    return temp;
  } else {
    return NULL;
  }
}
inline const ::diplomacy::tensorflow::SavedUserObject& SavedObject::user_object() const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedObject.user_object)
  return has_user_object()
      ? *kind_.user_object_
      : *reinterpret_cast< ::diplomacy::tensorflow::SavedUserObject*>(&::diplomacy::tensorflow::_SavedUserObject_default_instance_);
}
inline ::diplomacy::tensorflow::SavedUserObject* SavedObject::unsafe_arena_release_user_object() {
  // @@protoc_insertion_point(field_unsafe_arena_release:diplomacy.tensorflow.SavedObject.user_object)
  if (has_user_object()) {
    clear_has_kind();
    ::diplomacy::tensorflow::SavedUserObject* temp = kind_.user_object_;
    kind_.user_object_ = NULL;
    return temp;
  } else {
    return NULL;
  }
}
inline void SavedObject::unsafe_arena_set_allocated_user_object(::diplomacy::tensorflow::SavedUserObject* user_object) {
  clear_kind();
  if (user_object) {
    set_has_user_object();
    kind_.user_object_ = user_object;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:diplomacy.tensorflow.SavedObject.user_object)
}
inline ::diplomacy::tensorflow::SavedUserObject* SavedObject::mutable_user_object() {
  if (!has_user_object()) {
    clear_kind();
    set_has_user_object();
    kind_.user_object_ = CreateMaybeMessage< ::diplomacy::tensorflow::SavedUserObject >(
        GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(field_mutable:diplomacy.tensorflow.SavedObject.user_object)
  return kind_.user_object_;
}

// .diplomacy.tensorflow.SavedAsset asset = 5;
inline bool SavedObject::has_asset() const {
  return kind_case() == kAsset;
}
inline void SavedObject::set_has_asset() {
  _oneof_case_[0] = kAsset;
}
inline void SavedObject::clear_asset() {
  if (has_asset()) {
    if (GetArenaNoVirtual() == NULL) {
      delete kind_.asset_;
    }
    clear_has_kind();
  }
}
inline const ::diplomacy::tensorflow::SavedAsset& SavedObject::_internal_asset() const {
  return *kind_.asset_;
}
inline ::diplomacy::tensorflow::SavedAsset* SavedObject::release_asset() {
  // @@protoc_insertion_point(field_release:diplomacy.tensorflow.SavedObject.asset)
  if (has_asset()) {
    clear_has_kind();
      ::diplomacy::tensorflow::SavedAsset* temp = kind_.asset_;
    if (GetArenaNoVirtual() != NULL) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    kind_.asset_ = NULL;
    return temp;
  } else {
    return NULL;
  }
}
inline const ::diplomacy::tensorflow::SavedAsset& SavedObject::asset() const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedObject.asset)
  return has_asset()
      ? *kind_.asset_
      : *reinterpret_cast< ::diplomacy::tensorflow::SavedAsset*>(&::diplomacy::tensorflow::_SavedAsset_default_instance_);
}
inline ::diplomacy::tensorflow::SavedAsset* SavedObject::unsafe_arena_release_asset() {
  // @@protoc_insertion_point(field_unsafe_arena_release:diplomacy.tensorflow.SavedObject.asset)
  if (has_asset()) {
    clear_has_kind();
    ::diplomacy::tensorflow::SavedAsset* temp = kind_.asset_;
    kind_.asset_ = NULL;
    return temp;
  } else {
    return NULL;
  }
}
inline void SavedObject::unsafe_arena_set_allocated_asset(::diplomacy::tensorflow::SavedAsset* asset) {
  clear_kind();
  if (asset) {
    set_has_asset();
    kind_.asset_ = asset;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:diplomacy.tensorflow.SavedObject.asset)
}
inline ::diplomacy::tensorflow::SavedAsset* SavedObject::mutable_asset() {
  if (!has_asset()) {
    clear_kind();
    set_has_asset();
    kind_.asset_ = CreateMaybeMessage< ::diplomacy::tensorflow::SavedAsset >(
        GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(field_mutable:diplomacy.tensorflow.SavedObject.asset)
  return kind_.asset_;
}

// .diplomacy.tensorflow.SavedPolymorphicFunction function = 6;
inline bool SavedObject::has_function() const {
  return kind_case() == kFunction;
}
inline void SavedObject::set_has_function() {
  _oneof_case_[0] = kFunction;
}
inline void SavedObject::clear_function() {
  if (has_function()) {
    if (GetArenaNoVirtual() == NULL) {
      delete kind_.function_;
    }
    clear_has_kind();
  }
}
inline const ::diplomacy::tensorflow::SavedPolymorphicFunction& SavedObject::_internal_function() const {
  return *kind_.function_;
}
inline ::diplomacy::tensorflow::SavedPolymorphicFunction* SavedObject::release_function() {
  // @@protoc_insertion_point(field_release:diplomacy.tensorflow.SavedObject.function)
  if (has_function()) {
    clear_has_kind();
      ::diplomacy::tensorflow::SavedPolymorphicFunction* temp = kind_.function_;
    if (GetArenaNoVirtual() != NULL) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    kind_.function_ = NULL;
    return temp;
  } else {
    return NULL;
  }
}
inline const ::diplomacy::tensorflow::SavedPolymorphicFunction& SavedObject::function() const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedObject.function)
  return has_function()
      ? *kind_.function_
      : *reinterpret_cast< ::diplomacy::tensorflow::SavedPolymorphicFunction*>(&::diplomacy::tensorflow::_SavedPolymorphicFunction_default_instance_);
}
inline ::diplomacy::tensorflow::SavedPolymorphicFunction* SavedObject::unsafe_arena_release_function() {
  // @@protoc_insertion_point(field_unsafe_arena_release:diplomacy.tensorflow.SavedObject.function)
  if (has_function()) {
    clear_has_kind();
    ::diplomacy::tensorflow::SavedPolymorphicFunction* temp = kind_.function_;
    kind_.function_ = NULL;
    return temp;
  } else {
    return NULL;
  }
}
inline void SavedObject::unsafe_arena_set_allocated_function(::diplomacy::tensorflow::SavedPolymorphicFunction* function) {
  clear_kind();
  if (function) {
    set_has_function();
    kind_.function_ = function;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:diplomacy.tensorflow.SavedObject.function)
}
inline ::diplomacy::tensorflow::SavedPolymorphicFunction* SavedObject::mutable_function() {
  if (!has_function()) {
    clear_kind();
    set_has_function();
    kind_.function_ = CreateMaybeMessage< ::diplomacy::tensorflow::SavedPolymorphicFunction >(
        GetArenaNoVirtual());
  }
  // @@protoc_insertion_point(field_mutable:diplomacy.tensorflow.SavedObject.function)
  return kind_.function_;
}

inline bool SavedObject::has_kind() const {
  return kind_case() != KIND_NOT_SET;
}
inline void SavedObject::clear_has_kind() {
  _oneof_case_[0] = KIND_NOT_SET;
}
inline SavedObject::KindCase SavedObject::kind_case() const {
  return SavedObject::KindCase(_oneof_case_[0]);
}
// -------------------------------------------------------------------

// SavedUserObject

// -------------------------------------------------------------------

// SavedAsset

// uint32 asset_file_def_index = 1;
inline void SavedAsset::clear_asset_file_def_index() {
  asset_file_def_index_ = 0u;
}
inline ::google::protobuf::uint32 SavedAsset::asset_file_def_index() const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedAsset.asset_file_def_index)
  return asset_file_def_index_;
}
inline void SavedAsset::set_asset_file_def_index(::google::protobuf::uint32 value) {

  asset_file_def_index_ = value;
  // @@protoc_insertion_point(field_set:diplomacy.tensorflow.SavedAsset.asset_file_def_index)
}

// -------------------------------------------------------------------

// SavedPolymorphicFunction

// repeated .diplomacy.tensorflow.SavedMonomorphicFunction monomorphic_function = 1;
inline int SavedPolymorphicFunction::monomorphic_function_size() const {
  return monomorphic_function_.size();
}
inline void SavedPolymorphicFunction::clear_monomorphic_function() {
  monomorphic_function_.Clear();
}
inline ::diplomacy::tensorflow::SavedMonomorphicFunction* SavedPolymorphicFunction::mutable_monomorphic_function(int index) {
  // @@protoc_insertion_point(field_mutable:diplomacy.tensorflow.SavedPolymorphicFunction.monomorphic_function)
  return monomorphic_function_.Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedMonomorphicFunction >*
SavedPolymorphicFunction::mutable_monomorphic_function() {
  // @@protoc_insertion_point(field_mutable_list:diplomacy.tensorflow.SavedPolymorphicFunction.monomorphic_function)
  return &monomorphic_function_;
}
inline const ::diplomacy::tensorflow::SavedMonomorphicFunction& SavedPolymorphicFunction::monomorphic_function(int index) const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedPolymorphicFunction.monomorphic_function)
  return monomorphic_function_.Get(index);
}
inline ::diplomacy::tensorflow::SavedMonomorphicFunction* SavedPolymorphicFunction::add_monomorphic_function() {
  // @@protoc_insertion_point(field_add:diplomacy.tensorflow.SavedPolymorphicFunction.monomorphic_function)
  return monomorphic_function_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::diplomacy::tensorflow::SavedMonomorphicFunction >&
SavedPolymorphicFunction::monomorphic_function() const {
  // @@protoc_insertion_point(field_list:diplomacy.tensorflow.SavedPolymorphicFunction.monomorphic_function)
  return monomorphic_function_;
}

// -------------------------------------------------------------------

// SavedMonomorphicFunction

// string concrete_function = 1;
inline void SavedMonomorphicFunction::clear_concrete_function() {
  concrete_function_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline const ::std::string& SavedMonomorphicFunction::concrete_function() const {
  // @@protoc_insertion_point(field_get:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
  return concrete_function_.Get();
}
inline void SavedMonomorphicFunction::set_concrete_function(const ::std::string& value) {

  concrete_function_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
  // @@protoc_insertion_point(field_set:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
}
#if LANG_CXX11
inline void SavedMonomorphicFunction::set_concrete_function(::std::string&& value) {

  concrete_function_.Set(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual());
  // @@protoc_insertion_point(field_set_rvalue:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
}
#endif
inline void SavedMonomorphicFunction::set_concrete_function(const char* value) {
  GOOGLE_DCHECK(value != NULL);

  concrete_function_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
              GetArenaNoVirtual());
  // @@protoc_insertion_point(field_set_char:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
}
inline void SavedMonomorphicFunction::set_concrete_function(const char* value,
    size_t size) {

  concrete_function_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
      reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
  // @@protoc_insertion_point(field_set_pointer:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
}
inline ::std::string* SavedMonomorphicFunction::mutable_concrete_function() {

  // @@protoc_insertion_point(field_mutable:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
  return concrete_function_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline ::std::string* SavedMonomorphicFunction::release_concrete_function() {
  // @@protoc_insertion_point(field_release:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)

  return concrete_function_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
}
inline void SavedMonomorphicFunction::set_allocated_concrete_function(::std::string* concrete_function) {
  if (concrete_function != NULL) {

  } else {

  }
  concrete_function_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), concrete_function,
      GetArenaNoVirtual());
  // @@protoc_insertion_point(field_set_allocated:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
}
inline ::std::string* SavedMonomorphicFunction::unsafe_arena_release_concrete_function() {
  // @@protoc_insertion_point(field_unsafe_arena_release:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);

  return concrete_function_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
}
inline void SavedMonomorphicFunction::unsafe_arena_set_allocated_concrete_function(
    ::std::string* concrete_function) {
  GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
  if (concrete_function != NULL) {

  } else {

  }
  concrete_function_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      concrete_function, GetArenaNoVirtual());
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:diplomacy.tensorflow.SavedMonomorphicFunction.concrete_function)
}

#ifdef __GNUC__
  #pragma GCC diagnostic pop
#endif  // __GNUC__
// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// @@protoc_insertion_point(namespace_scope)

}  // namespace tensorflow
}  // namespace diplomacy

// @@protoc_insertion_point(global_scope)

#endif  // PROTOBUF_INCLUDED_diplomacy_5ftensorflow_2fpython_2fsaved_5fmodel_2fsaved_5fobject_5fgraph_2eproto


text:
/**
 * 获取当前手机的地理位置信息
 * author tangsj
 */
!function(w) {

  function Geolocation(){
    // 信息获取标识
    this.pullFlag = false;
    this.pullTimer = '';
    this.error = '';
    this.position = {};
    this._init();
  }

  Geolocation.prototype._init = function(){
    var _this = this;

    if(!navigator.geolocation){
      this.error = "当前浏览器不支持获取地理位置.";
      this.pullFlag = true;
      return false;
    }

    navigator.geolocation.getCurrentPosition(function(position){
      _this._showPosition(position);
    }, function(error){
      _this._showError(error);
    });
  }

  Geolocation.prototype._showPosition = function(position){
    this.position = {
      latitude: position.coords.latitude,
      longitude: position.coords.longitude,
      accuracy: position.coords.accuracy
    }
    this.pullFlag = true;
  }

  Geolocation.prototype._showError = function(error){
    switch(error.code){
      case error.PERMISSION_DENIED:
        this.error = '共享位置权限被关闭.';
        break;
      case error.POSITION_UNAVAILABLE:
        this.error = '无法检测当前位置.';
        break;
      case error.TIMEOUT:
        this.error = '位置检测超时.';
        break;
      default:
        this.error = '未知错误.';
        break;
    }
    this.pullFlag = true;
  }

  Geolocation.prototype.pull = function(callback){
    var _this = this;
    // 信息获取监听定时器
    this.pullTimer = setInterval(function(){
      if(_this.pullFlag){
        clearInterval(_this.pullTimer);

        if(_this.error){
          callback(_this.error);
          return false;
        }

        callback(_this.position);
      }
    }, 100);
  }

  w.Geolocation = new Geolocation();
}(window);

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:background="@drawable/miaobian_selector"
        android:orientation="vertical">

        <TextView
            android:id="@+id/cus_title"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
            android:gravity="center"
            android:text="确定修改密码?"
            android:textSize="20sp"
            android:padding="10dp"
            />

        <include layout="@layout/view" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/confirm_cancle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@drawable/fanhui_selector"
                android:gravity="center"
                android:padding="10dp"
                android:textSize="20sp"
                android:text="取消" />

            <View
                android:layout_width="1dp"
                android:layout_height="10dp"
                android:background="@color/gray" />

            <TextView
                android:id="@+id/confirm_ok"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@drawable/fanhui_selector"
                android:gravity="center"
                android:textSize="20sp"
                android:padding="10dp"
                android:text="确定" />
        </LinearLayout>
    </LinearLayout>

</LinearLayout>


text:
var forEach = require("for-each"),
	URL = require("url-parse")

module.exports = {
	forEach: forEach,
	test: "Foo",
	URL: URL
}


text:
namespace base {
class SequencedTaskRunner;
}  // namespace base

namespace disk_cache {

// Internal helper used to sequence cleanup and reuse of cache directories.
// One of these is created before each backend, and is kept alive till both
// the backend is destroyed and all of its work is done by its refcount,
// which keeps track of outstanding work. That refcount is expected to only be
// updated from the I/O thread or its equivalent.
class NET_EXPORT_PRIVATE BackendCleanupTracker
    : public base::RefCounted<BackendCleanupTracker> {
 public:
  // Either returns a fresh cleanup tracker for |path| if none exists, or
  // will eventually post |retry_closure| to the calling thread,
  // and return null.
  static scoped_refptr<BackendCleanupTracker> TryCreate(
      const base::FilePath& path,
      base::OnceClosure retry_closure);

  BackendCleanupTracker(const BackendCleanupTracker&) = delete;
  BackendCleanupTracker& operator=(const BackendCleanupTracker&) = delete;

  // Register a callback to be posted after all the work of associated
  // context is complete (which will result in destruction of this context).
  // Should only be called by owner, on its I/O-thread-like execution context,
  // and will in turn eventually post |cb| there.
  void AddPostCleanupCallback(base::OnceClosure cb);

 private:
  friend class base::RefCounted<BackendCleanupTracker>;
  explicit BackendCleanupTracker(const base::FilePath& path);
  ~BackendCleanupTracker();

  void AddPostCleanupCallbackImpl(base::OnceClosure cb);

  base::FilePath path_;

  // Since it's possible that a different thread may want to create a
  // cache for a reused path, we keep track of runners contexts of
  // post-cleanup callbacks.
  std::vector<
      std::pair<scoped_refptr<base::SequencedTaskRunner>, base::OnceClosure>>
      post_cleanup_cbs_;

  // We expect only TryMakeContext to be multithreaded, everything
  // else should be sequenced.
  SEQUENCE_CHECKER(seq_checker_);
};

}  // namespace disk_cache

#endif  // NET_DISK_CACHE_BACKEND_CLEANUP_TRACKER_H_


text:
package com.github.dozermapper.core.cache;

import java.util.LinkedHashMap;
import java.util.Map;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * Default cache manager implementation backed by {@link LRUMap}
 *
 * @param <KeyType>   type of key being stored
 * @param <ValueType> java of value being stored
 */
public class DefaultCache<KeyType, ValueType> implements Cache<KeyType, ValueType> {

    private final String name;
    private final LRUMap cacheMap;

    /**
     * Default cache manager implementation backed by {@link LRUMap}
     *
     * @param name        unique cache name
     * @param maximumSize maximum cache size
     */
    public DefaultCache(final String name, final int maximumSize) {
        if (maximumSize < 1) {
            throw new IllegalArgumentException("Dozer cache max size must be greater than 0");
        }

        this.name = name;
        this.cacheMap = new LRUMap(maximumSize); //Should be: Collections.synchronizedMap
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void clear() {
        cacheMap.clear();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public synchronized void put(KeyType key, ValueType value) {
        if (key == null) {
            throw new IllegalArgumentException("Cache entry key cannot be null");
        }

        CacheEntry<KeyType, ValueType> cacheEntry = new CacheEntry<>(key, value);
        cacheMap.put(cacheEntry.getKey(), cacheEntry);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public ValueType get(KeyType key) {
        if (key == null) {
            throw new IllegalArgumentException("Key cannot be null");
        }

        CacheEntry<KeyType, ValueType> result = cacheMap.get(key);
        if (result == null) {
            return null;
        } else {
            return result.getValue();
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getName() {
        return name;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public long getSize() {
        return cacheMap.size();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int getMaxSize() {
        return cacheMap.getMaximumSize();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean containsKey(KeyType key) {
        return cacheMap.containsKey(key);
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
    }

    /**
     * NOTE: Look if its worth while in replacing with:
     * https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/LRUMap.html
     */
    private class LRUMap extends LinkedHashMap<KeyType, CacheEntry<KeyType, ValueType>> {

        private final int maximumSize;

        LRUMap(int maximumSize) {
            this.maximumSize = maximumSize;
        }

        @Override
        protected boolean removeEldestEntry(Map.Entry<KeyType, CacheEntry<KeyType, ValueType>> eldest) {
            return size() > maximumSize;
        }

        private int getMaximumSize() {
            return maximumSize;
        }
    }
}


text:
wordpress_id: 141
title: Segway at Western
wordpress_url: http://spaetzel.com/PermaLink,guid,490.aspx
layout: post
---

        It looks like the UWO campus police have bought themeselves a Segway.

        I look forward to seeing these things roaming around the campus.

        I didn't take this photo. It was uploaded to flickr by someone that works at UWO. See
        some more Segway shots


text:
\documentclass[16pt,pdf,unicode]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{listings}
\usepackage{tikz}

\usetikzlibrary{positioning}
\usetikzlibrary{calc} % for manimulation of coordinates
\tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt=#1{}{invisible}},
    alt/.code args={<#1>#2#3}{%
      \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
    },
  }

% Scheme listings
\lstdefinelanguage{Scheme}{
  morekeywords=[1]{define, define-syntax, define-macro, lambda, define-stream, stream-lambda},
  morekeywords=[2]{begin, call-with-current-continuation, call/cc,
    call-with-input-file, call-with-output-file, case, cond,
    do, else, for-each, if,
    let*, let, let-syntax, letrec, letrec-syntax,
    let-values, let*-values,
    and, or, not, delay, force,
    quasiquote, quote, unquote, unquote-splicing,
    map, fold, syntax, syntax-rules, eval, environment, query },
  morekeywords=[3]{import, export},
  alsodigit=!\$\%&*+-./:<=>?@^_~,
  sensitive=true,
  morecomment=[l]{;},
  morecomment=[s]{\#|}{|\#},
  morestring=[b]",
  basicstyle=\small\ttfamily,
  keywordstyle=\bf\ttfamily\color[rgb]{0,.3,.7},
  commentstyle=\color[rgb]{0.133,0.545,0.133},
  stringstyle={\color[rgb]{0.75,0.49,0.07}},
  upquote=true,
  breaklines=true,
  breakatwhitespace=true,
  literate=*{`}{{`}}{1}
}

% Escape to latex from lstlisting
\lstset{basicstyle=\small\ttfamily,
numbers=left,
escapeinside=||
}

\usetheme{Boadilla}
\setbeamercovered{transparent}
%\lstset{ language=Lisp }

\title[Организация памяти]{Теория и практика компилляции программ: среда времени исполнения}
\author[Д. Анисимов]{Денис Анисимов}
\institute[МФТИ]{Московский физико-технический университет\\
	{\tiny государственный университет}\\}
\date[16.02.2013]{МФТИ, 16 февраля 2013 года}

\begin{document}

\begin{frame}[plain]
\setcounter{framenumber}{0}
\titlepage
\end{frame}

\section{Введение}
\begin{frame}
\frametitle{Поддержка времени исполнения}
\begin{itemize}
  \item Для реализации статических конструкций языка во время исполнения необходимы дополнительные действия, определяемые логикой машинного исполнения.
  \item Связь имени в исходном языке с данными в машине представляет собой выделение и освобождение памяти.
  \item Поддержка работы с памятью осуществляется средой времени исполнения
  \begin{itemize}
    \item Состоит из программ подгружаемых с исполняемым кодом.
    \item Определяется семантикой процедур.
  \end{itemize}
\end{itemize}
\end{frame}

\section{Процедуры}
\begin{frame}[fragile]
\frametitle{Процедуры}
\begin{lstlisting}[language=Scheme,numbers=left, stepnumber=1, numbersep=1pt]
(define add
  (lambda (num1 num2)
    (+ num1 num2)))

	(add 1 2)
\end{lstlisting}
\begin{itemize}
  \item \textit{Определение процедуры}(1-3): связь идентификатора с инструкцией(тело процедуры)
  \item \textit{Вызов процедуры}(5): исполнение тела процедуры. Каждое выполнение процедуры - \textit{активация}
  \item \textit{Формальные параметры}(num1 num2): идентификаторы специального характера
  \item \textit{Фактические параметры}(1 2): аргументы, передаваемые процедуре и замещающие формальные параметры.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Деревья активации}
Время жизни активации процедур имеет вложенный характер: при вызове процедуры \textit{a} из \textit{b} процедура \textit{b} закончится раньше чем \textit{a}.
Наглядное представление процесса создания активаций - дерево.
\begin{center}
\begin{figure}
\begin{tikzpicture}[every node/.style=level 1/.style={sibling distance=30mm},level 2/.style={sibling distance=30mm}]
\node{q(1,9)}
  child {
    node[left=1.7cm] {q(1,3)}
      child { node{q(1,0)}}
      child {
        node {q(2,3)}
          child { node{q(2,1)} }
          child { node{q(3,3)} }
      }
  }
  child {
    node[right=1.7cm] {q(5,9)}
      child { node {q(5,5)} }
      child {
        node {q(7,9)}
          child { node{q(7,7)} }
          child { node{q(9,9)} }
      }
  }
;
\end{tikzpicture}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Стек управления}
В процессе исполнения программы дерево активаций проходится обходом в глубину. Текущие рабочие активации составляют стек.
\begin{center}
\begin{figure}
\begin{tikzpicture}[every node/.style=level 1/.style={sibling distance=30mm},level 2/.style={sibling distance=30mm}]
\tikzstyle{na}=[opacity=0.3,dashed]
\node{q(1,9)}
  child {
    node[left=1.7cm] {q(1,3)}
      child[na] { node[na]{q(1,0)}}
      child {
        node {q(2,3)}
          child { node{q(2,1)} }
          child[na] { node[na]{q(3,3)} }
      }
  }
  child[na] {
    node[na,right=1.7cm] {q(5,9)}
      child[na] { node[na] {q(5,5)} }
      child[na] {
        node[na] {q(7,9)}
          child[na] { node[na]{q(7,7)} }
          child[na] { node[na]{q(9,9)} }
      }
  }
;
\end{tikzpicture}
\end{figure}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Продолжение}
\begin{itemize}
  \item Продолжение  - представление состояния исполнения программы на данный момент.
  \item Поддержка обращений позволяет обобщённо реализовать некоторые шаблоны программирования - исключения, сопрограммы и др.
  \item Организация памяти для языков непосредственно поддерживающий продолжения отличается от традиционных.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Спагетти стек}
Для реализации продолжений необходимо уметь хранить состояния стека управления. Один из способов - реализация стека в виде динамического односвязного списка.
\begin{center}
\begin{figure}
\begin{tikzpicture}[every node/.style=level 1/.style={sibling distance=30mm},level 2/.style={sibling distance=30mm}]
\tikzstyle{na}=[opacity=0.3,dashed]
\node{q(1,9)}
  child {
    node[left=1.7cm] {q(1,3)}
      child[na] { node[na]{q(1,0)}}
      child {
        node {q(2,3)}
          child { node[draw](n1){q(2,1)} }
          child { node[draw](n2){q(3,3)} }
      }
  }
  child {
    node[right=1.7cm] {q(5,9)}
      child[na] { node[na] {q(5,5)} }
      child {
        node {q(7,9)}
          child { node(n3){q(7,7)} }
          child[na] { node[na]{q(9,9)} }
      }
  }
;
\node at ($(n1)+(0.0,-0.6)$){saved};
\node at ($(n2)+(0.0,-0.6)$){saved};
\node at ($(n3)+(0.0,-0.6)$){current};
\end{tikzpicture}
\end{figure}
\end{center}
\end{frame}

\section{Организация памяти}
\begin{frame}
\frametitle{Классификация памяти}
\begin{itemize}
	\item Память используется для:
	\begin{itemize}
	  \item<1-2> Целевого кода
	  \item<1,3> Объектов данных
	  \item<1,4> Стека управления
	\end{itemize}
\end{itemize}
\begin{center}
	\begin{tabular}{|c|}
	\hline
	\uncover<1-3>{Код} \\ \hline
	\uncover<1,3>{Статические данные} \\	\hline
	\uncover<1,3,4>{Стек} \\	\hline
	\uncover<1,3,4>{$\downarrow$}	\\
	\uncover<1,3,4>{$\uparrow$} \\ \hline
	\uncover<1,3,4>{\alert<4>{Куча}}\\ \hline
  \end{tabular}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Записи активаций}
Запись активации или кадр - непрерывный блок памяти содержащий информацию необходимую для однократного исполнения процедуры.
\begin{center}
  \begin{tabular}{|c|}
  \hline
  \uncover<1,8>{Возвращаемое значение} \\ \hline
  \uncover<1,7>{Фактические параметры} \\ \hline
  \uncover<1,6>{Связь управления} \\ \hline
  \uncover<1,5>{Связь доступа} \\ \hline
  \uncover<1,4>{Состояние машины} \\ \hline
  \uncover<1,3>{Локальные данные} \\ \hline
  \uncover<1,2>{Временные значения} \\ \hline
  \end{tabular}
\end{center}
\begin{center}
\only<2>{Значения появляющиеся в процессе вычислений}
\only<3>{Локальные данные для данной процедуры}
\only<4>{Текущий контекст исполнения, например регистры, счётчик команд(зависит от конкретной машины)}
\only<5>{Ссылка для доступа к нелокальным переменным}
\only<6>{Ссылка на активацию вызывающей процедуры}
\only<7>{Фактические параметры передающиеся процедуре}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Размещение локальных данных}
\begin{itemize}
  \item Память под статически известные данные размечается компилятором в процессе обработки объявлений.
  \item Память под них выделяется динамически, но относительное положение известно статически.
  \item В процессе размещения учитываются ограничения целевой машины и соображения производительности.
\end{itemize}
\end{frame}

\section{Стратегии выделения памяти}
\begin{frame}
\frametitle{Статическое распределение}
\begin{itemize}
  \item Компилятор статически распределяет адреса всех объектов в памяти
  \item Недостатки
  \begin{itemize}
    \item Необходимо знать размеры объектов и ограничения памяти в процессе компиляции.
    \item Ограничение рекурсии
    \item Нет динамических структур данных
  \end{itemize}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Стековое распределение}
\begin{itemize}
  \item Данные динамически располагаются на стеке в процессе вычислений и вызова процедур.
  \item Локальные переменные разных активаций располагаются в отдельных областях памяти и уничтожаются при выходе из процедуры.
  \item Используется для представления стека управления.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Распределение памяти в куче}
\begin{itemize}
  \item В Scheme значения локальных переменных сохраняются по окончанию активации, а также возможно возобновление исполнения из сохранённого состояния стека. Поэтому стековое распределение памяти для хранения активаций не подходит.
  \item Распределение в куче позволяет динамически выделять память и освобождать её в \textit{произвольном} порядке.
  \item Недостатки:
  \begin{itemize}
    \item Эффективное использование кучи требует сложного пакета подержки времени исполнения.
    \item Необходимо освобождать неиспользуемую память, вручную или автоматически.
  \end{itemize}
\end{itemize}
\end{frame}

\section{Доступ к нелокальным именам}
\begin{frame}
\frametitle{Лексическая область видимости и вложенные процедуры}
\begin{itemize}
  \item Каждая блочная область видимости в компиляторе представляется таблицей символов и связывается с областью памяти для локальных данных.
  \item Поддержка вложенности процедур и принципа ближайшего определения осуществляется ссылкой на область локальных данных охватывающей процедуры(лексического блока)
  \item Доступ к нелокальным данным в процессе исполнения происходит по переходу по ссылкам + смещение в области локальных данных.
\end{itemize}
\end{frame}

\section{Передача параметров}
\begin{frame}
\frametitle{Передача параметров}
\begin{itemize}
  \item Семантически передача параметров может происходить по значению, по ссылке или обоими способами.
  \item Фактический механизм передачи параметров определяется целевой машиной и соображениями оптимизации.
\end{itemize}
\end{frame}

\end{document}


text:
package com.lpnpcs.yuanhelper.util;

import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

import com.lpnpcs.yuanhelper.base.YuanApplication;

/**
 * Created by lpnpcs.
 * email:lpnpcs@gmail.com
 * description:save SharedPreferences
 */
public class SettingUtil {
    private static Context context = YuanApplication.context;
    private static SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
    private static SharedPreferences.Editor editor = sp.edit();

    public static void save(String key, String value) {
        editor.putString(key, value);
        editor.apply();
    }
    public static void save(String key, boolean value) {
        editor.putBoolean(key, value);
        editor.apply();
    }
    public static void save(String key, int value) {
        editor = sp.edit();
        editor.putInt(key, value);
        editor.apply();
    }
    public static String get(String key, String defaultValue) {
        return sp.getString(key, defaultValue);
    }

    public static String getString(String key) {
        return sp.getString(key, "");
    }
    public static int getInt(String key) {
        return sp.getInt(key, 0);
    }
    public static boolean getBoolean(String key) {
        return sp.getBoolean(key, false);
    }
}


text:
class WorkInfo < ApplicationRecord
  belongs_to :user
  has_one :key_management, foreign_key: :user_id, primary_key: :user_id, dependent: :destroy
  #before_save :encrypt_ssn

  # We should probably use this
  def last_four
    "***-**-" << self.decrypt_ssn[-4, 4]
  end

  def encrypt_ssn
    aes = OpenSSL::Cipher.new(cipher_type)
    aes.encrypt
    aes.key = key[0..31]
    aes.iv = iv if iv != nil
    self.encrypted_ssn = aes.update(self.SSN) + aes.final
    self.SSN = nil
  end

  def decrypt_ssn
    aes = OpenSSL::Cipher.new(cipher_type)
    aes.decrypt
    aes.key = key[0..31]
    aes.iv = iv if iv != nil
    aes.update(self.encrypted_ssn) + aes.final
  end

  def key
    raise "Key Missing" unless KEY.present?
    KEY
  end

  def iv
    raise "No IV for this User" unless self.key_management.try(:iv).present?
    self.key_management.iv
  end

  def cipher_type
    "aes-256-cbc"
  end
end


text:
bool BrowsingDataHelper::IsWebScheme(const std::string& scheme) {
  // Special-case `file://` scheme iff cookies and site data are enabled via
  // the `--allow-file-cookies` CLI flag.
  if (scheme == url::kFileScheme) {
    return base::CommandLine::ForCurrentProcess()->HasSwitch(
        switches::kEnableFileCookies);
  }

  // Otherwise, all "web safe" schemes are valid, except `chrome-extension://`
  // and `chrome-devtools://`.
  content::ChildProcessSecurityPolicy* policy =
      content::ChildProcessSecurityPolicy::GetInstance();
  return (policy->IsWebSafeScheme(scheme) &&
          !BrowsingDataHelper::IsExtensionScheme(scheme) &&
          scheme != content::kChromeDevToolsScheme);
}

// Static
bool BrowsingDataHelper::HasWebScheme(const GURL& origin) {
  return BrowsingDataHelper::IsWebScheme(origin.scheme());
}

// Static
bool BrowsingDataHelper::IsExtensionScheme(const std::string& scheme) {
  return scheme == extensions::kExtensionScheme;
}

// Static
bool BrowsingDataHelper::HasExtensionScheme(const GURL& origin) {
  return BrowsingDataHelper::IsExtensionScheme(origin.scheme());
}

// Static
bool BrowsingDataHelper::DoesOriginMatchMask(const GURL& origin,
    int origin_set_mask, quota::SpecialStoragePolicy* policy) {
  // Packaged apps and extensions match iff EXTENSION.
  if (BrowsingDataHelper::HasExtensionScheme(origin.GetOrigin()) &&
      origin_set_mask & EXTENSION)
    return true;

  // If a websafe origin is unprotected, it matches iff UNPROTECTED_WEB.
  if ((!policy || !policy->IsStorageProtected(origin.GetOrigin())) &&
      BrowsingDataHelper::HasWebScheme(origin.GetOrigin()) &&
      origin_set_mask & UNPROTECTED_WEB)
    return true;

  // Hosted applications (protected and websafe origins) iff PROTECTED_WEB.
  if (policy &&
      policy->IsStorageProtected(origin.GetOrigin()) &&
      BrowsingDataHelper::HasWebScheme(origin.GetOrigin()) &&
      origin_set_mask & PROTECTED_WEB)
    return true;

  return false;
}


text:
id: 1008
title: cultura.rwx una publicación sobre cultura libre
date: 2011-04-04T21:41:14+00:00
author: Alvar
layout: post
guid: http://www.acercadelaeducacion.com.ar/?p=1008
permalink: /2011/04/cultura-rwx-una-publicacion-sobre-cultura-libre/
bitly_url:
  - http://bit.ly/1YIAJWD
bitly_hash:
  - 1YIAJWD
bitly_long_url:
  - http://www.acercadelaeducacion.com.ar/2011/04/cultura-rwx-una-publicacion-sobre-cultura-libre/
image: /wp-content/uploads/2011/04/rwx1_2011.jpg
categories:
  - Cultura Libre
  - Destacados
tags:
  - Cultura Libre
  - dosis
  - Educación
  - Noticias
  - Política
---
Cultura.rwx es una publicación sobre cultura libre la frecuencia de publicación es bimensual. El título hace referencia a los permisos de los archivos Leer (R) Escribir (W) Ejecutar (X) -rwx- esta nomenclatura indica que pueden hacer del archivo - la cultura-.  Basicamente lo que les plazca.

En su primer número podemos encontrar los siguientes temas:

.derechos de autor..

.convergencia..

.artes visuales..

.música..

.open hardware..

.radio..

.educación..

.dimensiones de género en el desarrollo del Software libre (FLOSS[1])

Todos abordados desde perspectivas que privilegian la cultura libre y el desarrollo de conocimiento colaborativo, distribuido y participativo. Esta para leerla, imprimirla y guardarla :D

Imagen| culturarwx.net


text:
@interface YJAutoLayoutCell()
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *content;
@property (weak, nonatomic) IBOutlet UILabel *userName;
@property (weak, nonatomic) IBOutlet UILabel *time;
@property (weak, nonatomic) IBOutlet UIImageView *imgView;

@end

@implementation YJAutoLayoutCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Fix the bug in iOS7 - initial constraints warning
    self.contentView.bounds = [UIScreen mainScreen].bounds;
}

- (void)bindData:(YJDataFeedModel *)model {
    self.title.text = model.title;
    self.content.text = model.content;
    self.userName.text = model.username;
    self.time.text = model.time;
    self.imgView.image = [UIImage imageNamed:model.imageName];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end


text:
layout: post
date: '2017-02-27'
title: "Gorgeous Sweetheart Neckline Brocade Beaded Wedding Dress"
category: A-Line
tags: ["gorgeous","wedding","apparel","sweetheart","brocade"]
image: http://www.starbrideapparel.com/7487-thickbox_default/gorgeous-sweetheart-neckline-brocade-beaded-wedding-dress.jpg
---
Gorgeous Sweetheart Neckline Brocade Beaded Wedding Dress

On Sales: **$333.594**
<amp-img layout="responsive" width="600" height="600" src="//www.starbrideapparel.com/7487-thickbox_default/gorgeous-sweetheart-neckline-brocade-beaded-wedding-dress.jpg" alt="Gorgeous Sweetheart Neckline Brocade Beaded Wedding Dress 0" />
<amp-img layout="responsive" width="600" height="600" src="//www.starbrideapparel.com/7488-thickbox_default/gorgeous-sweetheart-neckline-brocade-beaded-wedding-dress.jpg" alt="Gorgeous Sweetheart Neckline Brocade Beaded Wedding Dress 1" />

Buy it: [Gorgeous Sweetheart Neckline Brocade Beaded Wedding Dress](https://www.starbrideapparel.com/aline-wedding-dresses/3605-gorgeous-sweetheart-neckline-brocade-beaded-wedding-dress-1463394415206.html "Gorgeous Sweetheart Neckline Brocade Beaded Wedding Dress")

View more: [A-Line](https://www.starbrideapparel.com/2-aline-wedding-dresses "A-Line")


text:
/**
 * Collector and collector item data
 */
(function () {
    'use strict';

    angular
        .module(HygieiaConfig.module + '.core')
        .factory('collectorData', collectorData);

    function collectorData($http, $q) {
        var itemRoute = '/api/collector/item';
        var itemByComponentRoute = '/api/collector/item/component/';
        var itemsByTypeRoute = '/api/collector/item/type/';
        var collectorsByTypeRoute = '/api/collector/type/';
        var encryptRoute = "/api/encrypt/";

        return {
            itemsByType: itemsByType,
            createCollectorItem: createCollectorItem,
            getCollectorItem : getCollectorItem,
            collectorsByType: collectorsByType,
            encrypt: encrypt,
            getCollectorItemById:getCollectorItemById

        };

        function getCollectorItemById(id) {
            return $http.get(itemRoute + '/'+id).then(function (response) {
                return response.data;
            });
        }

        function itemsByType(type, params) {
            return $http.get(itemsByTypeRoute + type, {params: params}).then(function (response) {
                return response.data;
            });
        }

        function createCollectorItem(collectorItem) {
            return $http.post(itemRoute, collectorItem);
        }

        function getCollectorItem(item, type) {
            return $http.get(itemByComponentRoute + item + '?type=' + type).then(function (response) {
                return response.data;
            });
        }

        function collectorsByType(type) {
            return $http.get(collectorsByTypeRoute + type).then(function (response) {
                return response.data;
            });
        }

        function encrypt(message) {
            return $http.get(encryptRoute + message).then(function (response) {
                return response.data;
            });
        }
    }
})();


text:
<?php

namespace Marcoshoya\MarquejogoBundle\Controller\Customer;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Marcoshoya\MarquejogoBundle\Entity\Book;

/**
 * BookController
 *
 * @author Marcos Lazarin <marcoshoya at gmail dot com>
 */
class BookController extends Controller
{
    /**
     * @Route("/reserva/listar", name="customer_book_list")
     * @Method("GET")
     * @Template()
     */
    public function indexAction()
    {
        $user = $this->get('security.context')->getToken()->getUser();
        $em = $this->getDoctrine()->getManager();

        $entities = $em->getRepository('MarcoshoyaMarquejogoBundle:Book')->findBy(
            array('customer' => $user),
            array('id' => 'DESC')
        );

        return array('entities' => $entities);
    }

    /**
     * @Route("/reserva/{id}/visualizar", name="customer_book_show")
     * @ParamConverter("book", class="MarcoshoyaMarquejogoBundle:Book")
     * @Method("GET")
     * @Template()
     */
    public function showAction(Book $entity)
    {
        return array(
            'entity' => $entity
        );
    }

    /**
     * @Route("/reserva/{id}/cancelar", name="customer_book_cancel")
     * @ParamConverter("book", class="MarcoshoyaMarquejogoBundle:Book")
     * @Template()
     */
    public function cancelAction(Book $entity)
    {
        try {

            $em = $this->getDoctrine()->getManager();

            $entity->setStatus('cancelled');
            $em->persist($entity);

            $em->flush();

            $this->get('session')->getFlashBag()->add('success', 'Reserva cancelada com sucesso!');

        } catch (\Exception $ex) {
            $this->get('logger')->error("cancelAction error: " . $ex->getMessage());
            $this->get('session')->getFlashBag()->add('error', 'Ocorreu um erro ao cancelar a reserva');
        }

        return $this->redirect($this->generateUrl('customer_book_show', array('id' => $entity->getId())));
    }

    /**
     * @Route("/reserva/{id}/convidar", name="customer_book_invite")
     * @ParamConverter("book", class="MarcoshoyaMarquejogoBundle:Book")
     * @Template()
     */
    public function inviteAction(Book $entity, Request $request)
    {
        $data = array();

        $form = $this->createSearchFriendForm($data, $entity);

        $form->handleRequest($request);

        if ($form->isValid()) {

            // @TODO: send email

            $this->get('session')->getFlashBag()->add('success', 'E-mail enviado com sucesso!');

            return $this->redirect($this->generateUrl('customer_book_invite', array('id' => $entity->getId())));
        }

        return array(
            'results' => null,
            'form' => $form->createView(),
            'entity' => $entity
        );
    }

    /**
     * Creates the form
     *
     * @param array $data
     * @param Team $entity
     *
     * @return \Symfony\Component\Form\Form The form
     */
    private function createSearchFriendForm($data, Book $entity)
    {
        $form = $this->createFormBuilder($data, array(
                'action' => $this->generateUrl('customer_book_invite', array('id' => $entity->getId())),
                'method' => 'POST',
            ))
            ->add('email', 'email', array(
                'constraints' => array(
                    new Assert\NotBlank(array('message' => 'Campo obrigátorio')),
                    new Assert\Email(array('message' => 'Formato do e-mail inválido')),
            )))
            ->add('enviar', 'submit')
            ->getForm()
        ;

        return $form;
    }

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
org.pentaho.di.core.xml
</TITLE>

<META NAME="date" CONTENT="2012-11-21">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package org.pentaho.di.core.xml

Interface Summary

XMLInterface
Implementing classes of this interface know how to express themselves using XML
 They also can construct themselves using XML.

Class Summary

XMLCheck

XMLCheck.XMLTreeHandler

XMLHandler
This class contains a number of (static final) methods to facilitate
 the retrieval of information from XML Node(s).

XMLHandlerCache
Singleton to help speed up lookups in an XML DOM tree.

 The theory is that you often loop over occurrences of a certain tag in a Node.

 If there are 20 occurrences, you go from index 0..19.

 Every time we do the following

 - found node 0

 - found node 0, 1

 - found node 0, 1, 2

 - ...

 So the time to search node index 19 is 20 times larger on average then index 0.

 We can solve this by caching the position of index 18 and by starting back at that position.

 This class is a singleton to keep everyting 100% compatible with the rest of the codebase.

XMLHandlerCacheEntry
This is an entry in an XMLHandlerCache

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes