OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Static Public Member Functions | List of all members
WDataModuleInput Class Referenceabstract

This class is the abstract interface to all the possible inputs a WDataModule might handle. More...

#include <WDataModuleInput.h>

+ Inheritance diagram for WDataModuleInput:

Public Types

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

 WDataModuleInput ()
 Default constructor. More...
 
virtual ~WDataModuleInput ()
 Destructor. More...
 
virtual std::string getName () const =0
 Return a unique name for this input type. More...
 
virtual std::string asString () const =0
 Return a human-readable form of the input. 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 =0
 Write a machine-readable string which allows to restore your specific input later. More...
 

Static Public Member Functions

static SPtr create (std::string name, std::string parameter)
 Create an instance by using a parameter string. More...
 

Detailed Description

This class is the abstract interface to all the possible inputs a WDataModule might handle.

The classes can be specialized into streamed inputs, file inputs and similar.

Definition at line 37 of file WDataModuleInput.h.

Member Typedef Documentation

◆ ConstSPtr

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

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

Definition at line 48 of file WDataModuleInput.h.

◆ SPtr

typedef std::shared_ptr< WDataModuleInput > WDataModuleInput::SPtr

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

Definition at line 43 of file WDataModuleInput.h.

Constructor & Destructor Documentation

◆ WDataModuleInput()

WDataModuleInput::WDataModuleInput ( )

Default constructor.

Definition at line 32 of file WDataModuleInput.cpp.

◆ ~WDataModuleInput()

WDataModuleInput::~WDataModuleInput ( )
virtual

Destructor.

Definition at line 37 of file WDataModuleInput.cpp.

Member Function Documentation

◆ asString()

virtual std::string WDataModuleInput::asString ( ) const
pure virtual

Return a human-readable form of the input.

Like filenames, server names and similar.

Returns
the input as string

Implemented in WDataModuleInputFile.

◆ create()

WDataModuleInput::SPtr WDataModuleInput::create ( std::string  name,
std::string  parameter 
)
static

Create an instance by using a parameter string.

This is the string you define by the serialize() call.

Parameters
parameterthe parameter string
namethe name string
Returns
an instance of WDataModuleInput

Definition at line 42 of file WDataModuleInput.cpp.

References wlog::error().

Referenced by WModuleProjectFileCombiner::parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExtendedInfo()

std::string WDataModuleInput::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 in WDataModuleInputFile.

Definition at line 55 of file WDataModuleInput.cpp.

◆ getName()

virtual std::string WDataModuleInput::getName ( ) const
pure virtual

Return a unique name for this input type.

This is used to identify a certain input later.

Returns
the name.

Implemented in WDataModuleInputFile.

◆ serialize()

virtual std::ostream& WDataModuleInput::serialize ( std::ostream &  out) const
pure 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

Implemented in WDataModuleInputFile.


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