Version: 8.3.0
TypeCode.cxx File Reference
#include "TypeCode.hxx"
#include <sstream>
#include <iostream>
#include <cstring>
#include "YacsTrace.hxx"
Include dependency graph for TypeCode.cxx:

Go to the source code of this file.

Functions

static int validChar0 (char c)
 
static int validNextChar (char c)
 
static void checkValidName (const char *name)
 

Function Documentation

static void checkValidName ( const char *  name)
static

Definition at line 192 of file TypeCode.cxx.

References validChar0(), and validNextChar().

Referenced by YACS::ENGINE::TypeCode::interfaceTc().

193 {
194  int ok = 1;
195  if (*name)
196  {
197  if (!validChar0(*name++)) ok = 0;
198  for(; ok && *name; name++) if (!validNextChar(*name)) ok = 0;
199  }
200  if (!ok)throw YACS::Exception("Invalid Name");
201 }
static int validChar0 ( char  c)
inlinestatic

Definition at line 181 of file TypeCode.cxx.

Referenced by checkValidName().

182 {
183  return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
184 }
static int validNextChar ( char  c)
inlinestatic

Definition at line 186 of file TypeCode.cxx.

Referenced by checkValidName().

187 {
188  return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
189  (c >= '0' && c <= '9') || (c == '_') || (c == '/'));
190 }