PSCF v1.1
Public Member Functions | List of all members
Util::OptionalLabel Class Reference

An optional Label string in a file format. More...

#include <OptionalLabel.h>

Inheritance diagram for Util::OptionalLabel:
Util::Label

Public Member Functions

 OptionalLabel ()
 Default constructor. More...
 
 OptionalLabel (std::string string)
 Constructor. More...
 
 OptionalLabel (const char *string)
 Constructor. More...
 
 OptionalLabel (const OptionalLabel &other)
 Copy constructor. More...
 
virtual ~OptionalLabel ()
 Destructor. More...
 
- Public Member Functions inherited from Util::Label
 Label (bool isRequired=true)
 Constructor. More...
 
 Label (std::string string, bool isRequired=true)
 Constructor. More...
 
 Label (const char *string, bool isRequired=true)
 Constructor. More...
 
 Label (const Label &other)
 Copy constructor. More...
 
virtual ~Label ()
 Destructor. More...
 
void setString (std::string string)
 Set the label string. More...
 
void setIsRequired (bool isRequired)
 Set the isRequired boolean flag. More...
 
bool match (std::istream &in)
 Read and attempt to match next word in an input stream. More...
 
std::string string () const
 Return label string. More...
 
bool isRequired () const
 Is this the label for a required component? More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Util::Label
static void read (std::istream &in)
 Read a string without checking its value. More...
 
static void clear ()
 Clear the input buffer. More...
 
static void setIsMatched (bool isMatched)
 Explicitly set the isMatched flag. More...
 
static std::string buffer ()
 Get the string that is currently in the input buffer. More...
 
static bool isClear ()
 Is the input buffer clear? More...
 
static bool isMatched ()
 Did the most recent attempt to match a Label succeed? More...
 
- Static Public Attributes inherited from Util::Label
static const int LabelWidth = 20
 Width of label field in file output format. More...
 

Detailed Description

An optional Label string in a file format.

A subclass of Label that is always optional.

Definition at line 23 of file OptionalLabel.h.

Constructor & Destructor Documentation

◆ OptionalLabel() [1/4]

Util::OptionalLabel::OptionalLabel ( )

Default constructor.

Definition at line 16 of file OptionalLabel.cpp.

◆ OptionalLabel() [2/4]

Util::OptionalLabel::OptionalLabel ( std::string  string)
explicit

Constructor.

Parameters
stringlabel string that precedes value in file format

Definition at line 23 of file OptionalLabel.cpp.

◆ OptionalLabel() [3/4]

Util::OptionalLabel::OptionalLabel ( const char *  string)
explicit

Constructor.

Parameters
stringlabel string that precedes value in file format

Definition at line 30 of file OptionalLabel.cpp.

◆ OptionalLabel() [4/4]

Util::OptionalLabel::OptionalLabel ( const OptionalLabel other)

Copy constructor.

Parameters
otherOptionalLabel being cloned.

Definition at line 37 of file OptionalLabel.cpp.

◆ ~OptionalLabel()

Util::OptionalLabel::~OptionalLabel ( )
virtual

Destructor.

Definition at line 44 of file OptionalLabel.cpp.


The documentation for this class was generated from the following files: