class TemplateFolderCacheImpl; /** allows to cache the state of the template directories of OOo <p>Usually,thisclassisusedtogetherwithaninstanceofthe <servicescope="com.sun.star.frame">DocumentTemplates</service>service.Itallowstoscanthetemplatefolders oftheOffice,andupdatestheconfigurationsothatitreflectsthemostrecentstateofthefolders.<br/> Asthisisanexpensive,theTemplateFolderCachehasbeenintroduced.Itcachesthestateofthetemplate folders,andallowstodetermineiftheDocumentTemplatesserviceneedstobeinvokedtodothe(muchmoreexpensive) update.</p> @exampleC++ <listing> TemplateFolderCacheaTemplateFolders; if(aTemplateFolders.needsUpdate()) { // store the current state aCache.storeState();
// create the DocumentTemplates instance Reference<XDocumentTemplates>xTemplates=...;
// update the templates configuration xTemplates->update(); }
// do anything which relies on a up-to-date template configuration </listing>
*/ class UNLESS_MERGELIBS(SVT_DLLPUBLIC) TemplateFolderCache
{ private:
std::unique_ptr<TemplateFolderCacheImpl, o3tl::default_delete<TemplateFolderCacheImpl>> m_pImpl;
/** determines whether or not the template configuration needs to be updated @return <TRUE/>ifthetemplateconfigurationneedstobeupdated
*/ bool needsUpdate();
/** stores the current state of the template folders in the cache */ void storeState();
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.