bool PSettings::GetBool(const char *name) { bool val=false; FindBool(name,&val); return val; }
void PSettings::SetBool(const char *name,bool value) { bool old; status_t s=FindBool(name,&old); if(s==B_OK)ReplaceBool(name,value); else AddBool(name,value); }
bool AttributeMessage::GetAttribute(const char* name, bool defaultValue) const { bool value; if (FindBool(name, &value) != B_OK) return defaultValue; return value; }
myinline bool ArpMessage::GetBool(const char *name, bool def, int32 index) const { if( this ) { bool res; if( FindBool(name, index, &res) != B_NO_ERROR ) return def; return res; } return def; }
bool Preferences::FindBoolDef (const char *name, bool def) { bool v; status_t result = FindBool (name, &v); if (result != B_OK) return def; else return v; }
//------------------------------------------------------------------------------ status_t TTextData::Unarchive(const BMessage& oArc) { status_t aResult = B_OK; aResult |= SUPER::Unarchive(oArc); // bool aResult |= FindBool(oArc, ARC_NAME_EXPAND, &mExpand); aResult |= FindBool(oArc, ARC_NAME_GROUP, &mGroup); aResult |= FindBool(oArc, ARC_NAME_PATTERN_MATCH, &mPatternMatch); // int32 aResult |= FindInt32(oArc, ARC_NAME_ID, &mID); // uint32 aResult |= FindInt32(oArc, ARC_NAME_OUTLINE_LEVEL, reinterpret_cast<int32*>(&mOutlineLevel)); // string aResult |= FindString(oArc, ARC_NAME_TITLE, &mTitle); // Message aResult |= FindMessage(oArc, ARC_NAME_DATA, &mData); return aResult; }
//------------------------------------------------------------------------------ status_t TExitStates::Unarchive(const BMessage& oMsg) { status_t aResult = B_OK; aResult |= SUPER::Unarchive(oMsg); // bool aResult |= FindBool(oMsg, ARC_NAME_MINIMIZED, &mMinimized); // string aResult |= FindString(oMsg, FUC_ARC_NAME_APP_VER, &mAppVer); // その他 aResult |= FindRect(oMsg, FUC_ARC_NAME_FRAME, &mFrame); return aResult; }
int32 Message::FindBool(const char *name, bool *aBool) const { return FindBool( name, 0, aBool ); }