TextInterfaceName.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2009 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Util/units/TextInterfaceName.h
10
11#ifndef __TextInterfaceName_h
12#define __TextInterfaceName_h
13
14#include "Reference.h"
15
16namespace TextInterface {
17
19 class Name : public Reference::Able
20 {
21 public:
22
24 Name ();
25
27 bool operator () (char c) const { return valid(c); }
28
30 bool valid (char c) const;
31
33 bool invalid (char c) const { return ! valid (c); }
34
36 void reset ();
37
38 protected:
39 mutable unsigned count;
40 mutable bool in_range;
41 mutable bool in_precision;
42 };
43
44}
45
46#endif
Manages Reference::To references to the instance.
Definition ReferenceAble.h:35
bool invalid(char c) const
Return true if c is not the next character in a valid name.
Definition TextInterfaceName.h:33
bool valid(char c) const
Return true if c is the next character in a valid name.
Definition TextInterfaceName.C:22
bool operator()(char c) const
Operator interface.
Definition TextInterfaceName.h:27
void reset()
Reset to the start of the next variable name.
Definition TextInterfaceName.C:15
Name()
Default constructor.
Definition TextInterfaceName.C:10

Generated using doxygen 1.14.0