Skip to content

Commit dbac0bb

Browse files
committed
created engines (maybe superfluous, but well)
1 parent 80ebf3b commit dbac0bb

27 files changed

+1535
-625
lines changed

clean.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
find . | grep -ie ~| xargs -I {} rm {}; rm -rf tmp/*

src/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
# --- add subdirectories
44
#
55

6+
include_directories(engines)
7+
add_subdirectory(engines)
68
include_directories(processors)
79
add_subdirectory(processors)
8-
set (openpablo_libs processors)
910

11+
set (openpablo_libs engines processors)
12+
1013

1114
# --- Add files for openpablo main
1215
#
@@ -64,7 +67,7 @@ ELSE (${OPENPABLO_SHARED_LIBS})
6467
ENDIF (NOT WIN32)
6568

6669
# ADD_LIBRARY(openpablo STATIC ${CELESTE_SRC})
67-
# TARGET_LINK_LIBRARIES(openpablo processors ${common_libs})
70+
# TARGET_LINK_LIBRARIES(openpablo engines processors ${common_libs})
6871
# set_target_properties(openpablo PROPERTIES VERSION ${openpablo_LIB_VERSION})
6972
ENDIF (${OPENPABLO_SHARED_LIBS})
7073

src/engine/Engine.cpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/engine/Engine.hpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/engines/BauhausEngine.cpp

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/*
2+
* BauhausEngine.cpp
3+
*
4+
*
5+
* This file is part of openPablo.
6+
*
7+
* Copyright (c) 2012- Aydin Demircioglu ([email protected])
8+
*
9+
* openPablo is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU General Public License as published by
11+
* the Free Software Foundation, either version 3 of the License, or
12+
* (at your option) any later version.
13+
*
14+
* openPablo is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU General Public License
20+
* along with openPablo. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
#include "BauhausEngine.hpp"
24+
25+
#include <Magick++.h>
26+
#include <magick/MagickCore.h>
27+
#include <string>
28+
#include <QString>
29+
#include <QDebug>
30+
#include <QDir>
31+
32+
33+
/*
34+
* @mainpage BauhausEngine
35+
*
36+
* Description in html
37+
* @author Aydin Demircioglu
38+
*/
39+
40+
41+
/*
42+
* @file BauhausEngine.cpp
43+
*
44+
* @brief description in brief.
45+
*
46+
*/
47+
48+
using namespace Magick;
49+
50+
51+
52+
namespace openPablo
53+
{
54+
55+
/*
56+
* @class BauhausEngine
57+
*
58+
* @brief Abstract class to interface the capabilities of a processor
59+
*
60+
* Abstract class..
61+
*
62+
*/
63+
64+
65+
BauhausEngine::BauhausEngine()
66+
{
67+
//
68+
}
69+
70+
71+
72+
BauhausEngine::~BauhausEngine()
73+
{
74+
//
75+
}
76+
77+
78+
79+
void BauhausEngine::start ()
80+
{
81+
// Initialize ImageMagick install location for Windowsm
82+
// just to be sure
83+
InitializeMagick(NULL);
84+
85+
}
86+
87+
88+
89+
void BauhausEngine::setMagickImage (Magick::Image _magickImage)
90+
{
91+
// easy as we do not need to convert
92+
magickImage = _magickImage;
93+
}
94+
95+
96+
97+
Magick::Image BauhausEngine::getMagickImage ()
98+
{
99+
// easy as we do not need to convert
100+
return magickImage;
101+
}
102+
103+
104+
}

