@@ -117,6 +117,10 @@ namespace NKikimr::NBlobDepot {
117117 type == EBlobType::VG_FOOTER_BLOB || type == EBlobType::VG_GC_BLOB);
118118 return cookie >> typeBits;
119119 }
120+
121+ explicit operator TGenStep () const {
122+ return {Generation, Step};
123+ }
120124 };
121125
122126 class TGivenIdRange {
@@ -195,65 +199,6 @@ namespace NKikimr::NBlobDepot {
195199 return true ;
196200 }
197201
198- class TGenStep {
199- ui64 Value = 0 ;
200-
201- public:
202- TGenStep () = default ;
203- TGenStep (const TGenStep&) = default ;
204- TGenStep &operator =(const TGenStep& other) = default ;
205-
206- explicit TGenStep (ui64 value)
207- : Value(value)
208- {}
209-
210- TGenStep (ui32 gen, ui32 step)
211- : Value(ui64(gen) << 32 | step)
212- {}
213-
214- explicit TGenStep (const TLogoBlobID& id)
215- : TGenStep(id.Generation(), id.Step())
216- {}
217-
218- explicit TGenStep (const TBlobSeqId& id)
219- : TGenStep(id.Generation, id.Step)
220- {}
221-
222- explicit operator ui64 () const {
223- return Value;
224- }
225-
226- ui32 Generation () const {
227- return Value >> 32 ;
228- }
229-
230- ui32 Step () const {
231- return Value;
232- }
233-
234- void Output (IOutputStream& s) const {
235- s << Generation () << " :" << Step ();
236- }
237-
238- TString ToString () const {
239- TStringStream s;
240- Output (s);
241- return s.Str ();
242- }
243-
244- TGenStep Previous () const {
245- Y_ABORT_UNLESS (Value);
246- return TGenStep (Value - 1 );
247- }
248-
249- friend bool operator ==(const TGenStep& x, const TGenStep& y) { return x.Value == y.Value ; }
250- friend bool operator !=(const TGenStep& x, const TGenStep& y) { return x.Value != y.Value ; }
251- friend bool operator < (const TGenStep& x, const TGenStep& y) { return x.Value < y.Value ; }
252- friend bool operator <=(const TGenStep& x, const TGenStep& y) { return x.Value <= y.Value ; }
253- friend bool operator > (const TGenStep& x, const TGenStep& y) { return x.Value > y.Value ; }
254- friend bool operator >=(const TGenStep& x, const TGenStep& y) { return x.Value >= y.Value ; }
255- };
256-
257202#define BDEV (MARKER, TEXT, ...) \
258203 do { \
259204 auto & ctx = *TlsActivationContext; \
0 commit comments