Main Page   Class Hierarchy   Compound List   Compound Members  

agfio_plugin Class Reference

AG file I/O plugin interface. More...

List of all members.

Public Methods

virtual list< AGId > load (const string &filename, const Id &id="", map< string, string > *signalInfo=NULL, map< string, string > *options=NULL) throw (agfio::LoadError)
virtual string store (const string &filename, const Id &id, map< string, string > *options=NULL) throw (agfio::StoreError)
virtual string store (const string &filename, list< string > *const ids, map< string, string > *options=NULL) throw (agfio::StoreError)

Protected Methods

DllExport void auto_init (const Id &id, map< string, string > *signalInfo, AGSetId &agsetId, TimelineId &timelineId, SignalId &signalId, AGId &agId) throw (const string&)


Detailed Description

AG file I/O plugin interface.

agfio_plugin is an interface to AG file I/O plugins. Plugins should inherit this class and implement load() and store() functions.


Member Function Documentation

DllExport void agfio_plugin::auto_init const Id &    id,
map< string, string > *    signalInfo,
AGSetId &    agsetId,
TimelineId &    timelineId,
SignalId &    signalId,
AGId &    agId
throw (const string&) [protected]
 

This function is used to get appropriate AGSetId, AGId, TimelineId and SignalId for loading, using an algorithm described in the following table:

AGSetid
exists
AGid
exists
signalInfo
is NULL
Result

YYY
  • agsetId=id of AGSetid containing AGid
  • timelineId=id of AGid's Timeline
  • signalId=empty string
  • agId=id

  • YYN
  • agsetId=id of AGSetid containing AGid
  • timelineId=id of AGid's Timeline
  • signalId=id of matched (with signalInfo) Signal or a new Signal if no Signal is matched
  • agId=id

  • YNY
  • agsetId=id
  • timelineId=id of a new Timeline
  • signalId=empty string
  • agId=id of a new AG

  • YNN
  • agsetId=id
  • timelineId=id of a new Timeline
  • signalId=id of a new Signal
  • agId=id of a new AG

  • NNY
  • agsetId=id of a new AGSet
  • timelineId=id of a new Timeline
  • signalId=empty string
  • agId=id of a new AG

  • NNN
  • agsetId=id of a new AGSet
  • timelineId=id of a new Timeline
  • signalId=id of a new Signal
  • agId=id of a new AG
  • Note that AGSetid is an AGSet which is identified by id. Similarly, AGid is an AG which is identified by id.

    Parameters:
    id  id that is given to load().
    signalInfo  signalInfo that is given to load().
    agsetId  Output parameter for an AGSetId
    timelineId  Output parameter for a TimelineId
    signalId  Output parameter for a SignalId
    agsetId  Output parameter for an AGId

    virtual list<AGId> agfio_plugin::load const string &    filename,
    const Id &    id = "",
    map< string, string > *    signalInfo = NULL,
    map< string, string > *    options = NULL
    throw (agfio::LoadError) [inline, virtual]
     

    Load a file, converting it to AG's.

    Parameters:
    filename  A path (absolute or relative) to the file.
    id  AGSetId or AGId into which the file will be loaded.
    signalInfo  A feature-value pair list for the signal information. Features that should be used are:
    • uri
    • mimeClass
    • mimeType
    • encoding
    • unit
    • track (optional)
    The values shouldn't be empty.
    options  A option-value pair list that is used to change the behavior of load() of the I/O module(plugin).
    Returns:
    List of ids of created AG's

    virtual string agfio_plugin::store const string &    filename,
    list< string > *const    ids,
    map< string, string > *    options = NULL
    throw (agfio::StoreError) [inline, virtual]
     

    Same as store() below except that this one accepts a list of AGId's instead of just one AGId/AGSetId.

    virtual string agfio_plugin::store const string &    filename,
    const Id &    id,
    map< string, string > *    options = NULL
    throw (agfio::StoreError) [inline, virtual]
     

    Store AG's to a file.

    Parameters:
    filename  The name of the file to be written.
    id  The id of AG or AGSet to be stored.
    options  A option-value pair list that is used to change the behavior of store() of the I/O module(plugin).
    Returns:
    An optional string.