imgtools/romtools/rofsbuild/inc/cache/cachegenerator.hpp
author Bob Rosenberg <bob.rosenberg@nokia.com>
Mon, 18 Oct 2010 10:33:54 +0100
changeset 660 66ff3e731c60
parent 600 6d08f4a05d93
permissions -rw-r--r--
Sysdeftools additional support for merging misordered system definitions. More extensive validation. Minor bug fixes. Bash wrappers for perl scripts for unix installs.

/**
 * @file cachegenerator.hpp
 */


#ifndef ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_
#define ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_


/**
 * @class CacheGenerator
 * @brief Cache Generator will be running in a separated thread, its job is to pick up an invalidated entry from the CacheableList and then write the content into the cache.
 */
class CacheGenerator : public boost::thread
{
public:
	/**
	 * @fn static CacheGenerator* CacheGenerator::GetInstance(void)
	 * @brief Get singleton instance.
	 * @return The singleton instance.
	 * @exception CacheException Catch resource allocation failures.
	 */
	static CacheGenerator* GetInstance(void) throw (CacheException);

	/**
	 * @fn void CacheGenerator::ProcessFiles(void)
	 * @brief Pick up an invalidated entry from the cacheable list and write the content into the cache (i.e. under cache root directory).
	 */
	static void ProcessFiles(void) throw (CacheException);
protected:
	static CacheGenerator* Only;
private:
	CacheGenerator(void);

	CacheGenerator(const CacheGenerator&);

	CacheGenerator& operator = (const CacheGenerator&);
};


#endif  /* defined ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_ */