#undef new
#endif
-#if wxUSE_IOSTREAMH
-#include <iostream.h>
-#include <fstream.h>
-#else
-#include <iostream>
-#include <fstream>
-#ifdef _MSC_VER
-//using namespace std;
-#endif
-#endif
-
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
}
// Input/output
-#ifdef PROLOGIO
+#if wxUSE_PROLOGIO
bool wxDiagram::SaveFile(const wxString& filename)
{
wxBeginBusyCursor();
}
OnDatabaseSave(*database);
- char tempFile[400];
- wxGetTempFileName("diag", tempFile);
- FILE* file = fopen(tempFile, "w");
+ wxString tempFile;
+ wxGetTempFileName(wxT("diag"), tempFile);
+ FILE* file = fopen(tempFile.mb_str(wxConvFile), "w");
if (! file)
{
wxEndBusyCursor();
wxExpr *clause = database.FindClauseByFunctor("shape");
while (clause)
{
- char *type = NULL;
+ wxChar *type = NULL;
long parentId = -1;
- clause->AssignAttributeValue("type", &type);
- clause->AssignAttributeValue("parent", &parentId);
+ clause->AssignAttributeValue(wxT("type"), &type);
+ clause->AssignAttributeValue(wxT("parent"), &parentId);
wxClassInfo *classInfo = wxClassInfo::FindClass(type);
if (classInfo)
{
wxExpr *clause = database.FindClauseByFunctor("line");
while (clause)
{
- wxString type("");
+ wxString type;
long parentId = -1;
clause->GetAttributeValue("type", type);
clause->GetAttributeValue("parent", parentId);
- wxClassInfo *classInfo = wxClassInfo::FindClass((char*) (const char*) type);
+ wxClassInfo *classInfo = wxClassInfo::FindClass(type);
if (classInfo)
{
wxLineShape *shape = (wxLineShape *)classInfo->CreateObject();