|
Common System 0.2.0
Common interfaces and patterns for system integration
|

Go to the source code of this file.
Functions | |
| Result< int > | divide (int a, int b) |
| Result< std::string > | read_file (const std::string &path) |
| Result< int > | parse_and_compute (const std::string &expr) |
| int | main () |
| Result< int > divide | ( | int | a, |
| int | b ) |
Definition at line 26 of file result_example.cpp.
References kcenon::common::error_codes::INVALID_ARGUMENT, kcenon::common::make_error(), and kcenon::common::ok().
Referenced by main(), and parse_and_compute().


| int main | ( | ) |
Definition at line 86 of file result_example.cpp.
References divide(), kcenon::common::err(), kcenon::common::Result< T >::error(), kcenon::common::ok(), parse_and_compute(), and kcenon::common::try_catch().

| Result< int > parse_and_compute | ( | const std::string & | expr | ) |
Definition at line 62 of file result_example.cpp.
References divide(), kcenon::common::error_codes::INVALID_ARGUMENT, and kcenon::common::make_error().
Referenced by main().


| Result< std::string > read_file | ( | const std::string & | path | ) |
Definition at line 38 of file result_example.cpp.
References kcenon::common::error_codes::INVALID_ARGUMENT, kcenon::common::make_error(), kcenon::common::error_codes::NOT_FOUND, and kcenon::common::ok().
