MySQL 8.4.0
Source Code Documentation
mysql::gtid::Tag_plain Struct Reference

Tag representation so that: More...

#include <tag_plain.h>

Public Member Functions

 Tag_plain ()=default
 Default ctor. More...
 Tag_plain (const Tag &tag)
 Construct from tag object. More...
void clear ()
 Clear this tag. More...
bool is_defined () const
 Checks whether tag is defined. More...
std::size_t length () const
 Obtains tag length. More...
std::size_t to_string (char *buf) const
 Copies internal tag into a given buffer. More...
void set (const Tag &tag)
 Sets internal data to match a given pattern. More...
const unsigned char * data () const
 Internal data accessor (for encoding) More...

Private Attributes

unsigned char m_data [tag_max_length+1]
 null terminated tag representation More...

Detailed Description

Tag representation so that:

  • Tag_plain is trivial
  • Tag_plain is standard layout Therefore, a Tag_plain object is not empty by default! Use clear() or brace-enclosed initializer list to create an empty tag. Tag_plain must be a POD because it is used in Gtid_specification

Constructor & Destructor Documentation

◆ Tag_plain() [1/2]

mysql::gtid::Tag_plain::Tag_plain ( )

Default ctor.

◆ Tag_plain() [2/2]

mysql::gtid::Tag_plain::Tag_plain ( const Tag tag)

Construct from tag object.

tagtag to copy

Member Function Documentation

◆ clear()

void mysql::gtid::Tag_plain::clear ( )

Clear this tag.

◆ data()

const unsigned char * mysql::gtid::Tag_plain::data ( ) const

Internal data accessor (for encoding)

◆ is_defined()

bool mysql::gtid::Tag_plain::is_defined ( ) const

Checks whether tag is defined.

Return values
trueTag is defined
falseTag is empty

◆ length()

std::size_t mysql::gtid::Tag_plain::length ( ) const

Obtains tag length.

tag length

◆ set()

void mysql::gtid::Tag_plain::set ( const Tag tag)

Sets internal data to match a given pattern.

[in]tagPattern to copy from

◆ to_string()

std::size_t mysql::gtid::Tag_plain::to_string ( char *  buf) const

Copies internal tag into a given buffer.

[in,out]bufBuffer, needs to be pre-allocated
Number of bytes written into the buffer

Member Data Documentation

◆ m_data

unsigned char mysql::gtid::Tag_plain::m_data[tag_max_length+1]

null terminated tag representation

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