\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.12 - Three
CGAL::Three::Polyhedron_demo_io_plugin_interface Class Referenceabstract

#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>

Definition

This class provides a base for creating a new IO plugin.

Public Member Functions

virtual QString name () const =0
 Returns the name of the plugin It is used by the loading system. More...
 
virtual QString nameFilters () const =0
 The filters for the names of the files that can be used by the plugin. More...
 
virtual QString saveNameFilters () const
 Returns only the filters used for saving. More...
 
virtual QString loadNameFilters () const
 Returns only the filters used for loading. More...
 
virtual bool canLoad () const =0
 Specifies if the io_plugin is able to load an item or not. More...
 
virtual Scene_itemload (QFileInfo fileinfo)=0
 Loads an item from a file. More...
 
virtual bool canSave (const Scene_item *)=0
 Specifies if the io_plugin can save the item or not. More...
 
virtual bool save (const Scene_item *, QFileInfo fileinfo)=0
 Saves the item in the file corresponding to the path contained in fileinfo. More...
 
virtual bool isDefaultLoader (const Scene_item *) const
 If this returns true, then the loader will be chosen as defaultin the list of available loaders when saving a file, which means it will be the first in the list. More...
 

Member Function Documentation

◆ canLoad()

virtual bool CGAL::Three::Polyhedron_demo_io_plugin_interface::canLoad ( ) const
pure virtual

Specifies if the io_plugin is able to load an item or not.

This must be overriden.

◆ canSave()

virtual bool CGAL::Three::Polyhedron_demo_io_plugin_interface::canSave ( const Scene_item )
pure virtual

Specifies if the io_plugin can save the item or not.

This must be overriden.

◆ isDefaultLoader()

virtual bool CGAL::Three::Polyhedron_demo_io_plugin_interface::isDefaultLoader ( const Scene_item ) const
virtual

If this returns true, then the loader will be chosen as defaultin the list of available loaders when saving a file, which means it will be the first in the list.

◆ load()

virtual Scene_item* CGAL::Three::Polyhedron_demo_io_plugin_interface::load ( QFileInfo  fileinfo)
pure virtual

Loads an item from a file.

This must be overriden.

◆ loadNameFilters()

virtual QString CGAL::Three::Polyhedron_demo_io_plugin_interface::loadNameFilters ( ) const
virtual

Returns only the filters used for loading.

The default is nameFilters(). You must override this function to change its behavior. If multiple plugins have the same load filters, only once will be kept, so be careful not to use one that already exists.

◆ name()

virtual QString CGAL::Three::Polyhedron_demo_io_plugin_interface::name ( ) const
pure virtual

Returns the name of the plugin It is used by the loading system.

◆ nameFilters()

virtual QString CGAL::Three::Polyhedron_demo_io_plugin_interface::nameFilters ( ) const
pure virtual

The filters for the names of the files that can be used by the plugin.

Example : to filter OFF files : return "OFF files (*.off)"

◆ save()

virtual bool CGAL::Three::Polyhedron_demo_io_plugin_interface::save ( const Scene_item ,
QFileInfo  fileinfo 
)
pure virtual

Saves the item in the file corresponding to the path contained in fileinfo.

Returns false if error. This must be overriden.

◆ saveNameFilters()

virtual QString CGAL::Three::Polyhedron_demo_io_plugin_interface::saveNameFilters ( ) const
virtual

Returns only the filters used for saving.

The default is nameFilters(). You must override this function to change its behavior.