Standard Library
TCommandLineInfo Class
This class is inherited from
CCommandLineInfo
and provides several additional public member functions and variables to
generalize command line parsing:
- TCommandLineInfo::TCommandLineInfo()
- This is the constructor. It initializes the data members. Note
that the command line is actually parsed by the
CWinApp::ParseCommandLine()
function. After the command line is parsed, the data members will be set
as described below.
-
int TCommandLineInfo::SetFlag(CString NewFlag)
- This member function adds a flag (command line switch) to the list of valid
flags. When the command line is parsed, the specified flags will be
compared against this list, and the data members will be set accordingly.
- CString TCommandLineInfo::BadFlag
- If the command line contains an invalid flag (command line switch), this
data member will contain that flag. It may be included in message box text
or an error message displayed to the user.
- int TCommandLineInfo::FlagCount
- This is the number of flags (command line switches) specified by calls to
the TCommandLineInfo::SetFlag() member function.
- CStringArray TCommandLineInfo::LineFlag
- This data member contains the values specified by the user for each of the
flags (command line switches) specified. The array index for each value
will correspond to the array index of the flag set by the call(s) to the
TCommandLineInfo::SetFlag() member function.
-
CStringArray TCommandLineInfo::LineParameter
- This data member contains the command line parameters that were not
specified as values to a flag (command line switch). They are in the order
specified by the user.
- int TCommandLineInfo::ParmCount
- This data member contains the number of parameters that were not
specified as values to a flag (command line switch). It is the number of
text strings stored in the TCommandLineInfo::LineParameter data member.
-
CByteArray TCommandLineInfo::SpecifiedFlag
- This data member contains a indication of whether or not the user specified
a value for each flag (command line switch). The array index for each
value will correspond to the array index of the flag set by the call(s) to the
TCommandLineInfo::SetFlag() member function. If the flag was
specified, the corresponding byte will be set to one (1); otherwise, the byte
will be zero (0).
- int TCommandLineInfo::TotalCount
- This data member contains the total number of stand-alone command line
parameters plus the number of values specified for flags (command line
switches). It is the sum of TCommandLineInfo::ParmCount and
TCommandLineInfo::ValidCount.
- BOOL TCommandLineInfo::Valid
- This data member indicates the presence of user errors on the command
line. If the user specified any flags (command line switches) that were
not set up with calls to TCommandLineInfo::SetFlag(), this
data member will be FALSE. If all the flags that were specified were set
up, this data member will be TRUE.
- int TCommandLineInfo::ValidCount
- This data member contains the number of parameters that were specified as
values to a flag (command line switch). It is the sum of all the bytes in
TCommandLineInfo::SpecifiedFlag.
- CStringArray TCommandLineInfo::ValidFlag
- This data member contains the valid flags (command line switches) set by
calls to the TCommandLineInfo::SetFlag() member function. It
may be set directly by the function using the instance, but that is not
recommended as the TCommandLineInfo::SetFlag() member function
maintains the correct values of the related data members, namely
TCommandLineInfo::FlagCount, TCommandLineInfo::LineFlag, and
TCommandLineInfo::SpecifiedFlag.
[ CBinaryFile
| CCommaFile
| CDataFile
| TDateCtrl
| CDDE
| CDdeClient
| CDdeServer
]
[ CDirectoryLocator
| CDirectoryDialog
| CDirectoryFind
| CDirectoryNew
| CFileCopy
| TFrameWnd
]
[ InterfaceExcel
| CMaintFn
| CPrintFile
| CProcDialog
| TPrintDialog
| CProcPropertyPage
]
[ CProgress
| CRegistry
| CSDisCreate
| CSDisFile
| CSDisPage
| CSDisView
| CTableFile
]
[ CTaskIcon
| TPresent
| TTime
| TDate
| TDateTime
| CTransferData
| TWinApp
| CXlTable
]
[ Stand-alone Programs
| Standard Library
| Conversion Functions
| Utility Functions
| COBOL Functions
]
[ Windows NT Library
| COBOL Library
| COBOL Interface
| Command Prompt Abbreviations
| Purchase Instructions
]
[ Home
| Areas of Expertise
| "We Do Windows"
| Clients and Projects
| Software Samples
| Package Software Available
]
[ Contact Information
| Business Software Philosophy
| Church Software Philosophy
]
All contents of this web site are Copyright © Titus Information Systems,
Inc., Phoenix, Arizona, U.S.A.