diff --git a/uppsrc/Core/src.tpp/AppEnv$en-us.tpp b/uppsrc/Core/src.tpp/AppEnv$en-us.tpp new file mode 100644 index 000000000..63a4ec607 --- /dev/null +++ b/uppsrc/Core/src.tpp/AppEnv$en-us.tpp @@ -0,0 +1,153 @@ +topic "Application & environment utility";[ $$0,0#00000000000000000000000000000000:Default] +[i448;a25;kKO9;*@(64)2 $$1,0#37138531426314131252341829483370:item] +[l288;2 $$2,0#27521748481378242620020725143825:desc] +[*@(154.0.0)+109 $$3,3#19357814472219620448494467520139:head] +[~~~=_8333; $$4,4#05600065144404261032431302351956:break] +[{_}%EN-US +[s0;*@(68)2 Upp&] +[s0;*@(154.0.0)+117 Application `& environment utility&] +[s0;2 A number of utility functions to obtain information about your +application and system environment.&] +[s0;+80 &] +[s0;*2 Implemented in:&] +[s0;@(0.0.255)2 [@0 -|Core`\App.]h&] +[s0;@(0.0.255)2 [@0 -|Core`\App.]cpp&] +[s0;@(0.0.255)2 &] +[ {{10000F(128)G(128)@1 [s0;*@2 Function Detail]}}&] +[s0;*@2 &] +[s3; GetExeFilePath&] +[s0;2 &] +[s1;K:`:`:GetExeFilePath`(`): [^topic`:`/`/Core`/src`/String`$en`-us^ String]_[@0 GetExeF +ilePath]()&] +[s2;# Returns the absolute path towards the application`'s binary.&] +[s4; -|&] +[s3; &] +[s3; GetExeDirFile&] +[s3; &] +[s1;K:`:`:GetExeDirFile`(const char`*`): [^topic`:`/`/Core`/src`/String`$en`-us^ String +]_[@0 GetExeDirFile]([@(0.0.255) const]_[@(0.0.255) char]_`*[@3 fp])&] +[s2;# Returns the absolute path of a file that is found in the folder +where you application`'s binary resides.&] +[s2; [@(129.0.0) fp..................................................]the +name of the file&] +[s4; -|&] +[s0; &] +[s3; GetHomeDirectory&] +[s3; &] +[s1;K:`:`:GetHomeDirectory`(`): [^topic`:`/`/Core`/src`/String`$en`-us^ String]_[@0 GetHo +meDirectory]()&] +[s2; Returns the absolute path of current user`'s home folder.&] +[s4; -|&] +[s4; &] +[s3; GetHomeDirFile&] +[s3;*@0;3 &] +[s1;K:`:`:GetHomeDirFile`(const char`*`): [^topic`:`/`/Core`/src`/String`$en`-us^ Strin +g]_[@0 GetHomeDirFile]([@(0.0.255) const]_[@(0.0.255) char]_`*[@3 fp])&] +[s2;# Returns the absolute path of a file that is found in the current +user`'s home folder.&] +[s2; [@(129.0.0) fp..................................................]the +name of the file&] +[s4; -|&] +[s4; &] +[s3; GetExeTitle&] +[s0;*2 &] +[s1;K:`:`:GetExeTitle`(`): [^topic`:`/`/Core`/src`/String`$en`-us^ String]_[@0 GetExeTitl +e]()&] +[s2; Returns the title of the application.&] +[s4; -|&] +[s4; &] +[s3; UseHomeDirectoryConfig&] +[s0;*2 &] +[s1;K:`:`:UseHomeDirectoryConfig`(bool`): [@(0.0.255) void]_[@0 UseHomeDirectoryConfig]([@(0.0.255) b +ool]_[@3 b]_`=_true)&] +[s2;# Sets the search path for configuration to either the current +users`' home folder or to the folder where the application`'s +binary resides.&] +[s2; [*@(129.0.0) b]...................................................use +home folder (true) or application folder (false)&] +[s4; -|&] +[s4; &] +[s3; ConfigFile&] +[s0;*2 &] +[s1;K:`:`:ConfigFile`(const char`*`): [^topic`:`/`/Core`/src`/String`$en`-us^ String]_[@0 C +onfigFile]([@(0.0.255) const]_[@(0.0.255) char]_`*[@3 file])&] +[s2;# Returns the absolute path of a configuration file found in +the configuration files search path.&] +[s2; [@(129.0.0) file ]...............................................the +name of the file&] +[s4; -|&] +[s4; &] +[s3; ConfigFile&] +[s0; &] +[s1;K:`:`:ConfigFile`(`): [^topic`:`/`/Core`/src`/String`$en`-us^ String]_[@0 ConfigFile]( +)&] +[s2;# Returns the default configuration file from the configuration +files search path. The default configuration file is called [*/ `[application +title`]][* .cfg].&] +[s4; -|&] +[s4; &] +[s3; CommandLine&] +[s0; &] +[s1;K:`:`:CommandLine`(`): [@(0.0.255) const]_[^topic`:`/`/Core`/src`/Vector`$en`-us^ Vec +tor]<[^`:`:String^ Stri][^topic`:`/`/Core`/src`/String`$en`-us^ n][^`:`:String^ g]>`&_[@0 C +ommandLine]()&] +[s2; Return a vector of strings containing the command line parameters.&] +[s4; -|&] +[s3; &] +[s3; Environment&] +[s0; &] +[s1;K:`:`:Environment`(`): [@(0.0.255) const]_[^topic`:`/`/Core`/src`/VectorMap`$en`-us^ V +ectorMap]<[^topic`:`/`/Core`/src`/String`$en`-us^ String], [^topic`:`/`/Core`/src`/String`$en`-us^ S +tring]>`&_[@0 Environment]()&] +[s2; Returns a vector of strings with system environment variables.&] +[s4; -|&] +[s4; &] +[s3; SetExitCode&] +[s3; &] +[s1;K:`:`:SetExitCode`(int`): [@(0.0.255) void]_[@0 SetExitCode]([@(0.0.255) int]_[@3 code])&] +[s2; Sets the exit code that will be returned on application exit.&] +[s2; [*@(129.0.0) code].............................................the +exit code&] +[s4; -|&] +[s4; &] +[s3; GetExitCode&] +[s0; &] +[s1;K:`:`:GetExitCode`(`): [@(0.0.255) int]_[@0 GetExitCode]()&] +[s2;# Gets the exit code that will be returned on application exit.&] +[s4; -|&] +[s4;*2 &] +[s3; IsMainRunning&] +[s3; &] +[s1;K:`:`:IsMainRunning`(`): [@(0.0.255) bool]_[@0 IsMainRunning]()&] +[s2;# Return true if the applications execution has reached and not +yet exited the main function.&] +[s4; -|&] +[s4; &] +[s3; GetDataFile&] +[s3; &] +[s1;K:`:`:GetDataFile`(const char`*`): [^topic`:`/`/Core`/src`/String`$en`-us^ String]_ +[@0 GetDataFile]([@(0.0.255) const]_[@(0.0.255) char]_`*[@3 filename])&] +[s2;*_@(85.127.0) TODO&] +[s2; [*@(129.0.0) filename].......................................the +name of the file&] +[s4; -|&] +[s3; &] +[s3; LaunchWebBrowser&] +[s4; &] +[s1;K:`:`:LaunchWebBrowser`(const`:`:String`&`): [@(0.0.255) void]_[@0 LaunchWebBrowser]( +[@(0.0.255) const]_[^topic`:`/`/Core`/src`/String`$en`-us^ String]`&_[@3 url])&] +[s2; Opens an URL in the default Web Browser.&] +[s2; [*@(129.0.0) url................................................]the +URL that will be opened in the browser&] +[s4; &] +[s4; &] +[s0; &] +[ {{10000F(128)G(128)@(226.85.0) [s0;*@2 Function Detail (POSIX)]}}&] +[s4; &] +[s1;K:`:`:SetHomeDirectory`(const char`*`): [@(0.0.255) void]_[@0 SetHomeDirectory]([@(0.0.255) c +onst]_[@(0.0.255) char]_`*[@3 dir])&] +[s2;# Sets the current user`'s home folder.&] +[s2; [*@(129.0.0) dir][@(129.0.0) ................................................]the +URL that will be opened in the browser&] +[s0; &] +[s0; ] \ No newline at end of file diff --git a/uppsrc/Core/src.tpp/Size$en-us.tpp b/uppsrc/Core/src.tpp/Size$en-us.tpp new file mode 100644 index 000000000..b92ea9b24 --- /dev/null +++ b/uppsrc/Core/src.tpp/Size$en-us.tpp @@ -0,0 +1,201 @@ +topic "Size";[ $$0,0#00000000000000000000000000000000:Default] +[i448;a25;kKO9;*@(64) $$1,0#37138531426314131252341829483380:class] +[l288;2 $$2,0#27521748481378242620020725143825:desc] +[i448;a25;kKO9;*@(64)2 $$3,0#37138531426314131252341829483370:item] +[~~~=_8333; $$4,4#05600065144404261032431302351956:break] +[l288;a25;kK~~~.1408;@3;2 $$5,0#61217621437177404841962893300719:param] +[{_}%EN-US +[s0;*@(68)2 Upp&] +[s0;*@(154.0.0)+109 Size`_&] +[s0;*@(154.0.0)+109 &] +[s1;K:`:`:Size`_`:`:struct: template_<[@(0.0.255) class]_[@4 T]>&] +[s1;K:`:`:Size`_`:`:struct: [@(0.0.255) struct]_[@0 Size`_]_:_[@(0.0.255) public]_[^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ M +oveable]<_[@0 Size`_]<[@4 T]>_>_&] +[s2; &] +[s0;2 [* Size`_] is a generic structure that describes a two dimensional +size object. The horizontal dimension is represented by [*@(154.0.0) cx][@(154.0.0) +]and the vertical one by [*@(154.0.0) cy]. Both dimension are of +type [@4 T]. To get a specialized version of [* Size`_], use one +of the following:&] +[s0; &] +[s0;*@(154.0.0)2 Size&] +[s3; typedef_[^`:`:Size`_^ Size`_]<[^int^ int]>_Size&] +[s2; Size`_ with with [^int^ int] dimensions.&] +[s0;*@(154.0.0)2 &] +[s0;*@(154.0.0)2 Size16&] +[s3;K:`:`:Size16`:`:typedef:@0 [@(64) typedef_][^`:`:Size`_^@(64) Size`_][@(64) <][^`:`:int16^@(64) i +nt16][@(64) >_]Size16&] +[s2; Size`_ with with [^`:`:int16^ int16] dimensions.&] +[s0;*@(154.0.0)2 &] +[s0;*@(154.0.0)2 Size64&] +[s3;K:`:`:Size64`:`:typedef:@0 [@(64) typedef_][^`:`:Size`_^@(64) Size`_][@(64) <][^`:`:int64^@(64) i +nt64][@(64) >_]Size64&] +[s2; Size`_ with with [^`:`:int64^ int64] dimensions.&] +[s0;*@(154.0.0)2 &] +[s0;*@(154.0.0)2 Sizef&] +[s3;K:`:`:Sizef`:`:typedef:@0 [@(64) typedef_][^`:`:Size`_^@(64) Size`_][@(64) <][^double^@(64) d +ouble][@(64) >_]Sizef&] +[s2; Size`_ with with [^double^ double] dimensions.&] +[s0; &] +[s0; &] +[ {{10000F(128)G(128)@1 [s0;*@2 Constructor Detail]}}&] +[s0; &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(`): [@0 Size`_]()&] +[s2; Creates an uninitialized Size`_.&] +[s4; -|&] +[s4; &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(const`:`:Value`&`): [@0 Size`_]([@(0.0.255) const]_[^`:`:Value^ V +alue]`&_[@3 src])&] +[s2; Default copy constructor.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(T`,T`): [@0 Size`_]([@4 T]_[@3 cx], [@4 T]_[@3 cy])&] +[s2; Creates a Size`_ object an initializes it with two dimensions.&] +[s5;@0 [@3;3 cx-|]the horizontal dimension&] +[s5;@0 [*@3 cy][@3 -|]the vertical dimension&] +[s4; -|&] +[s3;K@0 &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(const`:`:Size`_``&`): [@0 Size`_]([@(0.0.255) const +]_[@0 Size`_]<[^int^ int]>`&_[@3 sz])&] +[s2; Creates a Size`_ object and initializes it with a [* Size] object.&] +[s5;@0 [*@3 sz][@3 -|]the size that is going to be copied&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(const`:`:Size`_``&`): [@0 Size`_]([@(0.0.255) con +st]_[@0 Size`_]<[^short^ short]>`&_[@3 sz])&] +[s2; Creates a Size`_ object and initializes it with a [* Size16] object.&] +[s5;@0 [*@3 sz]-|the size that is going to be copied&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(const`:`:Size`_``&`): [@0 Size`_]([@(0.0.255) co +nst]_[@0 Size`_]<[^double^ double]>`&_[@3 sz])&] +[s2; Creates a Size`_ object and initializes it with a [* Sizef] object.&] +[s5;@0 [*@3 sz]-|the size that is going to be copied&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(const`:`:Size`_`<`:`:int64`>`&`): [@0 Size`_]([@(0.0.255) c +onst]_[@0 Size`_]<[^`:`:int64^ int64]>`&_[@3 sz])&] +[s2; Creates a Size`_ object and initializes it with a [* Size64] object.&] +[s5;@0 [*@3 sz]-|the size that is going to be copied&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(const`:`:Point`_``&`): Size`_([@(0.0.255) const]_[^`:`:Point`_^ P +oint`_]<[^T^ T]>`&_[@3 pt])&] +[s2; Creates a Size`_ object and initializes it with a [* Point] object.&] +[s5;@0 [*@3 pt] -|the point object&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:`:`:Size`_`(const`:`:Nuller`&`): [@0 Size`_]([@(0.0.255) const]_[^`:`:Nuller^ N +uller]`&)&] +[s2; Creates a Size`_ object and initializes with [* Null].&] +[s0; &] +[s0; &] +[ {{10000F(128)G(128)@1 [s0;*@2 Public Field Detail]}}&] +[s0; &] +[s0;*@(141.42.0) [@4 T ]cx&] +[s2; the horizontal dimension&] +[s0; &] +[s4; -|&] +[s0; &] +[s0;*@(141.42.0) [@4 T][@0 ]cy&] +[s2; the vertical dimension&] +[s0; &] +[s0; &] +[ {{10000F(128)G(128)@1 [s0;*@2 Method Detail]}}&] +[s0; &] +[s3;K:`:`:Size`_`:`:Clear`(`): [@(0.0.255) void]_[@0 Clear]()&] +[s2; Seth both dimension to 0.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:IsEmpty`(`)const:@(0.0.255) bool[@(64) _][@0 IsEmpty][@(64) ()_]const&] +[s2; Returns [* true] if at least one dimension is 0, [* false] otherwise.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:SetNull`(`): [@(0.0.255) void]_[@0 SetNull]()&] +[s2; Reinitializes the object to [* Null].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:IsNullInstance`(`)const:@(0.0.255) bool[@(64) _][@0 IsNullInstance][@(64) ( +)_]const&] +[s2; Verifies if current size is [* Null].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:GetHashValue`(`)const:@(0.0.255) unsigned[@(64) _][@0 GetHashValue][@(64) ( +)_]const&] +[s2; Returns the hash value of the size.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:ToString`(`)const:@(0.0.255) [^topic`:`/`/Core`/src`/String`$en`-us^@(64) S +tring][@(64) _][@0 ToString][@(64) ()_]const&] +[s2; Returns the [* String] representation of the size.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`+`=`(`:`:Size`_`): [^`:`:Size`_^ Size`_]`&_[@0 operator`+`=]( +[^`:`:Size`_^ Size`_]_[@3 p])&] +[s2; Increases cx with [*@3 p]`'s horizontal dimension and cy with +[*@3 p]`'s vertical dimension.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`+`=`(T`): [^`:`:Size`_^ Size`_]`&_[@0 operator`+`=](T_[@3 t])&] +[s2; Increases both dimension with the same value [*@3 t].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`-`=`(`:`:Size`_`): [^`:`:Size`_^ Size`_]`&_[@0 operator`-`=]( +[^`:`:Size`_^ Size`_]_[@3 p])&] +[s2; Decreases cx with [*@3 p]`'s horizontal dimension and cy with +[*@3 p]`'s vertical dimension.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`-`=`(T`): [^`:`:Size`_^ Size`_]`&_[@0 operator`-`=](T_[@3 t])&] +[s2; Decreases both dimension with the same value [*@3 t].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`*`=`(`:`:Size`_`): [^`:`:Size`_^ Size`_]`&_[@0 operator`*`=]( +[^`:`:Size`_^ Size`_]_[@3 p])&] +[s2; Multiplies cx with [*@3 p]`'s horizontal dimension and cy with +[*@3 p]`'s vertical dimension.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`*`=`(T`): [^`:`:Size`_^ Size`_]`&_[@0 operator`*`=](T_[@3 t])&] +[s2; Multiplies both dimension with the same value [*@3 t].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`/`=`(`:`:Size`_`): [^`:`:Size`_^ Size`_]`&_[@0 operator/`=]( +[^`:`:Size`_^ Size`_]_[@3 p])&] +[s2; Divides cx with [*@3 p]`'s horizontal dimension and cy with [*@3 p]`'s +vertical dimension.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`/`=`(T`): [^`:`:Size`_^ Size`_]`&_[@0 operator/`=](T_[@3 t])&] +[s2; Divides both dimension with the same value [*@3 t].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`<`<`=`(int`): [^`:`:Size`_^ Size`_]`&_[@0 operator<<`=]([@(0.0.255) i +nt]_[@3 sh])&] +[s2; Shift both dimensions left by [*@3 sh].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`>`>`=`(int`): [^`:`:Size`_^ Size`_]`&_[@0 operator>>`=]([@(0.0.255) i +nt]_[@3 sh])&] +[s2; Shift both dimensions right by [*@3 sh].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`+`+`(`): [^`:`:Size`_^ Size`_]`&_[@0 operator`+`+]()&] +[s2; Increments both dimensions.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`-`-`(`): [^`:`:Size`_^ Size`_]`&_[@0 operator`-`-]()&] +[s2; Decrements both dimensions.&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:operator`:`:Value`(`)const:@(0.0.255) [@(64) operator_Value()_]cons +t&] +[s2; Returns a conversion of the size to [* Value].&] +[s4; -|&] +[s0; &] +[s3;K:`:`:Size`_`:`:Serialize`(`:`:Stream`&`): [@(0.0.255) void]_[@0 Serialize]([^`:`:Stream^ S +tream]`&_[@3 s])&] +[s2; Serializes the size to a stream.&] +[s5;@0 [*@(141.42.0) s]-|the output stream &] +[s0; &] +[s0; ] \ No newline at end of file