Back to index

salome-paravis  6.5.0
Public Member Functions | Protected Attributes
vtkGenerateStructElementCache Class Reference
Collaboration diagram for vtkGenerateStructElementCache:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 vtkGenerateStructElementCache (vtkMedStructElement *strelem, vtkUnstructuredGrid *ug)
bool HasParameter (const char *name)
double GetParameter1 (const char *name, vtkIdType id)

Protected Attributes

std::map< std::string,
vtkMedConstantAttribute * > 
cstAttribute
std::map< std::string,
vtkDataArray * > 
varAttribute

Detailed Description

Definition at line 34 of file vtkGenerateStructElement.cxx.


Constructor & Destructor Documentation

vtkGenerateStructElementCache::vtkGenerateStructElementCache ( vtkMedStructElement *  strelem,
vtkUnstructuredGrid *  ug 
) [inline]

Definition at line 37 of file vtkGenerateStructElement.cxx.

    {
    for(int attid = 0; attid < strelem->GetNumberOfConstantAttribute(); attid++)
      {
      vtkMedConstantAttribute* att = strelem->GetConstantAttribute(attid);
      this->cstAttribute[att->GetName()] = att;
      }

    for(int attid = 0; attid < strelem->GetNumberOfVariableAttribute(); attid++)
      {
      vtkMedVariableAttribute* att = strelem->GetVariableAttribute(attid);
      vtkDataArray* array = ug->GetFieldData()->GetArray(att->GetName());
      if(array != NULL)
        this->varAttribute[att->GetName()] = array;
      }
    }

Member Function Documentation

double vtkGenerateStructElementCache::GetParameter1 ( const char *  name,
vtkIdType  id 
) [inline]

Definition at line 60 of file vtkGenerateStructElement.cxx.

    {
    if(this->cstAttribute.find(name) != this->cstAttribute.end())
      {
      vtkMedConstantAttribute* att = this->cstAttribute[name];
      return att->GetValues()->GetVariantValue(0).ToDouble();
      }
    if(this->varAttribute.find(name) != this->varAttribute.end())
      {
      vtkDataArray* array = this->varAttribute[name];
      return array->GetTuple1(id);
      }
    return 0.0;
    }
bool vtkGenerateStructElementCache::HasParameter ( const char *  name) [inline]

Definition at line 54 of file vtkGenerateStructElement.cxx.

    {
    return this->cstAttribute.find(name) != this->cstAttribute.end()
        || this->varAttribute.find(name) != this->varAttribute.end();
    }

Member Data Documentation

std::map<std::string, vtkMedConstantAttribute*> vtkGenerateStructElementCache::cstAttribute [protected]

Definition at line 76 of file vtkGenerateStructElement.cxx.

std::map<std::string, vtkDataArray*> vtkGenerateStructElementCache::varAttribute [protected]

Definition at line 77 of file vtkGenerateStructElement.cxx.


The documentation for this class was generated from the following file: