- Avoids changing WriteJSONObject() API and makes more sense
- WriteJSONObject(f, class(ClassDoc), clDoc, 0, true);
+ WriteECONObject(f, class(ClassDoc), clDoc, 0);
- WriteJSONObject(f, class(NamespaceDoc), nsDoc, 0, true);
+ WriteECONObject(f, class(NamespaceDoc), nsDoc, 0);
f = FileOpen(filePath, write);
if(f)
{
f = FileOpen(filePath, write);
if(f)
{
- WriteJSONObject(f, class(NamespaceDoc), namespaceDoc, 0, true);
+ WriteECONObject(f, class(NamespaceDoc), namespaceDoc, 0);
f = FileOpen(filePath, write);
if(f)
{
f = FileOpen(filePath, write);
if(f)
{
- WriteJSONObject(f, class(ClassDoc), classDoc, 0, true);
+ WriteECONObject(f, class(ClassDoc), classDoc, 0);
-bool WriteMap(File f, Class type, Map map, int indent, bool eCON)
+static bool WriteMap(File f, Class type, Map map, int indent, bool eCON)
else
isFirst = false;
for(i = 0; i<indent; i++) f.Puts(" ");
else
isFirst = false;
for(i = 0; i<indent; i++) f.Puts(" ");
- _WriteJSONObject(f, mapNodeClass, n, indent, eCON, eCON ? true : false);
+ WriteONObject(f, mapNodeClass, n, indent, eCON, eCON ? true : false);
}
f.Puts("\n");
indent--;
}
f.Puts("\n");
indent--;
-bool WriteArray(File f, Class type, Container array, int indent, bool eCON)
+static bool WriteArray(File f, Class type, Container array, int indent, bool eCON)
-bool WriteNumber(File f, Class type, DataValue value, int indent, bool eCON)
+static bool WriteNumber(File f, Class type, DataValue value, int indent, bool eCON)
{
char buffer[1024];
bool needClass = eCON;
{
char buffer[1024];
bool needClass = eCON;
-bool WriteValue(File f, Class type, DataValue value, int indent, bool eCON)
+static bool WriteValue(File f, Class type, DataValue value, int indent, bool eCON)
{
if(!strcmp(type.name, "String") || !strcmp(type.dataTypeString, "char *"))
{
{
if(!strcmp(type.name, "String") || !strcmp(type.dataTypeString, "char *"))
{
}
else if(type.type == normalClass || type.type == noHeadClass || type.type == structClass)
{
}
else if(type.type == normalClass || type.type == noHeadClass || type.type == structClass)
{
- _WriteJSONObject(f, type, value.p, indent, eCON, false);
+ WriteONObject(f, type, value.p, indent, eCON, false);
}
else if(eClass_IsDerived(type, class(ColorAlpha)))
{
}
else if(eClass_IsDerived(type, class(ColorAlpha)))
{
-public bool WriteJSONObject(File f, Class objectType, void * object, int indent, bool eCON)
+public bool WriteJSONObject(File f, Class objectType, void * object, int indent)
{
bool result = false;
if(object)
{
{
bool result = false;
if(object)
{
- result = _WriteJSONObject(f, objectType, object, indent, eCON, false);
+ result = WriteONObject(f, objectType, object, indent, false, false);
f.Puts("\n");
}
return result;
}
f.Puts("\n");
}
return result;
}
-static bool _WriteJSONObject(File f, Class objectType, void * object, int indent, bool eCON, bool omitDefaultIdentifier)
+public bool WriteECONObject(File f, Class objectType, void * object, int indent)
+{
+ bool result = false;
+ if(object)
+ {
+ result = WriteONObject(f, objectType, object, indent, true, false);
+ f.Puts("\n");
+ }
+ return result;
+}
+
+static bool WriteONObject(File f, Class objectType, void * object, int indent, bool eCON, bool omitDefaultIdentifier)
-Class eSystem_SuperFindClass(const String name, Module alternativeModule)
+static Class eSystem_SuperFindClass(const String name, Module alternativeModule)
{
Class _class = eSystem_FindClass(__thisModule, name);
if(!_class && alternativeModule)
{
Class _class = eSystem_FindClass(__thisModule, name);
if(!_class && alternativeModule)
-bool isSubclass(const String name, Class type)
+static bool isSubclass(const String name, Class type)
{
Class _class = eSystem_SuperFindClass(name, type.module);
if(eClass_IsDerived(_class, type))
{
Class _class = eSystem_SuperFindClass(name, type.module);
if(eClass_IsDerived(_class, type))
SettingsIOResult ::Save(File f, GlobalSettings globalSettings)
{
SettingsIOResult result = error;
SettingsIOResult ::Save(File f, GlobalSettings globalSettings)
{
SettingsIOResult result = error;
- if(globalSettings && WriteJSONObject(f, globalSettings.data._class, globalSettings.data, 0, false))
+ if(globalSettings && WriteJSONObject(f, globalSettings.data._class, globalSettings.data, 0))
result = success;
return result;
}
result = success;
return result;
}
files.Remove(resNode);
version = 0.2f;
files.Remove(resNode);
version = 0.2f;
- WriteJSONObject(f, class(Project), this, 0, false);
+ WriteJSONObject(f, class(Project), this, 0);