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

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

#ifndef pbOutputHPP
#define pbOutputHPP

#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.Classes.hpp>
#include <System.SysUtils.hpp>
#include <StrBuffer.hpp>
#include <pbPublic.hpp>

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

namespace Pboutput
{
//-- forward type declarations -----------------------------------------------
__interface DELPHIINTERFACE IpbMessage;
typedef System::DelphiInterface<IpbMessage> _di_IpbMessage;
class DELPHICLASS TProtoBufOutput;
//-- type declarations -------------------------------------------------------
__interface IpbMessage  : public System::IInterface 
{
	virtual int __fastcall getSerializedSize() = 0 ;
	virtual void __fastcall writeTo(TProtoBufOutput* buffer) = 0 ;
};

#pragma pack(push,4)
class PASCALIMPLEMENTATION TProtoBufOutput : public System::TInterfacedObject
{
	typedef System::TInterfacedObject inherited;
	
private:
	Strbuffer::TSegmentBuffer* FBuffer;
	
public:
	__fastcall TProtoBufOutput();
	__fastcall virtual ~TProtoBufOutput();
	void __fastcall SaveToStream(System::Classes::TStream* Stream);
	void __fastcall SaveToFile(const System::UnicodeString FileName);
	void __fastcall Clear();
	void __fastcall writeRawVarint32(int value);
	void __fastcall writeRawVarint64(__int64 value);
	void __fastcall writeTag(int fieldNumber, int wireType);
	void __fastcall writeRawData(const void * p, int size)/* overload */;
	void __fastcall writeRawData(const void *buf, int size)/* overload */;
	System::AnsiString __fastcall GetText();
	void __fastcall writeDouble(int fieldNumber, double value);
	void __fastcall writeFloat(int fieldNumber, float value);
	void __fastcall writeInt64(int fieldNumber, __int64 value);
	void __fastcall writeInt32(int fieldNumber, int value);
	void __fastcall writeFixed64(int fieldNumber, __int64 value);
	void __fastcall writeFixed32(int fieldNumber, int value);
	void __fastcall writeRawBoolean(bool value);
	void __fastcall writeBoolean(int fieldNumber, bool value);
	void __fastcall writeString(int fieldNumber, const System::UnicodeString value);
	void __fastcall writeBytes(int fieldNumber, const System::Sysutils::TBytes value);
	void __fastcall writeMessage(int fieldNumber, const _di_IpbMessage value);
	void __fastcall writeUInt32(int fieldNumber, unsigned value);
	void __fastcall writeRawSInt32(int value);
	void __fastcall writeRawSInt64(__int64 value);
	void __fastcall writeSInt32(int fieldNumber, int value);
	void __fastcall writeSInt64(int fieldNumber, __int64 value);
	int __fastcall getSerializedSize();
	void __fastcall writeTo(TProtoBufOutput* buffer);
private:
	void *__IpbMessage;	// IpbMessage 
	
public:
	operator IpbMessage*(void) { return (IpbMessage*)&__IpbMessage; }
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE System::LongWord __fastcall EncodeZigZag32(const System::LongInt A);
extern DELPHI_PACKAGE unsigned __int64 __fastcall EncodeZigZag64(const __int64 A);
}	/* namespace Pboutput */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_PBOUTPUT)
using namespace Pboutput;
#endif
#pragma pack(pop)
#pragma option pop

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