moab
MBiMesh Class Reference

#include <MBiMesh.hpp>

List of all members.

Public Member Functions

 MBiMesh (moab::Interface *mbImpl=NULL)
virtual ~MBiMesh ()
bool have_deleted_ents (bool reset)
virtual ErrorCode delete_mesh ()
virtual ErrorCode delete_entities (const EntityHandle *, const int)
virtual ErrorCode delete_entities (const Range &)
void note_set_handle_tag (Tag)
void note_ent_handle_tag (Tag)
void note_tag_destroyed (Tag)
bool is_set_handle_tag (Tag) const
bool is_ent_handle_tag (Tag) const
int set_last_error (int, const char *)
int set_last_error (ErrorCode, const char *)

Public Attributes

iBase_AdjacencyCost AdjTable [16]
moab::InterfacembImpl
int lastErrorType
char lastErrorDescription [120]

Private Attributes

bool haveDeletedEntities
bool iCreatedInterface
std::vector< TagsetHandleTags
std::vector< TagentHandleTags

Detailed Description

Definition at line 14 of file MBiMesh.hpp.


Constructor & Destructor Documentation

MBiMesh::~MBiMesh ( ) [inline, virtual]

Definition at line 73 of file MBiMesh.hpp.

{
  if (iCreatedInterface) delete mbImpl;
}

Member Function Documentation

ErrorCode MBiMesh::delete_entities ( const EntityHandle a,
const int  n 
) [inline, virtual]

Definition at line 83 of file MBiMesh.hpp.

{
  if (n > 0)
    haveDeletedEntities = true;
  return mbImpl->delete_entities( a, n );
}
ErrorCode MBiMesh::delete_entities ( const Range r) [inline, virtual]

Definition at line 90 of file MBiMesh.hpp.

{
  if (!r.empty())
    haveDeletedEntities = true;
  return mbImpl->delete_entities( r );
}
ErrorCode MBiMesh::delete_mesh ( ) [inline, virtual]

Definition at line 78 of file MBiMesh.hpp.

                                      {
  haveDeletedEntities = true;
  return mbImpl->delete_mesh();
}
bool MBiMesh::have_deleted_ents ( bool  reset) [inline]

Definition at line 24 of file MBiMesh.hpp.

                                       {
    bool result = haveDeletedEntities;
    if (reset)
      haveDeletedEntities = false;
    return result;
  }
bool MBiMesh::is_ent_handle_tag ( Tag  t) const [inline]

Definition at line 136 of file MBiMesh.hpp.

{
  return std::binary_search( entHandleTags.begin(), entHandleTags.end(), t );
}
bool MBiMesh::is_set_handle_tag ( Tag  t) const [inline]

Definition at line 131 of file MBiMesh.hpp.

{
  return std::binary_search( setHandleTags.begin(), setHandleTags.end(), t );
}
void MBiMesh::note_ent_handle_tag ( Tag  t) [inline]

Definition at line 109 of file MBiMesh.hpp.

{
  std::vector<Tag>::iterator i;
  i = std::lower_bound( setHandleTags.begin(), setHandleTags.end(), t );
  if (i != setHandleTags.end() && *i == t)
    setHandleTags.erase(i);
  i = std::lower_bound( entHandleTags.begin(), entHandleTags.end(), t );
  if (i == entHandleTags.end() || *i != t)
    entHandleTags.insert( i, t );
}
void MBiMesh::note_set_handle_tag ( Tag  t) [inline]

Definition at line 98 of file MBiMesh.hpp.

{
  std::vector<Tag>::iterator i;
  i = std::lower_bound( entHandleTags.begin(), entHandleTags.end(), t );
  if (i != entHandleTags.end() && *i == t)
    entHandleTags.erase(i);
  i = std::lower_bound( setHandleTags.begin(), setHandleTags.end(), t );
  if (i == setHandleTags.end() || *i != t)
    setHandleTags.insert( i, t );
}
void MBiMesh::note_tag_destroyed ( Tag  t) [inline]

Definition at line 120 of file MBiMesh.hpp.

{
  std::vector<Tag>::iterator i;
  i = std::lower_bound( setHandleTags.begin(), setHandleTags.end(), t );
  if (i != setHandleTags.end() && *i == t)
    setHandleTags.erase(i);
  i = std::lower_bound( entHandleTags.begin(), entHandleTags.end(), t );
  if (i != entHandleTags.end() && *i == t)
    entHandleTags.erase(i);
}
int MBiMesh::set_last_error ( int  code,
const char *  msg 
) [inline]

Definition at line 141 of file MBiMesh.hpp.

{
  std::strncpy( lastErrorDescription, msg, sizeof(lastErrorDescription) );
  lastErrorDescription[sizeof(lastErrorDescription)-1] = '\0';
  return (lastErrorType = static_cast<iBase_ErrorType>(code));
}
int MBiMesh::set_last_error ( ErrorCode  code,
const char *  msg 
) [inline]

Definition at line 148 of file MBiMesh.hpp.

{
  std::string message(msg);
  message += "  (MOAB Error Code: ";
  message += mbImpl->get_error_string(code);
  message += ")";
  return set_last_error( iBase_ERROR_MAP[code], message.c_str() );
}

Member Data Documentation

Definition at line 34 of file MBiMesh.hpp.

std::vector<Tag> MBiMesh::entHandleTags [private]

Definition at line 19 of file MBiMesh.hpp.

Definition at line 17 of file MBiMesh.hpp.

Definition at line 18 of file MBiMesh.hpp.

Definition at line 37 of file MBiMesh.hpp.

Definition at line 36 of file MBiMesh.hpp.

Definition at line 35 of file MBiMesh.hpp.

std::vector<Tag> MBiMesh::setHandleTags [private]

Definition at line 19 of file MBiMesh.hpp.


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