|
| | Dog () |
| | Default constructor for Dog. Calls the Animal base class constructor and sets the type to "Dog". Displays a specific construction message.
|
| |
| | Dog (const Dog &other) |
| | Copy constructor for Dog. Calls the Animal base class copy constructor. Displays a specific copy construction message.
|
| |
| Dog & | operator= (const Dog &other) |
| | Copy assignment operator for Dog. (Copy And Swap Idiom) Displays a specific copy assignment message.
|
| |
| virtual | ~Dog () |
| | Destructor for Dog. Displays a specific destruction message.
|
| |
| virtual void | makeSound () const |
| | Makes the characteristic sound of a dog ("Woof!"). This function overrides the virtual makeSound() from the Animal class.
|
| |
| | Dog () |
| |
| | Dog (const Dog &other) |
| |
| Dog & | operator= (const Dog &other) |
| |
| virtual | ~Dog () |
| |
| virtual void | makeSound () const |
| | Makes a generic animal sound. This implementation is for the base Animal class. Derived classes are expected to override this function.
|
| |
| void | bark () const |
| | Makes a specific barking sound for a Dog. This is a Dog-specific method.
|
| |
| Brain * | getBrain () const |
| | Gets a pointer to the Dog's Brain object.
|
| |
| | Dog () |
| |
| | Dog (const Dog &other) |
| |
| Dog & | operator= (const Dog &other) |
| |
| virtual | ~Dog () |
| |
| virtual void | makeSound () const |
| | Makes a generic animal sound. This implementation is for the base Animal class. Derived classes are expected to override this function.
|
| |
| void | bark () const |
| |
| Brain * | getBrain () const |
| |
| | Animal () |
| | Default constructor for Animal. Initializes the type to "Generic Animal". Displays a construction message.
|
| |
| | Animal (const Animal &other) |
| | Copy constructor for Animal. Copies the type from the other Animal object. Displays a copy construction message.
|
| |
| Animal & | operator= (const Animal &other) |
| | Copy assignment operator for Animal. Assigns the type from the other Animal object. Handles self-assignment. Displays a copy assignment message.
|
| |
| virtual | ~Animal () |
| | Destructor for Animal. Displays a destruction message.
|
| |
| const std::string & | getType () const |
| | Gets the type of the animal.
|
| |
| | Animal () |
| |
| | Animal (const Animal &other) |
| |
| Animal & | operator= (const Animal &other) |
| |
| virtual | ~Animal () |
| |
| const std::string & | getType () const |
| |
| | Animal () |
| |
| | Animal (const Animal &other) |
| |
| Animal & | operator= (const Animal &other) |
| |
| virtual | ~Animal () |
| |
| const std::string & | getType () const |
| |
The Dog class represents a canine animal.
This class inherits from the Animal base class and provides specific implementations for a dog's behavior, particularly its sound. It demonstrates polymorphism by overriding the virtual makeSound() function.
Dog.hpp の 33 行目に定義があります。