#include <opennurbs_textlog.h>

Inheritance diagram for ON_TextLog:
ON_TextHash

Public Member Functions

 ON_TextLog ()
 Create a text log that dumps to the virtual function void ON_TextLog::AppendText(). More...
 
 ON_TextLog (FILE *fp)
 Create a text log that dumps to an ASCII file. More...
 
 ON_TextLog (ON_wString &s)
 Create a text log that dumps to a string. More...
 
virtual ~ON_TextLog ()
 
void GetDoubleFormat (ON_String &) const
 
void GetFloatFormat (ON_String &) const
 
int IndentCount ()
 
int IndentSize () const
 
bool IsTextHash () const
 
ON_TextLogoperator<< (const char *)
 
ON_TextLogoperator<< (char)
 
ON_TextLogoperator<< (short)
 
ON_TextLogoperator<< (int)
 
ON_TextLogoperator<< (float)
 
ON_TextLogoperator<< (double)
 
ON_TextLogoperator<< (const ON_2dPoint &)
 
ON_TextLogoperator<< (const ON_3dPoint &)
 
ON_TextLogoperator<< (const ON_4dPoint &)
 
ON_TextLogoperator<< (const ON_2dVector &)
 
ON_TextLogoperator<< (const ON_3dVector &)
 
ON_TextLogoperator<< (const ON_Xform &)
 
void PopIndent ()
 
void ON_VARGS_FUNC_CDECL Print (const char *format,...)
 Print a formatted ASCII string of up to 2000 characters. More...
 
void ON_VARGS_FUNC_CDECL Print (const wchar_t *format,...)
 Print a formatted INICODE string of up to 2000 characters. More...
 
void Print (float)
 
void Print (double)
 
void Print (const ON_2dPoint &)
 
void Print (const ON_3dPoint &)
 
void Print (const ON_4dPoint &)
 
void Print (const ON_2dVector &)
 
void Print (const ON_3dVector &)
 
void Print (const ON_Xform &)
 
void Print (const ON_UUID &)
 
void Print (const ON_COMPONENT_INDEX &)
 
void Print (const ON_wString &string)
 Print an unformatted wide char string of any length. More...
 
void Print (const ON_String &string)
 Print an unformatted UTF-8 string of any length. More...
 
void Print (const ON_3dPointArray &, const char *=nullptr)
 
void Print (const ON_Matrix &, const char *=nullptr, int=0)
 
void PrintKnotVector (int, int, const double *)
 
void PrintNewLine ()
 Same as calling Print("\n"); More...
 
void PrintPointGrid (int, bool, int, int, int, int, const double *, const char *=nullptr)
 
void PrintPointList (int, bool, int, int, const double *, const char *=nullptr)
 
void PrintRGB (const ON_Color &)
 
void PrintString (const char *s)
 Print an unformatted ASCII string of any length. More...
 
void PrintString (const wchar_t *s)
 Print an unformatted UNICODE string of any length. More...
 
void PrintTime (const struct tm &)
 
void PrintWrappedText (const char *, int=60)
 
void PrintWrappedText (const wchar_t *, int=60)
 
void PushIndent ()
 
void SetDoubleFormat (const char *)
 
void SetFloatFormat (const char *)
 
void SetIndentCount (int indent_count)
 Set indentation count. More...
 
void SetIndentSize (int)
 

Static Public Attributes

static ON_TextLog Null
 ON_TextLog::Null is a silent text log and can be used when no output is desired but an ON_TextLog parameter is required. More...
 

Protected Member Functions

virtual void AppendText (const char *s)
 If the ON_TextLog(ON_wString& wstr) constructor was used, the default appends s to wstr. If the ON_TextLog(FILE* fp) constructor was used, the default calls fputs( fp, s). In all other cases, the default calls printf("%s",s). More...
 
virtual void AppendText (const wchar_t *s)
 If the ON_TextLog(ON_wString& wstr) constructor was used, the default appends s to wstr. In all other cases, the default converts the string to an ON_String and calls the ASCII version AppendText(const char*). More...
 

