Back to index

salome-med  6.5.0
Public Member Functions | Protected Attributes
MEDMEM::COORDINATEClient Class Reference

#include <COORDINATEClient.hxx>

List of all members.

Public Member Functions

 COORDINATEClient (const SALOME_MED::MESH_ptr m, MED_EN::medModeSwitch Mode)
 COORDINATEClient constructor.
void blankCopy ()
 COORDINATEClient::blankCopy()
void fillCopy ()
 COORDINATEClient::fillCopy()
virtual ~COORDINATEClient ()
virtual const double * getCoordinates (MED_EN::medModeSwitch Mode)
 Retourne les coordonnées
virtual double getCoordinate (int Number, int Axis)
 Retourne une coordonnée
virtual const double * getCoordinateAxis (int Axis)
 Retourne un axe.
virtual const int * getNodesNumbers () const
 Retourne le nombre de noeuds.

Protected Attributes

bool _complete
SALOME_MED::MESH_var IOR_Mesh

Detailed Description

Definition at line 31 of file COORDINATEClient.hxx.


Constructor & Destructor Documentation

COORDINATEClient::COORDINATEClient ( const SALOME_MED::MESH_ptr  m,
MED_EN::medModeSwitch  Mode 
)

COORDINATEClient constructor.

Constructeur.

Build an "empty" coordinate object (without the actual coordinate values). The object hold a Corba IOR and get data from it on user demand.

Parameters in : m (Mesh Corba IOR) mode (FULL_ or NO_ interlace)

Definition at line 39 of file COORDINATEClient.cxx.

                                                       :
  COORDINATE(m->getSpaceDimension(), 1, Mode),
  _complete(false),
  IOR_Mesh(SALOME_MED::MESH::_duplicate(m))
{
  blankCopy();
}

Here is the call graph for this function:

virtual MEDMEM::COORDINATEClient::~COORDINATEClient ( ) [inline, virtual]

Definition at line 73 of file COORDINATEClient.hxx.

{};

Member Function Documentation

COORDINATEClient::blankCopy()

Remplit les informations générales.

"(Re)Blank" the coordinate object.

Update fixed sized data from the Corba IOR (dimensions, strings). Get rid of variable sized data (coordinate values). Next call of getCoordinates (for instance) will update the object.

Definition at line 52 of file COORDINATEClient.cxx.

{
  std::string *tA;
  long nA;
  SALOME_MED::GMESH::coordinateInfos_var all;
  try
  {
        all = IOR_Mesh->getCoordGlobal();
  }
  catch (const exception & ex)
  {
        MESSAGE("Unable to acces Global information");
        THROW_SALOME_CORBA_EXCEPTION(ex.what() ,SALOME::INTERNAL_ERROR);
  }

  //convertCorbaArray(tA, nA, IOR_Mesh->getCoordinatesNames());
  convertCorbaArray(tA, nA, &all->coordNames);
  ASSERT(nA == getSpaceDimension());
  setCoordinatesNames(tA);
  delete [] tA;

  //convertCorbaArray(tA, nA, IOR_Mesh->getCoordinatesUnits());
  convertCorbaArray(tA, nA, &all->coordUnits);
  ASSERT(nA == getSpaceDimension());
  setCoordinatesUnits(tA);
  delete [] tA;


  setCoordinatesSystem( all->coordSystem.in());

  _complete = false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

COORDINATEClient::fillCopy()

Remplit les coordonnées

(Re)fill the coordinate object from the Corba IOR

Definition at line 90 of file COORDINATEClient.cxx.

{
  //PN ?? Est-ce qu on peut pas mettre une variable dans COORDINATEClient
  // qu on remplirait dans blankCopy ??
  long nN = IOR_Mesh->getNumberOfNodes();
  double *tC;
  long nC;

  SALOME::SenderDouble_var senderForCoords=IOR_Mesh->getSenderForCoordinates(MED_FULL_INTERLACE);
  tC=ReceiverFactory::getValue(senderForCoords,nC);

  ASSERT(nC == (getSpaceDimension() * nN));

  MEDARRAY<double> mC(tC, getSpaceDimension(), nN,MED_FULL_INTERLACE,true);
  setCoordinates(&mC,true);

  _complete = true;
}

Here is the caller graph for this function:

double COORDINATEClient::getCoordinate ( int  Number,
int  Axis 
) [virtual]

Retourne une coordonnée

Definition at line 128 of file COORDINATEClient.cxx.

{
  if (!_complete) fillCopy();
  double d = COORDINATE::getCoordinate(Number, Axis);

  return d;
}

Here is the call graph for this function:

const double * COORDINATEClient::getCoordinateAxis ( int  Axis) [virtual]

Retourne un axe.

Definition at line 140 of file COORDINATEClient.cxx.

{
  if (!_complete) fillCopy();
  const double *c = COORDINATE::getCoordinateAxis(Axis);

  return c;
}

Here is the call graph for this function:

const double * COORDINATEClient::getCoordinates ( MED_EN::medModeSwitch  Mode) [virtual]

Retourne les coordonnées

Definition at line 115 of file COORDINATEClient.cxx.

{
  if (!_complete) fillCopy();
  const double * c = COORDINATE::getCoordinates(Mode);

  return c;
}

Here is the call graph for this function:

const int * COORDINATEClient::getNodesNumbers ( ) const [virtual]

Retourne le nombre de noeuds.

Definition at line 152 of file COORDINATEClient.cxx.

{
  if (!_complete) (const_cast < COORDINATEClient * >(this))->fillCopy();

  MESSAGE("NON IMPLEMENTE DANS L'API CORBA");

  return NULL;
}

Member Data Documentation

bool MEDMEM::COORDINATEClient::_complete [mutable, protected]

Definition at line 35 of file COORDINATEClient.hxx.

SALOME_MED::MESH_var MEDMEM::COORDINATEClient::IOR_Mesh [protected]

Definition at line 36 of file COORDINATEClient.hxx.


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