class DjVuMemoryPort: public DjVuPort

Memory based port.

Inheritance:


Public Methods

[more]virtual bool inherits(const char * class_name) const
Returns 1 if class_name is "DjVuPort" or "DjVuMemoryPort"
[more]virtual GP<DataPool> request_data(const DjVuPort * source, const GURL & url)
If url is one of those, that have been added before by means of add_data() function, it will return the associated DataPool.
[more]void add_data(const GURL & url, const GP<DataPool> & pool)
Adds <url, pool> pair to the internal map.


Inherited from DjVuPort:

Public Methods

ostatic DjVuPortcaster* get_portcaster(void)
oDjVuPort& operator=(const DjVuPort & port)

Public

Notifications.

[more]virtual GURL id_to_url(const DjVuPort * source, const char * id)
This request is issued to request translation of the ID, used in an DjVu INCL chunk to a URL, which may be used to request data associated with included file.
[more]virtual GPBase id_to_file(const DjVuPort * source, const char * id)
This request is used to get a file corresponding to the given ID.
[more]virtual GP<DataPool> request_data(const DjVuPort * source, const GURL & url)
This request is issued when decoder needs additional data for decoding.
[more]virtual bool notify_error(const DjVuPort * source, const char * msg)
This notification is sent when an error occurs and the error message should be shown to the user.
[more]virtual bool notify_status(const DjVuPort * source, const char * msg)
This notification is sent to update the decoding status.
[more]virtual void notify_redisplay(const class DjVuImage * source)
This notification is sent by DjVuImage when it should be redrawn.
[more]virtual void notify_relayout(const class DjVuImage * source)
This notification is sent by \ref{DjVuImage} when its geometry has been changed as a result of decoding.
[more]virtual void notify_chunk_done(const DjVuPort * source, const char * name)
This notification is sent when a new chunk has been decoded.
[more]virtual void notify_file_flags_changed(const class DjVuFile * source, long set_mask, long clr_mask)
This notification is sent after the DjVuFile flags have been changed.
[more]virtual void notify_doc_flags_changed(const class DjVuDocument * source, long set_mask, long clr_mask)
This notification is sent after the DjVuDocument flags have been changed.
[more]virtual void notify_decode_progress(const DjVuPort * source, float done)
This notification is sent from time to time while decoding is in progress.
[more]enum ErrorRecoveryAction
This is the standard types for defining what to do in case of errors.


Inherited from GPEnabled:

Public Methods

oint get_count(void) const

Protected Fields

ovolatile int count


Documentation

Memory based port. This DjVuPort maintains a map associating pseudo urls with data segments. It processes the request_data notifications according to this map. After initializing the port, you should add as many pairs <url,pool> as needed need and add a route from a \Ref{DjVuDocument} orDjVuFile to this port.
ovirtual bool inherits(const char * class_name) const
Returns 1 if class_name is "DjVuPort" or "DjVuMemoryPort"

ovirtual GP<DataPool> request_data(const DjVuPort * source, const GURL & url)
If url is one of those, that have been added before by means of add_data() function, it will return the associated DataPool. ZERO otherwize.

ovoid add_data(const GURL & url, const GP<DataPool> & pool)
Adds <url, pool> pair to the internal map. From now on, if somebody asks for data corresponding to the url, it will be returning the pool


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.