35 std::cout <<
"ClassDemo constructor is running: " << p_comment << std::endl;
45 std::cout <<
"ClassDemo destructor is running: " << comment << std::endl;
92 printf(
"\n\nC++ Demo Example (Built " __DATE__
" " __TIME__
")\n\n");
104 std::cout <<
"Demo cout in loop " << demo_loop_count
105 <<
"... next count will be " << old_count
106 <<
"/" << current_count << std::endl;
122 if (demo_loop_count % 2 == 0)
124 std::cout <<
"About to throw..." << std::endl;
125 throw(
"count was even");
129 std::cout <<
"Odd" << std::endl;;
132 catch(
const char *reason)
134 std::cout <<
"Exception: " << reason << std::endl;
~ClassDemo()
Destructor for ClassDemo.
int GetDemoCount()
Getter for count value.
int IncrementDemoCount()
Increment count value.
void SetDemoCount(int value)
Set the count value.
ClassDemo(const char *p_comment)
Constructor for ClassDemo.
ClassDemo global_demo("global demo class")
A global instance of the ClassDemo class.
void app_init(void)
Main entry point to the application.
void mmosal_task_sleep(uint32_t duration_ms)
Sleep for a period of time, yielding during that time.