libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
List of all members | Classes | Public Member Functions | Static Protected Member Functions | Protected Attributes
t3_widget::file_name_list_t Class Reference

Implementation of the file_list_t interface. More...

Inheritance diagram for t3_widget::file_name_list_t:
t3_widget::file_list_t t3_widget::string_list_base_t t3_widget::list_base_t

Classes

class  file_name_entry_t
 Class representing a single file. More...
 

Public Member Functions

virtual const std::string * get_fs_name (size_t idx) const
 Get the file-system name for a particular idx. More...
 
virtual bool is_dir (size_t idx) const
 Retrieve whether the file at index idx in the list is a directory. More...
 
int load_directory (std::string *dir_name)
 Load the contents of dir_name into this list. More...
 
file_name_list_toperator= (const file_name_list_t &other)
 Compare this list with other. More...
 
virtual const std::string * operator[] (size_t idx) const
 Retrieve element idx. More...
 
virtual size_t size (void) const
 Retrieve the size of the list. More...
 

Static Protected Member Functions

static bool compare_entries (file_name_entry_t first, file_name_entry_t second)
 Check if two file_name_entry_t are the same. More...
 

Protected Attributes

std::vector< file_name_entry_tfiles
 Vector holding a list of all the files in a directory. More...
 

Detailed Description

Implementation of the file_list_t interface.

Member Function Documentation

bool t3_widget::file_name_list_t::compare_entries ( file_name_entry_t  first,
file_name_entry_t  second 
)
staticprotected

Check if two file_name_entry_t are the same.

const string * t3_widget::file_name_list_t::get_fs_name ( size_t  idx) const
virtual

Get the file-system name for a particular idx.

The file-system name is the name of the file as it is written in the file system. This is opposed to the name retrieved by operator[] which has been converted to UTF-8.

Implements t3_widget::file_list_t.

bool t3_widget::file_name_list_t::is_dir ( size_t  idx) const
virtual

Retrieve whether the file at index idx in the list is a directory.

Implements t3_widget::file_list_t.

int t3_widget::file_name_list_t::load_directory ( std::string *  dir_name)

Load the contents of dir_name into this list.

file_name_list_t & t3_widget::file_name_list_t::operator= ( const file_name_list_t other)

Compare this list with other.

const string * t3_widget::file_name_list_t::operator[] ( size_t  idx) const
virtual

Retrieve element idx.

Implements t3_widget::list_base_t.

size_t t3_widget::file_name_list_t::size ( void  ) const
virtual

Retrieve the size of the list.

Implements t3_widget::list_base_t.

Member Data Documentation

std::vector<file_name_entry_t> t3_widget::file_name_list_t::files
protected

Vector holding a list of all the files in a directory.