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

An encapsulation of an array of fill::gradientFill::stop items. More...

#include <XLStyles.hpp>

Public Member Functions

 XLGradientStops ()
 
 XLGradientStops (const XMLNode &node)
 Constructor. New items should only be created through an XLFill object.
 
 XLGradientStops (const XLGradientStops &other)
 Copy Constructor.
 
 XLGradientStops (XLGradientStops &&other)
 Move Constructor.
 
 ~XLGradientStops ()
 
XLGradientStopsoperator= (const XLGradientStops &other)
 Copy assignment operator.
 
XLGradientStopsoperator= (XLGradientStops &&other) noexcept=default
 Move assignment operator.
 
size_t count () const
 Get the count of gradient stops.
 
XLGradientStop stopByIndex (XLStyleIndex index) const
 Get the gradient stop entry identified by index.
 
XLGradientStop operator[] (XLStyleIndex index) const
 Operator overload: allow [] as shortcut access to stopByIndex.
 
XLStyleIndex create (XLGradientStop copyFrom=XLGradientStop{}, std::string_view styleEntriesPrefix="")
 Append a new XLGradientStop, based on copyFrom, and return its index in fills node.
 
std::string summary () const
 

Detailed Description

An encapsulation of an array of fill::gradientFill::stop items.

Constructor & Destructor Documentation

◆ XLGradientStops() [1/4]

XLGradientStops::XLGradientStops ( )

◆ XLGradientStops() [2/4]

XLGradientStops::XLGradientStops ( const XMLNode node)
explicit

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

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

◆ XLGradientStops() [3/4]

XLGradientStops::XLGradientStops ( const XLGradientStops other)

Copy Constructor.

Parameters
otherObject to be copied.

◆ XLGradientStops() [4/4]

XLGradientStops::XLGradientStops ( XLGradientStops &&  other)

Move Constructor.

Parameters
otherObject to be moved.

◆ ~XLGradientStops()

XLGradientStops::~XLGradientStops ( )

Member Function Documentation

◆ count()

size_t XLGradientStops::count ( ) const

Get the count of gradient stops.

Returns
The amount of stop entries

◆ create()

XLStyleIndex XLGradientStops::create ( XLGradientStop  copyFrom = XLGradientStop{},
std::string_view  styleEntriesPrefix = "" 
)

Append a new XLGradientStop, based on copyFrom, and return its index in fills node.

Parameters
copyFromCan provide an XLGradientStop to use as template for the new style
stopEntriesPrefixPrefix the newly created stop XMLNode with this pugi::node_pcdata text
Returns
The index of the new style as used by operator[]

◆ operator=() [1/2]

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

Copy assignment operator.

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

◆ operator=() [2/2]

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

Move assignment operator.

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

◆ operator[]()

XLGradientStop OpenXLSX::XLGradientStops::operator[] ( XLStyleIndex  index) const
inline

Operator overload: allow [] as shortcut access to stopByIndex.

Parameters
indexThe index within the XML sequence
Returns
An XLGradientStop object

◆ stopByIndex()

XLGradientStop XLGradientStops::stopByIndex ( XLStyleIndex  index) const

Get the gradient stop entry identified by index.

Parameters
indexThe index within the XML sequence
Returns
An XLGradientStop object

◆ summary()

std::string XLGradientStops::summary ( ) const

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