model_server/machine_prefs/src/pref_registry.cxx
// Put a integer value into the preference dictionary.
Put a integer value into the preference dictionary.
Put a integer value into the preference dictionary .
bool prefRegistry::putPref(const char* keyname,
                           const int value,
                           const bool persistent )
{
   Initialize(prefRegistry::putPref);
     bool saveIt = persistent && hasUserPrefs();
     bool status = insertTable(keyname, value, saveIt);
    if (status && saveIt) {
        Pref* item;
        int index;
        status = getTableIndex(keyname, index);
        if (status) {
            item = prefTable[index];
            status = UserPrefFile_->Write(keyname, item->intPref);
        }
    }
    if (!status)
       msg("Problem putting pref \'$1\'", error_sev) << keyname << eom;
    return (status);
}
bool prefRegistry :: putPref ( const char * keyname , const int value , const bool persistent ) { Initialize ( prefRegistry :: putPref ) ; bool saveIt = persistent && hasUserPrefs ( ) ; bool status = insertTable ( keyname , value , saveIt ) ; if ( status && saveIt ) { Pref * item ; int index ; status = getTableIndex ( keyname , index ) ; if ( status ) { item = prefTable [ index ] ; status = UserPrefFile_ -> Write ( keyname , item -> intPref ) ; } } if ( ! status ) msg ( " \' \' " , error_sev ) << keyname << eom ; return ( status ) ; }
Put a integer value into the preference dictionary.
Put a integer value into the preference dictionary .
/*=true*/ // If no user prefs are available, nothing can be persistent.