Rhino C++ API
8.14
|
#include <opennurbs_textlog.h>
Public Types | |
enum | LevelOfDetail : unsigned char { LevelOfDetail::Minimum = 0, LevelOfDetail::Medium = 1, LevelOfDetail::Maximum = 2 } |
ON_TextLog::LevelOfDetail determines ow much detail is printed. Functions that have an ON_TextLog parameter, like the Dump() functions, may use the level of detail to tailor their output. may use the level of detail to tailor their output. More... | |
Public Member Functions | |
ON_TextLog () | |
ON_TextLog (FILE *fp) | |
dump to open ASCII text file More... | |
ON_TextLog (ON_wString &s) | |
virtual | ~ON_TextLog () |
void | ClearColorFormat () |
ON_TextLog::LevelOfDetail | DecreaseLevelOfDetail () |
Decrease the level of detail. More... | |
ON_Color::TextFormat | GetColorFormat () |
void | GetDoubleFormat (ON_String &) const |
void | GetFloatFormat (ON_String &) const |
ON_TextLog::LevelOfDetail | GetLevelOfDetail () const |
ON_TextLog::LevelOfDetail | IncreaseLevelOfDetail () |
Increase the level of detail. More... | |
int | IndentCount () |
int | IndentSize () const |
bool | IsNull () const |
bool | IsTextHash () const |
bool | LevelOfDetailIsAtLeast (ON_TextLog::LevelOfDetail level_of_detail) |
ON_TextLog & | operator<< (char) |
ON_TextLog & | operator<< (const char *) |
ON_TextLog & | operator<< (const ON_2dPoint &) |
ON_TextLog & | operator<< (const ON_2dVector &) |
ON_TextLog & | operator<< (const ON_3dPoint &) |
ON_TextLog & | operator<< (const ON_3dVector &) |
ON_TextLog & | operator<< (const ON_4dPoint &) |
ON_TextLog & | operator<< (const ON_Xform &) |
ON_TextLog & | operator<< (double) |
ON_TextLog & | operator<< (float) |
ON_TextLog & | operator<< (int) |
ON_TextLog & | operator<< (short) |
void | PopIndent () |
void ON_VARGS_FUNC_CDECL | Print (const char *format,...) |
void | Print (const ON_2dPoint &) |
void | Print (const ON_2dVector &) |
void | Print (const ON_3dPoint &) |
void | Print (const ON_3dPointArray &, const char *=nullptr) |
void | Print (const ON_3dVector &) |
void | Print (const ON_4dPoint &) |
void | Print (const ON_COMPONENT_INDEX &) |
void | Print (const ON_Matrix &, const char *=nullptr, int=0) |
void | Print (const ON_String &string) |
void | Print (const ON_UUID &) |
void | Print (const ON_wString &string) |
void | Print (const ON_Xform &) |
void ON_VARGS_FUNC_CDECL | Print (const wchar_t *format,...) |
void | Print (double) |
void | Print (float) |
void | PrintColor (const ON_Color &color) |
void | PrintCurrentTime () |
void | PrintKnotVector (int, int, const double *) |
void | PrintNewLine () |
printing utilities 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 &color) |
void | PrintSpace () |
void | PrintString (const char *s) |
void | PrintString (const wchar_t *s) |
void | PrintString (ON_String s) |
void | PrintString (ON_wString s) |
void | PrintTab () |
void | PrintTime (const struct tm &t) |
void | PrintWrappedText (const char *, int=60) |
last arg is maximum line length More... | |
void | PrintWrappedText (const wchar_t *, int=60) |
last arg is maximum line length More... | |
void | PushIndent () |
void | SetColorFormat (ON_Color::TextFormat color_format) |
void | SetDoubleFormat (const char *) |
default is g More... | |
void | SetFloatFormat (const char *) |
default is g More... | |
void | SetIndentCount (int indent_count) |
void | SetIndentSize (int) |
void | SetLevelOfDetail (ON_TextLog::LevelOfDetail level_of_detail) |
Static Public Member Functions | |
static ON_TextLog::LevelOfDetail | LevelOfDetailFromUnsigned (unsigned int level_of_detail) |
Static Public Attributes | |
static ON_TextLog | Null |
Protected Member Functions | |
virtual void | AppendText (const char *s) |
virtual void | AppendText (const wchar_t *s) |
Protected Attributes | |
FILE * | m_pFile = nullptr |
ON_wString * | m_pString = nullptr |
Friends | |
class | ON_TextHash |
Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete openNURBS copyright information see http://www.opennurbs.org.
|
strong |
ON_TextLog::LevelOfDetail determines ow much detail is printed. Functions that have an ON_TextLog parameter, like the Dump() functions, may use the level of detail to tailor their output. may use the level of detail to tailor their output.
Level of detail interface
Enumerator | |
---|---|
Minimum | A brief summary or synopsis. |
Medium | The default level of detail. |
Maximum | A verbose description that may be so long it obscures the important points. |
ON_TextLog::ON_TextLog | ( | ) |
Description: Create a text log that dumps to the virtual function void ON_TextLog::AppendText().
ON_TextLog::ON_TextLog | ( | FILE * | fp | ) |
dump to open ASCII text file
Description: 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::ON_TextLog | ( | ON_wString & | s | ) |
Description: 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.
|
virtual |
|
protectedvirtual |
Description: 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];
Reimplemented in CRhinoDump.
|
protectedvirtual |
Description: 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];
Reimplemented in CRhinoDump.
void ON_TextLog::ClearColorFormat | ( | ) |
Description: Returns color format to the default ON_Color::TextFormat::DecimalRGBa
ON_TextLog::LevelOfDetail ON_TextLog::DecreaseLevelOfDetail | ( | ) |
Decrease the level of detail.
ON_Color::TextFormat ON_TextLog::GetColorFormat | ( | ) |
void ON_TextLog::GetDoubleFormat | ( | ON_String & | ) | const |
void ON_TextLog::GetFloatFormat | ( | ON_String & | ) | const |
ON_TextLog::LevelOfDetail ON_TextLog::GetLevelOfDetail | ( | ) | const |
Returns: Level of detail to print 0 = minimum level of detail 4 = maximum level of detail
ON_TextLog::LevelOfDetail ON_TextLog::IncreaseLevelOfDetail | ( | ) |
Increase the level of detail.
int ON_TextLog::IndentCount | ( | ) |
Returns: Current indentation count
int ON_TextLog::IndentSize | ( | ) | const |
0: one tab per indent >0: number of spaces per indent
bool ON_TextLog::IsNull | ( | ) | const |
Returns: True if this is ON_TextLog::Null.
bool ON_TextLog::IsTextHash | ( | ) | const |
Returns: True if the text is being used to calculate a geometric content SHA1 hash and non-geometry information that varies based on time, computer, or user should not be printed.
|
static |
bool ON_TextLog::LevelOfDetailIsAtLeast | ( | ON_TextLog::LevelOfDetail | level_of_detail | ) |
Parameter: level_of_detail - [in] Returns: True if this text log's level of detail the same or more detailed than the amount specified by level_of_detail.
ON_TextLog& ON_TextLog::operator<< | ( | char | ) |
ON_TextLog& ON_TextLog::operator<< | ( | const char * | ) |
ON_TextLog& ON_TextLog::operator<< | ( | const ON_2dPoint & | ) |
ON_TextLog& ON_TextLog::operator<< | ( | const ON_2dVector & | ) |
ON_TextLog& ON_TextLog::operator<< | ( | const ON_3dPoint & | ) |
ON_TextLog& ON_TextLog::operator<< | ( | const ON_3dVector & | ) |
ON_TextLog& ON_TextLog::operator<< | ( | const ON_4dPoint & | ) |
ON_TextLog& ON_TextLog::operator<< | ( | const ON_Xform & | ) |
ON_TextLog& ON_TextLog::operator<< | ( | double | ) |
ON_TextLog& ON_TextLog::operator<< | ( | float | ) |
ON_TextLog& ON_TextLog::operator<< | ( | int | ) |
ON_TextLog& ON_TextLog::operator<< | ( | short | ) |
void ON_TextLog::PopIndent | ( | ) |
void ON_VARGS_FUNC_CDECL ON_TextLog::Print | ( | const char * | format, |
... | |||
) |
Description: Print a formatted ASCII string of up to 2000 characters. Parameters: format - [in] nullptr terminated format control string Remarks: To print strings longer than 2000 characters, you must use ON_TextLog::PrintString. See Also: ON_TextLog::PrintString
void ON_TextLog::Print | ( | const ON_2dPoint & | ) |
void ON_TextLog::Print | ( | const ON_2dVector & | ) |
void ON_TextLog::Print | ( | const ON_3dPoint & | ) |
void ON_TextLog::Print | ( | const ON_3dPointArray & | , |
const char * | = nullptr |
||
) |
void ON_TextLog::Print | ( | const ON_3dVector & | ) |
void ON_TextLog::Print | ( | const ON_4dPoint & | ) |
void ON_TextLog::Print | ( | const ON_COMPONENT_INDEX & | ) |
void ON_TextLog::Print | ( | const ON_Matrix & | , |
const char * | = nullptr , |
||
int | = 0 |
||
) |
void ON_TextLog::Print | ( | const ON_String & | string | ) |
Description: Print an unformatted UTF-8 string of any length. Parameters: string - [in]
void ON_TextLog::Print | ( | const ON_UUID & | ) |
void ON_TextLog::Print | ( | const ON_wString & | string | ) |
Description: Print an unformatted wide char string of any length. Parameters: string - [in]
void ON_TextLog::Print | ( | const ON_Xform & | ) |
void ON_VARGS_FUNC_CDECL ON_TextLog::Print | ( | const wchar_t * | format, |
... | |||
) |
Description: Print a formatted UNICODE string of up to 2000 characters. Parameters: format - [in] nullptr terminated format control string Remarks: To print strings longer than 2000 characters, you must use ON_TextLog::PrintString. See Also: ON_TextLog::PrintString
void ON_TextLog::Print | ( | double | ) |
void ON_TextLog::Print | ( | float | ) |
void ON_TextLog::PrintColor | ( | const ON_Color & | color | ) |
Description: Print color using ON_Color::ToText(this->GetColorFormat(),0,true,*this);
void ON_TextLog::PrintCurrentTime | ( | ) |
Description: Prints the current Universal Coordinated Time returned by the gmtime() function in English. weekday month date::hour::min::sec year
void ON_TextLog::PrintKnotVector | ( | int | , |
int | , | ||
const double * | |||
) |
void ON_TextLog::PrintNewLine | ( | ) |
printing utilities
Description: Same as calling Print("\n");
void ON_TextLog::PrintPointGrid | ( | int | , |
bool | , | ||
int | , | ||
int | , | ||
int | , | ||
int | , | ||
const double * | , | ||
const char * | = nullptr |
||
) |
void ON_TextLog::PrintPointList | ( | int | , |
bool | , | ||
int | , | ||
int | , | ||
const double * | , | ||
const char * | = nullptr |
||
) |
void ON_TextLog::PrintRGB | ( | const ON_Color & | color | ) |
Description: Print color using the format ON_Color::TextFormat::DecimalRGB.
void ON_TextLog::PrintSpace | ( | ) |
Description: Same as calling Print(" ");
void ON_TextLog::PrintString | ( | const char * | s | ) |
Description: Print an unformatted UTF-8 encoded null terminated string. Parameters: s - [in] UTF-8 encoded null terminated string.
void ON_TextLog::PrintString | ( | const wchar_t * | s | ) |
Description: Print an unformatted UTF-16 or UTF-32 encoded null terminated string. Parameters: s - [in] UTF-16 or UTF-32 encoded null terminated string.
void ON_TextLog::PrintString | ( | ON_String | s | ) |
void ON_TextLog::PrintString | ( | ON_wString | s | ) |
void ON_TextLog::PrintTab | ( | ) |
Description: Same as calling Print("\t");
void ON_TextLog::PrintTime | ( | const struct tm & | t | ) |
Description: Prints the time in the t parameter as Universal Coordinated Time in English. weekday month date::hour::min::sec year Parameters: t - [in]
void ON_TextLog::PrintWrappedText | ( | const char * | , |
int | = 60 |
||
) |
last arg is maximum line length
void ON_TextLog::PrintWrappedText | ( | const wchar_t * | , |
int | = 60 |
||
) |
last arg is maximum line length
void ON_TextLog::PushIndent | ( | ) |
void ON_TextLog::SetColorFormat | ( | ON_Color::TextFormat | color_format | ) |
void ON_TextLog::SetDoubleFormat | ( | const char * | ) |
default is g
void ON_TextLog::SetFloatFormat | ( | const char * | ) |
default is g
void ON_TextLog::SetIndentCount | ( | int | indent_count | ) |
Description: Set indentation count.
void ON_TextLog::SetIndentSize | ( | int | ) |
void ON_TextLog::SetLevelOfDetail | ( | ON_TextLog::LevelOfDetail | level_of_detail | ) |
Description: Set the level of detail to print. Parameters: level_of_detail - [in] (default = ON_TextLog::LevelOfDetail::Medium)
|
friend |
|
protected |
|
protected |
|
static |
Description: ON_TextLog::Null is a silent text log and can be used when no output is desired but an ON_TextLog parameter is required.