Protected Attributes

FILE * m_pFile
 
ON_wStringm_pString
 

Friends

class ON_TextHash
 

Constructor & Destructor Documentation

◆ ON_TextLog() [1/3]

ON_TextLog::ON_TextLog ( )

Create a text log that dumps to the virtual function void ON_TextLog::AppendText().

◆ ON_TextLog() [2/3]

ON_TextLog::ON_TextLog ( FILE *  fp)

Create a text log that dumps to an ASCII file.

Parameters
fp[in] Pointer to an open ASCII text file. The file pointer must remain valid as long as the text log is in use.

◆ ON_TextLog() [3/3]

ON_TextLog::ON_TextLog ( ON_wString s)

Create a text log that dumps to a string.

Parameters
s[in] String that must exist as long as the text log is in use.

◆ ~ON_TextLog()

virtual ON_TextLog::~ON_TextLog ( )
virtual

Member Function Documentation

◆ AppendText() [1/2]

virtual void ON_TextLog::AppendText ( const char *  s)
protectedvirtual

If the ON_TextLog(ON_wString& wstr) constructor was used, the default appends s to wstr. If the ON_TextLog(FILE* fp) constructor was used, the default calls fputs( fp, s). In all other cases, the default calls printf("%s",s).

Parameters
s[in];

◆ AppendText() [2/2]

virtual void ON_TextLog::AppendText ( const wchar_t *  s)
protectedvirtual

If the ON_TextLog(ON_wString& wstr) constructor was used, the default appends s to wstr. In all other cases, the default converts the string to an ON_String and calls the ASCII version AppendText(const char*).

Parameters
s[in];

◆ GetDoubleFormat()

void ON_TextLog::GetDoubleFormat ( ON_String ) const

◆ GetFloatFormat()

void ON_TextLog::GetFloatFormat ( ON_String ) const

◆ IndentCount()

int ON_TextLog::IndentCount ( )
Returns
Current indentation count

◆ IndentSize()

int ON_TextLog::IndentSize ( ) const

◆ IsTextHash()

bool ON_TextLog::IsTextHash ( ) const

◆ operator<<() [1/12]

ON_TextLog& ON_TextLog::operator<< ( const char *  )

◆ operator<<() [2/12]

ON_TextLog& ON_TextLog::operator<< ( char  )

◆ operator<<() [3/12]

ON_TextLog& ON_TextLog::operator<< ( short  )

◆ operator<<() [4/12]

ON_TextLog& ON_TextLog::operator<< ( int  )

◆ operator<<() [5/12]

ON_TextLog& ON_TextLog::operator<< ( float  )

◆ operator<<() [6/12]

ON_TextLog& ON_TextLog::operator<< ( double  )

◆ operator<<() [7/12]

ON_TextLog& ON_TextLog::operator<< ( const ON_2dPoint )

◆ operator<<() [8/12]

ON_TextLog& ON_TextLog::operator<< ( const ON_3dPoint )

◆ operator<<() [9/12]

ON_TextLog& ON_TextLog::operator<< ( const ON_4dPoint )

◆ operator<<() [10/12]

ON_TextLog& ON_TextLog::operator<< ( const ON_2dVector )

◆ operator<<() [11/12]

ON_TextLog& ON_TextLog::operator<< ( const ON_3dVector )

◆ operator<<() [12/12]

ON_TextLog& ON_TextLog::operator<< ( const ON_Xform )

◆ PopIndent()

void ON_TextLog::PopIndent ( )

◆ Print() [1/16]

void ON_VARGS_FUNC_CDECL ON_TextLog::Print ( const char *  format,
  ... 
)

Print a formatted ASCII string of up to 2000 characters.

Parameters
format[in] nullptr terminated format control string

To print strings longer than 2000 characters, you must use ON_TextLog::PrintString.

See also
ON_TextLog::PrintString

◆ Print() [2/16]

void ON_VARGS_FUNC_CDECL ON_TextLog::Print ( const wchar_t *  format,
  ... 
)

Print a formatted INICODE string of up to 2000 characters.