src/engines/BauhausEngine.hpp

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/*
2+
* BauhausEngine.hpp
3+
*
4+
*
5+
* This file is part of openPablo.
6+
*
7+
* Copyright (c) 2012- Aydin Demircioglu ([email protected])
8+
*
9+
* openPablo is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU General Public License as published by
11+
* the Free Software Foundation, either version 3 of the License, or
12+
* (at your option) any later version.
13+
*
14+
* openPablo is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU General Public License
20+
* along with openPablo. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
24+
#ifndef OPENPABLO_BAUHAUSENGINE_H_
25+
#define OPENPABLO_BAUHAUSENGINE_H_
26+
27+
/*
28+
* @mainpage BauhausEngine
29+
*
30+
* Description in html
31+
* @author Aydin Demircioglu
32+
*/
33+
34+
35+
/*
36+
* @file BauhausEngine.hpp
37+
*
38+
* @brief description in brief.
39+
*
40+
*/
41+
42+
43+
#include <QString>
44+
45+
#include <Magick++.h>
46+
47+
#include "Engine.hpp"
48+
49+
50+
using namespace Magick;
51+
52+
53+
namespace openPablo
54+
{
55+
56+
/*
57+
* @class Engine
58+
*
59+
* @brief Abstract class to interface the capabilities of a engine
60+
*
61+
* Abstract class..
62+
*
63+
*/
64+
class BauhausEngine: public Engine
65+
{
66+
public:
67+
/*
68+
*
69+
*/
70+
71+
BauhausEngine();
72+
73+
virtual ~BauhausEngine();
74+
75+
virtual void start ();
76+
77+
virtual void setMagickImage (Magick::Image _magickImage);
78+
79+
virtual Magick::Image getMagickImage ();
80+
81+
82+
private:
83+
84+
Magick::Image magickImage;
85+
86+
};
87+
88+
}
89+
90+
91+
#endif

src/engines/CMakeLists.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
#
3+
# Add files for openpablo
4+
#
5+
6+
SET(ENGINES_SOURCE
7+
Engine.cpp
8+
EngineFactory.cpp
9+
BauhausEngine.cpp
10+
MagickEngine.cpp
11+
)
12+
13+
14+
SET(ENGINES_HEADER
15+
Engine.hpp
16+
EngineFactory.hpp
17+
BauhausEngine.hpp
18+
MagickEngine.hpp
19+
)
20+
21+
22+
IF (${OPENPABLO_SHARED_LIBS})
23+
add_library(engines SHARED ${ENGINES_SOURCE} ${ENGINES_HEADER})
24+
#target_link_libraries(engines ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
25+
#set_target_properties(engines PROPERTIES VERSION ${HUGIN_LIB_VERSION})
26+
IF(WIN32)
27+
install(TARGETS engines RUNTIME DESTINATION ${BINDIR})
28+
ELSEIF(${HUGIN_LIBS_PRIVATE_DIR})
29+
install(TARGETS engines LIBRARY DESTINATION ${LIBDIR}/hugin NAMELINK_SKIP)
30+
ELSE(WIN32)
31+
install(TARGETS engines LIBRARY DESTINATION ${LIBDIR} NAMELINK_SKIP)
32+
ENDIF(WIN32)
33+
ELSE (${OPENPABLO_SHARED_LIBS})
34+
add_library(engines STATIC ${ENGINES_SOURCE} ${ENGINES_HEADER})
35+
ENDIF (${OPENPABLO_SHARED_LIBS})
36+
37+
target_link_libraries(engines ${QT_LIBRARIES}) # ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
38+
install(TARGETS engines DESTINATION lib)
39+

src/engines/Engine.cpp

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
* Engine.cpp
3+
*
4+
*
5+
* This file is part of openPablo.
6+
*
7+
* Copyright (c) 2012- Aydin Demircioglu ([email protected])
8+
*
9+
* openPablo is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU General Public License as published by
11+
* the Free Software Foundation, either version 3 of the License, or
12+
* (at your option) any later version.
13+
*
14+
* openPablo is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU General Public License
20+
* along with openPablo. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
#include "Engine.hpp"
24+
25+
26+
/*
27+
* @mainpage Engine
28+
*
29+
* Description in html
30+
* @author Aydin Demircioglu
31+
*/
32+
33+
34+
/*
35+
* @file Engine.cpp
36+
*
37+
* @brief description in brief.
38+
*
39+
*/
40+
41+
42+
43+
namespace openPablo
44+
{
45+
46+
/*
47+
* @class Engine
48+
*
49+
* @brief Abstract class to interface the capabilities of a processor
50+
*
51+
* Abstract class..
52+
*
53+
*/
54+
55+
56+
void Engine::setSettings (boost::property_tree::ptree _pt)
57+
{
58+
pt = _pt;
59+
}
60+
61+
62+
63+
void Engine::setFilename (QString _filename)
64+
{
65+
filename = _filename;
66+
}
67+
68+
69+
70+
Engine::~Engine()
71+
{
72+
//
73+
}
74+
75+
76+
}

0 commit comments

Comments
 (0)