| 1 |
// Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
// NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
// |
| 5 |
// See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
#include "adios/Ioad_IOFactory.h" |
| 8 |
#include "adios/Ioad_Initializer.h" |
| 9 |
|
| 10 |
namespace Ioad { |
| 11 |
int Initializer::useCount = 0; |
| 12 |
|
| 13 |
/** \brief Initialize the adios database parts of the Ioss library. |
| 14 |
* |
| 15 |
* Calls appropriate internal functions and methods to |
| 16 |
* initialize the adios database parts of the Ioss library. |
| 17 |
*/ |
| 18 |
Initializer::Initializer() |
| 19 |
{ |
| 20 |
if (useCount == 0) |
| 21 |
Ioad::IOFactory::factory(); |
| 22 |
useCount++; |
| 23 |
} |
| 24 |
|
| 25 |
Initializer::~Initializer() |
| 26 |
{ |
| 27 |
try { |
| 28 |
// Put code here that should run after sierra is finished |
| 29 |
// executing... |
| 30 |
useCount--; |
| 31 |
} |
| 32 |
catch (...) { |
| 33 |
} |
| 34 |
} |
| 35 |
} // namespace Ioad |