Removewinheader

This commit is contained in:
Schöberl, Joachim 2024-02-11 11:02:18 +01:00
parent 97de13cf30
commit b88535621f
13 changed files with 50 additions and 30 deletions

View File

@ -44,7 +44,7 @@ namespace GZSTREAM_NAMESPACE {
// class gzstreambuf:
// --------------------------------------
gzstreambuf* gzstreambuf::open( const filesystem::path & name, int open_mode) {
gzstreambuf* gzstreambuf::open( const std::filesystem::path & name, int open_mode) {
if ( is_open())
return (gzstreambuf*)0;
mode = open_mode;
@ -143,7 +143,7 @@ int gzstreambuf::sync() {
// class gzstreambase:
// --------------------------------------
gzstreambase::gzstreambase( const filesystem::path & name, int mode) {
gzstreambase::gzstreambase( const std::filesystem::path & name, int mode) {
init( &buf);
open( name.c_str(), mode);
}
@ -152,7 +152,7 @@ gzstreambase::~gzstreambase() {
buf.close();
}
void gzstreambase::open( const filesystem::path & name, int open_mode) {
void gzstreambase::open( const std::filesystem::path & name, int open_mode) {
if ( ! buf.open( name.c_str(), open_mode))
clear( rdstate() | std::ios::badbit);
}

View File

@ -62,7 +62,7 @@ public:
// ASSERT: both input & output capabilities will not be used together
}
int is_open() { return opened; }
gzstreambuf* open( const filesystem::path & name, int open_mode);
gzstreambuf* open( const std::filesystem::path & name, int open_mode);
gzstreambuf* close();
~gzstreambuf() { close(); }
@ -76,9 +76,9 @@ protected:
gzstreambuf buf;
public:
gzstreambase() { init(&buf); }
gzstreambase( const filesystem::path & name, int open_mode);
gzstreambase( const std::filesystem::path & name, int open_mode);
~gzstreambase();
void open( const filesystem::path & name, int open_mode);
void open( const std::filesystem::path & name, int open_mode);
void close();
gzstreambuf* rdbuf() { return &buf; }
};
@ -92,10 +92,10 @@ public:
class DLL_HEADER igzstream : public gzstreambase, public std::istream {
public:
igzstream() : std::istream( &buf) {}
igzstream( const filesystem::path & name, int open_mode = std::ios::in)
igzstream( const std::filesystem::path & name, int open_mode = std::ios::in)
: gzstreambase( name, open_mode), std::istream( &buf) {}
gzstreambuf* rdbuf() { return gzstreambase::rdbuf(); }
void open( const filesystem::path & name, int open_mode = std::ios::in) {
void open( const std::filesystem::path & name, int open_mode = std::ios::in) {
gzstreambase::open( name, open_mode);
}
};
@ -103,10 +103,10 @@ public:
class DLL_HEADER ogzstream : public gzstreambase, public std::ostream {
public:
ogzstream() : std::ostream( &buf) {}
ogzstream( const filesystem::path & name, int mode = std::ios::out)
ogzstream( const std::filesystem::path & name, int mode = std::ios::out)
: gzstreambase( name, mode), std::ostream( &buf) {}
gzstreambuf* rdbuf() { return gzstreambase::rdbuf(); }
void open( const filesystem::path & name, int open_mode = std::ios::out) {
void open( const std::filesystem::path & name, int open_mode = std::ios::out) {
gzstreambase::open( name, open_mode);
}
};

View File

@ -45,5 +45,4 @@ namespace netgen
// #include "mpi_interface.hpp"
#include "netgenout.hpp"
#endif

View File

@ -77,8 +77,8 @@ public:
template<typename TFunc>
void ParallelFor( int first, int next, const TFunc & f )
{
int nthreads = thread::hardware_concurrency();
thread * threads = new thread[nthreads];
int nthreads = std::thread::hardware_concurrency();
std::thread * threads = new std::thread[nthreads];
for (int i=0; i<nthreads; i++)
{
int myfirst = first + (next-first)*i/nthreads;
@ -97,7 +97,7 @@ void ParallelFor( int first, int next, const TFunc & f )
typedef void (*NgTaskManager)(std::function<void(int,int)>);
typedef void (*NgTracer)(string, bool); // false .. start, true .. stop
typedef void (*NgTracer)(std::string, bool); // false .. start, true .. stop
inline void DummyTaskManager (std::function<void(int,int)> func)
{
@ -105,7 +105,7 @@ void ParallelFor( int first, int next, const TFunc & f )
func(1,2);
}
inline void DummyTracer (string, bool) { ; }
inline void DummyTracer (std::string, bool) { ; }
template <typename FUNC>
inline void ParallelFor (NgTaskManager tm, size_t n, FUNC func)

View File

@ -16,7 +16,7 @@ namespace netgen
templates, global types, defines and variables
*/
DLL_HEADER extern const string netgen_version;
DLL_HEADER extern const std::string netgen_version;
/// The following value may be adapted to the hardware !
#ifndef CLOCKS_PER_SEC

View File

@ -5,6 +5,7 @@
#include <mystdlib.h>
#include <mydefs.hpp>
# ifdef __APPLE__
#define GL_SILENCE_DEPRECATION
#define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED

View File

@ -55,18 +55,23 @@ namespace metis { extern "C" {
# ifndef NO_PARALLEL_THREADS
# ifdef MSVC_EXPRESS
# else
# include <afxwin.h>
# include <afxmt.h>
// # include <afxwin.h>
// # include <afxmt.h>
# endif // MSVC_EXPRESS
# endif
# include <windows.h>
# undef WIN32_LEAN_AND_MEAN
# include <winnt.h>
// # include <winnt.h>
#else // Not using MC VC++
#endif
using namespace std;
// using namespace std;
namespace netgen
{
using namespace std;
}
#endif

View File

@ -9,6 +9,12 @@
#include "../include/opti.hpp"
/*** Windows headers ***/
#ifdef _MSC_VER
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# undef WIN32_LEAN_AND_MEAN
#endif
namespace netgen
{
@ -62,4 +68,6 @@ namespace netgen
#include "paralleltop.hpp"
#endif

View File

@ -1,4 +1,5 @@
#include <mystdlib.h>
#include <myadt.hpp>
#include <linalg.hpp>
#include <csg.hpp>
@ -6,7 +7,11 @@
#include <meshing.hpp>
#include <inctcl.hpp>
#include <visual.hpp>
#include <stlgeom.hpp>

View File

@ -13,13 +13,6 @@ Visualization
*/
// #ifdef PARALLEL
// #define PARALLELGL
// #endif
#include "visual_api.hpp"
#include "../include/incopengl.hpp"

View File

@ -1,6 +1,5 @@
#include <mystdlib.h>
// #include <incopengl.hpp>
#include <inctcl.hpp>
#include <myadt.hpp>
@ -8,7 +7,7 @@
#include <csg.hpp>
#include <stlgeom.hpp>
#include <inctcl.hpp>
// #include <parallel.hpp>
#include <visual.hpp>

View File

@ -1,8 +1,13 @@
#include <mystdlib.h>
#include <inctcl.hpp>
#include <meshing.hpp>
#include <inctcl.hpp>
#include <core/ngcore_api.hpp>
using std::string;
using std::endl;
using std::cout;
using std::cerr;
namespace netgen
{
NGCORE_API_EXPORT Flags parameters;

View File

@ -33,6 +33,11 @@ using netgen::verbose;
using netgen::NgArray;
using netgen::RegisterUserFormats;
using std::string;
using std::endl;
using std::cout;
using std::cerr;
using std::ofstream;