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

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

#ifndef Fmx_UabstractprotobufclassesHPP
#define Fmx_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 <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <System.Generics.Collections.hpp>
#include <System.Generics.Defaults.hpp>
#include <FMX.pbInput.hpp>
#include <FMX.pbOutput.hpp>
#include <System.Types.hpp>

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

namespace Fmx
{
namespace Uabstractprotobufclasses
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TAbstractProtoBufClass;
template<typename T> class DELPHICLASS TProtoBufClassList__1;
//-- type declarations -------------------------------------------------------
#pragma pack(push,4)
class PASCALIMPLEMENTATION TAbstractProtoBufClass : public System::TObject
{
	typedef System::TObject inherited;
	
	
private:
	typedef System::Generics::Collections::TDictionary__2<int,bool> TRequiredFields;
	
private:
	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(Fmx::Pbinput::TProtoBufInput* ProtoBuf, int FieldNumber, int WireType);
	virtual void __fastcall SaveFieldsToBuf(Fmx::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);
	void __fastcall SaveToStream(System::Classes::TStream* Stream);
	void __fastcall LoadFromBuf(Fmx::Pbinput::TProtoBufInput* ProtoBuf);
	void __fastcall SaveToBuf(Fmx::Pboutput::TProtoBufOutput* ProtoBuf);
};

#pragma pack(pop)

// 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(Fmx::Pbinput::TProtoBufInput* ProtoBuf, int FieldNum);
	virtual void __fastcall SaveToBuf(Fmx::Pboutput::TProtoBufOutput* ProtoBuf, int FieldNumForItems);
public:
	/* {System_Generics_Collections}TObjectList<FMX_uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1()/* overload */ : System::Generics::Collections::TObjectList__1<T>() { }
	/* {System_Generics_Collections}TObjectList<FMX_uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Create */ inline __fastcall TProtoBufClassList__1(bool AOwnsObjects)/* overload */ : System::Generics::Collections::TObjectList__1<T>(AOwnsObjects) { }
	/* {System_Generics_Collections}TObjectList<FMX_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<FMX_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<FMX_uAbstractProtoBufClasses_TProtoBufClassList<T>_T>.Destroy */ inline __fastcall virtual ~TProtoBufClassList__1() { }
	
public:
	/* {System_Generics_Collections}TList<FMX_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<FMX_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<FMX_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<FMX_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 */
}	/* namespace Fmx */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX_UABSTRACTPROTOBUFCLASSES)
using namespace Fmx::Uabstractprotobufclasses;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX)
using namespace Fmx;
#endif
#pragma pack(pop)
#pragma option pop

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