62 lines
1.2 KiB
C++
62 lines
1.2 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TADSPrintf 类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TADSPrintf 定义
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#include "StdAfx.h"
|
|
#include "TADSPrintf.h"
|
|
|
|
TADSPrintf::~TADSPrintf()
|
|
{
|
|
|
|
}
|
|
|
|
TADSPrintf & TADSPrintf::operator << (LPCTSTR str)
|
|
{
|
|
ads_printf(_T("%s"), str);
|
|
|
|
return *this;
|
|
}
|
|
|
|
TADSPrintf & TADSPrintf::operator << (int i)
|
|
{
|
|
ads_printf(_T("%d"), i);
|
|
|
|
return *this;
|
|
}
|
|
|
|
TADSPrintf & TADSPrintf::operator << (long i)
|
|
{
|
|
ads_printf(_T("%ld"), i);
|
|
|
|
return *this;
|
|
}
|
|
|
|
TADSPrintf & TADSPrintf::operator << (const ads_point pt)
|
|
{
|
|
TCHAR sOut[1024] = _T("");
|
|
_stprintf(sOut, _T("(%g,%g,%g)"), pt[0], pt[1], pt[2]);
|
|
ads_printf(sOut);
|
|
|
|
return *this;
|
|
}
|
|
|
|
TADSPrintf & TADSPrintf::operator << (ads_real r)
|
|
{
|
|
TCHAR sOut[80] = _T("");
|
|
_stprintf(sOut, _T("%g"), r);
|
|
ads_printf(sOut);
|
|
|
|
return *this;
|
|
}
|
|
|
|
TADSPrintf & TADSPrintf::operator << (const TCString &str)
|
|
{
|
|
ads_printf(_T("%s"), (LPCTSTR)str);
|
|
return *this;
|
|
} |