Base Framework
Public Member Functions | Static Public Member Functions | List of all members
CharacterSet Class Reference

8 bit character set. More...

#include <base/string/CharacterSet.h>

Inherits Object.

Public Member Functions

 CharacterSet ()
 
 CharacterSet (const String &path)
 
 CharacterSet (const CharacterSet &copy) noexcept
 
CharacterSetoperator= (const CharacterSet &assign) noexcept
 
const ucs4 * getCharacterSet () const noexcept
 
ucs4 getCharacter (uint8 value) const noexcept
 
void setCharacter (uint8 value, ucs4 code) noexcept
 
void save (const String &path, Architecture::ByteOrder byteOrder=Architecture::NATIVE) const
 

Static Public Member Functions

static CharacterSet load (const String &path)
 
static CharacterSet load (const Array< String > &searchPaths, const String &path)
 

Detailed Description

8 bit character set.

8 bit character set.

Version
1.0

Constructor & Destructor Documentation

◆ CharacterSet() [1/3]

CharacterSet::CharacterSet ( )

Initializes the character set filled with 0.

◆ CharacterSet() [2/3]

CharacterSet::CharacterSet ( const String path)
inline

Initializes the character set from the specified file.

◆ CharacterSet() [3/3]

CharacterSet::CharacterSet ( const CharacterSet copy)
inlinenoexcept

Initalizes the character set from other character set.

Member Function Documentation

◆ getCharacter()

ucs4 CharacterSet::getCharacter ( uint8  value) const
inlinenoexcept

Returns the Unicode value of the specified character in the character set.

Parameters
characterThe character within the character set.

◆ getCharacterSet()

const ucs4* CharacterSet::getCharacterSet ( ) const
inlinenoexcept

Returns the character set.

◆ load() [1/2]

static CharacterSet CharacterSet::load ( const Array< String > &  searchPaths,
const String path 
)
static

Loads the character set.

Parameters
serachPathsThe serach paths.
pathThe path of the character set (normally relative).

◆ load() [2/2]

static CharacterSet CharacterSet::load ( const String path)
static

Loads the character set from the specified file.

◆ operator=()

CharacterSet& CharacterSet::operator= ( const CharacterSet assign)
inlinenoexcept

Assignment of character set by character set.

◆ save()

void CharacterSet::save ( const String path,
Architecture::ByteOrder  byteOrder = Architecture::NATIVE 
) const

Saves the character set to the specified file.

Parameters
pathThe file path.
byteOrderThe desired byte order. Default is Architecture::NATIVE.

◆ setCharacter()

void CharacterSet::setCharacter ( uint8  value,
ucs4  code 
)
inlinenoexcept

Sets the Unicode value of the specified character in the character set.

Parameters
valueThe 8 bit character within the character set.
codeThe Unicode value.