mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
27 lines
437 B
C++
27 lines
437 B
C++
#include <Core/Core.h>
|
|
|
|
using namespace Upp;
|
|
|
|
void Do(Any& x)
|
|
{
|
|
if(x.Is<String>())
|
|
LOG("String: " << x.Get<String>());
|
|
if(x.Is<FileIn>()) {
|
|
LOG("--- File: ");
|
|
LOG(LoadStream(x.Get<FileIn>()));
|
|
LOG("----------");
|
|
}
|
|
if(x.IsEmpty())
|
|
LOG("empty");
|
|
}
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
Any x;
|
|
x.Create<String>() = "Hello!";
|
|
Do(x);
|
|
x.Create<FileIn>().Open(GetDataFile("Ntl12.cpp"));
|
|
Do(x);
|
|
x.Clear();
|
|
Do(x);
|
|
}
|