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 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 05/05/2010 Moved implementation from header to this file. :-)
15 #include "rs_filterinterface.h"
22 RS_FilterInterface::RS_FilterInterface()
24 //std::cout << "RS_FilterInterface\n";
31 /*virtual*/ RS_FilterInterface::~RS_FilterInterface()
36 * Checks if this filter can import the given file type.
38 * @retval true if the filter can import the file type
39 * @retval false otherwise.
41 /*virtual*/ bool RS_FilterInterface::canImport(RS2::FormatType t)
43 // return !(importFormats.find(t) == importFormats.end());
44 return (importFormats.indexOf(t) != -1);
48 * Checks if this filter can export the given file type.
50 * @return true if the filter can export the file type,
53 /*virtual*/ bool RS_FilterInterface::canExport(RS2::FormatType t)
55 // return !(exportFormats.find(t) == exportFormats.end());
56 return (exportFormats.indexOf(t) != -1);
60 * Adds a file extension which can be imported by this filter.
62 void RS_FilterInterface::addImportFormat(RS2::FormatType type)
64 RS_DEBUG->print("Filter can import %d", (int)type);
65 importFormats += type;
69 * Adds a file extension which can be exported by this filter.
71 void RS_FilterInterface::addExportFormat(RS2::FormatType type)
73 RS_DEBUG->print("Filter can export %d", (int)type);
74 exportFormats += type;