Class WorkCellLoader


  • public class WorkCellLoader
    extends java.lang.Object
    Extendible interface for loading of WorkCells from files.

    By default, the following formats are supported:

    - all file extensions will be loaded using the standard RobWork
    XML format (XMLRWLoader).

    The Factory defines an extension point "rw.loaders.WorkCellLoader"
    that makes it possible to add loaders for other file formats than the
    ones above. Extensions take precedence over the default loaders.

    The WorkCell loader is chosen based on a case-insensitive file extension
    name. So "scene.wc.xml" will be loaded by the same loader as
    "scene.WC.XML"

    WorkCells are supposed to be loaded using the WorkCellLoaderFactory.load function:

     
    WorkCellPtr wc = WorkCellLoaderFactory.load("scene.wc.xml");
    if (wc.isNull())
    throw new Exception("WorkCell could not be loaded.");

    Alternatively a WorkCell can be loaded in the less convenient way:

     
    WorkCellLoaderPtr loader = WorkCellLoaderFactory.getWorkCellLoader(".wc.xml");
    WorkCellPtr wc = loader.loadWorkCell("scene.wc.xml");
    if (wc.isNull())
    throw new Exception("WorkCell could not be loaded.");
    • Constructor Detail

      • WorkCellLoader

        public WorkCellLoader​(long cPtr,
                              boolean cMemoryOwn)
    • Method Detail

      • delete

        public void delete()
      • loadWorkCell

        public WorkCellPtr loadWorkCell​(java.lang.String filename)
        Load a WorkCell from a file.

        Parameters:
        filename - [in] path to workcell file.