greenplumn CWStringConst 源码
greenplumn CWStringConst 代码
文件路径:/src/backend/gporca/libgpos/include/gpos/string/CWStringConst.h
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2010 Greenplum, Inc.
//
// @filename:
// CWStringConst.h
//
// @doc:
// Constant string class
//---------------------------------------------------------------------------
#ifndef GPOS_CWStringConst_H
#define GPOS_CWStringConst_H
#include "gpos/string/CWStringBase.h"
namespace gpos
{
//---------------------------------------------------------------------------
// @class:
// CWStringConst
//
// @doc:
// Constant string class.
// The class represents constant strings, which cannot be modified after creation.
// The class can either own its own memory, or be supplied with an external
// memory buffer holding the string characters.
// For a general string class that can be modified, see CWString.
//
//---------------------------------------------------------------------------
class CWStringConst : public CWStringBase
{
private:
// null terminated wide character buffer
const WCHAR *m_w_str_buffer;
public:
// ctors
CWStringConst(const WCHAR *w_str_buffer);
CWStringConst(CMemoryPool *mp, const WCHAR *w_str_buffer);
// shallow copy ctor
CWStringConst(const CWStringConst &);
//dtor
~CWStringConst() override;
// returns the wide character buffer storing the string
const WCHAR *GetBuffer() const override;
};
} // namespace gpos
#endif // #ifndef GPOS_CWStringConst_H
// EOF
相关信息
相关文章
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