u5e
UnicodeTextC++Library
Public Member Functions | Public Attributes | List of all members
u5e::codepoint Class Reference

Native representation of a codepoint. More...

#include <u5e/codepoint.hpp>

Inheritance diagram for u5e::codepoint:
Inheritance graph
[legend]

Public Member Functions

constexpr codepoint ()
 
constexpr codepoint (int32_t v)
 
constexpr codepoint (const codepoint &x)=default
 
constexpr codepointoperator= (const codepoint &x)=default
 
constexpr codepointoperator= (int c)
 
constexpr operator int () const
 

Public Attributes

codepoint_traits::int_type value
 

Detailed Description

Native representation of a codepoint.

Explicity class in order to hijack overloads, such that we only build codepoints out of known encodings and we only write to encodings out of known codepoints.

Definition at line 15 of file codepoint.hpp.

Constructor & Destructor Documentation

constexpr u5e::codepoint::codepoint ( )
inline

Default constructor, starts as NULL.

Definition at line 25 of file codepoint.hpp.

constexpr u5e::codepoint::codepoint ( int32_t  v)
inline

Implicit constructor from an integer value.

Definition at line 30 of file codepoint.hpp.

constexpr u5e::codepoint::codepoint ( const codepoint x)
default

Copy constructor.

Member Function Documentation

constexpr u5e::codepoint::operator int ( ) const
inline

Override int operator to return the codepoint value.

Definition at line 50 of file codepoint.hpp.

constexpr codepoint& u5e::codepoint::operator= ( const codepoint x)
default

Assignment operator from another codepoint.

constexpr codepoint& u5e::codepoint::operator= ( int  c)
inline

Assignment operator from an int.

Definition at line 45 of file codepoint.hpp.

Member Data Documentation

codepoint_traits::int_type u5e::codepoint::value

A codepoint has an integer value type.

Definition at line 20 of file codepoint.hpp.


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