STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Samples

Introduction

For the 1.7.1 release of the STLSoft libraries, there are seven sample programs provided:

ccvui

This Win32 GUI program, written by Greg Peet, enumerates the Component Categories on your system. and displays the classes that implement each category. It uses COMSTL's enum_simple_sequence class, along with various WinSTL components.

hardlink

This Win32 console (command-line) program creates hard links for files on Windows 2000/XP/2003 machines.

You can link files according to the usage:

  hardlink <src-spec> <link-dest>

where

  <src-spec> is a file, or wildcards (e.g. *.h)

and

  <link-dest> is a file, or directory

lnunique

This Win32 console (command-line) program filters out unique lines from input.

You can link files according to the usage

  lnunique [-c] [] [<output>]

where

   is the file to read from; if not specified it reads from stdin

  <output> is the file to write to; if not specified it writes to stdout

  -c displays the number of occurrences of each line

pathchk

This Win32 console (command-line) program simply examines the PATH environment variable and reports on any path components that do not exist.

rdempty

This Win32 console (command-line) program simply removes any empty directories a given named directory.

whereis

This Win32 console (command-line) program is an enhancement for this well-known utility.

It searches for a file, or a number of files matching a given search sequence, in one or more directories, and the subdirectories.

Its usage is:

  whereis {flags} [root-dir] <search-spec>

(For a full listing of the arguments and their meanings, type whereis at the prompt.)

Search-spec:

You can specify one or more filenames, or wild-card specifications. Each should be delimited by a semi-colon. So to search for the filename myfile.txt, you would type:

  whereis myfile.txt

To select all text files you would type:

  whereis *.txt

To select all text files, and any .doc files beginning with X, you would type:

  whereis *.txt;X*.doc

Directories:

1. No directory specified.

If no directory is specified, then the current directory is assumed to be the root of the search. Hence, the following two commands are the same:

  whereis . *.*

  whereis *.*

and the search is for all files in the current directory and its subdirectories.

2. Searching in a given set of paths

You can specify one or more root directories for the search path by specifying a semi-colon delimited set of directories, optionally prefixed by the -r argument, as in:

  whereis -rc:\winnt;d:\winxp *.exe

or

  whereis c:\winnt;d:\winxp *.exe

3. Searching in the system paths

If you specify the -p command-line argument, then the search is conducted in the contents of the system paths, ie. the components of the PATH environment variable. Hence, the following command will search for all executable programs and command/batch scripts on the system:

  whereis -p *.exe;*.com;*.bat;*.cmd

Note that only the system path directories are searched, not their sub-directories, as in

4. Searching in "special" locations.

In the same way that a search can operate within the PATH system environment variable, other "special" locations can also be searched. C and C++ developers will find the -i and -l arguments useful, as they search within the INCLUDE and LIB variable paths. Other types are supported by the -e argument which is affixed with the name of the semi-colon delimited environment variable in which to search. Hence the following two commands are equivalent, and both search for STLSoft files in the INCLUDE path

  whereis -i stlsoft*.h;atlstl*.h;comstl*.h;unixstl*.h;winstl*.h

  whereis -eINCLUDE stlsoft*.h;atlstl*.h;comstl*.h;unixstl*.h;winstl*.h

iwhereis

This Win32 console (command-line) program performs similar file-searches as the whereis utility, but for Internet FTP sites


STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004