Back to index

salome-med  6.5.0
Functions
MEDMEMTest_Family.cxx File Reference
#include "MEDMEMTest.hxx"
#include <cppunit/TestAssert.h>
#include "MEDMEM_define.hxx"
#include "MEDMEM_Family.hxx"
#include "MEDMEM_MedMeshDriver.hxx"
#include "MEDMEM_Mesh.hxx"
#include "MEDMEM_Support.hxx"
#include <sstream>
#include <cmath>

Go to the source code of this file.

Functions

static void check_support (const SUPPORT *theSupport, string theName, string theDescr, MED_EN::medEntityMesh theEntity, int theNbTypes)
 Check methods (24), defined in MEDMEM_Family.hxx: class FAMILY : virtual public SUPPORT { (+) FAMILY(); (+) FAMILY(MESH* Mesh, int Identifier, string Name, int NumberOfAttribute, int *AttributeIdentifier, int *AttributeValue, string AttributeDescription, int NumberOfGroup, string GroupName, int * MEDArrayNodeFamily, int ** MEDArrayCellFamily, int ** MEDArrayFaceFamily, int ** MEDArrayEdgeFamily); (+) FAMILY(const FAMILY & m); (+) FAMILY(const SUPPORT & s); (+) virtual ~FAMILY();.
static void check_famille (const FAMILY *theFamily, string theName, string theDescr, MED_EN::medEntityMesh theEntity, int theNbTypes, int theID, int theNbAttributes, int theNbGroups)

Function Documentation

static void check_famille ( const FAMILY *  theFamily,
string  theName,
string  theDescr,
MED_EN::medEntityMesh  theEntity,
int  theNbTypes,
int  theID,
int  theNbAttributes,
int  theNbGroups 
) [static]

Definition at line 103 of file MEDMEMTest_Family.cxx.

{
    check_support(theFamily, theName, theDescr, theEntity, theNbTypes);

    // identifier
    int id           = theFamily->getIdentifier();
    int nbAttributes = theFamily->getNumberOfAttributes();
    int nbGroups     = theFamily->getNumberOfGroups();

    CPPUNIT_ASSERT_EQUAL(theID, id);
    CPPUNIT_ASSERT_EQUAL(theNbAttributes, nbAttributes);
    CPPUNIT_ASSERT_EQUAL(theNbGroups, nbGroups);
}

Here is the call graph for this function:

static void check_support ( const SUPPORT *  theSupport,
string  theName,
string  theDescr,
MED_EN::medEntityMesh  theEntity,
int  theNbTypes 
) [static]

Check methods (24), defined in MEDMEM_Family.hxx: class FAMILY : virtual public SUPPORT { (+) FAMILY(); (+) FAMILY(MESH* Mesh, int Identifier, string Name, int NumberOfAttribute, int *AttributeIdentifier, int *AttributeValue, string AttributeDescription, int NumberOfGroup, string GroupName, int * MEDArrayNodeFamily, int ** MEDArrayCellFamily, int ** MEDArrayFaceFamily, int ** MEDArrayEdgeFamily); (+) FAMILY(const FAMILY & m); (+) FAMILY(const SUPPORT & s); (+) virtual ~FAMILY();.

     // Does not work (Segmentation Fault of Hang up)

(!) FAMILY & operator=(const FAMILY &fam);

(+) friend ostream & operator<<(ostream &os, FAMILY &my); (+) friend ostream & operator<<(ostream &os, const FAMILY &my);

(+) bool build(MED_EN::medEntityMesh Entity,int **FamilyNumber);

(+) inline void setIdentifier (int Identifier); (+) inline void setNumberOfAttributes (int NumberOfAttribute); (+) inline void setAttributesIdentifiers (int * AttributeIdentifier); (+) inline void setAttributesValues (int * AttributeValue); (+) inline void setAttributesDescriptions (string * AttributeDescription); (+) inline void setNumberOfGroups (int NumberOfGroups); (+) inline void setGroupsNames (string * GroupName);

(+) inline int getIdentifier() const; (+) inline int getNumberOfAttributes() const; (+) inline const int * getAttributesIdentifiers() const; (+) inline const int * getAttributesValues() const; (+) inline const string * getAttributesDescriptions() const; (+) inline int getNumberOfGroups() const; (+) inline const string * getGroupsNames() const;

(+) inline int getAttributeIdentifier(int i) const; (+) inline int getAttributeValue(int i) const; (+) inline string getAttributeDescription(int i) const; (+) inline string getGroupName(int i) const; }

Use code of MEDMEM/test_copie_family.cxx

Definition at line 89 of file MEDMEMTest_Family.cxx.

{
  string aName  = theSupport->getName();
  string aDescr = theSupport->getDescription();
  MED_EN::medEntityMesh anEntity = theSupport->getEntity();
  int aNbGeomTypes = theSupport->getNumberOfTypes();

  CPPUNIT_ASSERT_EQUAL(theName, aName);
  CPPUNIT_ASSERT_EQUAL(theDescr, aDescr);
  CPPUNIT_ASSERT_EQUAL(theEntity, anEntity);
  CPPUNIT_ASSERT_EQUAL(theNbTypes, aNbGeomTypes);
}

Here is the caller graph for this function: