imgtools/romtools/rofsbuild/inc/cache/cachegenerator.hpp
author Zheng Shen <zheng.shen@nokia.com>
Tue, 20 Jul 2010 15:02:28 +0800
changeset 617 3a747a240983
parent 600 6d08f4a05d93
permissions -rw-r--r--
ROM Tools 12.2.0.4 Postlinker 2.2.5 Revert package_definition.xml to changeset 360bd6b35136
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
600
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     1
/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     2
 * @file cachegenerator.hpp
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     3
 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     4
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     5
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     6
#ifndef ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     7
#define ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     8
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     9
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    10
/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    11
 * @class CacheGenerator
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    12
 * @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.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    13
 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    14
class CacheGenerator : public boost::thread
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    15
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    16
public:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    17
	/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    18
	 * @fn static CacheGenerator* CacheGenerator::GetInstance(void)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    19
	 * @brief Get singleton instance.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    20
	 * @return The singleton instance.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    21
	 * @exception CacheException Catch resource allocation failures.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    22
	 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    23
	static CacheGenerator* GetInstance(void) throw (CacheException);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    24
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    25
	/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    26
	 * @fn void CacheGenerator::ProcessFiles(void)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    27
	 * @brief Pick up an invalidated entry from the cacheable list and write the content into the cache (i.e. under cache root directory).
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    28
	 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    29
	static void ProcessFiles(void) throw (CacheException);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    30
protected:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    31
	static CacheGenerator* Only;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    32
private:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    33
	CacheGenerator(void);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    34
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    35
	CacheGenerator(const CacheGenerator&);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    36
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    37
	CacheGenerator& operator = (const CacheGenerator&);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    38
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    39
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    40
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    41
#endif  /* defined ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_ */