print module name
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 03 May 2015 22:19:03 +0200
changeset 9598a575ae57f
parent 8 8dadf7d93aa3
child 10 145b45ef7751
print module name
c++/parameter-lister/CLI.cpp
c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp
c++/parameter-lister/info/globalcode/parameterLister/OutputModule.h
c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp
c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.h
     1.1 --- a/c++/parameter-lister/CLI.cpp	Sun May 03 22:07:10 2015 +0200
     1.2 +++ b/c++/parameter-lister/CLI.cpp	Sun May 03 22:19:03 2015 +0200
     1.3 @@ -57,15 +57,18 @@
     1.4  		boost::optional<string> outputModule = getenv(envName);
     1.5  
     1.6  		if (outputModule.is_initialized()) {
     1.7 -			cout << "ENV: " << envName << " = " << outputModule.get();
     1.8 +			cout << "ENV: " << envName << " = " << outputModule.get() << endl;
     1.9  		} else {
    1.10 -			cout << "ENV: " << envName << " is missing";
    1.11 +			cout << "ENV: " << envName << " is missing" << endl;
    1.12  		}
    1.13  	}
    1.14  	
    1.15  	{
    1.16  		OutputModule om;
    1.17  		TerminalOutputModule tom;
    1.18 +		
    1.19 +		om.process(cout);
    1.20 +		tom.process(cout);
    1.21  	}
    1.22  
    1.23  
     2.1 --- a/c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp	Sun May 03 22:07:10 2015 +0200
     2.2 +++ b/c++/parameter-lister/info/globalcode/parameterLister/OutputModule.cpp	Sun May 03 22:19:03 2015 +0200
     2.3 @@ -13,7 +13,12 @@
     2.4  OutputModule::~OutputModule() {
     2.5  }
     2.6  
     2.7 -}
     2.8 -}
     2.9 +void OutputModule::process(std::ostream &output) {
    2.10 +	output << "OutputModule!" << std::endl;
    2.11  }
    2.12  
    2.13 +
    2.14 +}
    2.15 +}
    2.16 +}
    2.17 +
     3.1 --- a/c++/parameter-lister/info/globalcode/parameterLister/OutputModule.h	Sun May 03 22:07:10 2015 +0200
     3.2 +++ b/c++/parameter-lister/info/globalcode/parameterLister/OutputModule.h	Sun May 03 22:19:03 2015 +0200
     3.3 @@ -1,6 +1,8 @@
     3.4  #ifndef OUTPUTMODULE_H
     3.5  #define	OUTPUTMODULE_H
     3.6  
     3.7 +#include <iostream>
     3.8 +
     3.9  namespace info {
    3.10  namespace globalcode {
    3.11  namespace parameterLister {
    3.12 @@ -10,6 +12,7 @@
    3.13  	OutputModule();
    3.14  	OutputModule(const OutputModule& orig);
    3.15  	virtual ~OutputModule();
    3.16 +	void process(std::ostream &output);
    3.17  private:
    3.18  
    3.19  };
     4.1 --- a/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp	Sun May 03 22:07:10 2015 +0200
     4.2 +++ b/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.cpp	Sun May 03 22:19:03 2015 +0200
     4.3 @@ -13,7 +13,11 @@
     4.4  TerminalOutputModule::~TerminalOutputModule() {
     4.5  }
     4.6  
     4.7 -}
     4.8 -}
     4.9 +void TerminalOutputModule::process(std::ostream &output) {
    4.10 +	output << "TerminalOutputModule!" << std::endl;
    4.11  }
    4.12  
    4.13 +}
    4.14 +}
    4.15 +}
    4.16 +
     5.1 --- a/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.h	Sun May 03 22:07:10 2015 +0200
     5.2 +++ b/c++/parameter-lister/info/globalcode/parameterLister/TerminalOutputModule.h	Sun May 03 22:19:03 2015 +0200
     5.3 @@ -1,6 +1,8 @@
     5.4  #ifndef TERMINALOUTPUTMODULE_H
     5.5  #define	TERMINALOUTPUTMODULE_H
     5.6  
     5.7 +#include <iostream>
     5.8 +
     5.9  namespace info {
    5.10  namespace globalcode {
    5.11  namespace parameterLister {
    5.12 @@ -10,6 +12,7 @@
    5.13  	TerminalOutputModule();
    5.14  	TerminalOutputModule(const TerminalOutputModule& orig);
    5.15  	virtual ~TerminalOutputModule();
    5.16 +	void process(std::ostream &output);
    5.17  private:
    5.18  
    5.19  };