Preferences::Name Class Reference

List of all members.

Public Member Functions

 Name (int n)
 Name (const char *format,...)
 operator const char * ()

Detailed Description

Helper class to create group and entry names on the fly. Use an instance as the first argument to the Preferences::set() command.


Constructor & Destructor Documentation

Preferences::Name::Name int  n  ) 
 

Converts an integer into an entry name. Example:

Preferences prev( appPrefs, "PreviousFiles" );
int n; prev.get( "n", n, 0 );
for ( int i=0; i<n; i++ )
  prev.get( Name(i), prevFile[i], "" );

Preferences::Name::Name const char *  format,
  ...
 

Uses printf output to create the entry name. Example:

Preferences prefs( USER, "matthiasm.com", "test" );
int n; prev.get( "nFiles", n, 0 );
for ( int i=0; i<n; i++ )
  prev.get( Name( "File%d", i ), prevFile[i], "" );


The documentation for this class was generated from the following files:
Sun Jan 7 00:55:18 2007. FLTK ©2006 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.