Replaced tabs with spaces.

This commit is contained in:
Robert Osfield
2005-11-17 15:03:51 +00:00
parent 0e16b64665
commit d3541b96ed
116 changed files with 6866 additions and 6855 deletions

View File

@@ -1,15 +1,15 @@
/**********************************************************************
*
* FILE: Viewport.cpp
* FILE: Viewport.cpp
*
* DESCRIPTION: Read/Write osg::Viewport in binary format to disk.
* DESCRIPTION: Read/Write osg::Viewport in binary format to disk.
*
* CREATED BY: Auto generated by iveGenerated
* and later modified by Rune Schmidt Jensen.
* CREATED BY: Auto generated by iveGenerated
* and later modified by Rune Schmidt Jensen.
*
* HISTORY: Created 21.3.2003
* HISTORY: Created 21.3.2003
*
* Copyright 2003 VR-C
* Copyright 2003 VR-C
**********************************************************************/
#include "Exception.h"
@@ -19,45 +19,45 @@
using namespace ive;
void Viewport::write(DataOutputStream* out){
// Write Viewport's identification.
out->writeInt(IVEVIEWPORT);
// If the osg class is inherited by any other class we should also write this to file.
osg::Object* obj = dynamic_cast<osg::Object*>(this);
if(obj){
((ive::Object*)(obj))->write(out);
}
else
throw Exception("Viewport::write(): Could not cast this osg::Viewport to an osg::Object.");
// Write Viewport's properties.
// Write Viewport's identification.
out->writeInt(IVEVIEWPORT);
// If the osg class is inherited by any other class we should also write this to file.
osg::Object* obj = dynamic_cast<osg::Object*>(this);
if(obj){
((ive::Object*)(obj))->write(out);
}
else
throw Exception("Viewport::write(): Could not cast this osg::Viewport to an osg::Object.");
// Write Viewport's properties.
out->writeInt(x());
out->writeInt(y());
out->writeInt(width());
out->writeInt(height());
out->writeInt(x());
out->writeInt(y());
out->writeInt(width());
out->writeInt(height());
}
void Viewport::read(DataInputStream* in){
// Peek on Viewport's identification.
int id = in->peekInt();
if(id == IVEVIEWPORT){
// Read Viewport's identification.
id = in->readInt();
// If the osg class is inherited by any other class we should also read this from file.
osg::Object* obj = dynamic_cast<osg::Object*>(this);
if(obj){
((ive::Object*)(obj))->read(in);
}
else
throw Exception("Viewport::read(): Could not cast this osg::Viewport to an osg::Object.");
// Peek on Viewport's identification.
int id = in->peekInt();
if(id == IVEVIEWPORT){
// Read Viewport's identification.
id = in->readInt();
// If the osg class is inherited by any other class we should also read this from file.
osg::Object* obj = dynamic_cast<osg::Object*>(this);
if(obj){
((ive::Object*)(obj))->read(in);
}
else
throw Exception("Viewport::read(): Could not cast this osg::Viewport to an osg::Object.");
// Read Viewport's properties
x() = (GLenum)in->readInt();
y() = (GLenum)in->readInt();
width() = (GLenum)in->readInt();
height() = (GLenum)in->readInt();
// Read Viewport's properties
x() = (GLenum)in->readInt();
y() = (GLenum)in->readInt();
width() = (GLenum)in->readInt();
height() = (GLenum)in->readInt();
}
else{
throw Exception("Viewport::read(): Expected Viewport identification.");
}
}
else{
throw Exception("Viewport::read(): Expected Viewport identification.");
}
}