-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
readRecord4();
else if (recordNumber == 7 )
readRecord7();
+ else if (recordNumber == 8 )
+ readRecord8();
else if (recordNumber == 5 )
break; // stop reading
else
}
}
+//================================================================================
+/*!
+ * \brief Reads "ENREGISTREMENT DE TYPE 8"
+ */
+//================================================================================
+
+void SauvReader::readRecord8()
+{
+ // This record is useless (a constant table)
+ // => we skip it
+ int info;
+ int nbIntToSkip;
+ if ( !isASCII() )
+ {
+ getInt();
+ info = getInt();
+ int i = 0;
+ if (info == 3) {
+ // castem >= 18
+ // 1 more line
+ nbIntToSkip = 145;
+ }
+ else
+ nbIntToSkip = 141;
+
+ while (i <= nbIntToSkip) {
+ getInt();
+ i ++;
+ }
+ }
+}
+
//================================================================================
/*!
* \brief Reads the pile number, nb of objects and nb named of objects
int SauvReader::readPileNumber(int& nbNamedObjects, int& nbObjects)
{
- // FORMAT(' PILE NUMERO',I4,'NBRE ObjectS NOMMES',I8,'NBRE ObjectS',I8)
+ // FORMAT(' PILE NUMERO',I4,'NBRE OBJETS NOMMES',I8,'NBRE OBJETS',I8)
int pileNumber;
if ( !isASCII() )
{
{
char* line;
getNextLine(line);
- const char *s1 = " PILE NUMERO", *s2 = "NBRE ObjectS NOMMES", *s3 = "NBRE ObjectS";
+ const char *s1 = " PILE NUMERO", *s2 = "NBRE OBJETS NOMMES", *s3 = "NBRE OBJETS";
if ( ! GIBI_EQUAL( line, s1 ) )
THROW_IK_EXCEPTION("Could not read the pile number " << lineNb() );
line = line + strlen(s1);