OpenXLSX 1.9.1
Loading...
Searching...
No Matches
XLCellValue.hpp File Reference
#include <cmath>
#include <cstdint>
#include <fast_float/fast_float.h>
#include <fmt/base.h>
#include <fmt/format.h>
#include <iostream>
#include <string>
#include <variant>
#include "OpenXLSX-Exports.hpp"
#include "XLDateTime.hpp"
#include "XLException.hpp"
#include "XLRichText.hpp"
#include "XLXmlParser.hpp"
#include <functional>

Go to the source code of this file.

Data Structures

struct  OpenXLSX::VisitXLCellValueTypeToDouble
 
struct  OpenXLSX::VisitXLCellValueTypeToString
 
class  OpenXLSX::XLCellValue
 Class encapsulating a cell value. More...
 
class  OpenXLSX::XLCellValueProxy
 The XLCellValueProxy class is used for proxy (or placeholder) objects for XLCellValue objects. More...
 
struct  std::hash< OpenXLSX::XLRichTextRun >
 
struct  std::hash< OpenXLSX::XLRichText >
 
struct  std::hash< OpenXLSX::XLCellValue >
 

Namespaces

namespace  OpenXLSX
 
namespace  std
 

Macros

#define OPENXLSX_XLCELLVALUE_FRIEND_STRING_OP(OP, FUNCTOR)
 

Typedefs

typedef std::variant< std::string, int64_t, double, bool, OpenXLSX::XLRichTextXLCellValueType
 

Enumerations

enum class  OpenXLSX::XLValueType {
  OpenXLSX::Empty , OpenXLSX::Boolean , OpenXLSX::Integer , OpenXLSX::Float ,
  OpenXLSX::Error , OpenXLSX::String , OpenXLSX::RichText
}
 Enum defining the valid value types for a an Excel spreadsheet cell. More...
 

Macro Definition Documentation

◆ OPENXLSX_XLCELLVALUE_FRIEND_STRING_OP

#define OPENXLSX_XLCELLVALUE_FRIEND_STRING_OP (   OP,
  FUNCTOR 
)
Value:
friend bool operator OP(const XLCellValue& lhs, std::string_view rhs) \
{ \
if (std::holds_alternative<std::string>(lhs.m_value)) \
return FUNCTOR<>{}(std::string_view(std::get<std::string>(lhs.m_value)), rhs); \
return false; \
} \
friend bool operator OP(std::string_view lhs, const XLCellValue& rhs) \
{ \
if (std::holds_alternative<std::string>(rhs.m_value)) \
return FUNCTOR<>{}(lhs, std::string_view(std::get<std::string>(rhs.m_value))); \
return false; \
} \
friend bool operator OP(const XLCellValue& lhs, const char* rhs) { return lhs OP std::string_view(rhs); } \
friend bool operator OP(const char* lhs, const XLCellValue& rhs) { return std::string_view(lhs) OP rhs; } \
friend bool operator OP(const XLCellValue& lhs, const std::string& rhs) { return lhs OP std::string_view(rhs); } \
friend bool operator OP(const std::string& lhs, const XLCellValue& rhs) { return std::string_view(lhs) OP rhs; }

Typedef Documentation

◆ XLCellValueType

typedef std::variant<std::string, int64_t, double, bool, OpenXLSX::XLRichText> XLCellValueType