OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
OpenXLSX::XLNumberFormat Class Reference

#include <XLStyles_NumberFormats.hpp>

Public Member Functions

 XLNumberFormat ()
 XLNumberFormat (const XMLNode &node)
 Constructor. New items should only be created through an XLStyles object.
 XLNumberFormat (const XLNumberFormat &other)
 Copy Constructor.
 XLNumberFormat (XLNumberFormat &&other) noexcept=default
 Move Constructor.
 ~XLNumberFormat ()
XLNumberFormat & operator= (const XLNumberFormat &other)
 Copy assignment operator.
XLNumberFormat & operator= (XLNumberFormat &&other) noexcept=default
 Move assignment operator.
uint32_t numberFormatId () const
 Get the id of the number format.
std::string formatCode () const
 Get the code of the number format.
bool setNumberFormatId (uint32_t newNumberFormatId)
 Setter functions for style parameters.
bool setFormatCode (std::string_view newFormatCode)
std::string summary () const
 Return a string summary of the number format.

Friends

class XLNumberFormats

Constructor & Destructor Documentation

◆ XLNumberFormat() [1/4]

XLNumberFormat::XLNumberFormat ( )

◆ XLNumberFormat() [2/4]

XLNumberFormat::XLNumberFormat ( const XMLNode & node)
explicit

Constructor. New items should only be created through an XLStyles object.

Parameters
nodeAn XMLNode object with the styles item. If no input is provided, a null node is used.

◆ XLNumberFormat() [3/4]

XLNumberFormat::XLNumberFormat ( const XLNumberFormat & other)

Copy Constructor.

Parameters
otherObject to be copied.

◆ XLNumberFormat() [4/4]

OpenXLSX::XLNumberFormat::XLNumberFormat ( XLNumberFormat && other)
defaultnoexcept

Move Constructor.

Parameters
otherObject to be moved.

◆ ~XLNumberFormat()

XLNumberFormat::~XLNumberFormat ( )
default

Member Function Documentation

◆ formatCode()

std::string XLNumberFormat::formatCode ( ) const

Get the code of the number format.

Returns
The format code for this number format

◆ numberFormatId()

uint32_t XLNumberFormat::numberFormatId ( ) const

Get the id of the number format.

Returns
The id for this number format

◆ operator=() [1/2]

XLNumberFormat & XLNumberFormat::operator= ( const XLNumberFormat & other)

Copy assignment operator.

Parameters
otherRight hand side of assignment operation.
Returns
A reference to the lhs object.

◆ operator=() [2/2]

XLNumberFormat & OpenXLSX::XLNumberFormat::operator= ( XLNumberFormat && other)
defaultnoexcept

Move assignment operator.

Parameters
otherRight hand side of assignment operation.
Returns
A reference to lhs object.

◆ setFormatCode()

bool XLNumberFormat::setFormatCode ( std::string_view newFormatCode)

◆ setNumberFormatId()

bool XLNumberFormat::setNumberFormatId ( uint32_t newNumberFormatId)

Setter functions for style parameters.

Parameters
valuethat shall be set
Returns
true for success, false for failure

◆ summary()

std::string XLNumberFormat::summary ( ) const

Return a string summary of the number format.

Returns
string with info about the number format object

◆ XLNumberFormats

friend class XLNumberFormats
friend

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