Version: 6.3.1
Functions

src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx File Reference

#include "StdMeshersGUI_DistrPreview.h"
#include <qwt_plot_curve.h>
#include <qwt_plot_marker.h>
#include <qwt_plot_grid.h>
#include <qwt_symbol.h>
#include <qwt_legend.h>
#include <Expr_NamedUnknown.hxx>
#include <Expr_GeneralExpression.hxx>
#include <Standard_Failure.hxx>
#include <math.h>
#include <limits>
#include <Basics_Utils.hxx>
Include dependency graph for StdMeshersGUI_DistrPreview.cxx:

Go to the source code of this file.

Functions

bool isCorrectArg (const Handle(Expr_GeneralExpression)&expr)

Function Documentation

bool isCorrectArg ( const Handle(Expr_GeneralExpression)&  expr)

Definition at line 349 of file StdMeshersGUI_DistrPreview.cxx.

References SMESH.DownCast(), Handle(), isCorrectArg(), ex21_lamp.name, and SMESH_AdvancedEditor.res.

{
  Handle( Expr_NamedUnknown ) sub = Handle( Expr_NamedUnknown )::DownCast( expr );
  if( !sub.IsNull() )
    return sub->GetName()=="t";

  bool res = true;
  for( int i=1, n=expr->NbSubExpressions(); i<=n && res; i++ )
  {
    Handle( Expr_GeneralExpression ) sub = expr->SubExpression( i );
    Handle( Expr_NamedUnknown ) name = Handle( Expr_NamedUnknown )::DownCast( sub );
    if( !name.IsNull() )
    {
      if( name->GetName()!="t" )
        res = false;
    }
    else
      res = isCorrectArg( sub );
  }
  return res;
}
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS