Back to index

salome-med  6.5.0
MEDMEM_PorflowMeshDriver.cxx File Reference
#include "MEDMEM_PorflowMeshDriver.hxx"
#include "MEDMEM_DriversDef.hxx"
#include "MEDMEM_DriverTools.hxx"
#include "MEDMEM_Family.hxx"
#include "MEDMEM_Group.hxx"
#include "MEDMEM_Coordinate.hxx"
#include "MEDMEM_Connectivity.hxx"
#include "MEDMEM_Mesh.hxx"
#include "MEDMEM_CellModel.hxx"
#include "MEDMEM_define.hxx"
#include <string.h>
#include <ctype.h>
#include <iostream>
#include <sstream>
#include <iomanip>

Go to the source code of this file.


static bool isKeyWord (const string &line, const char *key)
static void locateFileName (const string &line, string::size_type &pos1, string::size_type &pos2)
static string getPorflowFileName (const string &line, const char *context)
static medGeometryElement get2DMedGeomType (int nbSommets)

Function Documentation

static medGeometryElement get2DMedGeomType ( int  nbSommets) [inline, static]

Definition at line 229 of file MEDMEM_PorflowMeshDriver.cxx.

    switch (nbSommets)
        case 2:
            return MED_SEG2;
        case 3:
            return MED_TRIA3;
        case 4:
            return MED_QUAD4;
    return MED_NONE;
static string getPorflowFileName ( const string &  line,
const char *  context 
) [inline, static]

Definition at line 247 of file MEDMEM_PorflowMeshDriver.cxx.

    string::size_type pos1=string::npos;
    string::size_type pos2=string::npos;

    locateFileName(line, pos1, pos2);

    // if we found a not empty filename
    if (pos1 != string::npos && pos2 != string::npos && pos2>pos1+1)
        return string(line,pos1+1,pos2-pos1-1);

    // else, we throw an exception
    string diagnosis("PORFLOW_MESH_RDONLY_DRIVER::read() : Error after reading keyword ");
    diagnosis+="\nNo filename was found enclosed in single or double quotes\n";
    throw MEDEXCEPTION(diagnosis.c_str());

Here is the call graph for this function:

static bool isKeyWord ( const string &  line,
const char *  key 
) [inline, static]

Definition at line 194 of file MEDMEM_PorflowMeshDriver.cxx.

    const int SIZE_KEY=4;
    const char * pt=line.c_str();
    while( isspace(*pt) ) // get rid of leading blanks
    return !strncmp(pt,key,SIZE_KEY);
static void locateFileName ( const string &  line,
string::size_type &  pos1,
string::size_type &  pos2 
) [inline, static]

Definition at line 203 of file MEDMEM_PorflowMeshDriver.cxx.

    pos1 = line.find('"',0);
    if ( pos1 != string::npos ) // if we found "
        pos2=line.find('"',pos1+1); // search a second "
    else // we didn't succeed with double quotes, so we try single quotes
        pos1 = line.find('\'',0);
        if ( pos1 != string::npos ) // if we found '
            pos2=line.find('\'',pos1+1); // search a second '

Here is the caller graph for this function: