📄 tptrarray.in
字号:
# IsEmpty <0 = not empty, 1 = empty># GetSize <expected size># GetUpperBound <expected upper bound># SetSize <param1> <param2># FreeExtra# RemoveAll# GetAt <index> <expected value># SetAt <index> <value># ElementAt <index> <expected value># SetAtGrow <index> <value># Add <value># ArrayOp <index> <expected value># InsertAt <index> <value> <count># RemoveAt <index> <count># InsertArrayAt <index> <array to insert as a quoted comma seperated list># IsNull <index> < 0 = not null, 1 = is null># Test initial conditionsIsEmpty 1GetSize 0GetUpperBound -1# Add an elementAdd 42IsEmpty 0GetSize 1GetUpperBound 0Add 23Add 53Add 64GetSize 4GetUpperBound 3# Test access functionsGetAt 0 42ElementAt 0 42ArrayOp 0 42GetAt 1 23ElementAt 1 23ArrayOp 1 23GetAt 3 64ElementAt 3 64ArrayOp 3 64# Test SetAt funcSetAt 0 34GetAt 0 34ElementAt 0 34ArrayOp 0 34SetAt 3 123GetAt 3 123ElementAt 3 123ArrayOp 3 123# Test SetSize()SetSize 13 2GetSize 13GetUpperBound 12# Test if SetSize clears the pointersRemoveAllSetAtGrow 10 1SetSize 5 2SetSize 11 2IsNull 10 1# Test RemoveAll()Add 11Add 21RemoveAllGetSize 0GetUpperBound -1# Test FreeExtraRemoveAllAdd 11Add 22GetAt 0 11GetAt 1 22GetSize 2GetUpperBound 1FreeExtraGetAt 0 11GetAt 1 22GetSize 2GetUpperBound 1# Test SetAtGrowRemoveAllAdd 10Add 21SetAtGrow 4 40GetSize 5GetAt 0 10GetAt 1 21IsNull 2 1IsNull 3 1GetAt 4 40# Test Add after a SetAtGrowRemoveAllSetAtGrow 4 42GetSize 5Add 52GetSize 6IsNull 0 1IsNull 1 1IsNull 2 1IsNull 3 1GetAt 4 42GetAt 5 52# Test InsertAtRemoveAllAdd 1Add 2Add 3Add 4GetAt 0 1GetAt 1 2GetAt 2 3GetAt 3 4InsertAt 1 5 1GetSize 5GetAt 0 1GetAt 1 5GetAt 2 2GetAt 3 3GetAt 4 4# Test multiple insertInsertAt 3 6 3GetSize 8GetAt 0 1GetAt 1 5GetAt 2 2GetAt 3 6GetAt 4 6GetAt 5 6GetAt 6 3GetAt 7 4# Test insert at the frontInsertAt 0 7 1GetSize 9GetAt 0 7GetAt 1 1GetAt 2 5GetAt 3 2GetAt 4 6GetAt 5 6GetAt 6 6GetAt 7 3GetAt 8 4# Test insert at the endInsertAt 9 8 1GetSize 10GetAt 0 7GetAt 1 1GetAt 2 5GetAt 3 2GetAt 4 6GetAt 5 6GetAt 6 6GetAt 7 3GetAt 8 4GetAt 9 8# Test insert that creates a gapInsertAt 12 9 1GetSize 13GetAt 0 7GetAt 1 1GetAt 2 5GetAt 3 2GetAt 4 6GetAt 5 6GetAt 6 6GetAt 7 3GetAt 8 4GetAt 9 8IsNull 10 1IsNull 11 1GetAt 12 9# Test RemoveAtRemoveAllAdd 1Add 2Add 3Add 4Add 5Add 6# Test removal from the middleRemoveAt 3 1GetSize 5GetAt 0 1GetAt 1 2GetAt 2 3GetAt 3 5GetAt 4 6# Test multiple removeRemoveAt 2 2GetSize 3GetAt 0 1GetAt 1 2GetAt 2 6# Test removal from frontRemoveAt 0 1GetSize 2GetAt 0 2GetAt 1 6Add 7Add 8GetSize 4GetAt 0 2GetAt 1 6GetAt 2 7GetAt 3 8# Test removal from endRemoveAt 3 1GetSize 3GetAt 0 2GetAt 1 6GetAt 2 7# Test InsertAt(int, CHXPtrArray*) functionallityRemoveAllAdd 1Add 2Add 3GetSize 3# Insert an empty arrayInsertArrayAt 1 ""GetSize 3# Insert into the middleInsertArrayAt 1 "4, 5, 6, 7"GetSize 7GetAt 0 1GetAt 1 4GetAt 2 5GetAt 3 6GetAt 4 7GetAt 5 2GetAt 6 3# Insert at the frontInsertArrayAt 0 "8, 9, 10"GetSize 10GetAt 0 8GetAt 1 9GetAt 2 10 GetAt 3 1GetAt 4 4GetAt 5 5GetAt 6 6GetAt 7 7GetAt 8 2GetAt 9 3# Insert at the endInsertArrayAt 10 "11, 12, 13"GetSize 13GetAt 0 8GetAt 1 9GetAt 2 10 GetAt 3 1GetAt 4 4GetAt 5 5GetAt 6 6GetAt 7 7GetAt 8 2GetAt 9 3GetAt 10 11GetAt 11 12GetAt 12 13# Insert off the endInsertArrayAt 16 "14, 15, 16"GetSize 19GetAt 0 8GetAt 1 9GetAt 2 10 GetAt 3 1GetAt 4 4GetAt 5 5GetAt 6 6GetAt 7 7GetAt 8 2GetAt 9 3GetAt 10 11GetAt 11 12GetAt 12 13IsNull 13 1IsNull 14 1IsNull 15 1GetAt 16 14GetAt 17 15GetAt 18 16
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -