MOAB: Mesh Oriented datABase  (version 5.2.1)
VtkWriter Class Reference
+ Inheritance diagram for VtkWriter:
+ Collaboration diagram for VtkWriter:

Public Member Functions

 VtkWriter (std::string base_name, Interface *interface)
ErrorCode visit (EntityHandle node, int depth, bool &descend)
 Visit a node in the tree during a traversal.
ErrorCode leaf (EntityHandle)
 Process a leaf node during tree traversal.

Private Attributes

std::string baseName
Interface * instance

Detailed Description

Definition at line 676 of file obb_test.cpp.


Constructor & Destructor Documentation

VtkWriter::VtkWriter ( std::string  base_name,
Interface *  interface 
) [inline]

Definition at line 679 of file obb_test.cpp.

: baseName( base_name ), instance( interface ) {}

Member Function Documentation

ErrorCode VtkWriter::leaf ( EntityHandle  node) [inline, virtual]

Process a leaf node during tree traversal.

Implements moab::OrientedBoxTreeTool::Op.

Definition at line 683 of file obb_test.cpp.

References MB_SUCCESS.

    {
        return MB_SUCCESS;
    }
ErrorCode VtkWriter::visit ( EntityHandle  node,
int  depth,
bool &  descend 
) [virtual]

Visit a node in the tree during a traversal.

This method is called for each node in the tree visited during a pre-order traversal.

Parameters:
nodeThe EntityHandle for the entity set for the tree node.
depthThe current depth in the tree.
descendOutput: if false, traversal will skip children of the current node, or if the current node is a leaf, the 'leaf' method will not be called.

Implements moab::OrientedBoxTreeTool::Op.

Definition at line 693 of file obb_test.cpp.

References MB_SUCCESS.

{
    descend = true;

    ErrorCode rval;
    int count;
    rval = instance->get_number_entities_by_handle( node, count );
    if( MB_SUCCESS != rval || 0 == count ) return rval;

    int id = instance->id_from_handle( node );
    char id_str[32];
    sprintf( id_str, "%d", id );

    std::string file_name( baseName );
    file_name += ".";
    file_name += id_str;
    file_name += ".vtk";

    return instance->write_mesh( file_name.c_str(), &node, 1 );
}

Member Data Documentation

std::string VtkWriter::baseName [private]

Definition at line 689 of file obb_test.cpp.

Interface* VtkWriter::instance [private]

Definition at line 690 of file obb_test.cpp.

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines