JX Application Framework
|
#include <JXPrefsManager.h>
Public Member Functions | |
JXPrefsManager (const JFileVersion currentVersion, const bool eraseFileIfOpen, const JPrefID &csfID) | |
~JXPrefsManager () override | |
virtual void | CleanUpBeforeSuddenDeath (const JXDocumentManager::SafetySaveReason reason) |
![]() | |
JPrefsManager (const JString &fileName, const JFileVersion currentVersion, const bool eraseFileIfOpen) | |
~JPrefsManager () override | |
JError | SaveToDisk () const |
JFileVersion | GetPrevPrefsVersion () const |
![]() | |
JContainer () | |
JContainer (const JContainer &source) | |
JContainer & | operator= (const JContainer &source) |
![]() | |
JCollection () | |
JCollection (const JCollection &source) | |
~JCollection () override | |
JCollection & | operator= (const JCollection &source) |
JSize | GetItemCount () const |
bool | IsEmpty () const |
bool | IndexValid (const JIndex index) const |
JIndex | GetIndexFromEnd (const JIndex index) const |
JString | ToString () const override |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Protected Member Functions | |
void | DataLoaded () override |
virtual void | SaveAllBeforeDestruct () |
![]() | |
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 |
![]() | |
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) |
Additional Inherited Members | |
![]() | |
static const JUtf8Byte * | kDataChanged = "DataChanged::JPrefsManager" |
static const JUtf8Byte * | kDataRemoved = "DataRemoved::JPrefsManager" |
static const JUtf8Byte * | kWrongVersion = "WrongVersion::JPrefsManager" |
Builds the file name based on the application signature.
JXPrefsManager::JXPrefsManager | ( | const JFileVersion | currentVersion, |
const bool | eraseFileIfOpen, | ||
const JPrefID & | csfID | ||
) |
|
override |
|
virtual |
This must be the last one called by the application's CleanUpBeforeSuddenDeath() function so we can save the preferences to disk.
If the server is dead, you cannot call any code that contacts it.
|
overrideprotectedvirtual |
Implements JPrefsManager.
|
protectedvirtual |
This must be called by the leaf class destructor.