CPGFStream(3)

πŸ“¦
version 7.21.7 Β· 4 versions
, in fedora 43

✨ CPGFStream ✨

okay so bestie, meet CPGFStream β€” the Abstract stream base class. she's the blueprint, the mother of all streams, and she does not do the actual work herself. that's the whole point, iykyk πŸ’…

This page is CPGFStream(3) from libpgf β€” yes, a manual page, and yes, we're making it cute.


🌸 SYNOPSIS 🌸

#include <PGFstream.h>

Inherited by CPGFFileStream, and CPGFMemoryStream.

πŸŽ€ Public Member Functions

CPGFStream ()
    Standard constructor.
virtual ~CPGFStream ()
    Standard destructor.
virtual void Write (int *count, void *buffer)=0
virtual void Read (int *count, void *buffer)=0
virtual void SetPos (short posMode, INT64 posOff)=0
virtual UINT64 GetPos () const =0
virtual bool IsValid () const =0
not me pointing out that those =0 at the end mean pure virtual β€” she's abstract, she's a concept, she's main character energy with no body. the children (CPGFFileStream and CPGFMemoryStream) do the actual lifting 🫢

πŸ¦‹ Detailed Description πŸ¦‹

Abstract stream base class.

Abstract stream base class.

(no fr, she said it twice, she's committed to the bit ✨)

πŸ‘‘ Author

C. Stamm

Definition at line 39 of file PGFstream.h.


πŸ’– Constructor & Destructor Documentation πŸ’–

⭐ CPGFStream::CPGFStream () [inline]

Standard constructor.

Definition at line 43 of file PGFstream.h.

43 {}

literally one line, an empty body, and yet she's doing so much for this codebase. iconic πŸ’…

⭐ virtual CPGFStream::~CPGFStream () [inline], [virtual]

Standard destructor.

Definition at line 47 of file PGFstream.h.

47 {}

also empty. also serving. the symmetry?? obsessed 😭


🌈 Member Function Documentation 🌈

πŸ“ virtual UINT64 CPGFStream::GetPos () const [pure virtual]

Get current stream position.

Returns

Current stream position

Implemented in CPGFFileStream, and CPGFMemoryStream.


πŸ“ virtual bool CPGFStream::IsValid () const [pure virtual]

Check stream validity.

Returns

True if stream and current position is valid

Implemented in CPGFFileStream, and CPGFMemoryStream.


πŸ“ virtual void CPGFStream::Read (int * count, void * buffer) [pure virtual]

Read some bytes from this stream and stores them into a buffer.

Parameters

  • count β€” A pointer to a value containing the number of bytes should be read. After this call it contains the number of read bytes.
  • buffer β€” A memory buffer

Implemented in CPGFFileStream, and CPGFMemoryStream.

lowkey watch that count pointer, bestie β€” it goes in holding how many you want and comes back holding how many you actually got. it's giving "tell me what you need and i'll tell you what you got" πŸ™ˆ

πŸ“ virtual void CPGFStream::SetPos (short posMode, INT64 posOff) [pure virtual]

Set stream position either absolute or relative.

Parameters

  • posMode β€” A position mode (FSFromStart, FSFromCurrent, FSFromEnd)
  • posOff β€” A new stream position (absolute positioning) or a position offset (relative positioning)

Implemented in CPGFFileStream, and CPGFMemoryStream.


πŸ“ virtual void CPGFStream::Write (int * count, void * buffer) [pure virtual]

Write some bytes out of a buffer into this stream.

Parameters

  • count β€” A pointer to a value containing the number of bytes should be written. After this call it contains the number of written bytes.
  • buffer β€” A memory buffer

Implemented in CPGFFileStream, and CPGFMemoryStream.

same vibe as Read but the other direction β€” count starts as "how many i wanna write" and ends as "how many i actually wrote" ✨

πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for libpgf from the source code.


and that's the whole page, bestie 🧚 no cap, you now know CPGFStream better than half the people who call her. go forth and inherit responsibly πŸ’–

Version 7.21.2 β€” Thu Jul 24 2025 00:00:00 β€” CPGFStream(3) πŸŽ€

bye bye, love u, read ur docs 🫢🌸

πŸ“¦ where this page comes from