You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmz007 36ed224bac
Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
1 year ago
..
include/android-base Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
tidy Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
.clang-format Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
Android.bp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
CPPLINT.cfg Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
NOTICE Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
OWNERS Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
PREUPLOAD.cfg Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
README.md Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
TEST_MAPPING Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
abi_compatibility.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
chrono_utils.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
chrono_utils_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
cmsg.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
cmsg_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
endian_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
errors_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
errors_unix.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
errors_windows.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
expected_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
file.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
file_benchmark.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
file_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
format_benchmark.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
function_ref_benchmark.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
function_ref_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
hex.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
hex_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
logging.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
logging_splitters.h Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
logging_splitters_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
logging_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
macros_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
mapped_file.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
mapped_file_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
no_destructor_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
parsebool.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
parsebool_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
parsedouble_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
parseint_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
parsenetaddress.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
parsenetaddress_fuzzer.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
parsenetaddress_fuzzer.dict Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
parsenetaddress_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
posix_strerror_r.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
process.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
process_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
properties.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
properties_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
result_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
result_test_constraint.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
scopeguard_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
stringprintf.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
stringprintf_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
strings.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
strings_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
test_main.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
test_utils.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
test_utils_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
threads.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
utf8.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
utf8_test.cpp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago

README.md

libbase

Who is this library for?

This library is a collection of convenience functions to make common tasks easier and less error-prone.

In this context, "error-prone" covers both "hard to do correctly" and "hard to do with good performance", but as a general purpose library, libbase's primary focus is on making it easier to do things easily and correctly when a compromise has to be made between "simplest API" on the one hand and "fastest implementation" on the other. Though obviously the ideal is to have both.

Should my routine be added?

The intention is to cover the 80% use cases, not be all things to all users.

If you have a routine that's really useful in your project, congratulations. But that doesn't mean it should be here rather than just in your project.

The question for libbase is "should everyone be doing this?"/"does this make everyone's code cleaner/safer?". Historically we've considered the bar for inclusion to be "are there at least three unrelated projects that would be cleaned up by doing so".

If your routine is actually something from a future C++ standard (that isn't yet in libc++), or it's widely used in another library, that helps show that there's precedent. Being able to say "so-and-so has used this API for n years" is a good way to reduce concerns about API choices.

Any other restrictions?

Unlike most Android code, code in libbase has to build for Mac and Windows too.

Code here is also expected to have good test coverage.

By its nature, it's difficult to change libbase API. It's often best to start using your routine just in your project, and let it "graduate" after you're certain that the API is solid.