OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Private Attributes | List of all members
WDataModuleInputFile Class Reference

Implements a file based input for the WDataModule. More...

#include <WDataModuleInputFile.h>

+ Inheritance diagram for WDataModuleInputFile:
+ Collaboration diagram for WDataModuleInputFile:

Public Types

typedef std::shared_ptr< WDataModuleInputFileSPtr
 Convenience typedef for a std::shared_ptr< WDataModuleInputFile >. More...
 
typedef std::shared_ptr< const WDataModuleInputFileConstSPtr
 Convenience typedef for a std::shared_ptr< const WDataModuleInputFile >. More...
 
- Public Types inherited from WDataModuleInput
typedef std::shared_ptr< WDataModuleInputSPtr
 Convenience typedef for a std::shared_ptr< WDataModuleInput >. More...
 
typedef std::shared_ptr< const WDataModuleInputConstSPtr
 Convenience typedef for a std::shared_ptr< const WDataModuleInput >. More...
 

Public Member Functions

 WDataModuleInputFile (boost::filesystem::path fname)
 Default constructor. More...
 
 WDataModuleInputFile (std::string fname)
 Default constructor. More...
 
virtual ~WDataModuleInputFile ()
 Destructor. More...
 
boost::filesystem::path getFilename () const
 Get the filename to load. More...
 
virtual std::string getName () const
 Return a unique name for this input type. More...
 
virtual std::string asString () const
 The file input as human readable string. More...
 
virtual std::string getExtendedInfo () const
 Return some extend information for the input, like complete path, server data (username, subject name, ...). More...
 
virtual std::ostream & serialize (std::ostream &out) const
 Write a machine-readable string which allows to restore your specific input later. More...
 
- Public Member Functions inherited from WDataModuleInput
 WDataModuleInput ()
 Default constructor. More...
 
virtual ~WDataModuleInput ()
 Destructor. More...
 

Private Attributes

boost::filesystem::path m_filename
 The filename to load. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from WDataModuleInput
static SPtr create (std::string name, std::string parameter)
 Create an instance by using a parameter string. More...
 

Detailed Description

Implements a file based input for the WDataModule.

Definition at line 39 of file WDataModuleInputFile.h.

Member Typedef Documentation

◆ ConstSPtr

typedef std::shared_ptr< const WDataModuleInputFile > WDataModuleInputFile::ConstSPtr

Convenience typedef for a std::shared_ptr< const WDataModuleInputFile >.

Definition at line 50 of file WDataModuleInputFile.h.

◆ SPtr

Convenience typedef for a std::shared_ptr< WDataModuleInputFile >.

Definition at line 45 of file WDataModuleInputFile.h.

Constructor & Destructor Documentation

◆ WDataModuleInputFile() [1/2]

WDataModuleInputFile::WDataModuleInputFile ( boost::filesystem::path  fname)
explicit

Default constructor.

Parameters
fnamethe filename to use.

Definition at line 29 of file WDataModuleInputFile.cpp.

◆ WDataModuleInputFile() [2/2]

WDataModuleInputFile::WDataModuleInputFile ( std::string  fname)
explicit

Default constructor.

Parameters
fnamethe filename to use.

Definition at line 35 of file WDataModuleInputFile.cpp.

◆ ~WDataModuleInputFile()

WDataModuleInputFile::~WDataModuleInputFile ( )
virtual

Destructor.

Definition at line 41 of file WDataModuleInputFile.cpp.

Member Function Documentation

◆ asString()

std::string WDataModuleInputFile::asString ( ) const
virtual

The file input as human readable string.

Returns
the readable form.

Implements WDataModuleInput.

Definition at line 51 of file WDataModuleInputFile.cpp.

References m_filename.

◆ getExtendedInfo()

std::string WDataModuleInputFile::getExtendedInfo ( ) const
virtual

Return some extend information for the input, like complete path, server data (username, subject name, ...).

It is up to you.

Returns
some extended information as string.

Reimplemented from WDataModuleInput.

Definition at line 68 of file WDataModuleInputFile.cpp.

References m_filename.

◆ getFilename()

boost::filesystem::path WDataModuleInputFile::getFilename ( ) const

Get the filename to load.

Returns
the filename

Definition at line 46 of file WDataModuleInputFile.cpp.

References m_filename.

Referenced by WQtDataModuleInput::onChange().

+ Here is the caller graph for this function:

◆ getName()

std::string WDataModuleInputFile::getName ( ) const
virtual

Return a unique name for this input type.

This is used to identify a certain input later.

Returns
the name.

Implements WDataModuleInput.

Definition at line 63 of file WDataModuleInputFile.cpp.

◆ serialize()

std::ostream & WDataModuleInputFile::serialize ( std::ostream &  out) const
virtual

Write a machine-readable string which allows to restore your specific input later.

No line-breaks, no ":" and it must not be empty.

Parameters
outthe stream to serialize to
Returns
the stream

Implements WDataModuleInput.

Definition at line 56 of file WDataModuleInputFile.cpp.

Member Data Documentation

◆ m_filename

boost::filesystem::path WDataModuleInputFile::m_filename
private

The filename to load.

Definition at line 112 of file WDataModuleInputFile.h.

Referenced by asString(), getExtendedInfo(), and getFilename().


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