model_server/ui_viewer/src/view_creation.cxx
//boris: returns 1 and sets the rep_type to available value. Otherwise, return 0.
//       if   enforce_rep_type == 1  ,  than check only the specified rep_type (ignore the default)
//
returns 1 and sets the rep_type to available value. Otherwise, return 0.
if   enforce_rep_type == 1  ,  than check only the specified rep_type (ignore the default)
returns 1 and sets the rep_type to available value . Otherwise return 0 . if enforce_rep_type == 1 than check only the specified rep_type ( ignore the default )
static int check_view_rep_type (appType app_type, repType& rep_type, int enforce_rep_type)
{
    Initialize(check_view_rep_type);
    int res  = 0;
    repType def_type = default_rep_type(app_type);
    if(rep_type < 0)		
    {
	if(def_type >= 0)
	{
	    rep_type = def_type;
	    res = 1;
	}
    }
    else if(invalid_rep_type(app_type, rep_type))
    {
	if( !(enforce_rep_type  ||  def_type < 0) )
	{
	    rep_type = def_type;
	    res = 1;
	}
    } else
	res = 1;
    return res;
}
static int check_view_rep_type ( appType app_type , repType & rep_type , int enforce_rep_type ) { Initialize ( check_view_rep_type ) ; int res = 0 ; repType def_type = default_rep_type ( app_type ) ; if ( rep_type < 0 ) { if ( def_type >= 0 ) { rep_type = def_type ; res = 1 ; } } else if ( invalid_rep_type ( app_type , rep_type ) ) { if ( ! ( enforce_rep_type || def_type < 0 ) ) { rep_type = def_type ; res = 1 ; } } else res = 1 ; return res ; }
boris: returns 1 and sets the rep_type to available value.
boris : returns 1 and sets the rep_type to available value .
//default type for the app_type // Look for default rep-type.