2014-06-25 03:19:39 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Hamburg University of Applied Sciences (HAW)
|
|
|
|
* Copyright (C) 2014 Ho Chi Minh city University of Technology (HCMUT)
|
|
|
|
*
|
2014-08-23 15:43:13 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-06-25 03:19:39 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup examples
|
|
|
|
* @{
|
|
|
|
*
|
2015-05-22 07:34:41 +02:00
|
|
|
* @file
|
2014-06-25 03:19:39 +02:00
|
|
|
* @brief implementation of declared functions of object cpp_class
|
|
|
|
*
|
|
|
|
* @author Martin Landsmann <martin.landsmann@haw-hamburg.de>
|
|
|
|
* @author DangNhat Pham-Huu <51002279@hcmut.edu.vn>
|
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2014-10-10 11:27:36 +02:00
|
|
|
#include "cpp_class.hpp"
|
2014-06-25 03:19:39 +02:00
|
|
|
|
|
|
|
cpp_class::cpp_class()
|
|
|
|
{
|
2019-10-23 21:23:14 +02:00
|
|
|
printf("Instantiating Object [constructor called]\n");
|
2014-06-25 03:19:39 +02:00
|
|
|
greet();
|
|
|
|
}
|
|
|
|
|
|
|
|
cpp_class::~cpp_class()
|
|
|
|
{
|
|
|
|
printf("Destroying Object [destructor called]\n");
|
|
|
|
printf("Im shutting down!\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void cpp_class::say_hello(void)
|
|
|
|
{
|
|
|
|
printf("Hello!\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void cpp_class::say_hello(int n)
|
|
|
|
{
|
|
|
|
printf("Hello![int: %d]\n", n);
|
|
|
|
}
|
|
|
|
|
|
|
|
void cpp_class::say_hello(float f)
|
|
|
|
{
|
|
|
|
printf("Hello![float: %f]\n", f);
|
|
|
|
}
|
|
|
|
|
|
|
|
void cpp_class::greet(void)
|
|
|
|
{
|
|
|
|
printf("Im starting!\n");
|
|
|
|
}
|