#include "Teuchos_ConfigDefs.hpp"
Go to the source code of this file.
Defines | |
| #define | STANDARD_MEMBER_COMPOSITION_MEMBERS(TYPE, NAME) |
| Macro that adds <<std member="" comp="">> attributes to any class. | |
Definition in file Teuchos_StandardMemberCompositionMacros.hpp.
|
|
Value: void NAME ( const TYPE & NAME ) { NAME ## _ = NAME ; }\ const TYPE& NAME() const { return NAME ## _; }\ private:\ TYPE NAME ## _;\ public: For example, if you want to include a <<std member="" comp="">> attribute as a member object of type MyClass with the name my_attribute you would include the macro in the public section of YourClass declaration as follows:
class YourClass {
public:
STANDARD_MEMBER_COMPOSITION_MEMBERS( MyClass, my_attribute )
};
private: MyClass my_attribute_;
public:
void my_attribute( const My_Class & my_attribute )
{ my_attribute_ = my_attribute; }
const My_Class& my_attribute() const
{ return my_attribute_; }
Definition at line 71 of file Teuchos_StandardMemberCompositionMacros.hpp. |
1.3.9.1