|
bool | IDValid (const JPrefID &id) const |
|
bool | GetData (const JPrefID &id, std::string *data) const |
|
void | SetData (const JPrefID &id, std::ostringstream &data) |
|
void | SetData (const JPrefID &id, std::string &data) |
|
void | SetData (const JPrefID &id, const JString &data) |
|
void | SetData (const JPrefID &id, const JUtf8Byte *data) |
|
void | RemoveData (const JPrefID &id) |
|
bool | UpgradeData (const bool reportError=true) |
|
virtual void | UpgradeData (const bool isNew, const JFileVersion currentVersion)=0 |
|
virtual void | DataLoaded ()=0 |
|
void | InstallCollection (JCollection *list) |
|
const JCollection * | GetList () const |
|
void | Receive (JBroadcaster *sender, const Message &message) override |
|
void | ItemAdded () |
|
void | ItemRemoved () |
|
void | SetItemCount (const JSize newItemCount) |
|
| JBroadcaster (const JBroadcaster &source) |
|
void | ListenTo (const JBroadcaster *sender) |
|
void | StopListening (const JBroadcaster *sender) |
|
void | ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember) |
|
void | StopListening (const JBroadcaster *sender, const std::type_info &messageType) |
|
template<class T > |
void | Send (JBroadcaster *recipient, const T &message) |
|
template<class T > |
void | Broadcast (const T &message) |
|
void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
|
void | BroadcastWithFeedback (Message *message) |
|
virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
|
virtual void | ReceiveGoingAway (JBroadcaster *sender) |
|
Buffers the data in a JPrefsFile and provides a base class for
application-specific preferences management. The functions to access
the data are protected because they should be hidden behind a clean
interface in the derived class.
UpgradeData() is called after the file has been read. Since UpgradeData()
must work on an empty file, this ensures that the program has a valid set
of preferences even if the file could not be read.
Some programs enforce that only a single copy is running for each user,
so an open prefs file means that the program crashed while editing the
preferences. If this is the case, pass true for eraseFileIfOpen to
the constructor.
Derived classes must implement the following function:
UpgradeData
Upgrade the preferences data from the specified version.