libfacade 1.1
A library for manipulating PNG images with payloads.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
facade::png::ChunkTag Class Reference

The string tag identifying a given facade::png::ChunkVec or facade::png::ChunkPtr. More...

#include <png.hpp>

Public Member Functions

 ChunkTag ()
 
 ChunkTag (const std::uint8_t *tag, std::size_t size)
 
 ChunkTag (const char *tag)
 
 ChunkTag (const std::string tag)
 
 ChunkTag (const ChunkTag &other)
 
bool operator== (const ChunkTag &other) const
 
void set_tag (const std::string tag)
 Set the tag value for this chunk tag with a std::string value.
 
void set_tag (const std::uint8_t *tag, std::size_t size)
 Set the tag value for this chunk tag with a uint8_t pointer value.
 
std::uint8_t * tag ()
 Return a pointer to the underlying chunk tag data.
 
const std::uint8_t * tag () const
 Return a const pointer to the underlying chunk tag data.
 
std::string to_string () const
 Convert this chunk tag to a std::string value.
 

Detailed Description

The string tag identifying a given facade::png::ChunkVec or facade::png::ChunkPtr.

Constructor & Destructor Documentation

◆ ChunkTag() [1/5]

facade::png::ChunkTag::ChunkTag ( )
inline

◆ ChunkTag() [2/5]

facade::png::ChunkTag::ChunkTag ( const std::uint8_t *  tag,
std::size_t  size 
)
inline

◆ ChunkTag() [3/5]

facade::png::ChunkTag::ChunkTag ( const char *  tag)
inline

◆ ChunkTag() [4/5]

facade::png::ChunkTag::ChunkTag ( const std::string  tag)
inline

◆ ChunkTag() [5/5]

facade::png::ChunkTag::ChunkTag ( const ChunkTag other)
inline

Member Function Documentation

◆ operator==()

bool ChunkTag::operator== ( const ChunkTag other) const

◆ set_tag() [1/2]

void ChunkTag::set_tag ( const std::string  tag)

Set the tag value for this chunk tag with a std::string value.

A chunk tag that is not 4 bytes in size throws facade::exception::InvalidChunkTag.

Parameters
tagThe std::string representation of the tag.
Exceptions
facade::exception::InvalidChunkTag

◆ set_tag() [2/2]

void ChunkTag::set_tag ( const std::uint8_t *  tag,
std::size_t  size 
)

Set the tag value for this chunk tag with a uint8_t pointer value.

A chunk tag that is not 4 bytes in size throws facade::exception::InvalidChunkTag.

Parameters
tagThe tag data pointer.
sizeThe size of the tag data pointer.
Exceptions
facade::exception::InvalidChunkTag

◆ tag() [1/2]

std::uint8_t * ChunkTag::tag ( )

Return a pointer to the underlying chunk tag data.

◆ tag() [2/2]

const std::uint8_t * ChunkTag::tag ( ) const

Return a const pointer to the underlying chunk tag data.

◆ to_string()

std::string ChunkTag::to_string ( ) const

Convert this chunk tag to a std::string value.


The documentation for this class was generated from the following files: