zProfile
============================================================================

	Summary  Non-view class for handling Windows style INI profile files.

	Remarks  Unlike ProBoard, the Windows-style INI files support the
	         concept of domains. A domain allows you to group the variables
	         into logical units and permits duplicate variable names to
	         occur under different domains. You can also use to package
	         to access the flat ProBoard files by specifying 0 everywhere
	         a domain name is required. You can use the INI files to store
	         setting from one program run to another or to allow configuring
	         of the program by the users. This package does not enforce any
	         specific file extension (again, unlike ProBoard itself).

	Notes    The format of the domain string is "[Domain_Name]". The format
	         of a variable is "Variable = Value" (the blanks can be skipped).
	         The domain and variable names MUST start in column 1 of the
	         file.


	ZPROFILE::ZPROFILE
	------------------------------------------------------------------------

		Summary  Creates the INI profile object and attaches it to a file.

		Syntax   zProfile();
		         zProfile(const char *fileName, profile_mode m = nocreat);

		Remarks  The first constructor will simply initialize the profile
		         object, but will not attach it to a file. The second
		         version (the one that you will probably use) attaches the
		         object to the 'fileName'. The profile mode lets you
		         specify one of two modes: 'nocreat' or 'open'. The first
		         will NOT create the requested file if it does not exist,
		         the second will force creation (check with the ! operator).
		         When reading the INI files from a program (without actually
		         writing to them, you would use the 'nocreat' mode).

		Example  zProfile prof("PROFILE.INI", zProfile::nocreat);


	ZPROFILE::~ZPROFILE
	------------------------------------------------------------------------

		Summary  Closes all files and releases memory.

		Syntax   ~zProfile();

		Remarks  This destructor will automatically close any open files and
		         will release allocated memory. Not much to it, really.


	ZPROFILE::OPEN
	------------------------------------------------------------------------

		Summary  Opens a profile file.

		Syntax   void Open(const char *fileName, profile_mode m = nocreat);

		Remarks  This function should rarely be needed by the application.
		         It is only used if you decide to use the constructor which
		         does not specify the file name or if you wish to use a
		         different profile with the same object. This will take care
		         of closing the current file, so you don't really need to
		         call Close() to do it. You can use the ! operator to check
		         the result of the operation.

		Return   Nothing.

		See also zProfile::Close


	ZPROFILE::CLOSE
	------------------------------------------------------------------------

		Summary  Closes the current profile.

		Syntax   void Close();

		Remarks  This function is rarely needed by applications. You might
		         want to use it when shelling out so that the number of
		         open file handles is reduced. You will have to use Open()
		         after that. The destructor takes care of closing all files
		         so you won't need it if the object goes out of scope.

		Return   Nothing.

		See also zProfile::Open


	ZPROFILE::READ
	------------------------------------------------------------------------

		Summary  Reads a string or value from a profile.

		Syntax   char*   ReadString(char *domain, char *variable,
		                            char *value, char *defaultValue);
		         long    ReadLong(char *domain, char *variable,
		                          long *value, long defaultValue);
		         short   ReadShort(char *domain, char *variable,
		                           short *value, short defaultValue);
		         Boolean ReadBool(char *domain, char *variable,
		                          Boolean *value, Boolean defaultValue);

		Remarks  These routines all behave similarly and are for reading
		         variable values from the profile. You can choose to use
		         the domain name (without the bounding brackets) or you
		         can choose to use flat profiles, in which case you would
		         pass 0 for the domain name. The default value is what the
		         variable will be set to if not found in the file. The
		         boolean version supports 'True/False, Yes/No, 1/0' for
		         the values. Note that the defaults will be used if the
		         variable is not found, or if the file could not be accessed.

		Return   Nothing.

		See also zProfile::Write, zProfile::Open


	ZPROFILE::WRITE
	------------------------------------------------------------------------

		Summary  Writes a profile variable.

		Syntax   void WriteString(char *sec, char *var, const char *value);
		         void WriteLong(char *domain, char *var, long value);
		         void WriteShort(char *domain, char *var, short value);
		         void WriteBool(char *domain, char *var, Boolean value);

		Remarks  These are the routines that write profile strings to the
		         file. You can omit the domain (passing 0) in which case
		         it will be ignored. The boolean version will write "True"
		         or "False". The routines will rewrite the whole file.

		Return   Nothing.

		See also zProfile::Read, zProfile::Open


	ZPROFILE::OPERATOR!
	------------------------------------------------------------------------

		Summary  Test the status of the profile.

		Syntax   Boolean operator!();

		Remarks  This operator should be used if you want to test the
		         status of the profile file. Usually needed after a call
		         to Open(). Reset by the Open() and Write() routines.

		Return   True if error, False otherwise.

		Example  if( !profile ) // do something

		See also operator void*()


	ZPROFILE::OPERATOR VOID *
	------------------------------------------------------------------------

		Summary  Test the status of the profile.

		Syntax   Boolean operator void *();

		Remarks  This operator should be used if you want to test the
		         status of the profile file. Usually needed after a call
		         to Open(). Reset by the Open() and Write() routines.

		Return   True if ok, False if error.

		Example  if( profile ) // do something

		See also operator!()


