From f347703370c979d8a89c0c81730c3d5ab95ed8e2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 24 Oct 2004 14:31:18 +0000 Subject: [PATCH] fixes to tabs --- src/osgPlugins/ive/DrawArrayLengths.cpp | 92 ++++++++++++------------- src/osgPlugins/ive/DrawArrays.cpp | 74 ++++++++++---------- 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/src/osgPlugins/ive/DrawArrayLengths.cpp b/src/osgPlugins/ive/DrawArrayLengths.cpp index 38df2d2e4..cdbde3dcf 100644 --- a/src/osgPlugins/ive/DrawArrayLengths.cpp +++ b/src/osgPlugins/ive/DrawArrayLengths.cpp @@ -1,15 +1,15 @@ /********************************************************************** * - * FILE: DrawArrayLengths.cpp + * FILE: DrawArrayLengths.cpp * - * DESCRIPTION: Read/Write osg::DrawArrayLengths in binary format to disk. + * DESCRIPTION: Read/Write osg::DrawArrayLengths 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 20.3.2003 + * HISTORY: Created 20.3.2003 * - * Copyright 2003 VR-C + * Copyright 2003 VR-C **********************************************************************/ #include "Exception.h" @@ -19,52 +19,52 @@ using namespace ive; void DrawArrayLengths::write(DataOutputStream* out){ - // Write DrawArrayLengths's identification. - out->writeInt(IVEDRAWARRAYLENGTHS); - // If the osg class is inherited by any other class we should also write this to file. - osg::PrimitiveSet* prim = dynamic_cast(this); - if(prim){ - ((ive::PrimitiveSet*)(prim))->write(out); - } - else - throw Exception("DrawArrayLengths::write(): Could not cast this osg::DrawArrayLengths to an osg::PrimitiveSet."); + // Write DrawArrayLengths's identification. + out->writeInt(IVEDRAWARRAYLENGTHS); + // If the osg class is inherited by any other class we should also write this to file. + osg::PrimitiveSet* prim = dynamic_cast(this); + if(prim){ + ((ive::PrimitiveSet*)(prim))->write(out); + } + else + throw Exception("DrawArrayLengths::write(): Could not cast this osg::DrawArrayLengths to an osg::PrimitiveSet."); - // Write DrawArrayLengths's properties. - out->writeInt(getFirst()); + // Write DrawArrayLengths's properties. + out->writeInt(getFirst()); - // Write array length and its elements. - out->writeInt(size()); - for(unsigned int i=0; iwriteInt(((osg::VectorSizei)(*this))[i]); - } + // Write array length and its elements. + out->writeInt(size()); + for(unsigned int i=0; iwriteInt(((osg::VectorSizei)(*this))[i]); + } } void DrawArrayLengths::read(DataInputStream* in){ - // Read DrawArrayLengths's identification. - int id = in->peekInt(); - if(id == IVEDRAWARRAYLENGTHS){ - // Code to read DrawArrayLengths's properties. - id = in->readInt(); - // If the osg class is inherited by any other class we should also read this from file. - osg::PrimitiveSet* prim = dynamic_cast(this); - if(prim){ - ((ive::PrimitiveSet*)(prim))->read(in); - } - else - throw Exception("DrawArrayLengths::read(): Could not cast this osg::DrawArrayLengths to an osg::PrimtiveSet."); + // Read DrawArrayLengths's identification. + int id = in->peekInt(); + if(id == IVEDRAWARRAYLENGTHS){ + // Code to read DrawArrayLengths's properties. + id = in->readInt(); + // If the osg class is inherited by any other class we should also read this from file. + osg::PrimitiveSet* prim = dynamic_cast(this); + if(prim){ + ((ive::PrimitiveSet*)(prim))->read(in); + } + else + throw Exception("DrawArrayLengths::read(): Could not cast this osg::DrawArrayLengths to an osg::PrimtiveSet."); - // Read properties - setFirst(in->readInt()); - - // Read array length and its elements. - int size = in->readInt(); - for(int i=0; ireadInt()); - } + // Read properties + setFirst(in->readInt()); + + // Read array length and its elements. + int size = in->readInt(); + for(int i=0; ireadInt()); + } - } - else{ - throw Exception("DrawArrayLengths::read(): Expected DrawArrayLengths identification."); - } + } + else{ + throw Exception("DrawArrayLengths::read(): Expected DrawArrayLengths identification."); + } } diff --git a/src/osgPlugins/ive/DrawArrays.cpp b/src/osgPlugins/ive/DrawArrays.cpp index 3e97f55f8..be22a59bb 100644 --- a/src/osgPlugins/ive/DrawArrays.cpp +++ b/src/osgPlugins/ive/DrawArrays.cpp @@ -1,15 +1,15 @@ /********************************************************************** * - * FILE: DrawArrays.cpp + * FILE: DrawArrays.cpp * - * DESCRIPTION: Read/Write osg::DrawArrays in binary format to disk. + * DESCRIPTION: Read/Write osg::DrawArrays 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 18.3.2003 + * HISTORY: Created 18.3.2003 * - * Copyright 2003 VR-C + * Copyright 2003 VR-C **********************************************************************/ #include "Exception.h" @@ -19,42 +19,42 @@ using namespace ive; void DrawArrays::write(DataOutputStream* out){ - // Write DrawArrays's identification. - out->writeInt(IVEDRAWARRAYS); - // If the osg class is inherited by any other class we should also write this to file. - osg::PrimitiveSet* prim = dynamic_cast(this); - if(prim){ - ((ive::PrimitiveSet*)(prim))->write(out); - } - else - throw Exception("DrawArrays::write(): Could not cast this osg::DrawArrays to an osg::PrimitiveSet."); + // Write DrawArrays's identification. + out->writeInt(IVEDRAWARRAYS); + // If the osg class is inherited by any other class we should also write this to file. + osg::PrimitiveSet* prim = dynamic_cast(this); + if(prim){ + ((ive::PrimitiveSet*)(prim))->write(out); + } + else + throw Exception("DrawArrays::write(): Could not cast this osg::DrawArrays to an osg::PrimitiveSet."); - // Write DrawArrays's properties. - out->writeInt(getFirst()); - out->writeInt(getCount()); + // Write DrawArrays's properties. + out->writeInt(getFirst()); + out->writeInt(getCount()); } void DrawArrays::read(DataInputStream* in){ - // Read DrawArrays's identification. - int id = in->peekInt(); - if(id == IVEDRAWARRAYS){ - // Code to read DrawArrays's properties. - id = in->readInt(); - // If the osg class is inherited by any other class we should also read this from file. - osg::PrimitiveSet* prim = dynamic_cast(this); - if(prim){ - ((ive::PrimitiveSet*)(prim))->read(in); - } - else - throw Exception("DrawArrays::read(): Could not cast this osg::DrawArrays to an osg::PrimitiveSet."); + // Read DrawArrays's identification. + int id = in->peekInt(); + if(id == IVEDRAWARRAYS){ + // Code to read DrawArrays's properties. + id = in->readInt(); + // If the osg class is inherited by any other class we should also read this from file. + osg::PrimitiveSet* prim = dynamic_cast(this); + if(prim){ + ((ive::PrimitiveSet*)(prim))->read(in); + } + else + throw Exception("DrawArrays::read(): Could not cast this osg::DrawArrays to an osg::PrimitiveSet."); - // Read DrawArrays properties - setFirst(in->readInt()); - setCount(in->readInt()); - } - else{ - throw Exception("DrawArrays::read(): Expected DrawArrays identification."); - } + // Read DrawArrays properties + setFirst(in->readInt()); + setCount(in->readInt()); + } + else{ + throw Exception("DrawArrays::read(): Expected DrawArrays identification."); + } }