Version: 9.15.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

◆ checkValidName()

static void checkValidName ( const char *  name)
static

Definition at line 190 of file TypeCode.cxx.

191 {
192  int ok = 1;
193  if (*name)
194  {
195  if (!validChar0(*name++)) ok = 0;
196  for(; ok && *name; name++) if (!validNextChar(*name)) ok = 0;
197  }
198  if (!ok)throw YACS::Exception("Invalid Name");
199 }
static int validChar0(char c)
Definition: TypeCode.cxx:179
static int validNextChar(char c)
Definition: TypeCode.cxx:184

References validChar0(), and validNextChar().

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

◆ validChar0()

static int validChar0 ( char  c)
inlinestatic

Definition at line 179 of file TypeCode.cxx.

180 {
181  return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
182 }

References gui.CONNECTOR::c.

Referenced by checkValidName().

◆ validNextChar()

static int validNextChar ( char  c)
inlinestatic

Definition at line 184 of file TypeCode.cxx.

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

References gui.CONNECTOR::c.

Referenced by checkValidName().