Parameters
format[in] nullptr terminated format control string

To print strings longer than 2000 characters, you must use ON_TextLog::PrintString.

See also
ON_TextLog::PrintString

◆ Print() [3/16]

void ON_TextLog::Print ( float  )

◆ Print() [4/16]

void ON_TextLog::Print ( double  )

◆ Print() [5/16]

void ON_TextLog::Print ( const ON_2dPoint )

◆ Print() [6/16]

void ON_TextLog::Print ( const ON_3dPoint )

◆ Print() [7/16]

void ON_TextLog::Print ( const ON_4dPoint )

◆ Print() [8/16]

void ON_TextLog::Print ( const ON_2dVector )

◆ Print() [9/16]

void ON_TextLog::Print ( const ON_3dVector )

◆ Print() [10/16]

void ON_TextLog::Print ( const ON_Xform )

◆ Print() [11/16]

void ON_TextLog::Print ( const ON_UUID )

◆ Print() [12/16]

void ON_TextLog::Print ( const ON_COMPONENT_INDEX &  )

◆ Print() [13/16]

void ON_TextLog::Print ( const ON_wString string)

Print an unformatted wide char string of any length.

Parameters
string[in]

◆ Print() [14/16]

void ON_TextLog::Print ( const ON_String string)

Print an unformatted UTF-8 string of any length.

Parameters
string[in]

◆ Print() [15/16]

void ON_TextLog::Print ( const ON_3dPointArray ,
const char *  = nullptr 
)

◆ Print() [16/16]

void ON_TextLog::Print ( const ON_Matrix ,
const char *  = nullptr,
int  = 0 
)

◆ PrintKnotVector()

void ON_TextLog::PrintKnotVector ( int  ,
int  ,
const double *   
)

◆ PrintNewLine()

void ON_TextLog::PrintNewLine ( )

Same as calling Print("\n");

printing utilities

◆ PrintPointGrid()

void ON_TextLog::PrintPointGrid ( int  ,
bool  ,
int  ,
int  ,
int  ,
int  ,
const double *  ,
const char *  = nullptr 
)

◆ PrintPointList()

void ON_TextLog::PrintPointList ( int  ,
bool  ,
int  ,
int  ,
const double *  ,
const char *  = nullptr 
)

◆ PrintRGB()

void ON_TextLog::PrintRGB ( const ON_Color )

◆ PrintString() [1/2]

void ON_TextLog::PrintString ( const char *  s)

Print an unformatted ASCII string of any length.

Parameters
s[in] nullptr terminated ASCII string.

◆ PrintString() [2/2]

void ON_TextLog::PrintString ( const wchar_t *  s)

Print an unformatted UNICODE string of any length.

Parameters
s[in] nullptr terminated UNICODE string.

◆ PrintTime()

void ON_TextLog::PrintTime ( const struct tm &  )

◆ PrintWrappedText() [1/2]

void ON_TextLog::PrintWrappedText ( const char *  ,
int  = 60 
)

◆ PrintWrappedText() [2/2]

void ON_TextLog::PrintWrappedText ( const wchar_t *  ,
int  = 60 
)

◆ PushIndent()

void ON_TextLog::PushIndent ( )

◆ SetDoubleFormat()

void ON_TextLog::SetDoubleFormat ( const char *  )

◆ SetFloatFormat()

void ON_TextLog::SetFloatFormat ( const char *  )

◆ SetIndentCount()

void ON_TextLog::SetIndentCount ( int  indent_count)

Set indentation count.

◆ SetIndentSize()

void ON_TextLog::SetIndentSize ( int  )

Friends And Related Function Documentation

◆ ON_TextHash

friend class ON_TextHash
friend

Member Data Documentation

◆ m_pFile

FILE* ON_TextLog::m_pFile
protected

◆ m_pString

ON_wString* ON_TextLog::m_pString
protected

◆ Null

ON_TextLog ON_TextLog::Null
static

ON_TextLog::Null is a silent text log and can be used when no output is desired but an ON_TextLog parameter is required.