📄 hoge
字号:
The function `tcmapput3' is used in order to store a record of the value of two regions into a map object..PP.RS.br\fBvoid tcmapput3(TCMAP *\fImap\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIfvbuf\fB, int \fIfvsiz\fB, const void *\fIlvbuf\fB, int \fIlvsiz\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkbuf\fR' specifies the pointer to the region of the key..RE.RS`\fIksiz\fR' specifies the size of the region of the key..RE.RS`\fIfvbuf\fR' specifies the pointer to the former region of the value..RE.RS`\fIfvsiz\fR' specifies the size of the former region of the value..RE.RS`\fIlvbuf\fR' specifies the pointer to the latter region of the value..RE.RS`\fIlvsiz\fR' specifies the size of the latter region of the value..RE.RSIf a record with the same key exists in the map, it is overwritten..RE.RE.PPThe function `tcmapputkeep' is used in order to store a new record into a map object..PP.RS.br\fBbool tcmapputkeep(TCMAP *\fImap\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkbuf\fR' specifies the pointer to the region of the key..RE.RS`\fIksiz\fR' specifies the size of the region of the key..RE.RS`\fIvbuf\fR' specifies the pointer to the region of the value..RE.RS`\fIvsiz\fR' specifies the size of the region of the value..RE.RSIf successful, the return value is true, else, it is false..RE.RSIf a record with the same key exists in the map, this function has no effect..RE.RE.PPThe function `tcmapputkeep2' is used in order to store a new string record into a map object..PP.RS.br\fBbool tcmapputkeep2(TCMAP *\fImap\fB, const char *\fIkstr\fB, const char *\fIvstr\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkstr\fR' specifies the string of the key..RE.RS`\fIvstr\fR' specifies the string of the value..RE.RSIf successful, the return value is true, else, it is false..RE.RSIf a record with the same key exists in the map, this function has no effect..RE.RE.PPThe function `tcmapputcat' is used in order to concatenate a value at the end of the value of the existing record in a map object..PP.RS.br\fBvoid tcmapputcat(TCMAP *\fImap\fB, const void *\fIkbuf\fB, int \fIksiz\fB, const void *\fIvbuf\fB, int \fIvsiz\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkbuf\fR' specifies the pointer to the region of the key..RE.RS`\fIksiz\fR' specifies the size of the region of the key..RE.RS`\fIvbuf\fR' specifies the pointer to the region of the value..RE.RS`\fIvsiz\fR' specifies the size of the region of the value..RE.RSIf there is no corresponding record, a new record is created..RE.RE.PPThe function `tcmapputcat2' is used in order to concatenate a string value at the end of the value of the existing record in a map object..PP.RS.br\fBvoid tcmapputcat2(TCMAP *\fImap\fB, const char *\fIkstr\fB, const char *\fIvstr\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkstr\fR' specifies the string of the key..RE.RS`\fIvstr\fR' specifies the string of the value..RE.RSIf there is no corresponding record, a new record is created..RE.RE.PPThe function `tcmapout' is used in order to remove a record of a map object..PP.RS.br\fBbool tcmapout(TCMAP *\fImap\fB, const void *\fIkbuf\fB, int \fIksiz\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkbuf\fR' specifies the pointer to the region of the key..RE.RS`\fIksiz\fR' specifies the size of the region of the key..RE.RSIf successful, the return value is true. False is returned when no record corresponds to the specified key..RE.RE.PPThe function `tcmapout2' is used in order to remove a string record of a map object..PP.RS.br\fBbool tcmapout2(TCMAP *\fImap\fB, const char *\fIkstr\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkstr\fR' specifies the string of the key..RE.RSIf successful, the return value is true. False is returned when no record corresponds to the specified key..RE.RE.PPThe function `tcmapget' is used in order to retrieve a record in a map object..PP.RS.br\fBconst void *tcmapget(const TCMAP *\fImap\fB, const void *\fIkbuf\fB, int \fIksiz\fB, int *\fIsp\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkbuf\fR' specifies the pointer to the region of the key..RE.RS`\fIksiz\fR' specifies the size of the region of the key..RE.RS`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned..RE.RSIf successful, the return value is the pointer to the region of the value of the corresponding record. `NULL' is returned when no record corresponds..RE.RSBecause an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string..RE.RE.PPThe function `tcmapget2' is used in order to retrieve a string record in a map object..PP.RS.br\fBconst char *tcmapget2(const TCMAP *\fImap\fB, const char *\fIkstr\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkstr\fR' specifies the string of the key..RE.RSIf successful, the return value is the string of the value of the corresponding record. `NULL' is returned when no record corresponds..RE.RE.PPThe function `tcmapget3' is used in order to retrieve a semivolatile record in a map object..PP.RS.br\fBconst void *tcmapget3(TCMAP *\fImap\fB, const void *\fIkbuf\fB, int \fIksiz\fB, int *\fIsp\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkbuf\fR' specifies the pointer to the region of the key..RE.RS`\fIksiz\fR' specifies the size of the region of the key..RE.RS`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned..RE.RSIf successful, the return value is the pointer to the region of the value of the corresponding record. `NULL' is returned when no record corresponds..RE.RSBecause an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string. The internal region of the returned record is moved to the tail so that the record will survive for a time under LRU cache algorithm removing records from the head..RE.RE.PPThe function `tcmapmove' is used in order to move a record to the edge of a map object..PP.RS.br\fBbool tcmapmove(TCMAP *\fImap\fB, const void *\fIkbuf\fB, int \fIksiz\fB, bool \fIhead\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkbuf\fR' specifies the pointer to the region of a key..RE.RS`\fIksiz\fR' specifies the size of the region of the key..RE.RS`\fIhead\fR' specifies the destination which is head if it is true or tail if else..RE.RSIf successful, the return value is true. False is returned when no record corresponds to the specified key..RE.RE.PPThe function `tcmapmove2' is used in order to move a string record to the edge of a map object..PP.RS.br\fBbool tcmapmove2(TCMAP *\fImap\fB, const char *\fIkstr\fB, bool \fIhead\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIkstr\fR' specifies the string of a key..RE.RS`\fIhead\fR' specifies the destination which is head if it is true or tail if else..RE.RSIf successful, the return value is true. False is returned when no record corresponds to the specified key..RE.RE.PPThe function `tcmapiterinit' is used in order to initialize the iterator of a map object..PP.RS.br\fBvoid tcmapiterinit(TCMAP *\fImap\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RSThe iterator is used in order to access the key of every record stored in the map object..RE.RE.PPThe function `tcmapiternext' is used in order to get the next key of the iterator of a map object..PP.RS.br\fBconst void *tcmapiternext(TCMAP *\fImap\fB, int *\fIsp\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RS`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned..RE.RSIf successful, the return value is the pointer to the region of the next key, else, it is `NULL'. `NULL' is returned when no record can be fetched from the iterator..RE.RSBecause an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string. The order of iteration is assured to be the same as the stored order..RE.RE.PPThe function `tcmapiternext2' is used in order to get the next key string of the iterator of a map object..PP.RS.br\fBconst char *tcmapiternext2(TCMAP *\fImap\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RSIf successful, the return value is the pointer to the region of the next key, else, it is `NULL'. `NULL' is returned when no record can be fetched from the iterator..RE.RSThe order of iteration is assured to be the same as the stored order..RE.RE.PPThe function `tcmapiterval' is used in order to get the value bound to the key fetched from the iterator of a map object..PP.RS.br\fBconst void *tcmapiterval(const void *\fIkbuf\fB, int *\fIsp\fB);\fR.RS`\fIkbuf\fR' specifies the pointer to the region of the iteration key..RE.RS`\fIsp\fR' specifies the pointer to the variable into which the size of the region of the return value is assigned..RE.RSThe return value is the pointer to the region of the value of the corresponding record..RE.RSBecause an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string..RE.RE.PPThe function `tcmapiterval2' is used in order to get the value string bound to the key fetched from the iterator of a map object..PP.RS.br\fBconst char *tcmapiterval2(const char *\fIkstr\fB);\fR.RS`\fIkstr\fR' specifies the string of the iteration key..RE.RSThe return value is the pointer to the region of the value of the corresponding record..RE.RE.PPThe function `tcmaprnum' is used in order to get the number of records stored in a map object..PP.RS.br\fBuint64_t tcmaprnum(const TCMAP *\fImap\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RSThe return value is the number of the records stored in the map object..RE.RE.PPThe function `tcmapmsiz' is used in order to get the total size of memory used in a map object..PP.RS.br\fBuint64_t tcmapmsiz(const TCMAP *\fImap\fB);\fR.RS`\fImap\fR' specifies the map object..RE.RSThe return value is the total size of memory used in a map object..RE.RE.PPThe function `tcmapkeys' is used in order to create a list object containing all keys in a map object..PP.RS.br\fBTCLIST *tcmapkeys(const TCMAP *\fImap\fB);\fR.RS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -