'Name' provides a simple method to create numerical or more complex procedural names for entries and groups on the fly.
More...
#include <Fl_Preferences.H>
|
| Name (const char *format,...) |
| Creates a group name or entry name on the fly. More...
|
|
| Name (unsigned int n) |
| Creates a group name or entry name on the fly. More...
|
|
| operator const char * () |
| Return the Name as a "C" string.
|
|
'Name' provides a simple method to create numerical or more complex procedural names for entries and groups on the fly.
Example: prefs.set(Fl_Preferences::Name("File%d",i),file[i]);.
See test/preferences.cxx as a sample for writing arrays into preferences.
'Name' is actually implemented as a class inside Fl_Preferences. It casts into const char* and gets automatically destroyed after the enclosing call ends.
◆ Name() [1/2]
Fl_Preferences::Name::Name |
( |
unsigned int |
n | ) |
|
Creates a group name or entry name on the fly.
This version creates a simple unsigned integer as an entry name.
int n, i;
prev.get( "n", 0 );
for ( i=0; i<n; i++ )
'Name' provides a simple method to create numerical or more complex procedural names for entries and ...
Definition: Fl_Preferences.H:159
Fl_Preferences provides methods to store user settings between application starts.
Definition: Fl_Preferences.H:60
◆ Name() [2/2]
Fl_Preferences::Name::Name |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
Creates a group name or entry name on the fly.
This version creates entry names as in 'printf'.
int n, i;
prev.get( "nFiles", 0 );
for ( i=0; i<n; i++ )
@ USER
Preferences apply only to the current user.
Definition: Fl_Preferences.H:68
The documentation for this class was generated from the following files: