The commonlibrary/c_utils repository provides the following commonly used C++ utility classes for standard system:
- Enhanced APIs for operations related to files, paths, and strings
- APIs related to the read-write lock, semaphore, timer, thread, and thread pool
- APIs related to the security data container and data serialization
- Error codes for each subsystem
commonlibrary/c_utils
├─ base
│ ├── include # Header files of APIs open to other subsystems
│ ├── src # Source files
│ └── test # Test code
├─ Docs
├── en # Documents in English
└── zh-cn # Documents in Chinese
Suitable for standard system.
./build.sh --product-name rk3568 --build-target c_utils
./build.sh --product-name rk3568 --build-target commonlibrary/c_utils/base:utils
./build.sh --product-name rk3568 --build-target commonlibrary/c_utils/base:utilsbase
- Open the corresponding BUILD.gn file of the related module.
- Add dependency to the corresponding block as follows:
ohos_shared_library("xxxxx") {
...
external_deps = [
...
# Dependency of shared library(Optional)
"c_utils:utils",
# Dependency of static library(Optional)
"c_utils:utilsbase",
]
...
}
2023/01/31
- Add docs directory,provide development guidelines for main functionalities in c_utils.
- Add comments in header files.
- Modify README in which the guidelines can be accessed by links in section "Coding Directions".
2022/10/10
- Move this repository from utils/native to commonlibrary/c_utils.
- Switch component name from utils_base to c_utils.
- Securec is not in this repository any more. Please use third_party_bounds_checking_function.