OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
textconv_helper::CA2W_ Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/dev-utils/StackWalker.h>

Collaboration diagram for textconv_helper::CA2W_:

Public Member Functions

 CA2W_ (LPCSTR pStr, UINT codePage=CP_ACP)
 ~CA2W_ ()
 operator LPCWSTR ()

Private Member Functions

 CA2W_ (const CA2W_ &)
CA2W_ & operator= (const CA2W_ &)

Private Attributes

std::vector< wchar_t > m_vWideArray
LPCSTR m_pStr

Detailed Description

Constructor & Destructor Documentation

◆ CA2W_() [1/2]

textconv_helper::CA2W_::CA2W_ ( LPCSTR pStr,
UINT codePage = CP_ACP )
inline
51 : m_pStr(pStr)
52 {
53 if (pStr)
54 {
55 // Resize the vector and assign null WCHAR to each element
56 int length = MultiByteToWideChar(codePage, 0, pStr, -1, NULL, 0) + 1;
57 m_vWideArray.assign(length, L'\0');
58
59 // Fill our vector with the converted WCHAR array
60 MultiByteToWideChar(codePage, 0, pStr, -1, &m_vWideArray[0], length);
61 }
62 }
#define L(s)
Definition ExtrusionEntity.cpp:25
LPCSTR m_pStr
Definition StackWalker.h:71
std::vector< wchar_t > m_vWideArray
Definition StackWalker.h:70
double length(const Points &pts)
Definition MultiPoint.hpp:181

References L, m_pStr, and m_vWideArray.

Referenced by CA2W_(), and operator=().

Here is the caller graph for this function:

◆ ~CA2W_()

textconv_helper::CA2W_::~CA2W_ ( )
inline
63{}

◆ CA2W_() [2/2]

textconv_helper::CA2W_::CA2W_ ( const CA2W_ & )
private

References CA2W_().

Here is the call graph for this function:

Member Function Documentation

◆ operator LPCWSTR()

textconv_helper::CA2W_::operator LPCWSTR ( )
inline
64{ return m_pStr ? &m_vWideArray[0] : NULL; }

References m_pStr, and m_vWideArray.

◆ operator=()

CA2W_ & textconv_helper::CA2W_::operator= ( const CA2W_ & )
private

References CA2W_().

Here is the call graph for this function:

Member Data Documentation

◆ m_pStr

LPCSTR textconv_helper::CA2W_::m_pStr
private

Referenced by CA2W_(), and operator LPCWSTR().

◆ m_vWideArray

std::vector<wchar_t> textconv_helper::CA2W_::m_vWideArray
private

Referenced by CA2W_(), and operator LPCWSTR().


The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/dev-utils/StackWalker.h