New IfcGeomObjects setting to force alignment of TopoDS_Face normal to CCW orientation

Removed static Ifc class, renamed to non-static IfcFile. IfcFile renamed to IfcSpfStream
Introduced Logger class
This commit is contained in:
Thomas Krijnen
2012-12-31 14:17:16 +00:00
parent 23450c7c39
commit 22ab3ad06a
22 changed files with 581 additions and 437 deletions
+29 -1
View File
@@ -22,6 +22,7 @@
#include <string>
#include <vector>
#include <sstream>
#include "../ifcparse/SharedPointer.h"
#include "../ifcparse/Ifc2x3enum.h"
@@ -132,9 +133,14 @@ namespace IfcUtil {
};
}
namespace IfcParse {
class IfcFile;
}
class Argument {
protected:
public:
//void* file;
//public:
virtual operator int() const = 0;
virtual operator bool() const = 0;
virtual operator double() const = 0;
@@ -154,6 +160,7 @@ public:
class IfcAbstractEntity {
public:
IfcParse::IfcFile* file;
virtual IfcEntities getInverse(Ifc2x3::Type::Enum c = Ifc2x3::Type::ALL) = 0;
virtual IfcEntities getInverse(Ifc2x3::Type::Enum c, int i, const std::string& a) = 0;
virtual std::string datatype() = 0;
@@ -166,4 +173,25 @@ public:
virtual unsigned int id() = 0;
};
class Logger {
public:
typedef enum { LOG_NOTICE, LOG_WARNING, LOG_ERROR } Severity;
private:
static std::ostream* log1;
static std::ostream* log2;
static std::stringstream log_stream;
static Severity verbosity;
static char* severity_strings[];
public:
/// Determines to what stream respectively progress and errors are logged
static void SetOutput(std::ostream* l1, std::ostream* l2);
/// Determines the types of log messages to get logged
static void Verbosity(Severity v);
static Severity Verbosity();
/// Log a message to the output stream
static void Message(Severity type, const std::string& message, const IfcAbstractEntityPtr entity=0);
static void Status(const std::string& message, bool new_line=true);
static std::string Logger::GetLog();
};
#endif