18 #ifndef _PREFERENCEINFOBASE_
19 #define _PREFERENCEINFOBASE_
29 typedef std::vector<Preference*> PreferenceVector;
30 typedef std::map<PreferenceId, unsigned int> PrefIdToPrefPositionMap;
31 typedef std::map<PreferenceId, Preference*> PrefIdToPrefPtrMap;
33 typedef std::pair<Preference *, unsigned int> PrefWithDepth;
34 typedef std::list<PrefWithDepth> PrefWithDepthList;
48 unsigned int countPreferences()
const;
52 const PreferenceVector& getListPreferences()
const;
54 PreferenceVector getAllPreferences()
const;
56 void getAllPreferencesSorted(OUT PrefWithDepthList &outSortedPrefs)
const;
62 bool addNewPreference(
const tstring& name,
64 ApiStringMap& attributes,
65 const tstring& parent = EmptyString);
66 bool movePreference(
Preference* pPreference,
unsigned int& position);
68 bool removeAndDeletePreference(
const PreferenceId& preferenceId,
bool bDontRemoveFromParent =
false);
69 void removeAllPreferences();
71 void setPreferenceHeading(
const tstring& preferenceHeading);
72 const tstring getPreferenceHeading()
const;
76 return deepCopy(existingPrefInfo);
80 deepCopy(existingPrefInfo);
89 PreferenceVector m_ParentPrefPtrVector;
90 PrefIdToPrefPositionMap m_ParentPrefIdToPositionMap;
91 PrefIdToPrefPtrMap m_PrefIdToPrefPtrMap;
100 #endif // _PREFERENCEINFOBASE_