mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.docs
This commit is contained in:
parent
88cb45434b
commit
f568ba43b0
6 changed files with 218 additions and 5 deletions
|
|
@ -258,7 +258,7 @@ public:
|
|||
operator const T*() const { return (T*)vector; }
|
||||
|
||||
Vector& operator<<(const T& x) { Add(x); return *this; }
|
||||
Vector& operator<<(T&& x) { Add(pick(x)); return *this; }
|
||||
Vector& operator<<(T&& x) { Add(pick(x)); return *this; }
|
||||
|
||||
#ifdef UPP
|
||||
void Serialize(Stream& s) { StreamContainer(s, *this); }
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ is that [* pos] is range checked in debug mode.&]
|
|||
[s7; [*/ Return value]-|Iterator.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;K%- friend_[@(0.0.255) void][@(64) _]Swap[@(64) (][^`:`:BiArray^@(64) BiArray][@(64) `&_][@3 a
|
||||
[s5;K%- friend_[@(0.0.255) void][@(64) _][* Swap][@(64) (][^`:`:BiArray^@(64) BiArray][@(64) `&_][@3 a
|
||||
][@(64) , ][^`:`:BiArray^@(64) BiArray][@(64) `&_][@3 b][@(64) )]&]
|
||||
[s2; Specialization of the generic [* Swap] for BiArrays. Swaps BiArray
|
||||
in low constant time operation.&]
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ from [%-*@4 TT]. [%-*@4 T] must be polymorphic.&]
|
|||
[s0; &]
|
||||
[ {{10000@(113.42.0) [s0;%% [*@7;4 MakeOne]]}}&]
|
||||
[s0; &]
|
||||
[s5;:Upp`:`:MakeOne`(Args`.`.`.args`): [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 T],
|
||||
[s5;:Upp`:`:MakeOne`(Args`&`&`.`.`.`): [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 T],
|
||||
[@(0.0.255) class...]_[*@4 Args]>_[_^Upp`:`:One^ One]<[*@4 T]>_[* MakeOne]([*@4 Args][@(0.0.255) .
|
||||
..]_args)&]
|
||||
[s2;%% This simple utility function creates One<T> instance.&]
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@ s...]_[*@4 Args]>_[*@4 T][@(0.0.255) `&]_[* Create]([*@4 Args][@(0.0.255) ...]_a
|
|||
&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:Vector`:`:Create`(Args`&`&`.`.`.args`):%- [@(0.0.255) template]_<[@(0.0.255) c
|
||||
lass...]_[*@4 Args]>_[*@4 T][@(0.0.255) `&]_[* Create]([*@4 Args][@(0.0.255) `&`&...]_args)&]
|
||||
[s5;:Upp`:`:Vector`:`:Create`(Args`&`&`.`.`.`):%- [@(0.0.255) template]_<[@(0.0.255) clas
|
||||
s...]_[*@4 Args]>_[*@4 T][@(0.0.255) `&]_[* Create]([*@4 Args][@(0.0.255) `&`&...]_args)&]
|
||||
[s2; Creates and adds a new element to the Array. [%-*@3 args] are
|
||||
forwarded to constructor.&]
|
||||
[s3; &]
|
||||
|
|
|
|||
9
upptst/Annotations/Annotations.upp
Normal file
9
upptst/Annotations/Annotations.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
204
upptst/Annotations/main.cpp
Normal file
204
upptst/Annotations/main.cpp
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
/*
|
||||
STRUCT,
|
||||
STRUCTTEMPLATE,
|
||||
TYPEDEF,
|
||||
CONSTRUCTOR,
|
||||
DESTRUCTOR,
|
||||
FUNCTION,
|
||||
INSTANCEFUNCTION,
|
||||
CLASSFUNCTION,
|
||||
FUNCTIONTEMPLATE,
|
||||
INSTANCEFUNCTIONTEMPLATE,
|
||||
CLASSFUNCTIONTEMPLATE,
|
||||
INLINEFRIEND,
|
||||
VARIABLE,
|
||||
INSTANCEVARIABLE,
|
||||
CLASSVARIABLE,
|
||||
ENUM,
|
||||
MACRO,
|
||||
FRIENDCLASS,
|
||||
NAMESPACE,
|
||||
FLAGTEST,
|
||||
*/
|
||||
|
||||
void *Bar();
|
||||
int& Bar2();
|
||||
|
||||
#define MACRO
|
||||
|
||||
#define FN_MACRO(x)
|
||||
|
||||
enum Enum {
|
||||
EnumItem,
|
||||
EnumItem2 = 2,
|
||||
|
||||
};
|
||||
|
||||
void Function();
|
||||
|
||||
void Function()
|
||||
{
|
||||
}
|
||||
|
||||
String global_variable;
|
||||
static String static_variable;
|
||||
|
||||
struct Struct {
|
||||
enum { NAME };
|
||||
|
||||
operator String();
|
||||
|
||||
String attribute;
|
||||
static String meta_attribute;
|
||||
|
||||
void Method(String param, int foo);
|
||||
static void ClassMethod(int param);
|
||||
|
||||
void Method();
|
||||
static void ClassMethod();
|
||||
|
||||
Struct();
|
||||
~Struct();
|
||||
};
|
||||
|
||||
String Struct::meta_attribute;
|
||||
|
||||
void Struct::Method(String param)
|
||||
{
|
||||
String x;
|
||||
}
|
||||
|
||||
void Struct::Test()
|
||||
{
|
||||
}
|
||||
|
||||
void Struct::ClassMethod(int param)
|
||||
{
|
||||
}
|
||||
|
||||
void Struct::Method()
|
||||
{
|
||||
}
|
||||
|
||||
void Struct::ClassMethod()
|
||||
{
|
||||
}
|
||||
|
||||
Struct::Struct()
|
||||
{
|
||||
}
|
||||
|
||||
Struct::~Struct()
|
||||
{
|
||||
}
|
||||
|
||||
Struct h;
|
||||
|
||||
void Foo() {
|
||||
h.
|
||||
}
|
||||
|
||||
class Class {
|
||||
int x;
|
||||
|
||||
Class();
|
||||
~Class();
|
||||
};
|
||||
|
||||
union Union {
|
||||
int x, y;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct TemplateFoo {
|
||||
int y;
|
||||
};
|
||||
|
||||
typedef Foo Typedef;
|
||||
|
||||
using UsingTypedef = Foo;
|
||||
|
||||
namespace Namespace {
|
||||
#define MACRO
|
||||
|
||||
#define FN_MACRO(x)
|
||||
|
||||
enum Enum {
|
||||
EnumItem,
|
||||
EnumItem2 = 2,
|
||||
|
||||
};
|
||||
|
||||
void Function();
|
||||
|
||||
void Function()
|
||||
{
|
||||
}
|
||||
|
||||
struct Struct {
|
||||
String attribute;
|
||||
static String meta_attribute;
|
||||
|
||||
void Method(String param, int foo);
|
||||
void ClassMethod(int param);
|
||||
|
||||
void Method();
|
||||
void ClassMethod();
|
||||
|
||||
Struct();
|
||||
~Struct();
|
||||
};
|
||||
|
||||
String Struct::meta_attribute;
|
||||
|
||||
void Struct::Method(String param)
|
||||
{
|
||||
}
|
||||
|
||||
void Struct::ClassMethod(int param)
|
||||
{
|
||||
}
|
||||
|
||||
void Struct::Method()
|
||||
{
|
||||
}
|
||||
|
||||
void Struct::ClassMethod()
|
||||
{
|
||||
}
|
||||
|
||||
Struct::Struct()
|
||||
{
|
||||
}
|
||||
|
||||
Struct::~Struct()
|
||||
{
|
||||
}
|
||||
|
||||
class Class {
|
||||
int x;
|
||||
|
||||
Class();
|
||||
~Class();
|
||||
};
|
||||
|
||||
union Union {
|
||||
int x, y;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct TemplateFoo {
|
||||
int y;
|
||||
};
|
||||
|
||||
typedef Foo Typedef;
|
||||
|
||||
using UsingTypedef = Foo;
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue