ESA JPIP server
0.1
|
The cache model of a JPIP client is handled using this class. More...
#include <cache_model.h>
Classes | |
class | Codestream |
Sub-class of the cache model class used to identify a codestream. More... | |
Public Member Functions | |
CacheModel () | |
Empty constructor. More... | |
CacheModel (const CacheModel &model) | |
Copy constructor. More... | |
CacheModel & | operator= (const CacheModel &model) |
Copy assignment. More... | |
CacheModel & | operator+= (const CacheModel &model) |
Add the content of the given cache model. More... | |
template<typename T > | |
T & | SerializeWith (T &stream) |
Codestream & | GetCodestream (int num_codestream) |
Returns the reference of a codestream. More... | |
int | GetMetadata (int id) |
Returns the amount of a meta-data. More... | |
int | AddToMetadata (int id, int amount, bool complete=false) |
Increases the amount of a meta-data. More... | |
template<int BIN_CLASS> | |
int | GetDataBin (int num_codestream, int id) |
Returns the amount of a data-bin item using the class DataBinSelector . More... | |
template<int BIN_CLASS> | |
int | AddToDataBin (int num_codestream, int id, int amount, bool complete=false) |
Increases the amount of a data-bin item using the class DataBinSelector . More... | |
bool | IsFullMetadata () const |
Returns the full flag of the meta-datas. More... | |
void | SetFullMetadata () |
Sets the full flag for the meta-datas to true. More... | |
void | Pack (int min_sum=1) |
Calls the Pack method of all the codestreams. More... | |
void | Clear () |
Clear all the amounts. More... | |
virtual | ~CacheModel () |
Private Attributes | |
bool | full_meta |
Says if the meta-data has been totally sent. More... | |
vector< int > | meta_data |
Amounts for the meta-datas. More... | |
vector< Codestream > | codestreams |
Amounts for the codestreams. More... | |
The cache model of a JPIP client is handled using this class.
It allows to maintain a cache model recording the amount of data sent by the server regarding the meta-datas, headers, tile-headers and precincts. This implementation only allows to record incremental amounts, from the beginning of each entity. The value INT_MAX
is used to specify that an item is complete. This class is serializable.
|
inline |
Empty constructor.
|
inline |
Copy constructor.
|
inlinevirtual |
|
inline |
Increases the amount of a data-bin item using the class DataBinSelector
.
num_codestream | Index number of the associated codestream. |
id | Index number of the data-bin. |
amount | Amount increment. |
complete | true if the data-bin is complete after the increment. |
|
inline |
Increases the amount of a meta-data.
id | Index number of the meta-data. |
amount | Amount increment. |
complete | true if the meta-data is complete after the increment. |
|
inline |
Clear all the amounts.
|
inline |
Returns the reference of a codestream.
num_codestream | Index number of the codestream. |
|
inline |
Returns the amount of a data-bin item using the class DataBinSelector
.
num_codestream | Index number of the associated codestream. |
id | Index number of the data-bin. |
|
inline |
Returns the amount of a meta-data.
id | Index number of the meta-data. |
|
inline |
Returns the full flag of the meta-datas.
|
inline |
Add the content of the given cache model.
|
inline |
Copy assignment.
|
inline |
Calls the Pack
method of all the codestreams.
|
inline |
|
inline |
Sets the full flag for the meta-datas to true.
|
private |
Amounts for the codestreams.
|
private |
Says if the meta-data has been totally sent.
|
private |
Amounts for the meta-datas.