git-svn-id: svn://ultimatepp.org/upp/trunk@7196 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-04-09 06:42:23 +00:00
parent 3a7254eb8c
commit 83c67cd38f
4 changed files with 45 additions and 0 deletions

30
upptst/INI/INI.cpp Normal file
View file

@ -0,0 +1,30 @@
#include <Core/Core.h>
using namespace Upp;
namespace Config {
INI_STRING(text, "default text", "Text parameter");
};
struct Test {
int x;
String a;
};
Test y = { 123, "123" };
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
SetIniFile(GetDataFile("test.ini"));
for(;;) {
LOG(Config::text);
LOG(GetIniInfoFormatted());
getchar();
SetIniFile(GetDataFile("test.ini"));
}
}

10
upptst/INI/INI.upp Normal file
View file

@ -0,0 +1,10 @@
uses
Core;
file
test.ini,
INI.cpp;
mainconfig
"" = "SSE2";

4
upptst/INI/init Normal file
View file

@ -0,0 +1,4 @@
#ifndef _INI_icpp_init_stub
#define _INI_icpp_init_stub
#include "Core/init"
#endif

1
upptst/INI/test.ini Normal file
View file

@ -0,0 +1 @@
text = Just a test