|
degate 0.1.1
|
Storage policy for image objects that are stored in a file. More...
#include <StoragePolicies.h>

Public Member Functions | |
| StoragePolicy_File (unsigned int _width, unsigned int _height, std::string const &filename, bool persistent=false) | |
| virtual | ~StoragePolicy_File () |
| PixelPolicy::pixel_type | get_pixel (unsigned int x, unsigned int y) const |
| Get pixel for "native" pixel types. | |
| void | set_pixel (unsigned int x, unsigned int y, typename PixelPolicy::pixel_type new_val) |
| Set "native" pixel. | |
Protected Attributes | |
| MemoryMap< typename PixelPolicy::pixel_type > | memory_map |
Storage policy for image objects that are stored in a file.
Definition at line 110 of file StoragePolicies.h.
| degate::StoragePolicy_File< PixelPolicy >::StoragePolicy_File | ( | unsigned int | _width, |
| unsigned int | _height, | ||
| std::string const & | filename, | ||
| bool | persistent = false |
||
| ) | [inline] |
Definition at line 118 of file StoragePolicies.h.
:
memory_map(_width, _height,
persistent == false ? MAP_STORAGE_TYPE_TEMP_FILE : MAP_STORAGE_TYPE_PERSISTENT_FILE,
filename) {
}
| virtual degate::StoragePolicy_File< PixelPolicy >::~StoragePolicy_File | ( | ) | [inline, virtual] |
Definition at line 127 of file StoragePolicies.h.
{}
| PixelPolicy::pixel_type degate::StoragePolicy_File< PixelPolicy >::get_pixel | ( | unsigned int | x, |
| unsigned int | y | ||
| ) | const [inline, virtual] |
Get pixel for "native" pixel types.
This method is abstract. If you derive from this class, you should implement it for a concrete StoragePolicy.
Implements degate::StoragePolicy_Base< PixelPolicy >.
Definition at line 129 of file StoragePolicies.h.
References degate::MemoryMap< T >::get(), and degate::StoragePolicy_File< PixelPolicy >::memory_map.
{
return memory_map.get(x, y);
}

| void degate::StoragePolicy_File< PixelPolicy >::set_pixel | ( | unsigned int | x, |
| unsigned int | y, | ||
| typename PixelPolicy::pixel_type | new_val | ||
| ) | [inline, virtual] |
Set "native" pixel.
This method is abstract. If you derive from this class, you should implement it for a concrete StoragePolicy.
Implements degate::StoragePolicy_Base< PixelPolicy >.
Definition at line 134 of file StoragePolicies.h.
References degate::StoragePolicy_File< PixelPolicy >::memory_map, and degate::MemoryMap< T >::set().
{
memory_map.set(x, y, new_val);
}

MemoryMap<typename PixelPolicy::pixel_type> degate::StoragePolicy_File< PixelPolicy >::memory_map [protected] |
Definition at line 114 of file StoragePolicies.h.
Referenced by degate::StoragePolicy_File< PixelPolicy >::get_pixel(), and degate::StoragePolicy_File< PixelPolicy >::set_pixel().
1.7.4