Small fix in theide commandline mode

git-svn-id: svn://ultimatepp.org/upp/trunk@369 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-08-26 21:25:16 +00:00
parent ea699eb2a9
commit 215bdadf0a
5 changed files with 1033 additions and 345 deletions

View file

@ -17,6 +17,8 @@ using namespace Upp;
@@<:PACKAGE:>.cpp
#include <:?header:>"<:PACKAGE:>.h"<:/:><Core/Core.h><:.:>
<:?!header:>using namespace Upp;<:.:>
CONSOLE_APP_MAIN
{
<:?cmdline:>const Vector<String>& cmdline = CommandLine();

View file

@ -1,21 +1,533 @@
TITLE("AIndex")
COMPRESSED
120,156,237,93,89,115,219,70,18,254,43,83,149,163,68,133,162,64,144,20,41,201,73,197,231,174,43,137,157,178,21,229,65,69,137,16,56,20,39,2,1,46,6,144,204,108,54,191,125,187,231,0,6,23,111,41,148,203,126,176,37,96,208,51,211,253,245,57,135,47,108,242,245,215,86,221,250,202,90,240,231,228,21,29,57,177,23,245,47,88,187,221,59,117,236,206,233,237,79,239,143,79,247,127,220,59,106,215,144,74,19,168,180,186,205,86,175,211,106,182,237,35,248,171,217,106,218,29,187,213,110,246,236,227,118,175,213,234,89,39,174,231,112,222,191,240,236,94,239,20,63,178,225,35,187,219,177,155,221,118,175,221,107,182,186,61,27,190,181,45,203,182,186,118,167,217,110,245,236,206,201,144,114,183,127,225,244,90,167,251,31,142,224,163,22,246,4,196,173,230,145,221,238,182,109,171,101,217,109,232,170,217,235,181,155,221,78,175,117,124,116,116,226,58,211,136,5,190,234,139,53,155,118,243,244,186,217,61,133,49,255,253,247,223,141,102,219,146,35,104,3,177,166,213,134,161,
54,225,153,213,182,187,205,206,177,117,220,233,53,123,86,11,136,119,186,86,231,100,234,132,206,164,122,234,157,133,83,239,90,39,44,162,64,98,255,187,102,179,11,159,28,213,143,190,106,182,187,48,209,94,171,221,233,117,45,232,220,182,237,86,203,110,182,236,227,99,187,115,212,233,158,140,169,51,164,161,154,130,3,131,223,111,194,167,221,122,247,43,248,208,106,119,90,118,251,24,153,213,130,158,108,251,168,115,220,236,180,173,206,17,80,58,9,233,127,98,22,210,9,245,65,100,255,189,250,223,55,175,223,29,252,246,145,92,240,206,233,79,63,90,228,226,27,203,58,176,44,49,3,2,3,155,122,78,68,175,158,245,147,231,86,195,106,216,157,78,141,40,137,153,237,175,146,95,219,228,44,251,170,78,86,39,113,190,57,137,127,59,124,252,198,207,190,255,225,234,106,69,66,228,249,91,127,72,63,245,191,237,127,97,211,146,108,178,78,35,251,216,62,221,39,23,251,242,27,210,151,111,229,75,162,254,185,216,127,41,152,112,240,215,217,108,74,73,48,34,212,19,216,228,36,10,
8,143,130,144,54,200,25,153,196,60,34,220,137,24,31,205,136,129,96,78,70,65,72,220,192,143,28,230,211,144,140,60,231,14,30,176,33,188,99,35,70,135,228,122,70,132,142,210,8,94,159,19,199,31,74,98,99,231,142,98,239,36,152,210,208,129,126,6,223,15,190,239,147,33,29,1,161,97,35,51,188,115,24,222,11,135,51,151,132,240,125,48,33,142,235,82,152,81,210,111,182,185,98,230,193,95,248,3,243,111,228,252,27,228,151,164,95,213,139,232,63,246,57,187,193,95,244,64,246,106,123,64,24,154,158,13,190,37,159,106,125,2,99,31,7,67,152,118,20,135,62,210,27,3,93,114,231,120,49,21,211,215,28,211,163,56,27,51,158,96,82,49,223,25,14,225,47,206,3,151,1,23,97,8,96,5,157,107,230,177,136,81,193,234,235,121,243,227,117,236,104,130,125,75,14,115,148,148,16,103,131,188,141,8,244,23,115,152,130,195,145,142,238,83,137,198,133,129,83,194,176,177,254,186,142,168,144,88,17,18,129,223,158,135,161,51,147,143,244,60,128,176,227,121,193,189,
24,61,246,157,64,195,137,72,52,166,132,194,167,48,14,14,120,160,190,139,125,16,193,57,199,135,47,39,65,24,177,63,97,80,17,155,80,226,177,91,154,157,99,42,60,242,28,200,163,75,128,222,102,117,194,176,91,30,232,190,71,14,136,2,166,16,50,10,44,199,254,28,50,13,184,248,0,127,19,3,145,3,35,247,44,26,19,62,165,174,196,158,16,81,131,104,24,104,46,33,95,34,148,145,148,56,208,105,40,205,145,128,231,66,192,131,3,241,57,55,117,162,78,96,92,12,65,196,137,15,234,65,125,96,54,8,207,117,92,24,5,140,100,66,232,39,0,186,152,137,102,227,139,152,121,130,125,64,136,249,242,173,132,208,196,153,10,242,170,115,24,145,227,221,59,51,142,248,164,97,40,120,231,121,208,141,19,186,99,115,180,2,97,116,52,162,46,98,201,155,17,144,42,3,128,197,190,79,233,144,34,86,129,246,84,76,122,68,60,39,188,161,196,143,39,215,160,130,166,134,51,33,217,84,219,62,208,73,112,151,17,244,40,68,52,250,122,132,174,3,12,228,248,64,76,132,
242,8,91,79,195,224,26,62,104,144,223,199,204,163,200,31,32,12,34,226,12,30,11,51,194,64,23,208,110,0,121,74,246,208,64,0,227,194,168,134,148,180,236,0,83,142,33,59,45,98,96,121,108,78,94,240,30,104,10,82,14,241,130,40,51,37,68,179,64,15,119,161,61,72,133,151,240,28,25,24,115,57,158,204,116,5,42,64,2,56,1,14,232,171,19,42,70,132,226,36,247,99,138,248,158,92,11,211,33,161,38,36,3,36,82,213,167,0,17,47,22,35,77,112,166,24,132,84,47,246,15,65,74,30,243,111,225,171,190,57,244,6,249,77,60,7,218,233,108,66,144,91,16,41,206,13,165,56,132,38,215,201,117,44,148,112,38,26,33,89,176,98,0,222,97,255,226,144,144,62,152,221,60,108,146,30,148,46,56,82,46,180,158,42,45,170,106,93,106,156,129,182,55,113,8,29,133,245,18,201,130,137,3,189,207,74,17,21,114,196,66,160,225,220,57,204,115,176,105,172,167,150,104,238,30,80,7,162,208,26,190,6,74,37,246,164,6,234,138,99,197,87,96,161,126,141,
35,109,139,235,192,17,249,174,72,24,140,16,31,131,237,201,206,202,20,80,224,131,52,181,76,160,191,216,228,10,140,39,194,137,94,135,212,185,229,162,111,30,12,14,92,128,128,112,24,224,189,188,136,13,14,110,129,243,65,8,65,32,202,177,161,109,126,56,129,17,58,190,38,35,172,19,136,7,69,4,246,144,166,146,21,240,17,196,193,53,42,95,2,35,199,39,210,82,35,144,19,241,66,132,10,236,66,123,48,14,131,248,102,108,48,230,13,52,127,7,70,39,225,12,60,100,97,194,14,78,246,110,0,64,142,156,9,104,44,140,30,231,140,159,137,62,120,124,45,249,29,229,73,241,154,236,219,135,175,93,16,141,48,97,56,227,134,224,162,1,106,205,51,248,17,16,101,192,67,224,75,224,2,129,146,119,33,5,217,241,84,120,194,105,220,11,123,50,133,81,211,240,78,78,24,173,182,226,122,131,188,151,12,11,4,144,0,71,48,251,152,59,96,235,112,188,78,200,2,233,3,5,67,193,16,0,229,123,57,86,180,146,226,85,42,250,140,5,41,145,177,180,206,147,0,97,
173,140,52,227,127,196,190,27,129,130,8,69,23,236,141,180,75,114,193,15,115,173,50,234,11,147,53,216,22,17,145,208,7,141,85,64,255,64,153,116,205,138,44,60,250,120,79,233,84,163,95,99,249,103,244,169,142,63,83,12,120,119,246,115,234,84,235,134,83,1,227,112,25,5,83,230,14,78,6,135,131,195,151,208,237,224,144,135,238,48,112,7,135,191,128,97,65,21,29,124,77,253,193,65,204,47,133,101,197,39,125,52,42,164,31,97,92,40,224,186,34,29,104,120,43,184,25,76,165,115,7,183,70,167,48,196,233,172,79,34,136,2,56,56,57,80,246,9,232,40,115,129,87,142,7,179,67,116,195,116,192,175,142,168,3,1,23,229,169,246,32,184,66,161,210,128,19,100,27,218,196,242,8,71,243,232,23,138,94,143,203,223,90,68,37,16,164,24,87,163,3,77,226,232,52,240,182,48,56,73,158,239,149,5,228,104,102,74,190,52,82,11,50,248,54,125,222,34,159,146,231,165,169,130,14,72,75,104,182,200,224,10,189,88,242,170,38,98,125,251,20,71,137,22,221,167,
247,217,96,200,65,245,1,167,53,141,209,124,164,129,107,67,170,112,217,43,25,159,95,211,212,60,41,235,97,52,17,90,116,31,196,222,80,55,76,77,139,12,191,165,145,184,166,62,132,218,74,41,0,138,119,160,149,66,126,202,104,240,0,32,13,170,206,201,44,136,65,103,132,131,197,1,153,33,152,238,31,242,8,65,9,90,73,196,131,9,194,56,185,46,163,203,17,141,132,47,134,32,14,21,42,13,94,152,15,20,241,41,117,38,2,23,93,12,117,68,14,195,33,183,1,101,84,73,129,66,167,20,105,24,187,160,160,186,253,91,31,134,194,134,96,132,185,178,198,24,132,195,167,82,205,202,154,133,24,196,161,31,19,237,210,102,109,153,167,32,14,14,254,122,173,132,5,45,32,20,203,190,87,178,62,248,235,215,114,17,238,40,168,231,97,178,192,176,29,150,131,193,90,131,51,122,150,204,143,170,210,121,75,120,210,236,219,132,201,89,214,46,172,71,84,48,57,95,105,40,24,141,60,225,188,229,144,239,107,87,185,97,41,201,125,144,233,22,85,122,151,203,182,100,112,151,
49,51,194,84,100,243,46,180,209,82,40,117,21,174,84,218,34,178,77,99,84,52,68,111,71,85,14,29,99,235,235,48,184,133,192,94,184,125,116,50,34,32,13,124,90,50,193,52,84,163,159,24,143,184,57,69,108,0,25,3,70,0,105,40,202,117,226,10,57,22,14,163,140,77,195,128,202,129,8,154,38,73,84,157,27,89,45,80,201,155,36,24,135,88,33,169,72,23,84,22,48,23,225,35,128,231,234,166,70,52,62,68,108,192,0,228,115,252,160,34,21,135,216,37,25,189,194,195,72,255,32,231,155,204,244,137,104,219,227,40,203,35,193,245,105,66,117,87,209,135,89,83,21,2,231,124,220,34,108,27,16,243,49,103,155,39,126,101,50,141,28,189,88,103,217,22,238,128,248,42,38,242,6,130,178,72,151,1,210,81,33,97,19,146,162,240,150,166,137,26,89,152,52,25,9,44,38,233,194,201,39,153,108,85,2,251,59,214,114,210,220,220,15,170,210,115,85,235,86,26,176,77,160,179,106,248,174,0,248,162,236,83,185,111,3,217,63,59,121,243,249,57,69,50,158,147,
183,205,59,18,196,148,103,84,143,22,200,72,173,124,122,254,225,225,67,25,61,250,135,244,38,143,164,115,15,174,50,187,5,88,77,244,11,72,183,2,82,24,248,221,63,23,242,128,157,189,99,65,204,87,12,123,178,70,235,145,67,159,34,70,49,24,90,24,250,144,61,30,72,226,105,252,131,37,253,37,67,31,220,162,99,198,62,181,37,131,159,124,224,179,91,97,79,185,252,171,67,159,146,218,152,1,210,2,184,183,95,30,3,92,61,64,213,55,85,18,83,65,74,82,206,13,194,154,114,11,149,132,52,58,156,121,146,245,152,197,62,65,173,223,224,42,121,90,101,20,131,203,154,36,28,60,189,199,149,120,209,84,19,94,87,75,16,46,5,23,130,54,126,173,34,241,114,58,53,10,226,164,143,116,144,59,173,73,91,84,132,93,169,187,60,113,72,110,25,101,151,131,147,193,137,156,225,165,222,221,86,6,11,43,217,189,245,236,217,42,120,59,91,184,136,241,94,209,5,166,137,205,14,50,216,26,225,162,44,174,174,224,34,71,118,187,88,131,188,152,25,123,197,146,213,7,
67,86,44,191,177,74,224,110,234,25,62,24,139,22,4,45,51,62,252,132,75,224,92,108,134,137,112,227,10,109,220,52,36,5,177,40,30,164,11,37,240,17,110,60,11,66,39,156,17,5,12,110,46,156,165,180,228,162,217,155,32,216,219,19,13,159,129,26,255,176,87,35,207,158,145,38,254,101,215,106,187,180,72,3,80,142,178,248,3,223,146,238,94,42,7,223,135,34,243,55,89,53,147,218,50,23,95,229,182,208,136,122,83,100,73,106,75,199,168,88,94,72,118,76,224,150,101,194,35,220,84,144,88,6,177,35,8,183,96,72,237,197,0,17,55,7,136,157,30,233,110,158,185,193,152,32,11,172,146,253,108,96,250,113,175,206,67,173,47,110,47,124,122,107,238,207,65,94,197,5,115,104,216,93,52,246,210,136,77,164,17,21,246,64,214,32,243,91,14,51,148,253,160,72,184,94,220,183,88,186,44,0,38,98,58,133,248,93,218,122,99,147,148,146,185,140,222,112,255,38,56,218,138,26,20,31,235,88,204,172,61,149,47,216,23,18,45,57,199,50,231,81,162,197,37,254,
115,151,108,72,46,45,199,93,1,0,224,12,201,109,198,85,247,2,1,25,57,163,49,22,28,221,81,221,250,220,85,227,41,161,123,101,216,46,66,162,49,205,141,65,40,74,64,91,7,226,67,103,201,79,111,55,67,229,66,192,114,245,119,108,149,205,27,20,228,35,177,143,61,81,17,16,165,25,197,214,211,83,17,146,169,181,70,191,84,129,146,104,126,161,38,225,209,174,227,99,251,73,249,139,202,148,7,228,250,224,89,120,150,163,59,173,170,15,164,105,9,206,171,115,226,53,241,189,57,156,191,192,248,161,96,92,153,125,125,164,243,49,188,56,245,42,63,153,183,19,169,200,7,25,50,45,153,13,234,189,189,133,237,190,37,250,84,237,175,212,246,218,6,249,56,197,253,240,186,104,148,30,181,25,82,140,175,224,137,84,180,40,136,28,175,236,28,209,156,197,151,204,186,198,46,41,197,82,235,16,58,250,58,151,158,25,79,124,173,161,49,159,15,222,31,1,174,203,161,113,69,36,166,125,124,198,152,156,191,160,91,182,113,224,172,188,132,58,184,24,244,31,120,105,23,92,
199,178,133,175,45,172,30,190,212,39,193,50,197,216,10,151,180,234,98,248,191,104,244,18,156,93,126,199,198,162,201,151,29,199,244,23,167,116,207,221,40,46,133,254,18,211,184,14,2,175,122,30,111,249,235,201,52,154,45,57,141,51,138,11,27,144,87,138,131,24,233,89,35,138,52,64,135,85,110,163,153,179,87,35,120,190,155,88,115,166,6,10,38,182,105,230,136,225,121,68,143,171,83,94,247,140,111,100,83,95,122,212,9,83,171,106,216,51,60,245,132,7,181,188,220,225,215,205,171,198,162,207,236,210,133,217,177,58,114,92,21,67,174,23,243,203,218,242,79,70,140,190,165,168,127,131,208,167,36,234,209,37,240,12,219,75,215,233,100,12,83,25,193,20,215,177,176,56,158,171,141,27,75,91,229,197,113,254,16,171,221,217,80,60,49,220,185,155,22,140,138,123,210,120,173,64,252,93,209,174,232,10,219,78,227,105,117,76,148,73,29,207,189,51,63,155,25,46,43,251,245,4,181,137,0,214,176,209,122,202,15,233,159,179,182,125,185,8,143,229,102,89,234,177,151,48,
254,70,198,189,2,108,171,99,104,113,110,118,190,189,47,86,182,77,195,79,94,6,120,136,249,19,139,102,58,224,168,76,144,230,249,244,186,40,92,20,26,22,58,111,144,231,120,125,65,184,153,95,168,100,200,91,113,241,194,110,228,21,91,118,38,114,106,220,188,141,160,178,198,84,9,228,93,168,238,138,187,4,228,5,13,94,112,159,194,109,209,109,20,104,212,138,151,62,236,88,126,35,165,84,17,222,223,102,235,84,242,150,144,149,156,226,103,165,22,219,133,246,23,96,149,1,107,77,192,72,7,178,33,96,10,238,104,233,173,32,15,32,199,71,46,104,200,59,48,112,218,15,44,134,42,5,172,16,212,96,223,16,21,15,66,176,49,131,43,143,25,36,74,213,188,74,216,174,89,26,40,10,188,184,241,43,19,123,156,225,45,40,192,183,52,226,16,119,215,112,143,221,140,35,248,161,50,254,208,23,6,165,81,197,147,193,76,134,231,8,31,113,127,147,56,152,143,87,148,225,236,210,141,240,9,136,234,101,199,252,50,116,165,36,74,227,243,127,24,138,98,147,227,57,69,35,
121,73,228,191,73,163,100,55,227,37,176,225,50,3,179,31,178,110,163,20,171,171,2,78,215,109,100,243,61,147,102,61,211,67,35,173,236,212,30,17,13,31,197,175,138,73,21,80,216,32,205,149,211,222,249,178,73,105,181,170,50,32,88,184,252,243,20,35,218,242,68,221,240,47,121,64,108,39,128,252,231,128,179,158,240,119,130,245,107,26,212,179,144,77,214,10,176,252,50,166,13,99,189,92,53,47,75,215,59,201,82,54,202,214,13,17,230,66,78,158,60,73,84,195,195,155,58,229,105,128,144,64,35,199,19,190,170,170,78,95,86,229,23,251,155,197,118,229,92,31,115,234,251,171,112,242,85,24,76,55,228,228,213,224,123,243,69,179,200,98,236,36,191,230,91,50,125,225,110,140,205,122,70,157,110,79,91,24,148,252,158,185,116,112,64,124,229,102,50,252,42,186,242,237,44,132,157,165,236,90,114,53,199,201,46,45,21,14,202,102,10,146,75,109,88,23,172,9,23,81,89,59,86,193,27,245,214,75,95,74,181,75,144,227,226,82,91,151,225,2,144,218,185,19,38,136,
214,175,208,22,101,46,125,112,227,48,148,39,24,101,131,122,166,41,195,203,221,28,158,238,241,76,41,230,42,225,69,37,74,70,179,73,1,113,28,102,182,252,39,115,254,133,249,108,194,254,84,54,101,2,214,46,148,233,110,60,153,234,116,71,215,159,49,80,23,211,208,151,54,38,51,84,147,90,107,57,111,209,170,228,115,207,11,220,21,113,44,6,151,19,72,58,147,121,75,172,229,141,215,222,250,16,130,99,2,238,22,17,42,130,229,143,226,46,183,75,34,255,173,240,157,188,8,212,132,174,188,91,89,29,229,73,76,255,161,48,78,146,104,131,252,30,132,183,92,38,92,108,36,110,87,52,174,89,214,71,106,126,251,245,215,57,133,16,174,250,83,185,155,62,74,100,94,114,157,70,186,120,7,55,222,212,27,29,242,32,14,193,4,24,55,214,149,240,145,156,103,54,133,51,23,151,103,184,129,212,43,188,128,113,112,85,52,85,115,175,154,206,94,73,251,10,52,41,12,102,220,128,50,82,213,69,232,114,44,204,189,170,123,142,47,92,221,110,159,103,237,54,128,222,228,193,
210,182,219,45,221,31,176,60,155,86,221,121,176,138,8,42,164,191,250,193,184,193,247,41,54,36,50,204,0,244,124,121,37,122,206,49,91,225,11,230,144,166,125,224,206,229,93,159,250,54,93,1,238,180,101,249,133,189,242,130,227,161,198,31,139,74,177,167,21,231,99,142,232,54,207,19,154,140,91,41,168,95,131,167,200,160,37,249,90,47,187,30,87,239,121,82,129,85,158,215,171,214,108,49,164,45,222,222,186,34,251,173,211,147,148,235,198,79,10,133,4,148,120,80,59,17,7,53,164,64,140,23,240,84,116,81,83,124,66,51,55,56,72,70,152,216,37,121,213,231,124,214,61,38,16,231,15,100,41,238,200,237,202,200,156,58,120,250,28,135,146,151,154,65,88,255,138,52,151,94,129,164,144,75,166,48,179,172,90,60,190,141,81,82,168,253,151,241,169,194,250,231,255,127,143,217,148,130,207,188,58,75,45,185,200,59,241,191,172,72,22,173,101,27,68,254,153,188,218,153,203,27,181,213,255,195,128,215,194,223,4,33,164,182,147,98,112,85,209,31,254,235,67,78,146,86,
234,206,81,66,194,168,191,85,5,174,75,249,9,188,200,62,175,8,205,72,182,145,26,124,226,38,116,217,76,12,97,177,83,188,204,66,167,108,96,203,12,10,230,255,130,222,48,127,125,199,153,142,59,40,217,234,191,204,198,54,61,196,199,156,244,235,194,189,145,27,76,57,217,10,241,135,44,12,204,2,121,131,123,33,133,219,73,86,64,232,132,141,114,236,72,152,49,119,91,9,204,60,251,114,3,46,46,184,163,80,215,167,193,20,10,196,98,113,224,59,194,250,229,183,77,171,255,184,69,95,54,13,31,225,80,197,105,14,199,191,1,211,63,166,174,56,77,141,59,57,174,227,27,50,9,134,185,140,18,63,144,57,165,184,12,167,184,186,184,156,244,42,173,124,206,174,215,76,131,160,108,103,250,139,92,0,198,77,145,101,134,115,190,39,49,30,204,241,40,233,131,10,215,242,126,177,157,127,40,207,81,233,55,72,255,255,106,226,218,163,
topic "AIndex";[2 $$0,0#00000000000000000000000000000000:Default]
[i448;a25;kKO9;*@(64)2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,0#27521748481378242620020725143825:desc]
[a83;*R6 $$3,0#31310162474203024125188417583966:caption]
[l288;i1121;b17;O9;~~~.1408;2 $$4,0#10431211400427159095818037425705:param]
[i448;a25;kKO9;*@(64)2 $$5,0#37138531426314131252341829483370:item]
[*+117 $$6,6#14700283458701402223321329925657:header]
[l288;a17;*1 $$7,7#70004532496200323422659154056402:requirement]
[{_}%EN-US
[s5;K@0 [%00-00@(64) template_<][%00-00@(0.0.255) class][%00-00@(64) _][%00-00@4 T][%00-00@(64) ,
][%00-00@(0.0.255) class][%00-00@(64) _][%00-00@4 V][%00-00@(64) , ][%00-00@(0.0.255) clas
s][%00-00@(64) _][%00-00@4 HashFn][%00-00@(64) >__][%00-00@(0.0.255) class][%00-00@(64) _][%00-00 A
Index]&]
[s5;K@0 [%00-00@(64) template_<][%00-00@(0.0.255) class][%00-00@(64) _][%00-00@4 T][%00-00@(64) ,
][%00-00@(0.0.255) class][%00-00@(64) _][%00-00@4 V][%00-00@(64) , ][%00-00@(0.0.255) clas
s][%00-00@(64) _][%00-00@4 HashFn][%00-00@(64) >__][%00-00@(0.0.255) class][%00-00@(64) _][%00-00 A
Index]&]
[s0;t292;* [* class ]AIndex&]
[s0; &]
[s0; [*C@4 T]-|Type of elements to store. T must satisfy requirements
for container flavor identified by parameter V and must have
[*C operator`=`=] defined.&]
[s0; [*C@4 V]-|Basic random access container.&]
[s0; [*C@4 HashFn]-|Hashing class. Must have defined [*C unsigned operator()(const
T`& x)] method returning hash value for elements.&]
[s0; This template class adds associative capabilities to basic random
access containers, forming flavors of Index. It is used as base
class for concrete index flavors, [* Index] and [* ArrayIndex].&]
[s0; It allows adding elements at the end of sequence in constant
amortized time like basic random container. Additionally, it
also allows fast retrieval of a position of the element with
specified value. Hashing is used for this operation. AIndex stores
hash`-values of elements, so it has no sense to cache them externally.&]
[s0; Building of internal hash maps of AIndex is always deferred
till search operation. This effectively avoids unneeded remapping
if large number of elements is added.&]
[s0; Removing elements from an AIndex causes an interesting problem.
While it is possible to simply remove (or insert) an element
at a specified position, such operation has to move a lot of
elements and also scratches internal hash maps. Thus removing
elements this way is slow, especially when combined with searching.&]
[s0; The solution for this problem is [*/ unlinking] of elements. Unlinked
elements are not removed from index, but they are [*/ ignored][/
]by search operations. Unlinking is a simple, constant time,
fast operation. Further, it is possible to place an element at
the first available unlinked position (rather than to the end
of sequence) using the [* Put] method, reusing unlinked position
in short constant time.&]
[s0; The only problem of unlinking is that it breaks the so`-called
[* multi`-key ordering]. This term means that if there are more
elements with the same value in the index and they are iterated
through using the FindNext method, their positions (got as the
result of Find and subsequent FindNext methods) are in ascending
order. The problem is that it is impossible to implement placing
elements at unlinked positions in short time while preserving
this ordering. On the other hand, usage scenarios for indexes
show that need for unlinking elements and multi`-key ordering
is almost always disjunct. For the rest of the cases, it is always
possible to restore ordering by the [* Reindex] or the [* Sweep]
method.&]
[s0; Like any other NTL container, AIndex is [*/^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ m
oveable][*/ ]type with [*/^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ pick
and optional deep copy] transfer semantics, although these features
are more important in derived concrete index flavors.&]
[s0; Members&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Add][%00-00 (][%00-00@(0.0.255) const][%00-00 _][%00-00@4 T
][%00-00 `&_][%00-00@3 x][%00-00 , ][%00-00@(0.0.255) unsigned][%00-00 _][%00-00@3 `_hash][%00-00 )
]&]
[s2; Adds a new element with a precomputed hash value.The precomputed
hash value must be the same as the hash value that would be the
result of HashFn. The benefit of this variant is that sometimes
you can compute hash`-value as the part of an other process,
like fetching strings from an input stream.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 x]-|Element to add.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Add][%00-00 (][%00-00@(0.0.255) const][%00-00 _][%00-00@4 T
][%00-00 `&_][%00-00@3 x][%00-00 )]&]
[s2; Adds a new element to AIndex.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 x]-|Element to add.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 Find][%00-00@(64) (][%00-00 const][%00-00@(64) _
][%00-00@4 T][%00-00@(64) `&_][%00-00@3 x][%00-00@(64) , ][%00-00 unsigned][%00-00@(64) _][%00-00@3 `_
hash][%00-00@(64) )_][%00-00 const]&]
[s2; Retrieves the position of the first element with the specified
value in AIndex, using a precomputed hash value. The precomputed
hash value must be the same as the hash value that would be result
of HashFn. If multi`-key ordering is not broken and more than
one element with the same value exists in AIndex, the lowest
position is retrieved. If the specified value does not exist
in AIndex, a negative number is returned. Unlinked elements are
ignored.&]
[s4; [*C@3 x]-|Element to find.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s4; [*/ Return value]-|Position of the element or negative value if
value is not in AIndex.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 Find][%00-00@(64) (][%00-00 const][%00-00@(64) _
][%00-00@4 T][%00-00@(64) `&_][%00-00@3 x][%00-00@(64) )_][%00-00 const]&]
[s2; Retrieves the position of the first element with the specified
value in AIndex. If multi`-key ordering is not broken and more
than one element with the same value exists in AIndex, lowest
position is retrieved. If the specified value does not exist
in AIndex, a negative number is returned. Unlinked elements are
ignored.&]
[s4; [*C@3 x]-|Element to find.&]
[s4; [*/ Return value]-|Position of the element or negative value if
value is not in AIndex.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 FindNext][%00-00@(64) (][%00-00 int][%00-00@(64) _
][%00-00@3 i][%00-00@(64) )_][%00-00 const]&]
[s2; Retrieves the position of the next element with the same value
as the element at specified position. If multi`-key ordering
is not broken and more than one element with that value exists
in AIndex, the lowest position greater than specified one is
retrieved, so positions returned by subsequent calls to FindNext
are in ascending order. When there are no more elements with
the required value, a negative number is returned. Unlinked elements
are ignored.&]
[s4; [*C@3 i]-|Position of the element.&]
[s4; [*/ Return value]-|Position of the next element with same value.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 FindLast][%00-00@(64) (][%00-00 const][%00-00@(64) _
][%00-00@4 T][%00-00@(64) `&_][%00-00@3 x][%00-00@(64) , ][%00-00 unsigned][%00-00@(64) _][%00-00@3 `_
hash][%00-00@(64) )_][%00-00 const]&]
[s2; Retrieves the position of the last element with specified value
in AIndex, using a precomputed hash value. The precomputed hash
value must be the same as the hash value that would be the result
of HashFn. If multi`-key ordering is not broken and more than
one element with the same value exists in AIndex, the greatest
position is retrieved. If the specified value does not exist
in AIndex, a negative number is returned. Unlinked elements are
ignored.&]
[s4; [*C@3 x]-|Element to find.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s4; [*/ Return value]-|Position of the element or negative number if
value is not in AIndex.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 FindLast][%00-00@(64) (][%00-00 const][%00-00@(64) _
][%00-00@4 T][%00-00@(64) `&_][%00-00@3 x][%00-00@(64) )_][%00-00 const]&]
[s2; Retrieves the position of the last element with specified value
in AIndex. If multi`-key ordering is not broken and more than
one element with the same value exists in AIndex, the greatest
position is retrieved. If element does not exist in AIndex, a
negative number is returned. Unlinked elements are ignored.&]
[s4; [*C@3 x]-|Element to find.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s4; [*/ Return value]-|Position of the element or negative number if
value is not in AIndex.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 FindPrev][%00-00@(64) (][%00-00 int][%00-00@(64) _
][%00-00@3 i][%00-00@(64) )_][%00-00 const]&]
[s2; Retrieves the position of the previous element with the same
value as the element at the specified position. If multi`-key
ordering is not broken and more than one element with that value
exists in AIndex, the greatest position lower than specified
one is retrieved (so that positions got by subsequent calls to
FindNext are in descending order). When there are no more elements
with required value, negative number is returned. Unlinked elements
are ignored.&]
[s4; [*C@3 i]-|Position of the element.&]
[s4; [*/ Return value]-|Position of the previous element with same value.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 FindAdd][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@4 T][%00-00 `&_][%00-00@3 key][%00-00 , ][%00-00@(0.0.255) unsigned][%00-00 _][%00-00@3 `_
hash][%00-00 )]&]
[s2; Retrieves position of first element with specified value in
AIndex, using a precomputed hash value. Precomputed hash value
must be same as hash value that would be result of HashFn. If
multi`-key ordering is not broken and more than one element with
the same value exists in AIndex, the lowest position is retrieved.
If element does not exist in AIndex, it is added to AIndex and
position of this newly added element is returned. Unlinked elements
are ignored.&]
[s4; [*C@3 key]-|Element to find or add.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s4; [*/ Return value]-|Position of the found or added element.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 FindAdd][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@4 T][%00-00 `&_][%00-00@3 key][%00-00 )]&]
[s2; Retrieves position of first element with specified value in
AIndex. If multi`-key ordering is not broken and more than one
element with the same value exists in AIndex, lowest position
is retrieved. If element does not exist in AIndex, it is added
to AIndex and position of this newly added element is returned.
Unlinked elements are ignored.&]
[s4; [*C@3 key]-|Element to find or add.&]
[s4; [*/ Return value]-|Position of the found or added element.&]
[s0;3 &]
[s5;K [%00-00^`:`:AIndex^ AIndex][%00-00 `&_][%00-00@0 operator<<][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _T`&_][%00-00@3 x][%00-00 )]&]
[s2; Operator replacement of [* void Add(const T`& x)]. By returning
reference to AIndex it allows adding multiple elements in a single
expression, thus e.g. allowing to construct a temporary Index
as part of an expression like Foo((Index<int>() << 1 << 2)).&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 newt]-|Element to be added.&]
[s4; [*/ Return value]-|Reference to AIndex.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Unlink][%00-00 (][%00-00@(0.0.255) int][%00-00 _
][%00-00@3 i][%00-00 )]&]
[s2; Unlinks the element at the specified position. The unlinked
item stays in AIndex but is ignored by any Find operation.&]
[s4; [*C@3 i]-|Position of item to unlink.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 Put][%00-00 (][%00-00@(0.0.255) const][%00-00 _][%00-00@4 T
][%00-00 `&_][%00-00@3 x][%00-00 , ][%00-00@(0.0.255) unsigned][%00-00 _][%00-00@3 `_hash][%00-00 )
]&]
[s2; If there are any unlinked elements in AIndex, one of them is
replaced by specified value. If there are no unlinked elements,
the element with the specified value is appended to the end of
AIndex using [* Add]. The precomputed hash should be same as the
result of HashFn. The position of the placed element is returned.&]
[s7; Invalidates multi`-key ordering.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 x]-|Element to put into AIndex.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s4; [*/ Return value]-|Position where the element was placed.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 Put][%00-00 (][%00-00@(0.0.255) const][%00-00 _][%00-00@4 T
][%00-00 `&_][%00-00@3 x][%00-00 )]&]
[s2; If there are any unlinked elements in AIndex, one of them is
replaced by specified value. If there are no unlinked elements,
the element with the specified value is appended to the end of
AIndex using [* Add]. The position of the placed element is returned.&]
[s7; Invalidates multi`-key ordering.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s4; [*C@3 x]-|Element to put into AIndex.&]
[s4; [*/ Return value]-|Position where element is placed.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 FindPut][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@4 T][%00-00 `&_][%00-00@3 key][%00-00 , ][%00-00@(0.0.255) unsigned][%00-00 _][%00-00@3 `_
hash][%00-00 )]&]
[s2; Retrieves the position of the first element with the specified
value in AIndex, using a precomputed hash value. The precomputed
hash value must be the same as the hash value that would be the
result of HashFn. If the specified value does not exist in the
AIndex, it is placed to it using [* Put(const T`& x, unsigned `_hash).]
The position of the found or placed element is returned.&]
[s7;~~~.992; Invalidates multi`-key ordering.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 key]-|Element to find or put.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s4; [*/ Return value]-|Position of the found or placed element.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 FindPut][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@4 T][%00-00 `&_][%00-00@3 key][%00-00 )]&]
[s2; Retrieves the position of the first element with the specified
value in AIndex. If the element does not exist in the AIndex,
it is placed to it using [* Put(const T`& x).] The position of
the found or placed element is returned.&]
[s7; Invalidates multi`-key ordering.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 key]-|Element to find or put.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s4; [*/ Return value]-|Position of the found or placed element.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Set][%00-00 (][%00-00@(0.0.255) int][%00-00 _][%00-00@3 i
][%00-00 , ][%00-00@(0.0.255) const][%00-00 _][%00-00@4 T][%00-00 `&_][%00-00@3 x][%00-00 ,
][%00-00@(0.0.255) unsigned][%00-00 _][%00-00@3 `_hash][%00-00 )]&]
[s2; Replaces the element at the specified position with a new element
with the specified value, using a precomputed hash`-value. Speed
of this operation depends on the total number of elements with
the same value as the specified one.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 i]-|Position of the element.&]
[s4; [*C@3 x]-|Value to set.&]
[s4; [*C@3 `_hash]-|Precomputed hash value.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Set][%00-00 (][%00-00@(0.0.255) int][%00-00 _][%00-00@3 i
][%00-00 , ][%00-00@(0.0.255) const][%00-00 _][%00-00@4 T][%00-00 `&_][%00-00@3 x][%00-00 )]&]
[s2; Replaces the element at the specified position with a new element
with the specified value. Speed of this operation depends on
total number of elements with the same value as specified the
specified one.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 i]-|Position of the element.&]
[s4; [*C@3 x]-|Value to set.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 const][%00-00@(64) _T`&_][%00-00@0 operator`[`]][%00-00@(64) (][%00-00 i
nt][%00-00@(64) _][%00-00@3 i][%00-00@(64) )_][%00-00 const]&]
[s2; Returns the element at the specified position.&]
[s4; [*C@3 i]-|Position of the element.&]
[s4; [*/ Return value]-|Constant reference to element.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 GetCount][%00-00@(64) ()_][%00-00 const]&]
[s2; Returns number of elements in AIndex.&]
[s4; [*/ Return value]-|Actual number of elements.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 bool][%00-00@(64) _][%00-00@0 IsEmpty][%00-00@(64) ()_][%00-00 const]&]
[s2; Tests whether AIndex is empty. Same as GetCount() `=`= 0.&]
[s4; [*/ Return value]-|true if AIndex is empty, false otherwise.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Clear][%00-00 ()]&]
[s2; Removes all elements from AIndex.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 ClearIndex][%00-00 ()]&]
[s2; Restores multi`-key ordering.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 UnlinkKey][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@4 T][%00-00 `&_][%00-00@3 k][%00-00 , ][%00-00@(0.0.255) unsigned][%00-00 _][%00-00@3 h
][%00-00 )]&]
[s2; Unlinks all elements with specified value using precomputed
hash`-value. Unlinked elements stay in AIndex but are ignored
by any Find operations. Precomputed hash value must be same as
hash value that would be result of HashFn. &]
[s4; [*C@3 k]-|Value of elements to unlink.&]
[s4; [*C@3 h]-|Precomputed hash value.&]
[s4; [*/ Return value]-|Number of elements unlinked.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 UnlinkKey][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@4 T][%00-00 `&_][%00-00@3 k][%00-00 )]&]
[s2; Unlinks all elements with specified value. Unlinked elements
remain in the AIndex but are ignored by any Find operations.&]
[s4; [*C@3 k]-|Value of elements to unlink.&]
[s4; [*/ Return value]-|Number of elements unlinked.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 bool][%00-00@(64) _][%00-00@0 IsUnlinked][%00-00@(64) (][%00-00 int][%00-00@(64) _
][%00-00@3 i][%00-00@(64) )_][%00-00 const]&]
[s2; Tests whether the element at the specified position is unlinked.&]
[s4; [*C@3 i]-|Position.&]
[s4; [*/ Return value]-|true if element is unlinked.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Sweep][%00-00 ()]&]
[s2; Removes all unlinked elements from AIndex. Complexity of the
operation depends on the number of elements in AIndex, not on
the number of unlinked elements. Also restores multi`-key ordering.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Insert][%00-00 (][%00-00@(0.0.255) int][%00-00 _
][%00-00@3 i][%00-00 , ][%00-00@(0.0.255) const][%00-00 _][%00-00@4 T][%00-00 `&_][%00-00@3 k][%00-00 ,
][%00-00@(0.0.255) unsigned][%00-00 _][%00-00@3 h][%00-00 )]&]
[s2; Inserts an element with the specified value at the specified
position, using a precomputed hash value. The precomputed hash
value must be the same as the hash value that would be the result
of HashFn. This is a slow operation, especially when combined
with any search operations.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 i]-|Insert position.&]
[s4; [*C@3 k]-|Element to insert.&]
[s4; [*C@3 h]-|Precomputed hash value.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Insert][%00-00 (][%00-00@(0.0.255) int][%00-00 _
][%00-00@3 i][%00-00 , ][%00-00@(0.0.255) const][%00-00 _][%00-00@4 T][%00-00 `&_][%00-00@3 k][%00-00 )
]&]
[s2; Inserts an element with the specified value at the specified
position. This is a slow operation, especially when combined
with any search operations.&]
[s7; Requires T to have deep copy constructor.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 i]-|Insert position.&]
[s4; [*C@3 k]-|Element to insert.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Remove][%00-00 (][%00-00@(0.0.255) int][%00-00 _
][%00-00@3 i][%00-00 )]&]
[s2; Removes the element at the specified position. This is a slow
operation, especially when combined with any search operations.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 i]-|Position of the element to remove.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Remove][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@(0.0.255) int][%00-00 _`*][%00-00@3 sorted`_list][%00-00 , ][%00-00@(0.0.255) int][%00-00 _
][%00-00@3 count][%00-00 )]&]
[s2; Removes multiple elements from AIndex. Time of operation only
slightly depends on the number of removed elements. This is a
slow operation, especially when combined with any search operations.&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 sorted`_list]-|Pointer to array of positions to remove, in
ascending order.&]
[s4; [*C@3 count]-|Number of elements to remove.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Remove][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00^`:`:Vector^ Vector][%00-00 <][%00-00^int^ int][%00-00 >`&_][%00-00@3 sorted`_list][%00-00 )
]&]
[s2; Removes multiple elements from AIndex. Same as Remove(sorted`_list,
sorted`_list.GetCount()).&]
[s7; Invalidates iterators to AIndex.&]
[s7; Invalidates references to Index.&]
[s4; [*C@3 sorted`_list]-|Sorted Vector of positions to remove.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 RemoveKey][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@4 T][%00-00 `&_][%00-00@3 k][%00-00 , ][%00-00@(0.0.255) unsigned][%00-00 _][%00-00@3 h
][%00-00 )]&]
[s2; Removes all elements with the specified value using a precomputed
hash`-value. The precomputed hash value must be the same as the
hash value that would be the result of HashFn. This is a slow
operation, especially when combined with any search operations.&]
[s4; [*C@3 k]-|Value of the elements to remove.&]
[s4; [*C@3 h]-|Precomputed hash value.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 RemoveKey][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@4 T][%00-00 `&_][%00-00@3 k][%00-00 )]&]
[s2; Removes all elements with the specified value. This is a slow
operation, especially when combined with any search operations.&]
[s4; [*C@3 k]-|Value of the elements to remove.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Trim][%00-00 (][%00-00@(0.0.255) int][%00-00 _][%00-00@3 n
][%00-00 )]&]
[s2; Reduces the number of elements in AIndex to the specified number.
Requested number must be less than or equal to actual number
of elements in AIndex.&]
[s4; [*C@3 n]-|Requested number of elements.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Drop][%00-00 (][%00-00@(0.0.255) int][%00-00 _][%00-00@3 n
][%00-00 _`=_][%00-00@3 1][%00-00 )]&]
[s2; Drops the specified number of elements from the end of the AIndex
(same as Trim(GetCount() `- n)).&]
[s4; [*C@3 n]-|Number of elements.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 const][%00-00@(64) _T`&_][%00-00@0 Top][%00-00@(64) ()_][%00-00 const]&]
[s2; Returns a reference to the last element in the AIndex.&]
[s4; [*/ Return value]-|Reference of thr last element in the AIndex.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Reserve][%00-00 (][%00-00@(0.0.255) int][%00-00 _
][%00-00@3 n][%00-00 )]&]
[s2; Reserves capacity. If the requested capacity is greater than
current capacity, capacity is increased to the requested value.&]
[s4; [*C@3 n]-|Requested capacity.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Shrink][%00-00 ()]&]
[s2; Minimizes the memory consumption of AIndex by decreasing the
capacity to the number of elements.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 GetAlloc][%00-00@(64) ()_][%00-00 const]&]
[s2; Returns the current capacity of AIndex.&]
[s4; [*/ Return value]-|Capacity of AIndex.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 Serialize][%00-00 (][%00-00^`:`:Stream^ Stream
][%00-00 `&_][%00-00@3 s][%00-00 )]&]
[s2; Serializes content of AIndex to/from Stream. Works only if NTL
is used as part of UPP.&]
[s7; Requires T to have serialization operator defined.&]
[s4; [*C@3 s]-|Target/source stream.&]
[s0;3 &]
[s5;K [%00-00 V_][%00-00@0 PickKeys][%00-00 ()_pick`_]&]
[s2; Returns a basic random access container of elements. Destroys
AIndex by picking.&]
[s4; [*/ Return value]-|Basic random access container of elements in
AIndex.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 const][%00-00@(64) _V`&_][%00-00@0 GetKeys][%00-00@(64) ()_][%00-00 con
st]&]
[s2; Returns a constant reference to basic random access container
of elements.&]
[s4; [*/ Return value]-|Constant reference to a basic random access
container of elements.&]
[s0;3 &]
[s5;K [%00-00^`:`:AIndex^ AIndex][%00-00 `&_][%00-00@0 operator`=][%00-00 (pick`__][%00-00@4 V][%00-00 `&
_][%00-00@3 s][%00-00 )]&]
[s2; Assigns basic random access container to AIndex. Transfers the
source container in short constant time, but destroys it by picking.&]
[s4; [*C@3 s]-|Source container.&]
[s0;3 &]
[s5;K [%00-00^`:`:AIndex^ AIndex][%00-00 `&_][%00-00@0 operator<<`=][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _][%00-00@4 V][%00-00 `&_][%00-00@3 s][%00-00 )]&]
[s2; Assigns the basic random access container to AIndex, while preserving
the value of the source container.&]
[s7; Requires T to have deep copy constructor or optional deep copy.&]
[s4; [*C@3 s]-|Source container.&]
[s0;3 &]
[s0;:`:`:AIndex`:`:AIndex`(pick`_ V`&`): [* AIndex](pick`_ V`& [*@3 s])&]
[s2; Pick`-constructs AIndex from a basic random access container.
Transfers the source container in short constant time, but destroys
it by picking.&]
[s4; [*C@3 s]-|Source basic random access container.&]
[s0;3 &]
[s0;:`:`:AIndex`:`:AIndex`(const V`&`,int`): [* AIndex](const V`& [*@3 s],
int)&]
[s2; Deep`-copy constructs AIndex from basic random access container.&]
[s7; Requires T to have deep copy constructor or optional deep copy
constructor.&]
[s4; [*C@3 s]-|Source AIndex.&]
[s0;3 &]
[s5;K@0 [%00-00@(64) typedef_T_][%00-00 ValueType]&]
[s2; Typedef of T for use in templated algorithms.&]
[s0;3 &]
[s5;K@0 [%00-00@(64) typedef_typename_][%00-00^V`:`:ConstIterator^@(64) V`::ConstIterator][%00-00@(64) _
][%00-00 ConstIterator]&]
[s2; Constant iterator type.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00^`:`:AIndex`:`:ConstIterator^@(64) ConstIterator][%00-00@(64) _][%00-00@0 B
egin][%00-00@(64) ()_][%00-00 const]&]
[s2; Returns a constant iterator to the first element in AIndex.&]
[s4; [*/ Return value]-|Iterator.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00^`:`:AIndex`:`:ConstIterator^@(64) ConstIterator][%00-00@(64) _][%00-00@0 E
nd][%00-00@(64) ()_][%00-00 const]&]
[s2; Returns a constant iterator to the position just beyond the
last element in AIndex.&]
[s4; [*/ Return value]-|Iterator.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00^`:`:AIndex`:`:ConstIterator^@(64) ConstIterator][%00-00@(64) _][%00-00@0 G
etIter][%00-00@(64) (][%00-00 int][%00-00@(64) _][%00-00@3 pos][%00-00@(64) )_][%00-00 const]&]
[s2; Returns a constant iterator to the element at specified position.
Same as [* Begin() `+ i]. The benefit of this method is that [* pos]
is range checked in debug mode.&]
[s4; [*C@3 pos]-|Required position.&]
[s4; [*/ Return value]-|Iterator.&]
[s0;3 &]
[s0;:`:`:AIndex`:`:AIndex`(`): [* AIndex]()&]
[s2; Constructor. Constructs an empty AIndex.&]
[s0;3 &]
[s0;:`:`:AIndex`:`:AIndex`(const`:`:AIndex`&`,int`): [* AIndex](const
[* AIndex]`& [*@3 s], int)&]
[s2; Optional deep copy constructor.&]
[s7; Requires T to have deep copy constructor or optional deep copy
constructor.&]
[s4; [*C s]-|Source AIndex.&]
[s0; ]

View file

@ -1,232 +1,377 @@
TITLE("CParser")
COMPRESSED
120,156,237,92,11,115,219,54,18,254,43,184,166,173,37,71,
82,248,144,44,89,158,155,73,234,164,29,79,19,55,83,167,
115,55,231,218,38,68,66,50,106,138,228,17,164,31,57,95,
127,251,237,2,164,8,210,164,94,118,174,233,163,147,90,22,
9,44,246,249,97,1,44,124,106,145,47,191,52,58,198,51,
99,197,127,227,215,108,74,83,63,57,59,229,253,254,232,128,
90,131,131,171,239,127,216,63,216,125,217,218,235,183,129,136,
9,68,236,161,105,143,6,182,217,183,246,224,135,105,155,214,
192,178,251,230,200,218,239,143,108,123,100,140,93,159,10,113,
118,234,91,163,209,1,142,108,65,39,107,56,176,204,97,127,
212,31,153,246,112,100,65,95,203,48,44,99,104,13,204,190,
61,178,6,99,143,9,247,236,148,142,236,131,221,31,247,160,
147,141,35,1,113,195,220,179,250,195,190,101,216,134,213,135,
161,204,209,168,111,14,7,35,123,127,111,111,236,210,40,225,
97,144,141,197,77,211,50,15,38,230,240,0,88,254,245,215,
95,123,102,223,80,28,244,129,152,105,244,129,85,19,158,25,
125,107,104,14,246,141,253,193,200,28,25,54,16,31,12,141,
193,56,162,49,157,215,75,142,52,6,43,69,31,26,99,158,
48,32,177,251,220,52,135,208,101,175,179,247,204,236,15,65,
208,145,221,31,140,134,6,12,110,89,150,109,91,166,109,237,
239,91,131,189,193,112,124,201,168,199,226,76,4,10,204,239,
154,208,117,216,25,62,131,142,70,127,96,91,253,125,84,150,
13,35,89,214,222,96,223,28,244,141,193,30,80,26,199,236,
223,41,143,217,156,5,96,177,255,92,252,247,171,55,199,221,
159,78,200,169,24,28,124,255,210,32,167,95,25,70,215,48,
94,182,140,158,209,179,6,131,54,201,44,147,63,71,155,94,
228,95,201,225,123,26,11,224,228,235,179,83,97,28,16,252,
176,14,242,167,132,11,34,248,60,242,25,185,99,9,185,102,
241,29,73,5,155,166,62,241,217,45,119,169,79,104,64,253,
187,143,208,84,164,60,161,19,104,57,13,99,50,73,185,239,
241,96,70,208,192,192,40,137,36,61,65,194,41,241,105,48,
75,233,140,9,114,195,147,75,114,232,116,125,126,197,136,184,
11,18,122,219,171,48,112,19,198,87,208,43,32,206,142,243,
179,225,236,144,132,197,115,30,208,132,121,240,235,109,66,120,
64,230,108,30,2,99,173,32,76,200,73,18,51,58,111,119,
136,8,73,18,170,97,73,114,9,92,113,20,34,76,201,37,
189,102,248,202,15,169,71,56,18,128,47,216,34,35,51,229,
177,72,122,228,3,18,191,164,2,155,130,168,34,33,94,26,
163,68,216,52,225,115,38,251,10,18,197,161,203,132,0,118,
38,119,11,174,129,21,226,134,209,29,54,152,131,161,219,185,
88,239,104,80,180,154,179,228,50,244,4,113,105,0,84,227,
240,38,127,227,140,199,111,226,24,212,200,110,93,38,125,29,
185,224,129,7,26,79,50,113,40,247,211,152,21,50,102,94,
225,129,30,231,147,208,239,145,127,92,178,0,140,133,44,231,
3,66,99,105,24,224,45,112,99,6,164,148,89,58,153,44,
110,56,159,171,177,82,169,53,120,84,112,208,138,98,54,101,
49,152,248,142,92,115,74,62,32,199,138,77,37,72,187,196,
36,195,55,130,128,2,111,152,239,87,205,26,78,126,97,110,
34,69,71,171,77,96,180,152,6,2,232,131,4,45,80,29,
103,222,66,105,202,53,109,249,9,62,126,238,140,157,241,155,
91,247,60,119,245,243,115,205,217,69,18,167,110,114,182,120,
85,184,58,52,51,136,100,88,127,59,214,223,23,100,162,116,
226,115,183,142,12,129,161,179,104,217,205,195,229,195,93,196,
80,103,30,202,155,203,184,80,93,143,28,134,224,219,60,192,
96,10,102,224,135,224,165,104,23,233,255,82,81,50,78,98,
174,154,151,196,150,0,113,158,128,70,92,144,251,133,243,226,
48,140,153,243,66,196,174,243,34,77,184,239,124,201,2,167,
155,10,231,89,166,22,252,144,17,79,148,142,94,0,243,175,
89,204,175,129,187,105,28,2,80,193,3,82,35,141,173,143,
56,70,50,11,119,116,148,63,22,191,128,137,2,8,9,247,
146,198,206,174,211,30,231,166,216,45,43,152,168,118,23,216,
238,194,217,205,31,239,190,180,201,2,144,72,251,76,9,236,
35,4,163,170,148,9,195,88,42,162,159,61,207,187,30,202,
190,221,251,220,243,132,0,40,105,240,148,90,52,44,59,72,
21,14,223,135,226,76,35,6,31,240,132,203,0,0,164,145,
225,162,128,167,183,134,210,160,107,254,81,86,88,7,64,199,
233,224,59,229,9,37,13,34,11,171,245,23,37,133,150,47,
156,191,95,28,255,244,246,109,7,193,236,66,111,229,243,128,
149,154,45,228,182,137,185,120,209,201,28,178,212,117,26,148,
233,167,190,95,88,106,100,212,91,10,159,235,150,66,46,187,
247,239,67,224,75,225,15,98,87,164,105,20,191,243,32,74,
19,133,230,77,116,164,28,221,251,183,240,65,130,116,62,97,
205,67,2,223,221,251,111,1,237,3,58,103,189,178,71,72,
43,53,76,146,40,77,131,87,232,205,192,18,149,86,133,93,
164,184,186,138,54,19,124,45,62,121,208,232,187,82,73,250,
240,85,117,53,15,112,94,248,226,185,34,171,190,52,13,5,
74,214,7,42,169,187,18,135,198,131,176,200,127,109,6,145,
60,41,217,44,12,114,247,44,60,83,72,53,103,212,50,143,
89,237,159,133,89,122,219,8,210,121,24,234,143,151,173,67,
26,155,105,129,186,45,0,172,208,92,71,205,84,212,243,164,
251,66,214,199,3,200,242,230,84,58,51,230,123,50,41,66,
133,65,90,192,170,13,101,130,51,201,38,200,27,76,75,98,
22,133,113,130,83,160,156,253,182,181,76,191,38,242,113,124,
116,69,204,52,101,206,215,130,96,155,82,55,233,228,108,64,
10,6,169,77,48,235,144,107,234,167,12,19,159,95,82,48,
152,0,32,203,179,142,126,45,252,124,139,169,161,252,82,23,
85,75,252,99,185,3,172,242,91,114,84,224,68,150,145,162,
24,66,240,89,0,26,85,57,30,118,56,97,9,76,30,89,
58,86,137,248,239,107,176,228,58,228,94,225,28,11,207,48,
180,220,174,224,178,14,12,117,204,92,9,151,58,82,214,38,
0,106,88,81,205,130,235,12,82,159,1,108,41,237,113,120,
114,197,163,147,136,66,34,95,99,21,208,170,208,83,104,185,
86,8,61,134,174,28,227,79,88,254,57,93,33,187,19,10,
79,48,163,165,105,18,98,124,192,18,9,242,101,1,244,35,
230,117,32,253,78,22,11,16,176,97,246,28,151,14,106,248,
39,176,221,211,202,82,43,71,143,168,72,192,175,114,13,196,
98,132,131,60,186,245,105,78,155,226,184,40,124,22,23,16,
110,145,63,16,248,167,156,183,131,44,169,217,241,33,117,58,
69,44,192,37,84,182,200,89,173,166,73,24,250,245,106,106,
84,17,12,43,202,154,88,120,224,238,11,242,35,75,210,56,
80,208,1,78,8,2,0,130,76,145,97,212,95,85,137,168,
99,148,99,13,78,203,161,162,113,250,158,177,171,67,253,101,
193,171,98,70,161,133,155,198,49,174,180,179,37,6,146,3,
212,211,166,189,135,204,31,102,93,202,109,183,100,243,59,150,
52,112,249,202,187,166,1,58,212,138,28,8,162,32,12,214,
228,60,111,67,104,82,144,156,48,112,20,156,126,112,60,4,
69,158,60,198,69,142,68,89,160,149,248,166,161,155,91,131,
110,76,36,232,88,12,125,37,115,24,140,9,34,34,230,242,
41,119,11,201,81,42,221,166,185,132,117,80,232,150,212,129,
49,13,227,172,242,88,80,22,68,181,123,249,120,245,88,91,
234,71,95,125,108,212,209,122,156,102,35,202,55,83,175,185,
152,248,11,34,144,91,32,157,218,246,22,180,63,97,0,110,
222,146,14,159,220,44,246,111,103,150,13,59,218,245,246,148,
105,101,173,5,97,97,18,249,44,121,10,35,102,164,54,178,
227,178,62,182,76,64,121,188,162,203,39,180,254,39,64,172,
204,16,149,105,165,81,253,228,104,90,132,160,148,167,163,129,
190,200,208,153,121,159,21,150,125,94,72,166,52,190,38,102,
173,171,111,156,94,147,155,176,32,43,254,16,112,247,135,0,
187,135,38,95,5,114,27,89,253,50,102,108,75,187,127,214,
8,169,169,124,139,133,210,123,88,141,60,9,92,94,200,195,
155,150,92,143,22,107,121,88,48,9,233,157,45,183,45,205,
197,19,18,103,249,250,148,250,130,117,212,161,143,104,222,3,
105,134,195,45,215,134,185,200,191,37,212,173,208,150,213,114,
205,14,116,216,90,103,79,14,96,143,212,245,239,18,156,214,
52,18,252,111,175,48,20,162,87,227,54,206,103,132,58,205,
187,120,71,94,227,78,181,156,150,138,253,86,114,84,184,194,
38,39,95,218,28,48,227,215,44,88,156,137,115,15,64,31,
210,95,185,9,248,16,240,105,190,176,46,86,192,119,120,190,
229,179,160,37,218,43,16,31,183,208,142,10,250,79,55,85,
47,141,8,93,67,159,112,71,177,214,127,143,130,235,240,42,
219,134,56,242,178,173,54,181,181,45,15,170,101,41,8,75,
50,101,111,231,209,53,90,221,122,29,167,235,106,229,90,23,
235,10,30,120,205,202,53,210,170,13,45,160,204,87,74,163,
31,30,85,206,141,74,18,253,200,168,87,146,169,214,74,216,
74,212,201,130,135,215,107,36,67,65,24,128,173,104,160,108,
132,79,228,40,203,100,94,109,176,205,68,76,86,201,120,130,
171,90,234,3,3,49,167,32,9,96,145,234,9,188,130,201,
48,10,64,240,88,16,143,79,177,38,2,154,128,88,78,151,
250,209,37,13,210,57,139,245,21,113,126,34,32,183,215,104,
44,201,233,62,32,136,31,6,51,252,132,22,119,8,51,115,
208,239,115,231,57,16,141,231,192,6,30,224,176,121,228,99,
221,198,132,202,19,238,187,136,61,74,97,107,122,120,144,52,
184,184,4,67,60,251,153,41,47,174,218,156,56,221,204,228,
140,203,72,152,227,17,14,40,193,227,51,158,116,80,36,103,
7,100,220,201,126,235,194,111,184,247,12,116,125,63,188,81,
137,49,6,141,58,200,65,149,229,187,222,48,177,72,34,27,
5,137,226,116,13,109,104,231,183,15,61,39,88,233,57,42,
58,212,198,169,82,206,242,176,144,58,70,14,203,24,150,135,
199,50,27,175,45,210,18,3,31,75,237,54,194,24,26,25,
173,2,193,206,132,200,109,177,212,220,37,59,215,53,221,196,
108,181,103,227,143,20,177,102,206,170,183,185,45,99,109,89,
50,240,80,53,114,178,82,57,2,118,110,82,11,244,133,188,
6,179,28,103,231,21,120,62,52,115,118,254,149,7,3,205,
159,124,116,118,58,217,201,79,76,131,153,84,137,207,231,92,
110,197,83,55,77,0,27,228,48,45,214,155,245,84,97,31,
126,53,173,140,188,200,169,169,81,118,38,242,231,55,240,83,
158,29,169,72,171,61,81,149,162,119,239,143,51,44,195,175,
155,27,78,87,71,80,165,212,132,226,41,88,195,182,206,137,
250,108,140,197,167,50,107,245,204,221,88,145,164,168,0,167,
37,9,49,186,107,164,84,241,173,24,109,225,147,246,26,129,
190,181,13,142,159,32,86,94,135,233,196,103,203,32,127,234,
135,84,22,6,68,120,242,191,22,34,124,22,19,128,172,201,
172,227,125,13,133,121,101,173,84,61,241,129,210,150,250,77,
189,2,85,165,109,54,185,231,165,187,113,234,47,61,219,252,
118,75,121,150,56,64,37,117,170,155,15,22,245,192,170,70,
210,231,128,51,88,103,220,180,17,118,130,197,30,144,219,168,
115,143,22,214,9,59,95,56,59,237,131,21,214,187,201,206,
153,149,253,202,163,61,69,26,248,67,192,170,210,214,96,72,
131,174,96,205,122,121,197,2,175,4,35,50,178,215,73,154,
43,170,147,25,194,131,248,105,169,64,0,175,40,249,3,150,
16,185,126,42,139,183,153,112,105,4,58,15,61,38,96,153,
255,86,209,147,229,216,69,98,138,229,48,69,221,3,86,22,
67,26,169,10,180,91,105,32,249,57,172,157,2,50,9,187,
247,178,82,57,131,173,146,230,228,82,23,79,116,35,44,250,
22,2,32,16,45,141,243,62,178,46,72,26,104,229,224,101,
169,5,2,132,88,144,145,85,5,240,52,36,30,147,83,156,
2,0,96,64,150,164,99,73,143,204,130,111,151,69,253,201,
147,59,201,159,204,67,202,222,129,166,12,254,114,142,71,34,
72,83,22,34,69,89,190,21,248,251,113,45,53,129,21,46,
149,219,9,119,64,168,186,28,130,160,255,228,24,165,148,216,
189,127,157,143,247,151,175,110,13,100,127,10,71,237,61,153,
167,174,143,149,127,106,39,93,183,36,242,3,176,94,147,119,
170,106,191,69,121,67,126,121,234,53,115,57,238,140,169,156,
23,205,189,216,241,82,11,132,170,248,104,177,188,154,19,239,
60,93,134,11,106,208,59,196,60,243,134,139,188,220,173,233,
164,214,220,172,20,111,251,205,114,89,174,247,62,169,219,153,
249,14,75,68,169,202,249,139,34,209,13,118,89,180,154,237,
218,94,77,72,83,190,56,115,94,186,7,83,41,52,44,93,
145,41,115,94,199,108,103,141,26,72,109,215,76,206,16,234,
190,150,170,88,84,242,100,87,217,178,125,84,189,12,92,122,
68,126,201,176,230,218,201,102,206,90,17,111,253,83,146,90,
45,22,197,212,58,85,231,107,29,69,163,135,155,80,39,77,
186,172,173,213,15,241,216,227,152,221,212,44,207,14,85,209,
61,215,65,78,86,123,74,56,140,98,118,205,195,84,248,119,
234,118,0,98,156,118,91,67,191,203,85,136,159,51,171,207,
10,213,27,59,184,216,124,19,78,203,175,97,233,188,144,84,
233,176,186,253,128,18,103,40,85,115,215,96,217,74,242,193,
204,33,11,16,107,233,145,86,126,153,117,17,237,237,213,226,
42,17,66,0,103,154,132,113,33,200,67,45,212,139,89,47,
192,223,164,154,90,249,248,75,180,221,124,241,72,197,228,91,
237,166,201,230,124,228,97,136,81,181,90,23,27,94,87,82,
12,226,37,165,99,8,206,237,153,124,229,38,41,102,10,229,
40,39,203,62,154,146,13,121,123,6,55,87,202,205,95,137,
195,108,218,139,195,52,145,185,64,20,135,94,234,178,5,165,
197,148,211,114,195,121,68,19,142,119,174,213,254,142,138,156,
118,150,202,44,78,186,61,154,208,113,205,25,247,98,176,213,
23,152,42,143,208,231,244,99,240,234,245,193,66,142,141,206,
195,151,92,114,210,179,188,250,91,78,115,122,91,202,3,143,
142,63,56,23,239,94,253,115,9,81,236,22,77,203,221,212,
61,202,242,185,62,50,57,167,113,82,106,168,242,204,69,109,
68,204,32,45,18,85,43,53,29,17,235,115,228,210,83,122,
149,179,189,81,16,162,157,248,209,56,166,119,53,64,34,244,
157,119,208,19,158,35,74,7,104,188,215,132,122,235,222,191,
163,183,50,225,1,207,158,129,43,101,89,90,118,178,138,7,
92,234,42,56,243,240,22,11,48,133,46,10,121,44,230,178,
63,7,206,23,114,6,60,213,84,170,14,197,192,27,49,245,
195,151,185,231,227,212,202,131,148,201,188,23,225,49,128,105,
99,17,245,53,252,33,181,146,194,62,178,56,116,186,213,191,
3,160,142,64,139,33,213,118,225,132,205,120,16,32,179,225,
180,152,181,243,173,63,245,45,19,89,147,176,214,106,210,1,
50,196,7,85,243,107,105,111,249,24,248,154,128,253,175,100,
246,139,127,78,64,101,241,144,18,203,199,2,185,209,238,212,
168,139,244,177,54,78,13,30,214,248,209,186,225,251,255,12,
216,223,77,36,42,80,68,223,209,255,132,68,25,36,139,205,
228,133,58,90,167,82,224,14,81,159,196,121,158,23,216,168,
7,237,206,194,237,81,236,78,41,8,178,94,146,225,246,58,
38,212,110,132,127,253,196,118,204,201,94,252,65,44,169,228,
233,229,127,74,1,239,118,102,89,187,50,178,6,171,141,86,
237,125,131,240,208,106,231,214,237,1,206,182,182,176,232,217,
255,0,38,28,219,147,
topic "CParser";[2 $$0,0#00000000000000000000000000000000:Default]
[i448;a25;kKO9;*@(64)2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,0#27521748481378242620020725143825:desc]
[a83;*R6 $$3,0#31310162474203024125188417583966:caption]
[l288;i1121;b17;O9;~~~.1408;2 $$4,0#10431211400427159095818037425705:param]
[i448;a25;kKO9;*@(64)2 $$5,0#37138531426314131252341829483370:item]
[*+117 $$6,6#14700283458701402223321329925657:header]
[l288;a17;*1 $$7,7#70004532496200323422659154056402:requirement]
[{_}%EN-US
[s5;K@0 [%00-00@(0.0.255) class][%00-00@(64) _][%00-00 CParser]&]
[s0; &]
[s2; CParser is simple yet very useful lexical analyzer suitable
for building descent parsers of languages with C`-like syntax.&]
[s2; CParser works on `'`\0`' terminated text in memory (not Stream),
so to parse the file you have to load it into the memory first.
Text has to exist during the time it is processed by CParser
(no copy is made).&]
[s2; Many CParser methods can throw CParser`::Error exception to indicate
the failure to parse required symbol. When using CParser to build
concrete parser, it is common to use this exception (preferably
via ThrowError method) to indicate errors as well.&]
[s2; CParser objects cannot be transfered (copied).&]
[s2; &]
[s0;3 &]
[s5;K^`:`:Exc^ [%00-00^^@(0.0.255) struct][%00-00^^ _][%00-00^^@0 Error][%00-00^^ _:_][%00-00^^@(0.0.255) p
ublic][%00-00^^ _][%00-00 Exc]&]
[s0;* &]
[s2; Type used as CParser exception. Contains single String with
error description.&]
[s2; &]
[s0;l288;^topic`:`/`/Core`/src`/util`$en`-us`#`:`:Exc`:`:class Exc^ [/^^ Derived
from][^^ ][%00-00 Exc]&]
[s0;3 &]
[s0;l288;:`:`:CParser`:`:Error`:`:Error`(const char`*`): [%00-00* Error][%00-00 (const_ch
ar_`*][%00-00*@3 s][%00-00 )]&]
[s2;l448; Constructor.&]
[s4;l448; [%00-00*C@3 s]-|Error message.&]
[s2; &]
[s0;3 &]
[s5;K@0 [%00-00@(0.0.255) struct][%00-00@(64) _][%00-00 Pos]&]
[s2; &]
[s2; Position in parsed text.&]
[s0;3 &]
[s0;l288;:`:`:CParser`:`:Pos`:`:Pos`(const char`*`,int`,`:`:String`): [%00-00* Pos][%00-00 (
const_char_`*][%00-00*@3 ptr][%00-00 _`=_NULL, int_][%00-00*@3 line][%00-00 _`=_][%00-00@3 1
][%00-00 , String_][%00-00*@3 fn][%00-00 _`=_Null)]&]
[s2;l480; Constructor.&]
[s4;l480; [%00-00*C@3 ptr]-|Pointer to the position in the input text
&]
[s4;l480; [%00-00*C@3 line]-|Line number.&]
[s4;l480; [%00-00*C@3 fn]-|Filename.&]
[s0;3 &]
[s5;l288;K@0 [%00-00@(0.0.255) const][%00-00@(64) _][%00-00@(0.0.255) char][%00-00@(64) _`*][%00-00 p
tr]&]
[s2;l480; Pointer to the position in the input text &]
[s0;3 &]
[s5;l288;K@0 [%00-00@(0.0.255) int][%00-00@(64) _][%00-00 line]&]
[s2;l480; Line number.&]
[s0;3 &]
[s5;l288;K@0 [%00-00^`:`:String^@(64) String][%00-00@(64) _][%00-00 fn]&]
[s2;l480; Filename.&]
[s2; &]
[s0;3 &]
[s0;:`:`:CParser`:`:CParser`(const char`*`): [%00-00* CParser][%00-00 (const_char_`*][%00-00*@3 p
tr][%00-00 )]&]
[s2; Constructs the CParser.&]
[s4; [%00-00*C@3 ptr]-|Pointer to the input text.&]
[s0;3 &]
[s0;:`:`:CParser`:`:CParser`(const char`*`,const char`*`,int`): [%00-00* CParser][%00-00 (
const_char_`*][%00-00*@3 ptr][%00-00 , const_char_`*][%00-00*@3 fn][%00-00 ,
int_][%00-00*@3 line][%00-00 _`=_][%00-00@3 1][%00-00 )]&]
[s2; Constructs the CParser, with additional information for the
text. The additional info can be used when reporting error.&]
[s4; [%00-00*C@3 ptr]-|Pointer to the input text.&]
[s4; [%00-00*C@3 fn]-|The name of file (in fact, can be anything, value
is just stored).&]
[s4; [%00-00*C@3 line]-|First line number.&]
[s0;3 &]
[s0;:`:`:CParser`:`:CParser`(`): [%00-00* CParser][%00-00 ()]&]
[s2; Constructs the CParser. Input text has to be assigned using
the SetPos method.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 ThrowError][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@(0.0.255) char][%00-00 _`*][%00-00@3 s][%00-00 )]&]
[s2; Throws CParser`::Error.&]
[s4; [%00-00*C@3 s]-|Error message.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 NoSkipSpaces][%00-00 ()]&]
[s2; Sets CParser to the mode where white`-spaces are not automatically
skipped, but have to be skipped by Spaces method.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 SkipSpaces][%00-00 ()]&]
[s2; Sets CParser to the mode where white`-spaces are automatically
skipped. First skip is performed when position in input text
is assigned via constructor or SetPos, then the skip is performed
after any symbol.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 Spaces][%00-00 ()]&]
[s2; Skips white`-spaces.&]
[s4; [*/ Return value]-|true if there were white`-space to skip.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) char][%00-00 _][%00-00@0 PeekChar][%00-00 ()]&]
[s2; Returns the current single character.&]
[s4; [*/ Return value]-|Current character.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) char][%00-00 _][%00-00@0 GetChar][%00-00 ()]&]
[s2; Advances the position in the input text by one character.&]
[s4; [*/ Return value]-|Character at position before advancing it.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsChar][%00-00 (][%00-00@(0.0.255) char][%00-00 _
][%00-00@3 c][%00-00 )]&]
[s2; Tests whether there is a specific character at the current position.&]
[s4; [%00-00*C@3 c]-|Character to test.&]
[s4; [*/ Return value]-|true on match.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsChar2][%00-00 (][%00-00@(0.0.255) char][%00-00 _
][%00-00@3 c1][%00-00 , ][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c2][%00-00 )]&]
[s2; Tests whether there is a specific character pair at the current
position.&]
[s4; [%00-00*C@3 c1]-|First character of pair.&]
[s4; [%00-00*C@3 c2]-|Second character of pair.&]
[s4; [*/ Return value]-|true on match.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsChar3][%00-00 (][%00-00@(0.0.255) char][%00-00 _
][%00-00@3 c1][%00-00 , ][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c2][%00-00 ,
][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c3][%00-00 )]&]
[s2; Test for a specific character triplet at the current position.&]
[s4; [%00-00*C@3 c1]-|First character of triplet.&]
[s4; [%00-00*C@3 c2]-|Second character of triplet.&]
[s4; [%00-00*C@3 c3]-|Third character of triplet.&]
[s4; [*/ Return value]-|true on match.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 Char][%00-00 (][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c
][%00-00 )]&]
[s2; Tests for a single character at the current position. If there
is match, position is advanced.&]
[s4; [%00-00*C@3 c]-|Character to test.&]
[s4; [*/ Return value]-|true on match.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 Char2][%00-00 (][%00-00@(0.0.255) char][%00-00 _
][%00-00@3 c1][%00-00 , ][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c2][%00-00 )]&]
[s2; Tests for a character pair at the current position. If there
is match, position is advanced by two characters.&]
[s4; [%00-00*C@3 c1]-|First character of pair.&]
[s4; [%00-00*C@3 c2]-|Second character of pair.&]
[s4; [*/ Return value]-|true on match.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 Char3][%00-00 (][%00-00@(0.0.255) char][%00-00 _
][%00-00@3 c1][%00-00 , ][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c2][%00-00 ,
][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c3][%00-00 )]&]
[s2; Tests for a character triplet at the current position. If there
is match, position is advanced by three characters.&]
[s4; [%00-00*C@3 c1]-|First character of triplet.&]
[s4; [%00-00*C@3 c2]-|Second character of triplet.&]
[s4; [%00-00*C@3 c3]-|Third character of triplet.&]
[s4; [*/ Return value]-|true on match.&]
[s0;@(0.0.255) &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 PassChar][%00-00 (][%00-00@(0.0.255) char][%00-00 _
][%00-00@3 c][%00-00 )_throw(Error)]&]
[s2; Calls Char(c). If it returns false, throws error.&]
[s4; [%00-00*C@3 c]-|Character to test.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 PassChar2][%00-00 (][%00-00@(0.0.255) char][%00-00 _
][%00-00@3 c1][%00-00 , ][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c2][%00-00 )_throw(Error)
]&]
[s2; Calls Char2(c1, c2). If it returns false, throws error.&]
[s4; [%00-00*C@3 c1]-|First character of pair.&]
[s4; [%00-00*C@3 c2]-|Second character of pair.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 PassChar3][%00-00 (][%00-00@(0.0.255) char][%00-00 _
][%00-00@3 c1][%00-00 , ][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c2][%00-00 ,
][%00-00@(0.0.255) char][%00-00 _][%00-00@3 c3][%00-00 )_throw(Error)]&]
[s2; Calls Char2(c1, c2, c3). If it returns false, throws the Error.&]
[s4; [%00-00*C@3 c1]-|First character of triplet.&]
[s4; [%00-00*C@3 c2]-|Second character of triplet.&]
[s4; [%00-00*C@3 c3]-|Third character of triplet.&]
[s0;3 &]
[s0;:`:`:CParser`:`:Id`(const char`*`): [%00-00 bool_][%00-00* Id][%00-00 (const_char_`*][%00-00*@3 s
][%00-00 )]&]
[s2; Tests for given C`-like identifier. If there is match, advances
position by strlen(s) characters.&]
[s4; [%00-00*C@3 s]-|Identifier.&]
[s4; [*/ Return value]-|true on match.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 PassId][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00@(0.0.255) char][%00-00 _`*][%00-00@3 s][%00-00 )_throw(Error)]&]
[s2; Invokes the Id method with s as parameter. If it returns false,
throws the Error.&]
[s4; [%00-00*C@3 s]-|Identifier.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsId][%00-00 ()]&]
[s2; Tests whether there is any C`-like identifier at the current
position.&]
[s4; [*/ Return value]-|true if there is identifier.&]
[s0;3 &]
[s5;K [%00-00^`:`:String^ String][%00-00 _][%00-00@0 ReadId][%00-00 ()_throw(Error)]&]
[s2; Reads C`-like identifier from the current position. If there
is none, an Error is thrown.&]
[s4; [*/ Return value]-|Identifier.&]
[s0;3 &]
[s5;K [%00-00^`:`:String^ String][%00-00 _][%00-00@0 ReadIdt][%00-00 ()_throw(Error)]&]
[s2; Special variant of ReadId that considers different non`-alphanumeric
characters to be the part of identifier as long as they form
C`+`+ normal or template based type.&]
[s4; [*/ Return value]-|Identifier.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsInt][%00-00 ()]&]
[s2; Test for integer at current position `- there either must be
digit, or `'`+`' or `'`-`' sign followed by any number of spaces
and digit.&]
[s4; [*/ Return value]-|true if there is integer.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) int][%00-00 _][%00-00@0 ReadInt][%00-00 ()_throw(Error)]&]
[s2; Reads the integer from the current position. If IsInt is false,
throws an Error.&]
[s4; [*/ Return value]-|Integer.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsNumber][%00-00 ()]&]
[s2; Tests for sign`-less number at current position `- there must
be digit at current position.&]
[s4; [*/ Return value]-|true if there is number.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsNumber][%00-00 (][%00-00@(0.0.255) int][%00-00 _
][%00-00@3 base][%00-00 )]&]
[s2; Tests for sign`-less number with given base `- there must be
digit or letter `'A`' `- `'Z`' or `'a`' `- `'z`', where range
is limit by acutal base (e.g. for base 12 letters `'a`' `'A`'
`'b`' `'B`' are allowed).&]
[s4; [%00-00*C@3 base]-|Numeric base.&]
[s4; [*/ Return value]-|true if there is number with given numeric base.&]
[s0;3 &]
[s5;K [%00-00^`:`:uint32^ uint32][%00-00 _][%00-00@0 ReadNumber][%00-00 (][%00-00@(0.0.255) int
][%00-00 _][%00-00@3 base][%00-00 _`=_][%00-00@3 10][%00-00 )_throw(Error)]&]
[s2; Reads a number with the given numeric base. If IsNumber(base)
is false, throws an Error.&]
[s4; [%00-00*C@3 base]-|Numeric base.&]
[s4; [*/ Return value]-|Number.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsDouble][%00-00 ()]&]
[s2; Test for floating point number at current position `- there
either must be digit, or `'`+`' or `'`-`' sign followed by any
number of spaces and digit.&]
[s4; [*/ Return value]-|true if there is the floating point number.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) double][%00-00 _][%00-00@0 ReadDouble][%00-00 ()_throw(Error)]&]
[s2; Reads a floating point number with C based lexical rules.&]
[s4; [*/ Return value]-|Floating point number.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) bool][%00-00 _][%00-00@0 IsString][%00-00 ()]&]
[s2; Tests for C`-like string literal at the current position. Same
as IsChar(`'`\`"`');&]
[s4; [*/ Return value]-|true when there is string literal.&]
[s0;3 &]
[s5;K [%00-00^`:`:String^ String][%00-00 _][%00-00@0 ReadOneString][%00-00 (][%00-00@(0.0.255) b
ool][%00-00 _][%00-00@3 chkend][%00-00 _`=_false)_throw(Error)]&]
[s2; Reads C`-like string literal from current position (follow C
lexical rules, including escape codes). Literals on different
lines are not concatenated (unlike C).&]
[s4; [%00-00*C@3 chkend]-|When false, ReadOneString is more permissive
as it allows unterminated string literals `- string is then also
delimited by end of line or text.&]
[s4; [*/ Return value]-|String literal.&]
[s0;3 &]
[s5;K [%00-00^`:`:String^ String][%00-00 _][%00-00@0 ReadString][%00-00 (][%00-00@(0.0.255) boo
l][%00-00 _][%00-00@3 chkend][%00-00 _`=_false)_throw(Error)]&]
[s2; Reads C`-like string literal from current position (follow C
lexical rules, including escape codes). Literals on different
lines are concatenated (as in C).&]
[s4; [%00-00*C@3 chkend]-|When false, ReadOneString is more permissive
as it allows unterminated string literals `- string is then also
delimited by end of line or text.&]
[s4; [*/ Return value]-|String literal.&]
[s0;3 &]
[s5;K [%00-00^`:`:String^ String][%00-00 _][%00-00@0 ReadOneString][%00-00 (][%00-00@(0.0.255) i
nt][%00-00 _][%00-00@3 delim][%00-00 , ][%00-00@(0.0.255) bool][%00-00 _][%00-00@3 chkend][%00-00 _
`=_false)_throw(Error)]&]
[s2; Reads C`-like string literal from current position (follow C
lexical rules, including escape codes) with different delimiter
than `'`\`"`'. Literals on different lines are not concatenated
(unlike C).&]
[s4; [%00-00*C@3 delim]-|Delimiter.&]
[s4; [%00-00*C@3 chkend]-|When false, ReadOneString is more permissive
as it allows unterminated string literals `- string is then also
delimited by end of line or text.&]
[s4; [*/ Return value]-|String literal.&]
[s0;3 &]
[s5;K [%00-00^`:`:String^ String][%00-00 _][%00-00@0 ReadString][%00-00 (][%00-00@(0.0.255) int
][%00-00 _][%00-00@3 delim][%00-00 , ][%00-00@(0.0.255) bool][%00-00 _][%00-00@3 chkend][%00-00 _
`=_false)_throw(Error)]&]
[s2; Reads C`-like string literal from current position (follow C
lexical rules, including escape codes). with different delimiter
than `'`\`"`'. Literals on different lines are concatenated (as
in C).&]
[s4; [%00-00*C@3 delim]-|Delimiter.&]
[s4; [%00-00*C@3 chkend]-|When false, ReadOneString is more permissive
as it allows unterminated string literals `- string is then also
delimited by end of line or text.&]
[s4; [*/ Return value]-|String literal.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 SkipTerm][%00-00 ()]&]
[s2; Skips a single symbol. Decimal numbers, identifiers and string
literals are skipped as whole symbols, otherwise input position
is advanced by 1 character.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) const][%00-00 _][%00-00@(0.0.255) char][%00-00 _`*][%00-00@0 GetPtr][%00-00 (
)]&]
[s2; Gets a pointer to the current position.&]
[s4; [*/ Return value]-|Pointer to current position.&]
[s0;3 &]
[s5;K [%00-00^`:`:CParser`:`:Pos^ Pos][%00-00 _][%00-00@0 GetPos][%00-00 ()]&]
[s2; Gets the current position,.&]
[s4; [*/ Return value]-|Current position. It contains the pointer as
well as the line number and the filename.&]
[s0;3 &]
[s5;K [%00-00@(0.0.255) void][%00-00 _][%00-00@0 SetPos][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00^`:`:CParser`:`:Pos^ CParser`::Pos][%00-00 `&_][%00-00@3 p][%00-00 )]&]
[s2; Sets the current position.&]
[s4; [%00-00*C@3 pos]-|New current position. Can be in different text
than previously used in CParser.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00 bool][%00-00@(64) _][%00-00@0 IsEof][%00-00@(64) ()_][%00-00 const]&]
[s2; Test for the end of input text.&]
[s4; [*/ Return value]-|true when current position is a the end of input
text (`'`\0`' character).&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00@(64) operator_][%00-00 bool][%00-00@(64) ()_][%00-00 const]&]
[s4; [*/ Return value]-|!IsEof().&]
[s0; &]
[s5;K@(0.0.255) [%00-00 int][%00-00@(64) _][%00-00@0 GetLine][%00-00@(64) ()_][%00-00 const]&]
[s4; [*/ Return value]-|Current line.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00^`:`:String^@(64) String][%00-00@(64) _][%00-00@0 GetFileName][%00-00@(64) (
)_][%00-00 const]&]
[s4; [*/ Return value]-|Actual filename.&]
[s0; &]
[s0; &]
[s0; &]
[s0; &]
[s0; C`-like string literal formatting&]
[s0; &]
[s0; AsCString routines produce C`-like literals (compatible with
CParser) from character data:&]
[s0;3 &]
[s0;:`:`:AsCString`(const char`*`,const char`*`,int`,const char`*`,bool`): [%00-00 Stri
ng_][%00-00* AsCString][%00-00 (const_char_`*][%00-00*@3 s][%00-00 ,
const_char_`*][%00-00*@3 end][%00-00 , int_][%00-00*@3 linemax][%00-00 _`=_INT`_MAX,
const_char_`*][%00-00*@3 linepfx][%00-00 _`=_NULL, bool_][%00-00*@3 smart][%00-00 _`=_fal
se)]&]
[s2; Creates C`-like literal.&]
[s4; [%00-00*C@3 s]-|Pointer to characters.&]
[s4; [%00-00*C@3 end]-|End of characters array (`'`\0`' characters are
allowed inside data).&]
[s4; [%00-00*C@3 linemax]-|Maximal length of line. If this is exceeded,
ending `"`\`"`\n`" and [@3 linepfx] is inserted and literal continues
on the new line.&]
[s4; [%00-00*C@3 linepfx]-|Pointer to zero`-terminated text to be inserted
at the beginning of the line when the line length is exceeded.&]
[s4; [%00-00*C@3 smart]-|true activates smarter breaking into lines
`- breaks at spaces are preferred.&]
[s4; [*/ Return value]-|C`-like literal.&]
[s0;3 &]
[s0;:`:`:AsCString`(const char`*`,int`,const char`*`,bool`): [%00-00 String_][%00-00* AsC
String][%00-00 (const_char_`*][%00-00*@3 s][%00-00 , int_][%00-00*@3 linemax][%00-00 _`=_IN
T`_MAX, const_char_`*][%00-00*@3 linepfx][%00-00 _`=_NULL, bool_][%00-00*@3 smart][%00-00 _
`=_false)]&]
[s2; Creates C`-like literal from zero terminated character data.
Same as AsCString([@3 s], [@3 s] `+ strlen([@3 s]), [@3 linemax], [@3 linepfx],
[@3 smart]).&]
[s0;3 &]
[s0;:`:`:AsCString`(const`:`:String`&`,int`,const char`*`,bool`): [%00-00 String_][%00-00* A
sCString][%00-00 (const_String`&_][%00-00*@3 s][%00-00 , int_][%00-00*@3 linemax][%00-00 _`=
_INT`_MAX, const_char_`*][%00-00*@3 linepfx][%00-00 _`=_NULL, bool_][%00-00*@3 smart][%00-00 _
`=_false)]&]
[s2; Creates C`-like literal from String. String can contain zero
characters. Same as AsCString([@3 s].Begin(), [@3 s].End(), [@3 linemax],
[@3 linepfx], [@3 smart]).&]
[s0; ]

View file

@ -1,91 +1,113 @@
TITLE("Ptr and Pte")
COMPRESSED
120,156,237,88,109,119,218,54,20,254,43,218,210,246,0,13,
68,146,109,108,76,150,211,45,221,190,180,107,123,90,122,246,
129,3,88,24,17,180,26,139,73,118,50,78,187,252,246,93,
249,5,12,49,77,211,179,174,233,217,242,33,216,210,213,189,
247,121,238,163,43,193,144,162,7,15,240,49,62,194,183,252,
249,79,249,156,165,81,50,26,10,219,246,250,140,58,253,119,
207,94,246,250,173,39,141,174,221,4,39,4,156,88,46,177,
60,199,34,54,237,194,63,98,17,234,80,203,38,30,237,217,
158,101,121,216,15,35,166,245,104,24,81,207,235,155,200,20,
22,81,215,161,196,181,61,219,35,150,235,81,88,75,49,166,
216,165,14,177,45,143,58,254,140,235,112,52,100,158,213,111,
189,238,194,34,203,68,2,231,152,116,169,237,218,20,91,152,
218,16,138,120,158,77,92,199,179,122,221,174,31,178,85,34,
100,92,196,18,132,80,210,159,18,183,15,41,95,95,95,119,
136,141,243,12,108,112,70,176,13,169,18,24,195,54,117,137,
211,195,61,199,35,30,182,192,185,227,98,199,95,49,197,150,
245,200,141,15,231,86,232,46,246,69,194,193,69,235,49,33,
46,44,233,30,119,143,136,237,2,80,207,178,29,207,197,16,
156,82,106,89,148,88,180,215,163,78,215,113,253,5,103,51,
174,10,8,12,146,111,17,88,234,30,187,71,176,16,219,142,
69,237,158,33,203,130,72,148,118,157,30,113,108,236,116,193,
147,175,248,31,169,80,124,201,99,168,216,251,201,95,15,127,
126,209,126,251,6,13,181,213,71,175,18,133,88,60,131,79,
254,104,52,212,120,103,4,101,37,66,144,236,42,98,9,215,
104,165,228,165,152,113,196,144,94,50,149,160,149,20,113,194,
21,210,107,13,70,40,89,176,4,214,112,166,248,12,53,96,
169,184,136,225,233,197,219,231,207,155,232,106,193,227,98,193,
12,201,233,239,60,76,144,208,8,10,154,168,52,132,193,14,
26,152,245,75,246,14,34,137,4,165,154,207,211,8,137,24,
105,145,164,204,84,80,27,47,138,163,72,204,121,208,78,196,
146,35,57,47,157,133,44,142,101,130,166,28,210,228,161,208,
60,90,131,119,72,111,41,32,139,78,1,239,183,133,136,120,
6,114,23,92,137,77,239,66,211,199,25,17,144,104,178,40,
249,184,90,136,112,129,216,108,166,81,204,67,174,53,83,107,
52,79,227,208,164,200,34,145,172,81,34,247,160,234,78,30,
83,166,17,12,197,144,90,54,111,12,11,3,131,4,66,5,
109,40,179,184,132,133,201,122,197,59,232,141,52,54,134,20,
96,61,143,31,124,15,174,130,54,155,70,60,248,30,173,101,
138,244,34,243,11,41,101,217,50,112,22,103,212,228,11,166,
76,115,0,114,37,146,69,6,163,140,144,207,50,195,54,212,
214,232,218,208,117,140,120,231,162,227,23,124,229,213,65,191,
72,137,124,227,252,20,158,206,80,240,190,3,127,133,137,249,
112,250,207,198,129,31,248,96,241,19,68,27,163,225,67,140,
219,24,143,199,27,134,39,167,163,205,224,147,6,238,224,14,
117,156,38,42,218,192,198,124,82,177,178,209,160,50,115,54,
153,220,217,3,54,57,87,231,252,122,31,171,116,26,137,176,
206,9,42,32,141,114,180,45,52,108,229,17,39,163,205,166,
177,80,57,105,62,105,31,148,44,42,210,202,121,22,240,150,
109,194,92,75,187,130,137,57,159,65,69,64,236,102,110,87,
59,29,84,184,135,208,231,25,39,237,15,3,16,135,41,240,
158,101,110,55,78,228,74,132,80,142,147,224,228,92,42,30,
156,104,21,6,39,144,174,17,206,3,30,7,237,84,7,71,
149,122,153,199,60,203,109,1,79,128,133,167,133,82,230,74,
66,195,130,1,52,42,12,42,181,223,74,160,172,122,77,205,
15,213,107,75,116,181,218,213,90,127,194,74,83,36,181,29,
247,235,214,238,86,184,34,146,156,6,149,163,46,30,54,102,
199,168,206,21,144,194,182,178,218,243,245,171,188,228,102,111,
142,81,249,180,49,60,61,148,242,233,1,18,206,38,181,178,
83,135,100,103,84,161,87,208,253,230,34,44,91,88,231,83,
197,131,6,133,82,151,169,206,250,232,172,82,253,108,239,15,
206,62,71,97,170,84,88,249,216,8,154,31,211,151,218,234,
171,68,232,23,203,203,15,240,224,27,70,12,135,141,102,129,
190,184,149,64,147,141,243,174,37,75,236,7,221,12,130,86,
213,211,96,18,180,134,173,39,22,90,193,91,233,246,188,116,
167,179,22,158,145,38,226,11,211,150,11,170,119,247,159,157,
83,157,59,105,127,56,15,30,7,143,55,39,229,141,131,225,
182,12,51,48,229,219,163,106,178,217,204,164,120,11,30,77,
238,146,184,105,50,154,153,227,51,63,59,205,137,1,99,202,
24,214,129,120,185,51,89,166,11,59,190,178,43,54,251,196,
220,1,13,147,21,173,203,21,87,12,234,17,180,207,70,59,
118,141,230,182,209,102,128,70,155,232,39,232,53,79,82,21,
163,75,22,165,252,118,38,145,84,217,85,3,137,121,134,119,
38,225,48,55,55,130,205,73,203,226,117,29,235,159,1,227,
250,155,66,81,166,61,1,185,223,147,84,209,94,247,29,239,
180,67,80,115,29,235,63,108,12,26,59,133,201,85,90,206,
53,71,133,254,127,204,46,160,230,146,118,181,211,11,247,180,
253,106,127,234,6,15,65,43,129,243,252,159,134,80,119,190,
101,5,57,120,68,29,142,112,11,3,31,221,219,135,113,31,
0,12,221,90,240,120,86,119,200,78,165,140,106,207,231,45,
1,95,142,2,246,241,83,123,207,243,158,130,166,123,236,125,
37,188,123,89,221,13,210,93,200,186,39,120,191,92,125,255,
67,100,124,13,41,127,235,66,253,238,190,232,244,223,41,222,
29,225,254,95,221,123,208,133,178,43,252,114,197,148,208,50,
222,64,187,113,15,185,121,235,203,130,189,73,20,92,246,199,
249,13,48,127,217,166,107,198,170,188,13,100,157,69,253,93,
49,255,102,113,201,21,124,175,96,145,249,129,110,46,213,50,
251,125,46,251,78,148,57,66,48,134,102,130,93,196,82,39,
230,187,104,170,86,82,115,125,248,178,49,224,127,110,111,137,
163,191,1,237,13,110,211,
topic "Ptr and Pte";[2 $$0,0#00000000000000000000000000000000:Default]
[i448;a25;kKO9;*@(64)2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,0#27521748481378242620020725143825:desc]
[a83;*R6 $$3,0#31310162474203024125188417583966:caption]
[l288;i1121;b17;O9;~~~.1408;2 $$4,0#10431211400427159095818037425705:param]
[i448;a25;kKO9;*@(64)2 $$5,0#37138531426314131252341829483370:item]
[*+117 $$6,6#14700283458701402223321329925657:header]
[l288;a17;*1 $$7,7#70004532496200323422659154056402:requirement]
[{_}%EN-US
[s3; Ptr and Pte&]
[s0; Ptr and Pte class templates provide a smart pointer system that
cleared (assigned NULL) when pointed object is destructed. That
makes it useful in situations where life`-time of object cannot
be precisely determined.&]
[s0; While Ptr class template provides smart pointers, Pte is the
class which adds necessary functionality to pointed objects.
Ptr could only point to objects of Pte`-derived type. So to make
a class `"Ptr`-able`" you should add Pte as one of class bases,
with the derived class as its parameter, e.g.:&]
[s0; struct Foo : Pte<Foo> `{....&]
[s0; &]
[s5;K^`:`:PteBase^ [%00-00^^ template_<][%00-00^^@(0.0.255) class][%00-00^^ _][%00-00^^@4 T][%00-00^^ >
__][%00-00^^@(0.0.255) class][%00-00^^ _][%00-00^^@0 Pte][%00-00^^ _:_][%00-00^^@(0.0.255) p
ublic][%00-00^^ _][%00-00 PteBase]&]
[s0;* [* class_]Pte&]
[s0;3 &]
[s0;* &]
[s2; This template class implements the functionality needed in the
pointed object. &]
[s0; [*C@4 T]-|Type of pointed object.&]
[s0;^topic`:`/`/Core`/src`/PtePtr`$en`-us`#`:`:PteBase`:`:class PteBase^ [/^^ Derived
from][^^ ]PteBase&]
[s0; &]
[s0; &]
[s5;K [%00-00 template_<][%00-00@(0.0.255) class][%00-00 _][%00-00@4 T][%00-00 >__][%00-00@(0.0.255) c
lass][%00-00 _][%00-00@0 Ptr][%00-00 _:_][%00-00@(0.0.255) public][%00-00 _][%00-00^`:`:PtrBase^ P
trBase][%00-00 , ][%00-00@(0.0.255) private][%00-00 _][%00-00^`:`:Moveable^ Moveable][%00-00 <
_][%00-00@0 Ptr][%00-00 <][%00-00@4 T][%00-00 >_>_]&]
[s0;* [* class_]Ptr&]
[s0;3 &]
[s0;* &]
[s2; Type specific pointer.&]
[s0; [*C@4 T]-|Type of pointed object. T class must be derived from
Pte<T>.&]
[s0;^topic`:`/`/Core`/src`/PtePtr`$en`-us`#`:`:PtrBase`:`:PtrBase`(`)^ [/^^ Derived
from][^^ ]PtrBase&]
[s0;3 &]
[s0;:`:`:Ptr`:`:Ptr`(`): [* Ptr]()&]
[s2; Default constructor.&]
[s0;3 &]
[s0;:`:`:Ptr`:`:Ptr`(T`*`): [* Ptr](T_`*[*@3 ptr])&]
[s2; Constructs Ptr pointing to specified object.&]
[s4; [*C@3 ptr]-|C`+`+ pointer to pointed object.&]
[s0;3 &]
[s0;:`:`:Ptr`:`:Ptr`(const`:`:Ptr`&`): [* Ptr](const_[* Ptr]`&_[*@3 ptr])&]
[s2; Constructs Ptr pointing to the same object as other Ptr.&]
[s4; [*C@3 ptr]-|Other Ptr.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00@(64) T_`*][%00-00@0 operator`->][%00-00@(64) ()_][%00-00 const]&]
[s4; [*/ Return value]-|C`+`+ pointer to pointed object or NULL if Ptr
does not point to any object.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00@(64) T_`*][%00-00@0 operator`~][%00-00@(64) ()_][%00-00 const]&]
[s4; [*/ Return value]-|C`+`+ pointer to pointed object or NULL if Ptr
does not point to any object.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00@(64) operator_T`*()_][%00-00 const]&]
[s4; [*/ Return value]-|C`+`+ pointer to pointed object or NULL if Ptr
does not point to any object.&]
[s0;3 &]
[s5;K [%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@0 operator`=][%00-00 (T_`*][%00-00@3 ptr][%00-00 )
]&]
[s2; Assigns new pointer.&]
[s4; [*C@3 ptr]-|Pointer.&]
[s4; [*/ Return value]-|`*this.&]
[s0;3 &]
[s5;K [%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@0 operator`=][%00-00 (][%00-00@(0.0.255) const][%00-00 _
][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 ptr][%00-00 )]&]
[s2; Assigns other Ptr.&]
[s4; [*C@3 ptr]-|&]
[s4; [*/ Return value]-|&]
[s0;3 &]
[s5;K [%00-00 friend_][%00-00@(0.0.255) bool][%00-00 _][%00-00@0 operator`=`=][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 a][%00-00 , ][%00-00@(0.0.255) cons
t][%00-00 _T_`*][%00-00@3 b][%00-00 )]&]
[s5;K [%00-00 friend_][%00-00@(0.0.255) bool][%00-00 _][%00-00@0 operator`=`=][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _T_`*][%00-00@3 a][%00-00 , ][%00-00@(0.0.255) const][%00-00 _][%00-00^`:`:Ptr^ P
tr][%00-00 `&_][%00-00@3 b][%00-00 )]&]
[s5;K [%00-00 friend_][%00-00@(0.0.255) bool][%00-00 _][%00-00@0 operator`=`=][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 a][%00-00 , ][%00-00@(0.0.255) cons
t][%00-00 _][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 b][%00-00 )]&]
[s5;K [%00-00 friend_][%00-00@(0.0.255) bool][%00-00 _][%00-00@0 operator`=`=][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 a][%00-00 , T_`*][%00-00@3 b][%00-00 )
]&]
[s5;K [%00-00 friend_][%00-00@(0.0.255) bool][%00-00 _][%00-00@0 operator`=`=][%00-00 (T_`*][%00-00@3 a
][%00-00 , ][%00-00@(0.0.255) const][%00-00 _][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 b][%00-00 )
]&]
[s5;K [%00-00 friend_][%00-00@(0.0.255) bool][%00-00 _][%00-00@0 operator!`=][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 a][%00-00 , ][%00-00@(0.0.255) cons
t][%00-00 _T_`*][%00-00@3 b][%00-00 )]&]
[s5;K [%00-00 friend_][%00-00@(0.0.255) bool][%00-00 _][%00-00@0 operator!`=][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _T_`*][%00-00@3 a][%00-00 , ][%00-00@(0.0.255) const][%00-00 _][%00-00^`:`:Ptr^ P
tr][%00-00 `&_][%00-00@3 b][%00-00 )]&]
[s5;K [%00-00 friend_][%00-00@(0.0.255) bool][%00-00 _][%00-00@0 operator!`=][%00-00 (][%00-00@(0.0.255) c
onst][%00-00 _][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 a][%00-00 , ][%00-00@(0.0.255) cons
t][%00-00 _][%00-00^`:`:Ptr^ Ptr][%00-00 `&_][%00-00@3 b][%00-00 )]&]
[s2; Comparison operators.&]
[s0;3 &]
[s5;K@(0.0.255) [%00-00^`:`:String^@(64) String][%00-00@(64) _][%00-00@0 ToString][%00-00@(64) (
)_][%00-00 const]&]
[s2; Converts all information to string for diagnostic purposes&]
[s4; [*/ Return value]-|Text.&]
[s0; ]

View file

@ -36,10 +36,17 @@ static int sAppf(int c) {
return c >= ' ' || c == '\n' ? c : c == '\t' ? ' ' : 0;
}
static int sCharFilterNoCr(int c) {
return c == '\r' ? 0 : c;
}
void Console::Append(const String& s) {
if(s.IsEmpty()) return;
if(console) {
Puts(s);
String t = Filter(s, sCharFilterNoCr);
if(*t.Last() == '\n')
t.Trim(t.GetCount() - 1);
Puts(t);
return;
}
int l, h;