Commit 7d429457 authored by whitlocb's avatar whitlocb
Browse files

I changed some example code for plugin development.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11567 18c085ea-50e0-402c-830e-de6fd14e8384
parent 25f79a0a
......@@ -44,17 +44,38 @@
avtXXXXFileFormat::avtXXXXFileFormat(const char *filename)
: avtSTSDFileFormat(filename)
{
bool fileOpened = false;
initialized = false;
}
// Open the file specified by the filename argument here using
// your file format API and set fileOpened accordingly.
YOU MUST IMPLEMENT THIS
// Override this method in your reader
void
avtXXXXFileFormat::ActivateTimestep()
{
Initialize();
}
// If your file format API could not open the file then throw
// an exception.
if (!fileOpened)
// Provide this method in your reader
void
avtXXXXFileFormat::Initialize())
{
if(!initialized)
{
EXCEPTION1(InvalidDBTypeException,
"The file could not be opened");
bool okay = false;
// Open the file specified by the filename argument here using
// your file format API. See if the file has the right things in it.
// If so, set okay to true.
YOU MUST IMPLEMENT THIS
// If your file format API could not open the file then throw
// an exception.
if (!okay)
{
EXCEPTION1(InvalidDBTypeException,
"The file could not be opened");
}
initialized = true;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment