mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Doc: fix links problem in String Core article and added Nuller documentation.
This commit is contained in:
parent
8911eacec2
commit
35f6ca56f0
6 changed files with 282 additions and 229 deletions
|
|
@ -275,7 +275,7 @@ public:
|
|||
operator float() const { return FLOAT_NULL; }
|
||||
operator bool() const { return false; }
|
||||
|
||||
Nuller() {}
|
||||
Nuller() = default;
|
||||
};
|
||||
|
||||
extern const Nuller Null;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public:
|
|||
};
|
||||
|
||||
class String0 {
|
||||
enum { //
|
||||
enum { //
|
||||
KIND = 14, // chr[KIND] is String tier flag, 0 - small, 31 - medium, 32..254 ref alloc, 255 - read alloc from Ref
|
||||
SLEN = 15, // chr[SLEN] stores the length of small tier strings (up to 14 bytes)
|
||||
LLEN = 2, // chr[LLEN] stores the length of medium (< 32) and large tier strings
|
||||
|
|
|
|||
|
|
@ -1,111 +1,111 @@
|
|||
topic "";
|
||||
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
|
||||
[l288;2 $$2,2#27521748481378242620020725143825:desc]
|
||||
[0 $$3,0#96390100711032703541132217272105:end]
|
||||
[H6;0 $$4,0#05600065144404261032431302351956:begin]
|
||||
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
|
||||
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
|
||||
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
|
||||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[{_}
|
||||
[ {{10000@(113.42.0) [s0;%% [*@7;4 Title]]}}&]
|
||||
[s1;*3 &]
|
||||
[s1;:Upp`:`:FileMapping: [*3 FileMapping]&]
|
||||
[s2;%% Encapsulates file mapping of file to memory (Linux mmap, Win32
|
||||
CreateFileMapping) in mostly platform independent way.&]
|
||||
[s3; &]
|
||||
[ {{10000F(128)G(128)@1 [s0;%% [* Public Method List]]}}&]
|
||||
[s3; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:FileMapping`(const char`*`): [* FileMapping]([@(0.0.255) const
|
||||
] [@(0.0.255) char] [@(0.0.255) `*][*@3 file] [@(0.0.255) `=] [@3 0])&]
|
||||
[s2;%% Constructs the class; if [%-*@3 file] is not NULL, calls Open([%-*@3 file]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Open`(const char`*`,Upp`:`:dword`,Upp`:`:int64`): [@(0.0.255) b
|
||||
ool] [* Open]([@(0.0.255) const] [@(0.0.255) char] [@(0.0.255) `*][*@3 filename],
|
||||
dword [*@3 mode][@3 ][@(0.0.255) `=] FileStream[@(0.0.255) `::]READ,
|
||||
int64 [*@3 filesize] [@(0.0.255) `=] [@3 0])&]
|
||||
[s2;%% Opens [%-*@3 filename] for file mapping. [%-*@3 mode][%-@3 ][%-
|
||||
is a combination of flags defined in ][%-^topic`:`/`/Core`/src`/Stream`$en`-us`#`:`:BlockStream`:`:class BlockStream^ B
|
||||
lockStream][%- . If the mode contrains CREATE flag, ][%-*@3 filesize]
|
||||
is a size of newly created file. If any file mapping was open
|
||||
before Open open, it is closed first.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Create`(const char`*`,Upp`:`:int64`): [@(0.0.255) bool]
|
||||
[* Create]([@(0.0.255) const] [@(0.0.255) char] [@(0.0.255) `*][*@3 file],
|
||||
int64 [*@3 filesize])&]
|
||||
[s2;%% Same as Open([%-*@3 file], FileStream`::CREATE, [%-*@3 filesize]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:GetFileSize`(`)const: int64 [* GetFileSize]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Returns the current file size.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:GetTime`(`)const: Time [* GetTime]() [@(0.0.255) const]&]
|
||||
[s2;%% Returns the last modification time.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Map`(Upp`:`:int64`,size`_t`): byte [@(0.0.255) `*][* Map](int6
|
||||
4 [*@3 mapoffset], size`_t [*@3 maplen])&]
|
||||
[s2;%% Maps a portion file starting at [%-*@3 mapoffset] with size
|
||||
[%-*@3 maplen] to memory. No alignment rules are required for [%-*@3 mapoffset]
|
||||
and [%-*@3 maplen] (FileMapping maps bigger chunk of file if necessarry).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Map`(`): byte [@(0.0.255) `*][* Map]()&]
|
||||
[s2;%% Same as Map(0, GetFileSize()) `- maps the whole file. Probably
|
||||
the best mode with 64 bit platforms with relatively unlimited
|
||||
virtual space.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Unmap`(`): [@(0.0.255) bool] [* Unmap]()&]
|
||||
[s2;%% Ends file mapping (and writes changes to disk).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Close`(`): [@(0.0.255) bool] [* Close]()&]
|
||||
[s2;%% Closes the file.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:IsOpen`(`)const: [@(0.0.255) bool] [* IsOpen]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Returns true if there is open file in FileMapping.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:GetOffset`(`)const: int64 [* GetOffset]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Returns [%-*@3 mapoffset] from the Map call.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:GetCount`(`)const: size`_t [* GetCount]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Returns [%-*@3 maplen] from the Map call.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:operator`~`(`)const: [@(0.0.255) const]
|
||||
byte [@(0.0.255) `*][* operator][@(0.0.255) `~]() [@(0.0.255) const]&]
|
||||
[s5;:Upp`:`:FileMapping`:`:begin`(`)const: [@(0.0.255) const] byte
|
||||
[@(0.0.255) `*][* begin]() [@(0.0.255) const]&]
|
||||
[s5;:Upp`:`:FileMapping`:`:operator`~`(`): byte [@(0.0.255) `*][* operator][@(0.0.255) `~](
|
||||
)&]
|
||||
[s5;:Upp`:`:FileMapping`:`:begin`(`): byte [@(0.0.255) `*][* begin]()&]
|
||||
[s2;%% Returns a pointer to the mapped file content or NULL if there
|
||||
is no mapping.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:end`(`)const: [@(0.0.255) const] byte [@(0.0.255) `*][* end]()
|
||||
[@(0.0.255) const]&]
|
||||
[s5;:Upp`:`:FileMapping`:`:end`(`): byte [@(0.0.255) `*][* end]()&]
|
||||
[s2;%% Same as begin() `+ GetCount().&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:operator`[`]`(int`)const: [@(0.0.255) const]
|
||||
byte[@(0.0.255) `&] [* operator][@(0.0.255) `[`]]([@(0.0.255) int] i)
|
||||
[@(0.0.255) const]&]
|
||||
[s5;:Upp`:`:FileMapping`:`:operator`[`]`(int`): byte[@(0.0.255) `&]
|
||||
[* operator][@(0.0.255) `[`]]([@(0.0.255) int] i)&]
|
||||
[s2;%% Same as begin()`[i`].&]
|
||||
topic "File Mapping";
|
||||
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
|
||||
[l288;2 $$2,2#27521748481378242620020725143825:desc]
|
||||
[0 $$3,0#96390100711032703541132217272105:end]
|
||||
[H6;0 $$4,0#05600065144404261032431302351956:begin]
|
||||
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
|
||||
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
|
||||
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
|
||||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[{_}
|
||||
[ {{10000@(113.42.0) [s0;%% [*@7;4 File Mapping]]}}&]
|
||||
[s1;*3 &]
|
||||
[s1;:Upp`:`:FileMapping: [*3 FileMapping]&]
|
||||
[s2;%% Encapsulates file mapping of file to memory (Linux mmap, Win32
|
||||
CreateFileMapping) in mostly platform independent way.&]
|
||||
[s3; &]
|
||||
[ {{10000F(128)G(128)@1 [s0;%% [* Public Method List]]}}&]
|
||||
[s3; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:FileMapping`(const char`*`): [* FileMapping]([@(0.0.255) const
|
||||
] [@(0.0.255) char] [@(0.0.255) `*][*@3 file] [@(0.0.255) `=] [@3 0])&]
|
||||
[s2;%% Constructs the class; if [%-*@3 file] is not NULL, calls Open([%-*@3 file]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Open`(const char`*`,Upp`:`:dword`,Upp`:`:int64`): [@(0.0.255) b
|
||||
ool] [* Open]([@(0.0.255) const] [@(0.0.255) char] [@(0.0.255) `*][*@3 filename],
|
||||
dword [*@3 mode][@3 ][@(0.0.255) `=] FileStream[@(0.0.255) `::]READ,
|
||||
int64 [*@3 filesize] [@(0.0.255) `=] [@3 0])&]
|
||||
[s2;%% Opens [%-*@3 filename] for file mapping. [%-*@3 mode][%-@3 ][%-
|
||||
is a combination of flags defined in ][%-^topic`:`/`/Core`/src`/Stream`$en`-us`#`:`:BlockStream`:`:class BlockStream^ B
|
||||
lockStream][%- . If the mode contrains CREATE flag, ][%-*@3 filesize]
|
||||
is a size of newly created file. If any file mapping was open
|
||||
before Open open, it is closed first.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Create`(const char`*`,Upp`:`:int64`): [@(0.0.255) bool]
|
||||
[* Create]([@(0.0.255) const] [@(0.0.255) char] [@(0.0.255) `*][*@3 file],
|
||||
int64 [*@3 filesize])&]
|
||||
[s2;%% Same as Open([%-*@3 file], FileStream`::CREATE, [%-*@3 filesize]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:GetFileSize`(`)const: int64 [* GetFileSize]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Returns the current file size.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:GetTime`(`)const: Time [* GetTime]() [@(0.0.255) const]&]
|
||||
[s2;%% Returns the last modification time.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Map`(Upp`:`:int64`,size`_t`): byte [@(0.0.255) `*][* Map](int6
|
||||
4 [*@3 mapoffset], size`_t [*@3 maplen])&]
|
||||
[s2;%% Maps a portion file starting at [%-*@3 mapoffset] with size
|
||||
[%-*@3 maplen] to memory. No alignment rules are required for [%-*@3 mapoffset]
|
||||
and [%-*@3 maplen] (FileMapping maps bigger chunk of file if necessarry).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Map`(`): byte [@(0.0.255) `*][* Map]()&]
|
||||
[s2;%% Same as Map(0, GetFileSize()) `- maps the whole file. Probably
|
||||
the best mode with 64 bit platforms with relatively unlimited
|
||||
virtual space.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Unmap`(`): [@(0.0.255) bool] [* Unmap]()&]
|
||||
[s2;%% Ends file mapping (and writes changes to disk).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:Close`(`): [@(0.0.255) bool] [* Close]()&]
|
||||
[s2;%% Closes the file.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:IsOpen`(`)const: [@(0.0.255) bool] [* IsOpen]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Returns true if there is open file in FileMapping.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:GetOffset`(`)const: int64 [* GetOffset]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Returns [%-*@3 mapoffset] from the Map call.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:GetCount`(`)const: size`_t [* GetCount]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Returns [%-*@3 maplen] from the Map call.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:operator`~`(`)const: [@(0.0.255) const]
|
||||
byte [@(0.0.255) `*][* operator][@(0.0.255) `~]() [@(0.0.255) const]&]
|
||||
[s5;:Upp`:`:FileMapping`:`:begin`(`)const: [@(0.0.255) const] byte
|
||||
[@(0.0.255) `*][* begin]() [@(0.0.255) const]&]
|
||||
[s5;:Upp`:`:FileMapping`:`:operator`~`(`): byte [@(0.0.255) `*][* operator][@(0.0.255) `~](
|
||||
)&]
|
||||
[s5;:Upp`:`:FileMapping`:`:begin`(`): byte [@(0.0.255) `*][* begin]()&]
|
||||
[s2;%% Returns a pointer to the mapped file content or NULL if there
|
||||
is no mapping.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:end`(`)const: [@(0.0.255) const] byte [@(0.0.255) `*][* end]()
|
||||
[@(0.0.255) const]&]
|
||||
[s5;:Upp`:`:FileMapping`:`:end`(`): byte [@(0.0.255) `*][* end]()&]
|
||||
[s2;%% Same as begin() `+ GetCount().&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:FileMapping`:`:operator`[`]`(int`)const: [@(0.0.255) const]
|
||||
byte[@(0.0.255) `&] [* operator][@(0.0.255) `[`]]([@(0.0.255) int] i)
|
||||
[@(0.0.255) const]&]
|
||||
[s5;:Upp`:`:FileMapping`:`:operator`[`]`(int`): byte[@(0.0.255) `&]
|
||||
[* operator][@(0.0.255) `[`]]([@(0.0.255) int] i)&]
|
||||
[s2;%% Same as begin()`[i`].&]
|
||||
[s2;%% ]]
|
||||
|
|
@ -1,88 +1,88 @@
|
|||
topic "";
|
||||
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
|
||||
[l288;2 $$2,2#27521748481378242620020725143825:desc]
|
||||
[0 $$3,0#96390100711032703541132217272105:end]
|
||||
[H6;0 $$4,0#05600065144404261032431302351956:begin]
|
||||
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
|
||||
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
|
||||
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
|
||||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[{_}
|
||||
[ {{10000@(113.42.0) [s0;%% [*@7;4 Geometric functions]]}}&]
|
||||
[s3; &]
|
||||
[s5;:Upp`:`:Squared`(const Pointf`&`): [@(0.0.255) double] [* Squared]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2;%% Returns [%-*@3 p][%-* .x][%-*` 2][%-* `+ ][%-*@3 p][%-* .y][%-*` 2].&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Length`(const Pointf`&`): [@(0.0.255) double] [* Length]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2;%% Returns sqrt([%-*@3 p][%-* .x][%-*` 2][%-* `+ ][%-*@3 p][%-* .y][%-*` 2]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Direction`(const Pointf`&`): [@(0.0.255) double] [* Direction]([@(0.0.255) cons
|
||||
t] Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2;%% Returns atan2(p.y, p.x) : the angle between line `[0,0`] `-
|
||||
[%-*@3 p] and x axis in radians.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Distance`(const Pointf`&`,const Pointf`&`): [@(0.0.255) double]
|
||||
[* Distance]([@(0.0.255) const] Pointf[@(0.0.255) `&] [*@3 p1], [@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p2])&]
|
||||
[s2; [%% Returns distance ][*@3 p1][%% ][*@3 p2][%% `- Length(][*@3 p1][%% `-
|
||||
][*@3 p2]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:SquaredDistance`(const Pointf`&`,const Pointf`&`): [@(0.0.255) double]
|
||||
[* SquaredDistance]([@(0.0.255) const] Pointf[@(0.0.255) `&] [*@3 p1],
|
||||
[@(0.0.255) const] Pointf[@(0.0.255) `&] [*@3 p2])&]
|
||||
[s2; [%% Returns squared distance ][*@3 p1][%% ][*@3 p2][%% : Squared(][*@3 p1][%%
|
||||
`- ][*@3 p2]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Mid`(const Pointf`&`,const Pointf`&`): Pointf [* Mid]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 a], [@(0.0.255) const] Pointf[@(0.0.255) `&]
|
||||
[*@3 b])&]
|
||||
[s2;%% Returns middle point between [%-*@3 a] and [%-*@3 b] : 0.5 `* (a
|
||||
`+ b).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Orthogonal`(const Pointf`&`): Pointf [* Orthogonal]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2; [%% Returns a point that is ortoghonal to ][*@3 p][%% wrt to `[0,0`]
|
||||
: `[`-][*@3 p][* .y],[* ][*@3 p][* .x]`].&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Normalize`(const Pointf`&`): Pointf [* Normalize]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2;%% Returns [%-*@3 p] / Length([%-*@3 p]). If p is `[0,0`], returns
|
||||
`[0,0`].&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Polar`(double`): Pointf [* Polar]([@(0.0.255) double] [*@3 a])&]
|
||||
[s2;%% Returns a point with distance 1 from `[0,0`] and angle [%-*@3 a]
|
||||
between the point and x axis.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Polar`(const Pointf`&`,double`,double`): Pointf [* Polar]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p], [@(0.0.255) double] [*@3 r], [@(0.0.255) double]
|
||||
[*@3 a])&]
|
||||
[s2;%% Returns [%-*@3 p] `+ [%-*@3 r] `* Polar([%-*@3 a]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Lerp`(Point`_`,Point`_`,double`): [@(0.0.255) template]
|
||||
<[@(0.0.255) typename] T> Point`_<T> [* Lerp](Point`_<T> [*@3 a], Point`_<T>
|
||||
[*@3 b], [@(0.0.255) double] [*@3 t])&]
|
||||
[s5;:Upp`:`:Lerp`(Size`_`,Size`_`,double`): [@(0.0.255) template] <[@(0.0.255) typename]
|
||||
T> Size`_<T> [* Lerp](Size`_<T> [*@3 a], Size`_<T> [*@3 b], [@(0.0.255) double]
|
||||
[*@3 t])&]
|
||||
[s5;:Upp`:`:Lerp`(Rect`_`,Rect`_`,double`): [@(0.0.255) template] <[@(0.0.255) typename]
|
||||
T> Rect`_<T> [* Lerp](Rect`_<T> [*@3 a], Rect`_<T> [*@3 b], [@(0.0.255) double]
|
||||
[*@3 t])&]
|
||||
[s2; [%% Performs linear interpolation between 2 geometric objects],
|
||||
if the parameter [*@3 t] is inside `[0,1`] (the linear extrapolation
|
||||
otherwise).&]
|
||||
[s3; &]
|
||||
topic "Geometric functions";
|
||||
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
|
||||
[l288;2 $$2,2#27521748481378242620020725143825:desc]
|
||||
[0 $$3,0#96390100711032703541132217272105:end]
|
||||
[H6;0 $$4,0#05600065144404261032431302351956:begin]
|
||||
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
|
||||
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
|
||||
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
|
||||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[{_}
|
||||
[ {{10000@(113.42.0) [s0;%% [*@7;4 Geometric functions]]}}&]
|
||||
[s3; &]
|
||||
[s5;:Upp`:`:Squared`(const Pointf`&`): [@(0.0.255) double] [* Squared]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2;%% Returns [%-*@3 p][%-* .x][%-*` 2][%-* `+ ][%-*@3 p][%-* .y][%-*` 2].&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Length`(const Pointf`&`): [@(0.0.255) double] [* Length]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2;%% Returns sqrt([%-*@3 p][%-* .x][%-*` 2][%-* `+ ][%-*@3 p][%-* .y][%-*` 2]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Direction`(const Pointf`&`): [@(0.0.255) double] [* Direction]([@(0.0.255) cons
|
||||
t] Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2;%% Returns atan2(p.y, p.x) : the angle between line `[0,0`] `-
|
||||
[%-*@3 p] and x axis in radians.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Distance`(const Pointf`&`,const Pointf`&`): [@(0.0.255) double]
|
||||
[* Distance]([@(0.0.255) const] Pointf[@(0.0.255) `&] [*@3 p1], [@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p2])&]
|
||||
[s2; [%% Returns distance ][*@3 p1][%% ][*@3 p2][%% `- Length(][*@3 p1][%% `-
|
||||
][*@3 p2]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:SquaredDistance`(const Pointf`&`,const Pointf`&`): [@(0.0.255) double]
|
||||
[* SquaredDistance]([@(0.0.255) const] Pointf[@(0.0.255) `&] [*@3 p1],
|
||||
[@(0.0.255) const] Pointf[@(0.0.255) `&] [*@3 p2])&]
|
||||
[s2; [%% Returns squared distance ][*@3 p1][%% ][*@3 p2][%% : Squared(][*@3 p1][%%
|
||||
`- ][*@3 p2]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Mid`(const Pointf`&`,const Pointf`&`): Pointf [* Mid]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 a], [@(0.0.255) const] Pointf[@(0.0.255) `&]
|
||||
[*@3 b])&]
|
||||
[s2;%% Returns middle point between [%-*@3 a] and [%-*@3 b] : 0.5 `* (a
|
||||
`+ b).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Orthogonal`(const Pointf`&`): Pointf [* Orthogonal]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2; [%% Returns a point that is ortoghonal to ][*@3 p][%% wrt to `[0,0`]
|
||||
: `[`-][*@3 p][* .y],[* ][*@3 p][* .x]`].&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Normalize`(const Pointf`&`): Pointf [* Normalize]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p])&]
|
||||
[s2;%% Returns [%-*@3 p] / Length([%-*@3 p]). If p is `[0,0`], returns
|
||||
`[0,0`].&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Polar`(double`): Pointf [* Polar]([@(0.0.255) double] [*@3 a])&]
|
||||
[s2;%% Returns a point with distance 1 from `[0,0`] and angle [%-*@3 a]
|
||||
between the point and x axis.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Polar`(const Pointf`&`,double`,double`): Pointf [* Polar]([@(0.0.255) const]
|
||||
Pointf[@(0.0.255) `&] [*@3 p], [@(0.0.255) double] [*@3 r], [@(0.0.255) double]
|
||||
[*@3 a])&]
|
||||
[s2;%% Returns [%-*@3 p] `+ [%-*@3 r] `* Polar([%-*@3 a]).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Lerp`(Point`_`,Point`_`,double`): [@(0.0.255) template]
|
||||
<[@(0.0.255) typename] T> Point`_<T> [* Lerp](Point`_<T> [*@3 a], Point`_<T>
|
||||
[*@3 b], [@(0.0.255) double] [*@3 t])&]
|
||||
[s5;:Upp`:`:Lerp`(Size`_`,Size`_`,double`): [@(0.0.255) template] <[@(0.0.255) typename]
|
||||
T> Size`_<T> [* Lerp](Size`_<T> [*@3 a], Size`_<T> [*@3 b], [@(0.0.255) double]
|
||||
[*@3 t])&]
|
||||
[s5;:Upp`:`:Lerp`(Rect`_`,Rect`_`,double`): [@(0.0.255) template] <[@(0.0.255) typename]
|
||||
T> Rect`_<T> [* Lerp](Rect`_<T> [*@3 a], Rect`_<T> [*@3 b], [@(0.0.255) double]
|
||||
[*@3 t])&]
|
||||
[s2; [%% Performs linear interpolation between 2 geometric objects],
|
||||
if the parameter [*@3 t] is inside `[0,1`] (the linear extrapolation
|
||||
otherwise).&]
|
||||
[s3; &]
|
||||
[s0;%% ]]
|
||||
48
uppsrc/Core/src.tpp/Nuller_en-us.tpp
Normal file
48
uppsrc/Core/src.tpp/Nuller_en-us.tpp
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
topic "Nuller";
|
||||
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
|
||||
[l288;2 $$2,2#27521748481378242620020725143825:desc]
|
||||
[0 $$3,0#96390100711032703541132217272105:end]
|
||||
[H6;0 $$4,0#05600065144404261032431302351956:begin]
|
||||
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
|
||||
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
|
||||
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
|
||||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[{_}
|
||||
[ {{10000@(113.42.0) [s0;%% [*@7;4 Nuller]]}}&]
|
||||
[s3; &]
|
||||
[s1;:Upp`:`:Nuller: [@(0.0.255)3 class][3 ][*3 Nuller]&]
|
||||
[s9;%% Represents a logical null value with implicit conversions
|
||||
to multiple scalar types.&]
|
||||
[s0; &]
|
||||
[ {{10000F(128)G(128)@1 [s0;%% [* Public Method List]]}}&]
|
||||
[s0; &]
|
||||
[s5;:Upp`:`:Nuller`:`:operator int`(`)const: operator [@(0.0.255) int]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Converts to an integer null sentinel.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Nuller`:`:operator int64`(`)const: operator int64() [@(0.0.255) const]&]
|
||||
[s2;%% Converts to a 64`-bit integer null sentinel.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Nuller`:`:operator double`(`)const: operator [@(0.0.255) double]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Converts to a double`-precision null sentinel.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Nuller`:`:operator float`(`)const: operator [@(0.0.255) float]()
|
||||
[@(0.0.255) const]&]
|
||||
[s2;%% Converts to a single`-precision null sentinel.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s0; operator [@(0.0.255) bool]() [@(0.0.255) const]&]
|
||||
[s2; Converts to boolean false value. Allows ``Nuller`` to behave
|
||||
as a falsy value in conditional contexts.&]
|
||||
[s0; &]
|
||||
[ {{10000F(128)G(128)@1 [s0;%% [* Constructor detail]]}}&]
|
||||
[s3; &]
|
||||
[s5;:Upp`:`:Nuller`:`:Nuller`(`)`=default: [* Nuller]()&]
|
||||
[s2;%% Default constructor.&]
|
||||
[s3; ]]
|
||||
|
|
@ -63,8 +63,8 @@ r]_`*[*@3 s], [@(0.0.255) int]_[*@3 n])&]
|
|||
[%-*@3 s]. Zero characters are included.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:String`(const byte`*`,int`):%- [* String]([@(0.0.255) const]_[_^byte^ byte]_
|
||||
`*[*@3 s], [@(0.0.255) int]_[*@3 n])&]
|
||||
[s5;:String`:`:String`(const byte`*`,int`):%- [* String]([@(0.0.255) const]_[_^topic`:`/`/Core`/src`/PrimitiveDataTypes`_en`-us`#Upp`:`:byte`:`:typedef^ b
|
||||
yte]_`*[*@3 s], [@(0.0.255) int]_[*@3 n])&]
|
||||
[s2; Constructs a string equal to first [%-*@3 n] bytes of [%-*@3 s].
|
||||
Zero characters are included.&]
|
||||
[s3; &]
|
||||
|
|
@ -81,14 +81,14 @@ of [%-*@3 s]. Zero characters are included.&]
|
|||
to [%-*@3 chr]. [%-*@3 chr] can be zero.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:String`(StringBuffer`&`):%- [* String]([_^StringBuffer^ StringBuffer][@(0.0.255) `&
|
||||
]_[*@3 b])&]
|
||||
[s5;:String`:`:String`(StringBuffer`&`):%- [* String]([_^topic`:`/`/Core`/src`/StringBuffer`_en`-us`#StringBuffer`:`:class^ S
|
||||
tringBuffer][@(0.0.255) `&]_[*@3 b])&]
|
||||
[s2; Constructs a string from [%-*@3 b]. [%-*@3 b] is emptied by this
|
||||
operation.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:String`(const Nuller`&`):%- [* String]([@(0.0.255) const]_[_^Nuller^ Nuller][@(0.0.255) `&
|
||||
])&]
|
||||
[s5;:String`:`:String`(const Nuller`&`):%- [* String]([@(0.0.255) const]_[_^topic`:`/`/Core`/src`/Nuller`_en`-us`#Upp`:`:Nuller^ N
|
||||
uller][@(0.0.255) `&])&]
|
||||
[s2; Constructs empty [* String]. This variant is important to allow
|
||||
assigning [* Null ]to [* String ](which is same as assigning the
|
||||
empty [* String]).&]
|
||||
|
|
@ -113,19 +113,20 @@ for UTF`-8 where it returns a number of unicode codepoints. It
|
|||
is faster equivalent of ToWString().GetCount().&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:ToWString`(`)const:%- [_^WString^ WString]_[* ToWString]()_[@(0.0.255) const
|
||||
]&]
|
||||
[s5;:String`:`:ToWString`(`)const:%- [_^topic`:`/`/Core`/src`/String`_en`-us`#WString`:`:class^ W
|
||||
String]_[* ToWString]()_[@(0.0.255) const]&]
|
||||
[s2; Convert String to WString using current default character set.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:ToString`(`)const:%- [@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[* T
|
||||
oString]()_[@(0.0.255) const]&]
|
||||
[s5;:String`:`:ToString`(`)const:%- [@(0.0.255) const]_[_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring][@(0.0.255) `&]_[* ToString]()_[@(0.0.255) const]&]
|
||||
[s2; Returns `*this. Useful because ToString is standard method to
|
||||
convert concrete type to text, used by AsString template (and
|
||||
therefore by operator << as well).&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:GetVoid`(`):%- [@(0.0.255) static] [_^String^ String]_[* GetVoid]()&]
|
||||
[s5;:String`:`:GetVoid`(`):%- [@(0.0.255) static] [_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring]_[* GetVoid]()&]
|
||||
[s2; Returns special Void value. This value is same as empty string,
|
||||
but IsVoid method returns true for it. It can be used in special
|
||||
scenarios where client code needs to distinguish between two
|
||||
|
|
@ -139,7 +140,8 @@ empty string if it is empty.&]
|
|||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:String0`:`:IsEqual`(const String0`&`)const:%- [@(0.0.255) bool]_[* IsEqual]([@(0.0.255) c
|
||||
onst]_[_^String0^ String][@(0.0.255) `&]_[*@3 s])_[@(0.0.255) const]&]
|
||||
onst]_[_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ String][@(0.0.255) `&
|
||||
]_[*@3 s])_[@(0.0.255) const]&]
|
||||
[s2; Return true if string is equal to [%-*@3 s].&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
|
|
@ -156,8 +158,8 @@ onst]&]
|
|||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:String0`:`:Cat`(int`):%- [@(0.0.255) void]_[* Cat]([@(0.0.255) int]_[*@3 c])&]
|
||||
[s5;:String`:`:operator`+`=`(char`):%- [@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_
|
||||
[* operator`+`=]([@(0.0.255) char]_[*@3 c])&]
|
||||
[s5;:String`:`:operator`+`=`(char`):%- [@(0.0.255) const]_[_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring][@(0.0.255) `&]_[* operator`+`=]([@(0.0.255) char]_[*@3 c])&]
|
||||
[s2; Appends single character [%-*@3 c]. This operations has constant
|
||||
amortized time (in other words, internal space used by implementation
|
||||
grows exponentially, like with Vector or std`::vector). [%-*@3 c]
|
||||
|
|
@ -213,31 +215,34 @@ before it has to grow) &]
|
|||
operations.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:operator`+`=`(const char`*`):%- [@(0.0.255) const]_[_^String^ String][@(0.0.255) `&
|
||||
]_[* operator`+`=]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 s])&]
|
||||
[s5;:String`:`:operator`+`=`(const String`&`):%- [@(0.0.255) const]_[_^String^ String][@(0.0.255) `&
|
||||
]_[* operator`+`=]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 s])&]
|
||||
[s5;:String`:`:operator`+`=`(const char`*`):%- [@(0.0.255) const]_[_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring][@(0.0.255) `&]_[* operator`+`=]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 s])&]
|
||||
[s5;:String`:`:operator`+`=`(const String`&`):%- [@(0.0.255) const]_[_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring][@(0.0.255) `&]_[* operator`+`=]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_
|
||||
[*@3 s])&]
|
||||
[s2; Appends a zero terminated string [%-*@3 s].&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:operator`=`(const String`&`):%- [_^String^ String][@(0.0.255) `&]_[* operato
|
||||
r`=]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 s])&]
|
||||
[s5;:String`:`:operator`=`(const String`&`):%- [_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring][@(0.0.255) `&]_[* operator`=]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 s
|
||||
])&]
|
||||
[s2; Assigns another string [%-*@3 s]. This operations is relatively
|
||||
fast and does not depend on the length of string.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:String`:`:operator`=`(Upp`:`:String`&`&`):%- [_^Upp`:`:String^ String][@(0.0.255) `&
|
||||
]_[* operator`=]([_^Upp`:`:String^ String][@(0.0.255) `&`&]_[*@3 s])&]
|
||||
[s5;:Upp`:`:String`:`:operator`=`(Upp`:`:String`&`&`):%- [_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring][@(0.0.255) `&]_[* operator`=]([_^Upp`:`:String^ String][@(0.0.255) `&`&]_[*@3 s])&]
|
||||
[s2; Pick assignment.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:operator`=`(const char`*`):%- [_^String^ String][@(0.0.255) `&]_[* operator`=
|
||||
]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 s])&]
|
||||
[s5;:String`:`:operator`=`(const char`*`):%- [_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring][@(0.0.255) `&]_[* operator`=]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 s])&]
|
||||
[s2; Assign a zero terminated string [%-*@3 s].&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:String`:`:operator`=`(StringBuffer`&`):%- [_^String^ String][@(0.0.255) `&]_[* operato
|
||||
r`=]([_^StringBuffer^ StringBuffer][@(0.0.255) `&]_[*@3 b])&]
|
||||
[s5;:String`:`:operator`=`(StringBuffer`&`):%- [_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring][@(0.0.255) `&]_[* operator`=]([_^topic`:`/`/Core`/src`/StringBuffer`_en`-us`#StringBuffer`:`:class^ S
|
||||
tringBuffer][@(0.0.255) `&]_[*@3 b])&]
|
||||
[s2; Assigns the content of [* StringBuffer]. After the operation,b
|
||||
is emptied.&]
|
||||
[s3;%- &]
|
||||
|
|
@ -260,8 +265,8 @@ nt]_[*@3 i])_[@(0.0.255) const]&]
|
|||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:String`:`:Make`(int`,Maker`):%- [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 M
|
||||
aker]>_[@(0.0.255) static]_[_^Upp`:`:String^ String]_[* Make]([@(0.0.255) int]_[*@3 alloc],
|
||||
[*@4 Maker]_[*@3 m])&]
|
||||
aker]>_[@(0.0.255) static]_[_^topic`:`/`/Core`/src`/String`_en`-us`#String`:`:class^ S
|
||||
tring]_[* Make]([@(0.0.255) int]_[*@3 alloc], [*@4 Maker]_[*@3 m])&]
|
||||
[s2; Optimized static method for creating Strings. This method creates
|
||||
internal buffer of at least [%-*@3 alloc] and then invokes lambda
|
||||
[%-*@3 m] passing the char `* pointer to the internal buffer as
|
||||
|
|
@ -344,8 +349,8 @@ to [%-*@3 chr]. [%-*@3 chr] can be zero.&]
|
|||
operation.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:WString`:`:WString`(const Nuller`&`):%- [* WString]([@(0.0.255) const]_[_^Nuller^ Null
|
||||
er][@(0.0.255) `&])&]
|
||||
[s5;:WString`:`:WString`(const Nuller`&`):%- [* WString]([@(0.0.255) const]_[_^topic`:`/`/Core`/src`/Nuller`_en`-us`#Upp`:`:Nuller^ N
|
||||
uller][@(0.0.255) `&])&]
|
||||
[s2; Constructs empty [* WString]. This variant is important to allow
|
||||
assigning [* Null] to [* WString] (which is same as assigning the
|
||||
empty [* WString]).&]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue