1 // rs_filterinterface.cpp
3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 05/05/2010 Moved implementation from header to this file. :-)
17 #include "rs_filterinterface.h"
24 RS_FilterInterface::RS_FilterInterface()
26 //std::cout << "RS_FilterInterface\n";
33 /*virtual*/ RS_FilterInterface::~RS_FilterInterface()
38 * Checks if this filter can import the given file type.
40 * @retval true if the filter can import the file type
41 * @retval false otherwise.
43 /*virtual*/ bool RS_FilterInterface::canImport(RS2::FormatType t)
45 // return !(importFormats.find(t) == importFormats.end());
46 return (importFormats.indexOf(t) != -1);
50 * Checks if this filter can export the given file type.
52 * @return true if the filter can export the file type,
55 /*virtual*/ bool RS_FilterInterface::canExport(RS2::FormatType t)
57 // return !(exportFormats.find(t) == exportFormats.end());
58 return (exportFormats.indexOf(t) != -1);
62 * Adds a file extension which can be imported by this filter.
64 void RS_FilterInterface::addImportFormat(RS2::FormatType type)
66 RS_DEBUG->print("Filter can import %d", (int)type);
67 importFormats += type;
71 * Adds a file extension which can be exported by this filter.
73 void RS_FilterInterface::addExportFormat(RS2::FormatType type)
75 RS_DEBUG->print("Filter can export %d", (int)type);
76 exportFormats += type;