Moved some in inline methods in ParamterOutput into the new ParamterOutput.cpp

file to clean up the interface.
This commit is contained in:
Robert Osfield 2003-01-11 12:50:39 +00:00
parent e8ddbdd195
commit ef7d7fce2e
4 changed files with 45 additions and 26 deletions

View File

@ -129,6 +129,10 @@ SOURCE=..\..\Src\osgDB\Output.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\..\Src\osgDB\ParameterOutput.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Src\osgDB\ReadFile.cpp SOURCE=..\..\Src\osgDB\ReadFile.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -13,21 +13,13 @@ class OSGDB_EXPORT ParameterOutput
{ {
public: public:
ParameterOutput(Output& fw): ParameterOutput(Output& fw);
_fw(fw),
_numItemsPerLine(fw.getNumIndicesPerLine()),
_column(0) {}
ParameterOutput(Output& fw,int numItemsPerLine): ParameterOutput(Output& fw,int numItemsPerLine);
_fw(fw),
_numItemsPerLine(numItemsPerLine),
_column(0) {}
void begin() void begin();
{ void newLine();
_fw.indent() << "{"<<std::endl; void end();
_fw.moveIn();
}
template<class T> template<class T>
void write(const T& t) void write(const T& t)
@ -73,19 +65,8 @@ class OSGDB_EXPORT ParameterOutput
} }
void newLine()
{
if (_column!=0) _fw << std::endl;
_column = 0;
}
void end() protected:
{
if (_column!=0) _fw << std::endl;
_fw.moveOut();
_fw.indent() << "}"<<std::endl;
_column = 0;
}
Output& _fw; Output& _fw;
int _numItemsPerLine; int _numItemsPerLine;

View File

@ -11,6 +11,7 @@ CXXFILES =\
WriteFile.cpp\ WriteFile.cpp\
Input.cpp\ Input.cpp\
Output.cpp\ Output.cpp\
ParameterOutput.cpp\
Field.cpp\ Field.cpp\
FieldReader.cpp\ FieldReader.cpp\
FieldReaderIterator.cpp\ FieldReaderIterator.cpp\

View File

@ -0,0 +1,33 @@
#include <osgDB/ParameterOutput>
using namespace osgDB;
ParameterOutput::ParameterOutput(Output& fw):
_fw(fw),
_numItemsPerLine(fw.getNumIndicesPerLine()),
_column(0) {}
ParameterOutput::ParameterOutput(Output& fw,int numItemsPerLine):
_fw(fw),
_numItemsPerLine(numItemsPerLine),
_column(0) {}
void ParameterOutput::begin()
{
_fw.indent() << "{"<<std::endl;
_fw.moveIn();
}
void ParameterOutput::newLine()
{
if (_column!=0) _fw << std::endl;
_column = 0;
}
void ParameterOutput::end()
{
if (_column!=0) _fw << std::endl;
_fw.moveOut();
_fw.indent() << "}"<<std::endl;
_column = 0;
}