JX Application Framework
|
#include <JXSharedPrefsManager.h>
Classes | |
class | Read |
Public Member Functions | |
JXSharedPrefsManager () | |
~JXSharedPrefsManager () override | |
bool | WasNew () const |
void | ReadPrefs (JXSharedPrefObject *obj) |
void | WritePrefs (const JXSharedPrefObject *obj) |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
virtual JString | ToString () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Static Public Attributes | |
static const JUtf8Byte * | kRead = "Read::JXSharedPrefsManager" |
Additional Inherited Members | |
![]() | |
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) |
virtual void | Receive (JBroadcaster *sender, const Message &message) |
void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
void | BroadcastWithFeedback (Message *message) |
virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
virtual void | ReceiveGoingAway (JBroadcaster *sender) |
Stores preferences that are shared by all JX programs. Since this must be compatible with all versions of JX, all older versions of the data must be written along with the latest version. Programs that use an outdated version of JX cannot usually write to this file because they are unable to update all the relevant information. For single items like PartialWordModifier, the best method is to create another ID when values are added to the enum. When the new version opens the file for the first time, it reads the original ID and creates the new one. Old programs can still read and write the original ID, while new programs read and write the new ID. (Old programs cannot read the new ID since it has illegal values.) Since JFileArray modifies the file every time it is opened, we use a separate signal file to notify other running programs when the settings change. We use an idle task to check for signals from other programs.
anonymous enum |
JXSharedPrefsManager::JXSharedPrefsManager | ( | ) |
|
override |
void JXSharedPrefsManager::ReadPrefs | ( | JXSharedPrefObject * | obj | ) |
|
inline |
Returns true if prefs stored by the application should be used.
void JXSharedPrefsManager::WritePrefs | ( | const JXSharedPrefObject * | obj | ) |
|
static |