OpenXLSX 1.9.1
Loading...
Searching...
No Matches
OpenXLSX::XLNumberFormat Class Reference

An encapsulation of a number format (numFmt) item. More...

#include <XLStyles.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 ()
 
XLNumberFormatoperator= (const XLNumberFormat &other)
 Copy assignment operator.
 
XLNumberFormatoperator= (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
 

Detailed Description

An encapsulation of a number format (numFmt) item.

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

Friends And Related Symbol Documentation

◆ XLNumberFormats

friend class XLNumberFormats
friend

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