PCL
pcl::FileFilter Class Reference

A description of a file type and its associated file extensions. More...

#include <FileDialog.h>

Public Member Functions

 FileFilter ()=default
 
 FileFilter (const FileFilter &x)=default
 
 FileFilter (const String &description, const String &extension)
 
 FileFilter (const String &description, const StringList extensions)
 
virtual ~FileFilter ()
 
void AddExtension (const String &extension)
 
void AddExtensions (const StringList &extensions)
 
void Clear ()
 
String Description () const
 
const StringListExtensions () const
 
void SetDescription (const String &description)
 

Detailed Description

FileFilter is a simple class to describe a file type and enumerate its associated file extensions. That information plays a key role in file dialogs as OpenFileDialog and SaveFileDialog.

See also
FileDialog, GetDirectoryDialog, OpenFileDialog, SaveFileDialog

Definition at line 85 of file FileDialog.h.

Constructor & Destructor Documentation

◆ FileFilter() [1/4]

pcl::FileFilter::FileFilter ( )
default

Constructs an empty FileFilter object.

◆ FileFilter() [2/4]

pcl::FileFilter::FileFilter ( const String description,
const StringList  extensions 
)
inline

Constructs a FileFilter with the specified description and list of file extensions.

Definition at line 98 of file FileDialog.h.

◆ FileFilter() [3/4]

pcl::FileFilter::FileFilter ( const String description,
const String extension 
)
inline

Constructs a FileFilter with the specified description and a single file extension.

Definition at line 108 of file FileDialog.h.

◆ FileFilter() [4/4]

pcl::FileFilter::FileFilter ( const FileFilter x)
default

Copy constructor.

◆ ~FileFilter()

virtual pcl::FileFilter::~FileFilter ( )
inlinevirtual

Virtual destructor.

Definition at line 122 of file FileDialog.h.

Member Function Documentation

◆ AddExtension()

void pcl::FileFilter::AddExtension ( const String extension)

Adds a file extension associated with the file type represented by this FileFilter object.

◆ AddExtensions()

void pcl::FileFilter::AddExtensions ( const StringList extensions)
inline

Adds an ordered list of file extensions.

Definition at line 162 of file FileDialog.h.

◆ Clear()

void pcl::FileFilter::Clear ( )

Clears the file type description and the list of file extensions.

◆ Description()

String pcl::FileFilter::Description ( ) const
inline

Returns the description of the file type represented by this FileFilter object. Example: "FITS Files".

Definition at line 130 of file FileDialog.h.

◆ Extensions()

const StringList& pcl::FileFilter::Extensions ( ) const
inline

Returns a list of file extensions associated to the file type represented by this FileFilter object. Example: ".fit", ".fits", ".fts".

Definition at line 148 of file FileDialog.h.

◆ SetDescription()

void pcl::FileFilter::SetDescription ( const String description)
inline

Sets the description of the file type represented by this FileFilter object.

Definition at line 139 of file FileDialog.h.


The documentation for this class was generated from the following file: