μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
Dog Struct Reference
Inheritance diagram for Dog:
[legend]
Collaboration diagram for Dog:
[legend]

Public Member Functions

 Dog (const std::string &_name, Kind _kind=Kind::Dog)
 
std::string bark () const
 
 Dog (const std::string &_name, Kind _kind=Kind::Dog)
 
std::string bark () const
 
- Public Member Functions inherited from Animal
virtual ~Animal ()=default
 
virtual ~Animal ()=default
 

Public Attributes

std::string sound = "WOOF!"
 
- Public Attributes inherited from Animal
const Kind kind
 
const std::string name
 

Additional Inherited Members

- Public Types inherited from Animal
enum class  Kind {
  Unknown = 0 , Dog = 100 , Labrador , Chihuahua ,
  LastDog = 199 , Cat = 200 , Panther , LastCat = 299 ,
  Unknown = 0 , Dog = 100 , Labrador , Chihuahua ,
  LastDog = 199 , Cat = 200 , Panther , LastCat = 299
}
 
enum class  Kind {
  Unknown = 0 , Dog = 100 , Labrador , Chihuahua ,
  LastDog = 199 , Cat = 200 , Panther , LastCat = 299 ,
  Unknown = 0 , Dog = 100 , Labrador , Chihuahua ,
  LastDog = 199 , Cat = 200 , Panther , LastCat = 299
}
 
- Static Public Member Functions inherited from Animal
static const std::type_info * type_of_kind (Kind kind)
 
static std::string name_of_kind (Kind kind)
 
static const std::type_info * type_of_kind (Kind kind)
 
static std::string name_of_kind (Kind kind)
 
- Protected Member Functions inherited from Animal
 Animal (const std::string &_name, Kind _kind)
 
 Animal (const std::string &_name, Kind _kind)
 

Detailed Description

Definition at line 41 of file test_tagbased_polymorphic.cpp.

Constructor & Destructor Documentation

◆ Dog() [1/2]

Dog::Dog ( const std::string &  _name,
Kind  _kind = Kind::Dog 
)
inlineexplicit

Definition at line 42 of file test_tagbased_polymorphic.cpp.

◆ Dog() [2/2]

Dog::Dog ( const std::string &  _name,
Kind  _kind = Kind::Dog 
)
inlineexplicit

Definition at line 42 of file test_tagbased_polymorphic.cpp.

Member Function Documentation

◆ bark() [1/2]

std::string Dog::bark ( ) const
inline

Definition at line 43 of file test_tagbased_polymorphic.cpp.

References Animal::kind, Animal::name_of_kind(), and sound.

Referenced by Chihuahua::bark(), and TEST_SUBMODULE().

◆ bark() [2/2]

std::string Dog::bark ( ) const
inline

Definition at line 43 of file test_tagbased_polymorphic.cpp.

References Animal::kind, Animal::name_of_kind(), and sound.

Member Data Documentation

◆ sound

std::string Dog::sound = "WOOF!"

Definition at line 44 of file test_tagbased_polymorphic.cpp.

Referenced by bark(), Chihuahua::Chihuahua(), and TEST_SUBMODULE().


The documentation for this struct was generated from the following files: