AppUtil.h

Classes

AppUtil -- AppUtil: Utilities used by the CLI parameter-setting shell (full description)

class AppUtil

Interface

Public Members
AppUtil()
~AppUtil()
AppUtil (const GlishRecord& meta)
AppUtil (const AppUtil& other)
AppUtil& operator= (const AppUtil& other)
Vector <String> format (const String& method, const GlishRecord& parms, const Int& width, const Int& gap) const
String readcmd() const
Vector<String> parse (const GlishRecord& parms, const String& cmd) const
Private Members
Vector <String> tabulate (const String& line, const Int& colWidth) const
inline void fillBuf (Char* buffer, const Int& nlen) const
void pushCmd (Vector <String>& cmdStack, const String& newCmd) const
inline Bool validVarNameChar (const Char& inchar) const

Description

Prerequisite

Etymology

From the phrase "Application Utilities".

Synopsis

This module contains utilities used by the command-line interpreter parameter-setting shell (app.g), that are most appropriately implemented in C++. These primarily include utilities for reading input commands, parsing and translating input command strings into standard Glish, and formatting meta information and current parameter values for display.

Example


 

Motivation

The C++ utilities required by app.g are best collected in one associated class.

To Do

Member Description

AppUtil()

Default constructor, and destructor

~AppUtil()

AppUtil (const GlishRecord& meta)

Construct from an instance of the tasking meta-information

AppUtil (const AppUtil& other)

Copy constructor and assignment operator

AppUtil& operator= (const AppUtil& other)

Vector <String> format (const String& method, const GlishRecord& parms, const Int& width, const Int& gap) const

Format for display

String readcmd() const

Read command string

Vector<String> parse (const GlishRecord& parms, const String& cmd) const

Parse/translate command string into standard Glish

Vector <String> tabulate (const String& line, const Int& colWidth) const

Function to format a string for display in a multi-line column

inline void fillBuf (Char* buffer, const Int& nlen) const

Utility to initialize a buffer

void pushCmd (Vector <String>& cmdStack, const String& newCmd) const

Utility to add elements to a command list

inline Bool validVarNameChar (const Char& inchar) const

Utility to check for valid Glish variable name characters