# SimpleVector - [Overview](#section1250743270165636) - [Summary](#section1410137533165636) - [Data Fields](#pub-attribs) - [Details](#section508538747165636) - [Field](#section1604641307165636) - [compare](#a7661926c6a5d659ec2bff6533a7389fa) - [data](#a4674672209ae411544383a5399aee85b) - [free](#a1ff1e71311df432f11fd2613cdbc1b16) - [key](#a3e5edc51c8c7ef2536da2853986981ff) - [max](#a68140ca4cc59df48c63963f1eda3f35c) - [top](#ac699cefa0c1003b8babbe2c0ea3134db) ## **Overview** **Related Modules:** [Samgr](Samgr.md) **Description:** Defines the simplified vector class, which is extended by four elements. This class is applicable to the C language development scenario where the data volume is small and dynamic expansion is required. ## **Summary** ## Data Fields

Variable Name

Description

max

int16

top

int16

free

int16

data

void **

key

VECTOR_Key

compare

VECTOR_Compare

## **Details** ## **Field ** ## compare ``` VECTOR_Compare SimpleVector::compare ``` **Description:** Compares the sizes of key1 and key2, which are provided by users. The value **1** indicates that key1 is greater than key2, the value **0** indicates that key1 is equal to key2, and the value **-1** indicates that key1 is less than key2. The default value is **NULL**. ## data ``` void** SimpleVector::data ``` **Description:** Data storage pointer ## free ``` int16 SimpleVector::free ``` **Description:** Number of data records that have been released. The initial value is **0**. ## key ``` VECTOR_Key SimpleVector::key ``` **Description:** Converts a data element into a key for comparison. The key is provided by users, and the default value is **NULL**. ## max ``` int16 SimpleVector::max ``` **Description:** Maximum number of data records that can be stored. The initial value is **0**. ## top ``` int16 SimpleVector::top ``` **Description:** Peak value of the number of stored data records. The initial value is **0**.