xlnt
Public Types | Public Member Functions | List of all members
xlnt::named_range Class Reference

A 2D range of cells in a worksheet that is referred to by name. ws->range("A1:B2") could be replaced by ws->range("range1") More...

#include <named_range.hpp>

Public Types

using target = std::pair< worksheet, range_reference >
 Type alias for the combination of sheet and range this named_range points to. More...
 

Public Member Functions

 named_range ()
 Constructs a named range that has no name and has no targets. More...
 
 named_range (const named_range &other)
 Constructs a named range by copying its name and targets from other. More...
 
 named_range (const std::string &name, const std::vector< target > &targets)
 Constructs a named range with the given name and targets. More...
 
std::string name () const
 Returns the name of this range. More...
 
const std::vector< target > & targets () const
 Returns the set of targets of this named range as a vector. More...
 
named_rangeoperator= (const named_range &other)
 Assigns the name and targets of this named_range to that of other. More...
 
bool operator== (const named_range &rhs) const
 

Detailed Description

A 2D range of cells in a worksheet that is referred to by name. ws->range("A1:B2") could be replaced by ws->range("range1")

Member Typedef Documentation

◆ target

Type alias for the combination of sheet and range this named_range points to.

Constructor & Destructor Documentation

◆ named_range() [1/3]

xlnt::named_range::named_range ( )

Constructs a named range that has no name and has no targets.

◆ named_range() [2/3]

xlnt::named_range::named_range ( const named_range other)

Constructs a named range by copying its name and targets from other.

◆ named_range() [3/3]

xlnt::named_range::named_range ( const std::string &  name,
const std::vector< target > &  targets 
)

Constructs a named range with the given name and targets.

Member Function Documentation

◆ name()

std::string xlnt::named_range::name ( ) const

Returns the name of this range.

◆ operator=()

named_range& xlnt::named_range::operator= ( const named_range other)

Assigns the name and targets of this named_range to that of other.

◆ targets()

const std::vector<target>& xlnt::named_range::targets ( ) const

Returns the set of targets of this named range as a vector.


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