Input Class Reference

#include <Input.h>

Collaboration diagram for Input:

Collaboration graph

List of all members.

Public Member Functions

 Input (Params &)
 ~Input ()

Public Attributes

std::vector< const SizeName * > m_files
Params::Size_t m_total_size

Private Member Functions

void Initialize ()
 Performs initial steps.
void ReadInput ()
void LoadFiles ()
void AddFile (const std::string &)
void StringToSizeID (const std::string &)
bool CheckRange (const std::string &, Params::Size_t) const

Constructor & Destructor Documentation

Input::Input ( Params params  ) 

Input class constructor. Sets DiskUsage::m_block_size (DiskUsage static data member).

References Initialize(), Params::m_block_size, m_params, and DiskUsage::SetBlockSize().

Input::~Input (  )  [inline]

References m_files.

Member Function Documentation

void Input::Initialize (  )  [private]

Performs initial steps.

Loads files from input, gets their sizes, filters and adds them.

References LoadFiles(), Params::m_direct_input, m_files, m_params, Params::m_verbose, and ReadInput().

Referenced by Input().

void Input::ReadInput (  )  [private]

Reads the input directly (--di) instead of files/dir. Reads from stdin and/or args.

References Params::m_cmdline_items, Params::m_null_data, m_params, Params::m_pipe, and StringToSizeID().

Referenced by Initialize().

void Input::LoadFiles (  )  [private]

Loads files from input (stdin/args).

References AddFile(), Params::m_cmdline_items, Params::m_null_data, m_params, and Params::m_pipe.

Referenced by Initialize().

void Input::AddFile ( const std::string &   )  [private]

Tries to add a file into m_files to be processed.

Referenced by LoadFiles().

void Input::StringToSizeID ( const std::string &   )  [private]

Converts a given string to "size ID" pair and puts it into m_files.

Referenced by ReadInput().

bool Input::CheckRange ( const std::string &  ,
) const [private]

Check/filter files bigger than 'target'/'--max-size' and smaller than '--min-size'

Member Data Documentation

Contains the size and name of input files (filtered)

Referenced by Initialize(), and ~Input().

Holds the total size of the items

Global parameters.

Referenced by Initialize(), Input(), LoadFiles(), and ReadInput().

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