// CodeGear C++Builder
// Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'uAbstractProtoBufClasses.pas' rev: 37.00 (Windows)

#ifndef uAbstractProtoBufClassesHPP
#define uAbstractProtoBufClassesHPP

#pragma delphiheader begin
#pragma option push
#if defined(__BORLANDC__) && !defined(__clang__)
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#endif
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <System.Generics.Collections.hpp>
#include <pbInput.hpp>
#include <pbOutput.hpp>
#include <System.Generics.Defaults.hpp>
#include <System.Types.hpp>

//-- user supplied -----------------------------------------------------------

namespace Uabstractprotobufclasses
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TAbstractProtoBufClass;
template<typename T> class DELPHICLASS TProtoBufClassList__1;
//-- type declarations -------------------------------------------------------
class PASCALIMPLEMENTATION TAbstractProtoBufClass : public System::TObject
{
	typedef System::TObject inherited;
	
	
private:
	typedef System::Generics::Collections::TDictionary__2<int,bool> TRequiredFields;
	
private:
	__int64 FPosition;
	Pbinput::TProtoBufInput* _pb;
	TRequiredFields* FRequiredFields;
	
protected:
	void __fastcall AddLoadedField(int Tag);
	void __fastcall RegisterRequiredField(int Tag);
	bool __fastcall IsAllRequiredLoaded();
	virtual void __fastcall BeforeLoad();
	virtual void __fastcall AfterLoad();
	virtual bool __fastcall LoadSingleFieldFromBuf(Pbinput::TProtoBufInput* ProtoBuf, int FieldNumber, int WireType);
	virtual void __fastcall SaveFieldsToBuf(Pboutput::TProtoBufOutput* ProtoBuf) = 0 ;
	
public:
	__fastcall virtual TAbstractProtoBufClass();
	__fastcall virtual ~TAbstractProtoBufClass();
	void __fastcall Assign(TAbstractProtoBufClass* ProtoBuf);
	void __fastcall LoadFromMem(const void * Mem, const int Size, const bool OwnsMem = false);
	void __fastcall LoadFromStream(System::Classes::TStream* Stream)/* overload */;
	void __fastcall LoadFromStream(System::Classes::TStream* Stream, const __int64 asize)/* overload */;
	void __fastcall SaveToStream(System::Classes::TStream* Stream);
	void __fastcall LoadFromBuf(Pbinput::TProtoBufInput* ProtoBuf);
	void __fastcall SaveToBuf(Pboutput::TProtoBufOutput* ProtoBuf);
	__property __int64 Position = {read=FPosition};
};


// Template declaration generated by Delphi parameterized types is
// used only for accessing Delphi variables and fields.
// Don't instantiate with new type parameters in user code.
template<typename T> class PASCALIMPLEMENTATION TProtoBufClassList__1 : public System::Generics::Collections::TObjectList__1<T>
{
	typedef System::Generics::Collections::TObjectList__1<T> inherited;
	
public:
	virtual bool __fastcall AddFromBuf(Pbinput::TProtoBufInput* ProtoBuf, int FieldNum);
	virtual void __fastcall SaveToBuf(Pboutput::TProtoBufOutput* ProtoBuf, int FieldNumForItems);
public:
	/* {System_Generics_Collections}TObjectList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1()/* overload */ : System::Generics::Collections::TObjectList__1<T>() { }
	/* {System_Generics_Collections}TObjectList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1(bool AOwnsObjects)/* overload */ : System::Generics::Collections::TObjectList__1<T>(AOwnsObjects) { }
	/* {System_Generics_Collections}TObjectList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1(const System::DelphiInterface<System::Generics::Defaults::IComparer__1<T> > AComparer, bool AOwnsObjects)/* overload */ : System::Generics::Collections::TObjectList__1<T>(AComparer, AOwnsObjects) { }
	/* {System_Generics_Collections}TObjectList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1(System::Generics::Collections::TEnumerable__1<T>* const Collection, bool AOwnsObjects)/* overload */ : System::Generics::Collections::TObjectList__1<T>(Collection, AOwnsObjects) { }
	/* {System_Generics_Collections}TObjectList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Destroy */ inline __fastcall virtual ~TProtoBufClassList__1() { }
	
public:
	/* {System_Generics_Collections}TList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1(const System::DelphiInterface<System::Generics::Defaults::IComparer__1<T> > AComparer)/* overload */ : System::Generics::Collections::TObjectList__1<T>(AComparer) { }
	/* {System_Generics_Collections}TList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1(System::Generics::Collections::TEnumerable__1<T>* const Collection)/* overload */ : System::Generics::Collections::TObjectList__1<T>(Collection) { }
	/* {System_Generics_Collections}TList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1(const System::DelphiInterface<System::IEnumerable__1<T> > Collection)/* overload */ : System::Generics::Collections::TObjectList__1<T>(Collection) { }
	/* {System_Generics_Collections}TList<uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1(const T *Values, const System::NativeInt Values_High)/* overload */ : System::Generics::Collections::TObjectList__1<T>(Values, Values_High) { }
	
};


//-- var, const, procedure ---------------------------------------------------
}	/* namespace Uabstractprotobufclasses */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_UABSTRACTPROTOBUFCLASSES)
using namespace Uabstractprotobufclasses;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// uAbstractProtoBufClassesHPP
