diff options
author | yeti <yeti@yandex-team.ru> | 2022-02-10 16:50:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:47 +0300 |
commit | 118118f553c903d34b4dc5235c87fa531e026756 (patch) | |
tree | c79276ea463e5ff167e72ce2cbed14d3c0de9735 /library | |
parent | 4e10711f67db90b5b08220fee274f8f0fe620485 (diff) | |
download | ydb-118118f553c903d34b4dc5235c87fa531e026756.tar.gz |
Restoring authorship annotation for <yeti@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/yt/memory/ref.cpp | 8 | ||||
-rw-r--r-- | library/cpp/yt/memory/ref.h | 6 | ||||
-rw-r--r-- | library/cpp/yt/misc/property.h | 124 |
3 files changed, 69 insertions, 69 deletions
diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp index e8ff42e976..0ba1b4aea6 100644 --- a/library/cpp/yt/memory/ref.cpp +++ b/library/cpp/yt/memory/ref.cpp @@ -1,14 +1,14 @@ -#include "ref.h" +#include "ref.h" #include "blob.h" - + #include <library/cpp/ytalloc/api/ytalloc.h> #include <util/system/info.h> namespace NYT { -//////////////////////////////////////////////////////////////////////////////// - +//////////////////////////////////////////////////////////////////////////////// + namespace NDetail { // N.B. We would prefer these arrays to be zero sized diff --git a/library/cpp/yt/memory/ref.h b/library/cpp/yt/memory/ref.h index 73d19d9013..a011c8ef8a 100644 --- a/library/cpp/yt/memory/ref.h +++ b/library/cpp/yt/memory/ref.h @@ -3,7 +3,7 @@ #include "new.h" #include "range.h" #include "shared_range.h" - + #include <type_traits> namespace NYT { @@ -244,7 +244,7 @@ public: //! Creates a reference for a part of existing range. TSharedMutableRef Slice(void* begin, void* end) const; }; - + //////////////////////////////////////////////////////////////////////////////// DECLARE_REFCOUNTED_CLASS(TSharedRefArrayImpl) @@ -378,7 +378,7 @@ size_t GetByteSize(const std::vector<T>& parts); //////////////////////////////////////////////////////////////////////////////// } // namespace NYT - + #define REF_INL_H_ #include "ref-inl.h" #undef REF_INL_H_ diff --git a/library/cpp/yt/misc/property.h b/library/cpp/yt/misc/property.h index bef8024ae1..2d00ebc2a3 100644 --- a/library/cpp/yt/misc/property.h +++ b/library/cpp/yt/misc/property.h @@ -2,12 +2,12 @@ //////////////////////////////////////////////////////////////////////////////// -//! Declares a trivial public read-write property that is passed by reference. -#define DECLARE_BYREF_RW_PROPERTY(type, name) \ -public: \ - type& name(); \ - const type& name() const; - +//! Declares a trivial public read-write property that is passed by reference. +#define DECLARE_BYREF_RW_PROPERTY(type, name) \ +public: \ + type& name(); \ + const type& name() const; + //! Defines a trivial public read-write property that is passed by reference. //! All arguments after name are used as default value (via braced-init-list). #define DEFINE_BYREF_RW_PROPERTY(type, name, ...) \ @@ -42,25 +42,25 @@ public: \ return name##_; \ } -//! Forwards a trivial public read-write property that is passed by reference. -#define DELEGATE_BYREF_RW_PROPERTY(declaringType, type, name, delegateTo) \ - type& declaringType::name() \ - { \ - return (delegateTo).name(); \ - } \ - \ - const type& declaringType::name() const \ - { \ - return (delegateTo).name(); \ - } - -//////////////////////////////////////////////////////////////////////////////// - -//! Declares a trivial public read-only property that is passed by reference. -#define DECLARE_BYREF_RO_PROPERTY(type, name) \ -public: \ +//! Forwards a trivial public read-write property that is passed by reference. +#define DELEGATE_BYREF_RW_PROPERTY(declaringType, type, name, delegateTo) \ + type& declaringType::name() \ + { \ + return (delegateTo).name(); \ + } \ + \ + const type& declaringType::name() const \ + { \ + return (delegateTo).name(); \ + } + +//////////////////////////////////////////////////////////////////////////////// + +//! Declares a trivial public read-only property that is passed by reference. +#define DECLARE_BYREF_RO_PROPERTY(type, name) \ +public: \ const type& name() const; - + //! Defines a trivial public read-only property that is passed by reference. //! All arguments after name are used as default value (via braced-init-list). #define DEFINE_BYREF_RO_PROPERTY(type, name, ...) \ @@ -85,21 +85,21 @@ public: \ return name##_; \ } -//! Forwards a trivial public read-only property that is passed by reference. -#define DELEGATE_BYREF_RO_PROPERTY(declaringType, type, name, delegateTo) \ - const type& declaringType::name() const \ - { \ - return (delegateTo).name(); \ - } - -//////////////////////////////////////////////////////////////////////////////// - -//! Declares a trivial public read-write property that is passed by value. -#define DECLARE_BYVAL_RW_PROPERTY(type, name) \ -public: \ - type Get##name() const; \ +//! Forwards a trivial public read-only property that is passed by reference. +#define DELEGATE_BYREF_RO_PROPERTY(declaringType, type, name, delegateTo) \ + const type& declaringType::name() const \ + { \ + return (delegateTo).name(); \ + } + +//////////////////////////////////////////////////////////////////////////////// + +//! Declares a trivial public read-write property that is passed by value. +#define DECLARE_BYVAL_RW_PROPERTY(type, name) \ +public: \ + type Get##name() const; \ void Set##name(type value); - + //! Defines a trivial public read-write property that is passed by value. //! All arguments after name are used as default value (via braced-init-list). #define DEFINE_BYVAL_RW_PROPERTY(type, name, ...) \ @@ -157,25 +157,25 @@ public: \ name##_ = value; \ } \ -//! Forwards a trivial public read-write property that is passed by value. -#define DELEGATE_BYVAL_RW_PROPERTY(declaringType, type, name, delegateTo) \ +//! Forwards a trivial public read-write property that is passed by value. +#define DELEGATE_BYVAL_RW_PROPERTY(declaringType, type, name, delegateTo) \ type declaringType::Get##name() const \ - { \ - return (delegateTo).Get##name(); \ - } \ - \ + { \ + return (delegateTo).Get##name(); \ + } \ + \ void declaringType::Set##name(type value) \ - { \ - (delegateTo).Set##name(value); \ - } - -//////////////////////////////////////////////////////////////////////////////// - -//! Declares a trivial public read-only property that is passed by value. -#define DECLARE_BYVAL_RO_PROPERTY(type, name) \ -public: \ - type Get##name() const; - + { \ + (delegateTo).Set##name(value); \ + } + +//////////////////////////////////////////////////////////////////////////////// + +//! Declares a trivial public read-only property that is passed by value. +#define DECLARE_BYVAL_RO_PROPERTY(type, name) \ +public: \ + type Get##name() const; + //! Defines a trivial public read-only property that is passed by value. //! All arguments after name are used as default value (via braced-init-list). #define DEFINE_BYVAL_RO_PROPERTY(type, name, ...) \ @@ -201,13 +201,13 @@ public: \ return name##_; \ } -//! Forwards a trivial public read-only property that is passed by value. -#define DELEGATE_BYVAL_RO_PROPERTY(declaringType, type, name, delegateTo) \ - type declaringType::Get##name() \ - { \ - return (delegateTo).Get##name(); \ - } - +//! Forwards a trivial public read-only property that is passed by value. +#define DELEGATE_BYVAL_RO_PROPERTY(declaringType, type, name, delegateTo) \ + type declaringType::Get##name() \ + { \ + return (delegateTo).Get##name(); \ + } + //////////////////////////////////////////////////////////////////////////////// //! Below are macro helpers for extra properties. |