Skip to content

LuvStudio/openhmy-test-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commonlibrary/c_utils

Introduction

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

Directory Structure

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

Condition

Suitable for standard system.

Build

Build Component

./build.sh --product-name rk3568 --build-target c_utils

Build Shared Library

./build.sh --product-name rk3568 --build-target commonlibrary/c_utils/base:utils

Build Static Library

./build.sh --product-name rk3568 --build-target commonlibrary/c_utils/base:utilsbase

How to Add Dependency of c_utils

  1. Open the corresponding BUILD.gn file of the related module.
  2. 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",
  ]

  ...
}

Coding Directions

Changelog

2023/01/31

  1. Add docs directory,provide development guidelines for main functionalities in c_utils.
  2. Add comments in header files.
  3. Modify README in which the guidelines can be accessed by links in section "Coding Directions".

2022/10/10

  1. Move this repository from utils/native to commonlibrary/c_utils.
  2. Switch component name from utils_base to c_utils.
  3. Securec is not in this repository any more. Please use third_party_bounds_checking_function.

Repositories Involved

commonlibrary_c_utils

commonlibrary_utils_lite

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published