greenplumn CPrintPrefix 源码

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

greenplumn CPrintPrefix 代码

文件路径:/src/backend/gporca/libgpopt/include/gpopt/base/CPrintPrefix.h

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2009 Greenplum, Inc.
//
//	@filename:
//		CPrintPrefix.h
//
//	@doc:
//		Implemenation of prefix sequence for debug print functions;
//		In the common use case the actual strings are constants and a chain
//		of prefixes is built up on the stack;
//		Not ref-counted nor does it own any of the data it points to.
//---------------------------------------------------------------------------
#ifndef GPOS_CPrintPrefix_H
#define GPOS_CPrintPrefix_H

#include "gpos/base.h"

namespace gpopt
{
using namespace gpos;

//---------------------------------------------------------------------------
//	@class:
//		CPrintPrefix
//
//	@doc:
//		Prefix element for debug print functions
//
//---------------------------------------------------------------------------
class CPrintPrefix
{
private:
	// previous prefix; usually in the previous stack frame
	const CPrintPrefix *m_ppfx;

	// actual string
	const CHAR *m_sz;

public:
	// ctor
	explicit CPrintPrefix(const CPrintPrefix *, const CHAR *);

	// print
	IOstream &OsPrint(IOstream &os) const;

};	// class CPrintPrefix


// shorthand for printing
inline IOstream &
operator<<(IOstream &os, CPrintPrefix &pfx)
{
	return pfx.OsPrint(os);
}

}  // namespace gpopt

#endif	// !GPOS_CPrintPrefix_H


// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CAutoOptCtxt 源码

greenplumn CCTEInfo 源码

greenplumn CCTEMap 源码

greenplumn CCTEReq 源码

greenplumn CCastUtils 源码

greenplumn CColConstraintsArrayMapper 源码

greenplumn CColConstraintsHashMapper 源码

greenplumn CColRef 源码

greenplumn CColRefComputed 源码

greenplumn CColRefSet 源码

0  赞