mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
reference: ValueRef
git-svn-id: svn://ultimatepp.org/upp/trunk@7678 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
1f45c48921
commit
ad4141809b
3 changed files with 30 additions and 0 deletions
15
reference/ValueRef/ValueRef.cpp
Normal file
15
reference/ValueRef/ValueRef.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_FILE|LOG_COUT);
|
||||
Value v;
|
||||
for(int i = 0; i < 3; i++) {
|
||||
Value& p = v.At(i)("person");
|
||||
p("name") = "Name" + AsString(i + 1);
|
||||
p("lastname") = "LastName" + AsString(i + 1);
|
||||
}
|
||||
LOG(AsJSON(v));
|
||||
}
|
||||
11
reference/ValueRef/ValueRef.upp
Normal file
11
reference/ValueRef/ValueRef.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
description "Demonstrates Value referencing/mutating operations\377";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
ValueRef.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2";
|
||||
|
||||
4
reference/ValueRef/init
Normal file
4
reference/ValueRef/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _ValueRef_icpp_init_stub
|
||||
#define _ValueRef_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue