greenplumn CWStringConst 源码

  • 2022-08-18
  • 浏览 (337)

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

相关信息

greenplumn 源码目录

相关文章

greenplumn CStringStatic 源码

greenplumn CWString 源码

greenplumn CWStringBase 源码

greenplumn CWStringDynamic 源码

greenplumn CWStringStatic 源码

0  赞