Face Engine SDK 5.25.0
A face detection, recognition and tracking engine.
Loading...
Searching...
No Matches
fsdk::Sizer Struct Reference

Helper entity to measure size of dynamic objects in memory. More...

#include <Sizer.h>

Public Member Functions

 Sizer () noexcept
 Initializes sizer with zero.
 
 Sizer (const Sizer &other) noexcept
 Initializes sizer with another sizer value.
 
void append (size_t bytes) noexcept
 Append bytes to current byte count.
 
void append (const Sizer &other) noexcept
 Append other sizer byte count to current byte count.
 
void reset () noexcept
 Reset byte count to zero.
 
size_t getBytes () const noexcept
 Get current size.
 
size_t getKBytes () const noexcept
 Get current size.
 
size_t getMBytes () const noexcept
 Get current size.
 
size_t getGBytes () const noexcept
 Get current size.
 
 operator size_t () const noexcept
 Cast to size type.
 
bool isEmpty () const noexcept
 Check whether size is zero.
 
 operator bool () const noexcept
 Check whether size is zero.
 
Sizeroperator<< (size_t bytes) noexcept
 Append bytes to current byte count.
 
Sizeroperator<< (const Sizer &other) noexcept
 Append other sizer byte count to current byte count.
 
Sizeroperator= (const Sizer &other) noexcept
 Assign value of another sizer.
 
bool operator== (const Sizer &other) const noexcept
 Check if two sizers are equal.
 
bool operator!= (const Sizer &other) const noexcept
 Check if two sizers are not equal.
 
void swap (Sizer &other) noexcept
 

Protected Attributes

size_t m_bytes
 Current measured size in bytes.
 

Detailed Description

Helper entity to measure size of dynamic objects in memory.

Constructor & Destructor Documentation

◆ Sizer()

fsdk::Sizer::Sizer ( const Sizer & other)
inlinenoexcept

Initializes sizer with another sizer value.

Parameters
[in]otheranother sizer.

Member Function Documentation

◆ append() [1/2]

void fsdk::Sizer::append ( const Sizer & other)
inlinenoexcept

Append other sizer byte count to current byte count.

Parameters
[in]othersizer to take bytes from.

◆ append() [2/2]

void fsdk::Sizer::append ( size_t bytes)
inlinenoexcept

Append bytes to current byte count.

Parameters
[in]bytesnumber of bytes to append.

◆ getBytes()

size_t fsdk::Sizer::getBytes ( ) const
inlinenoexcept

Get current size.

Returns
current byte count.

◆ getGBytes()

size_t fsdk::Sizer::getGBytes ( ) const
inlinenoexcept

Get current size.

Returns
current size in gbytes (truncated).

◆ getKBytes()

size_t fsdk::Sizer::getKBytes ( ) const
inlinenoexcept

Get current size.

Returns
current size in kbytes (truncated).

◆ getMBytes()

size_t fsdk::Sizer::getMBytes ( ) const
inlinenoexcept

Get current size.

Returns
current size in mbytes (truncated).

◆ isEmpty()

bool fsdk::Sizer::isEmpty ( ) const
inlinenoexcept

Check whether size is zero.

Returns
true if current byte count is zero.

◆ operator bool()

fsdk::Sizer::operator bool ( ) const
inlinenoexcept

Check whether size is zero.

Returns
true if current byte count is not zero.

◆ operator!=()

bool fsdk::Sizer::operator!= ( const Sizer & other) const
inlinenoexcept

Check if two sizers are not equal.

Parameters
[in]othersizer.
Returns
true if sizers are not equal.

◆ operator<<() [1/2]

Sizer & fsdk::Sizer::operator<< ( const Sizer & other)
inlinenoexcept

Append other sizer byte count to current byte count.

Parameters
[in]othersizer to take bytes from.
Returns
sizer reference for call chaining.

◆ operator<<() [2/2]

Sizer & fsdk::Sizer::operator<< ( size_t bytes)
inlinenoexcept

Append bytes to current byte count.

Parameters
[in]bytesnumber of bytes to append.
Returns
sizer reference for call chaining.

◆ operator=()

Sizer & fsdk::Sizer::operator= ( const Sizer & other)
inlinenoexcept

Assign value of another sizer.

Parameters
[in]othersizer to take bytes from.
Returns
sizer reference for call chaining.

◆ operator==()

bool fsdk::Sizer::operator== ( const Sizer & other) const
inlinenoexcept

Check if two sizers are equal.

Parameters
[in]othersizer.
Returns
true if sizers are equal.

◆ swap()

void fsdk::Sizer::swap ( Sizer & other)
inlinenoexcept

Swap contents with an other sizer.

Parameters
[in,out]othersizer to swap with.

The documentation for this struct was generated from the following file: