1
0
Fork 0
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 6d24f2138b
Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56)
3 years ago
..
include/android-base Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
tidy Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
.clang-format Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Android.bp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
CPPLINT.cfg Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
NOTICE Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
OWNERS Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
PREUPLOAD.cfg Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
README.md Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
TEST_MAPPING Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
abi_compatibility.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
chrono_utils.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
chrono_utils_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
cmsg.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
cmsg_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
endian_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
errors_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
errors_unix.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
errors_windows.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
expected_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
file.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
file_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
format_benchmark.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
function_ref_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
logging.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
logging_splitters.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
logging_splitters_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
logging_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
macros_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
mapped_file.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
mapped_file_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
no_destructor_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
parsebool.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
parsebool_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
parsedouble_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
parseint_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
parsenetaddress.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
parsenetaddress_fuzzer.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
parsenetaddress_fuzzer.dict Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
parsenetaddress_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
process.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
process_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
properties.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
properties_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
result_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
scopeguard_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
stringprintf.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
stringprintf_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
strings.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
strings_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
test_main.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
test_utils.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
test_utils_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
threads.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
utf8.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
utf8_test.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years 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.