Commit 3d8f18a2 authored by Will Schroeder's avatar Will Schroeder
Browse files

ENH: Made print methods and IVARS consistent.

parent af32e5a8
......@@ -46,9 +46,9 @@ public:
int GetRefCount() {return this->RefCount;};
void DebugOn();
void DebugOff();
virtual unsigned long int GetMtime() {return this->Mtime.GetMtime();};
virtual unsigned long int GetMTime() {return this->MTime.GetMTime();};
int GetDebug();
void Modified() {Mtime.Modified();};
void Modified() {MTime.Modified();};
virtual char *GetClassName() {return "vlObject";};
void Print(ostream& os);
......@@ -61,7 +61,7 @@ public:
protected:
int Debug; // Enable debug messages
vlTimeStamp Mtime; // Keep track of modification time
vlTimeStamp MTime; // Keep track of modification time
private:
int RefCount; // Number of uses of this object by other objects
......
......@@ -25,7 +25,7 @@ class vlTimeStamp
public:
vlTimeStamp() {this->ModifiedTime = 0;};
void Modified() {this->ModifiedTime = ++vlTime;};
unsigned long int GetMtime() {return ModifiedTime;};
unsigned long int GetMTime() {return ModifiedTime;};
// Using >= and <= in the operators below handles special cases when
// modified times are equal. Only occurs for recently instantiated objects.
int operator>(vlTimeStamp& ts)
......
......@@ -15,19 +15,19 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
#include "Indent.hh"
#define vlStdIndent 2
#define NumBlanks 40
#define NumberOfBlanks 40
static char blanks[NumBlanks+1]=" ";
static char blanks[NumberOfBlanks+1]=" ";
vlIndent vlIndent::GetNextIndent()
{
int indent = this->Indent + vlStdIndent;
if ( indent > NumBlanks ) indent = NumBlanks;
if ( indent > NumberOfBlanks ) indent = NumberOfBlanks;
return indent;
}
ostream& operator<<(ostream& os, vlIndent& ind)
{
os << blanks + (NumBlanks-ind.Indent) ;
os << blanks + (NumberOfBlanks-ind.Indent) ;
return os;
}
......@@ -76,7 +76,7 @@ void vlObject::PrintSelf(ostream& os, vlIndent indent)
if (this->ShouldIPrint(vlObject::GetClassName()))
{
os << indent << "Debug: " << (this->Debug ? "On\n" : "Off\n");
os << indent << "Modified Time: " << this->GetMtime() << "\n";
os << indent << "Modified Time: " << this->GetMTime() << "\n";
os << indent << "Reference Count: " << this->RefCount << "\n";
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment