Fix some errors and warnings

This commit is contained in:
Thomas Krijnen
2012-12-31 14:29:18 +00:00
parent 22ab3ad06a
commit 8895368ae3
6 changed files with 4041 additions and 4041 deletions
+7 -7
View File
@@ -122,11 +122,11 @@ class ArrayType:
self.lower = l[1]
def __str__(self):
if self.type in entity_names:
return "SHARED_PTR< IfcTemplatedEntityList<%s> >"%self.type
return "SHARED_PTR< IfcTemplatedEntityList< %s > >"%self.type
elif self.type in selections:
return "SHARED_PTR< IfcTemplatedEntityList<IfcAbstractSelect> >"
return "SHARED_PTR< IfcTemplatedEntityList< IfcAbstractSelect > >"
else:
return "std::vector<%(type)s> /*[%(lower)s:%(upper)s]*/"%self.__dict__
return "std::vector< %(type)s > /*[%(lower)s:%(upper)s]*/"%self.__dict__
def type_enum(self):
if self.type in simple_types:
t = simple_types[self.type].type_enum()
@@ -167,7 +167,7 @@ class EnumType:
elif generator_mode == 'SOURCE_TO':
return '{ "%s" }'%'","'.join([v1 for v1,v2 in self.v])
elif generator_mode == 'SOURCE_FROM':
return "".join([' if(s=="%s"%s) return %s::%s;\n'%(v1.upper()," "*(self.maxlen-len(v1)),"%(name)s",v2) for v1,v2 in self.v])
return "".join([' if(s=="%s"%s) return ::%s::%s::%s;\n'%(v1.upper()," "*(self.maxlen-len(v1)),schema_version,"%(name)s",v2) for v1,v2 in self.v])
def __len__(self): return len(self.v)
def type_enum(self):
return "Argument_ENUMERATION"
@@ -292,7 +292,7 @@ class InverseList:
s = ""
for i in self.l:
if generator_mode == 'HEADER':
s += "\n SHARED_PTR< IfcTemplatedEntityList<%s> > %s(); // INVERSE %s::%s"%(i.type.type,i.name,i.type.type,i.reference)
s += "\n SHARED_PTR< IfcTemplatedEntityList< %s > > %s(); // INVERSE %s::%s"%(i.type.type,i.name,i.type.type,i.reference)
elif generator_mode == 'SOURCE':
s += "\n%s::list %s::%s() { RETURN_INVERSE(%s) }"%(i.type.type,"%(class_name)s",i.name,i.type.type)
return s
@@ -317,8 +317,8 @@ class Classdef:
"\n static Type::Enum Class();"+
"\n %(class_name)s (IfcAbstractEntityPtr e = IfcAbstractEntityPtr());"+
"\n typedef %(class_name)s* ptr;"+
"\n typedef SHARED_PTR< IfcTemplatedEntityList<%(class_name)s> > list;"+
"\n typedef IfcTemplatedEntityList<%(class_name)s>::it it;")%self.__dict__
"\n typedef SHARED_PTR< IfcTemplatedEntityList< %(class_name)s > > list;"+
"\n typedef IfcTemplatedEntityList< %(class_name)s >::it it;")%self.__dict__
)
elif generator_mode == 'SOURCE':
self.arguments.argstart = argument_start(self.class_name)
+1 -1
View File
@@ -8,7 +8,7 @@
} \
} catch(...) { } \
Logger::Message(Logger::LOG_ERROR,"Failed to convert:",l->entity); \
return false; \
return 0; \
}
#include "IfcRegisterDef.h"
+1442 -1442
View File
File diff suppressed because it is too large Load Diff
+2588 -2588
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -93,4 +93,4 @@ std::ostream* Logger::log1 = 0;
std::ostream* Logger::log2 = 0;
std::stringstream Logger::log_stream;
Logger::Severity Logger::verbosity = Logger::LOG_NOTICE;
char* Logger::severity_strings[] = { "Notice","Warning","Error" };
const char* Logger::severity_strings[] = { "Notice","Warning","Error" };
+2 -2
View File
@@ -181,7 +181,7 @@ private:
static std::ostream* log2;
static std::stringstream log_stream;
static Severity verbosity;
static char* severity_strings[];
static const char* severity_strings[];
public:
/// Determines to what stream respectively progress and errors are logged
static void SetOutput(std::ostream* l1, std::ostream* l2);
@@ -191,7 +191,7 @@ public:
/// 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();
static std::string GetLog();
};
#endif