declare specialisations, needed by the merge build. add cpp minizip file

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20045 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2007-09-04 18:39:13 +00:00
parent 9862ca834e
commit 480981fdcd
2 changed files with 26 additions and 7 deletions

View File

@ -10,6 +10,7 @@ file(GLOB support_sources ${TOP_SRC_DIR}/src/support/${LYX_CPP_FILES})
file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_FILES}) file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_FILES})
file(GLOB support_minzip_sources ${TOP_SRC_DIR}/src/support/minizip/*.c) file(GLOB support_minzip_sources ${TOP_SRC_DIR}/src/support/minizip/*.c)
file(GLOB support_minzip_cpp_sources ${TOP_SRC_DIR}/src/support/minizip/*.cpp)
file(GLOB support_min_zip_headers ${TOP_SRC_DIR}/src/support/minizip/*.h) file(GLOB support_min_zip_headers ${TOP_SRC_DIR}/src/support/minizip/*.h)
list(REMOVE_ITEM support_sources list(REMOVE_ITEM support_sources
@ -35,15 +36,9 @@ if(NOT MERGE_FILES)
set(support_headers ${support_headers} ${support_minzip_headers}) set(support_headers ${support_headers} ${support_minzip_headers})
add_library(support ${library_type} ${support_sources} ${support_headers}) add_library(support ${library_type} ${support_sources} ${support_headers})
else() else()
# move to front
list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/convert.cpp)
list(APPEND support_sources ${TOP_SRC_DIR}/src/support/convert.cpp)
list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/lstrings.cpp)
list(APPEND support_sources ${TOP_SRC_DIR}/src/support/lstrings.cpp)
list(REVERSE support_sources)
lyx_const_touched_files(_allinone support_sources) lyx_const_touched_files(_allinone support_sources)
add_library(support ${library_type} ${_allinone_files} add_library(support ${library_type} ${_allinone_files}
${support_minzip_sources}) ${support_minzip_sources} ${support_minzip_cpp_sources})
endif() endif()

View File

@ -16,11 +16,35 @@
#ifndef CONVERT_H #ifndef CONVERT_H
#define CONVERT_H #define CONVERT_H
#include "support/docstring.h"
namespace lyx { namespace lyx {
template <class Target, class Source> template <class Target, class Source>
Target convert(Source arg); Target convert(Source arg);
template<> std::string convert<std::string>(bool b);
template<> std::string convert<std::string>(char c);
template<> std::string convert<std::string>(short unsigned int sui);
template<> std::string convert<std::string>(int i);
template<> docstring convert<docstring>(int i);
template<> std::string convert<std::string>(unsigned int ui);
template<> docstring convert<lyx::docstring>(unsigned int ui);
template<> std::string convert<std::string>(unsigned long ul);
template<> docstring convert<lyx::docstring>(unsigned long ul);
template<> std::string convert<std::string>(long l);
template<> docstring convert<lyx::docstring>(long l);
template<> std::string convert<std::string>(float f);
template<> std::string convert<std::string>(double d);
template<> int convert<int>(std::string const s);
template<> int convert<int>(lyx::docstring const s);
template<> unsigned int convert<unsigned int>(std::string const s);
template<> unsigned long convert<unsigned long>(std::string const s);
template<> double convert<double>(std::string const s);
template<> int convert<int>(char const * cptr);
template<> double convert<double>(char const * cptr);
} // namespace lyx } // namespace lyx
#endif #endif