#include "Teuchos_RefCountPtr.hpp"
Include dependency graph for Teuchos_StandardCompositionMacros.hpp:
Go to the source code of this file.
Defines | |
| #define | STANDARD_COMPOSITION_MEMBERS(TYPE, NAME) |
| Macro that adds <<std comp="">> members for a composition association. | |
| #define | STANDARD_NONCONST_COMPOSITION_MEMBERS(TYPE, NAME) |
| #define | STANDARD_CONST_COMPOSITION_MEMBERS(TYPE, NAME) |
| Macro that adds <<std comp="">> members for a composition association. | |
Definition in file Teuchos_StandardCompositionMacros.hpp.
|
|
Value: void set_ ## NAME (const Teuchos::RefCountPtr< TYPE >& NAME ) \ { NAME ## _ = NAME ; } \ Teuchos::RefCountPtr< TYPE > get_ ## NAME() const \ { return NAME ## _; } \ TYPE& NAME() \ { return *NAME ## _; } \ const TYPE& NAME() const \ { return *NAME ## _; } \ private: \ Teuchos::RefCountPtr< TYPE > NAME ## _; \ public: \ typedef Teuchos::RefCountPtr< TYPE > NAME ## _ptr_t;
This form is for when the object being held will have const attributes the same as the For example, if you want to include a <<std comp="">> association with an non-const object of type MyClass of the name my_object you would include the macro in the public section of YourClass declaration as follows:
class YourClass {
public:
STANDARD_COMPOSITION_MEMBERS( MyClass, my_object )
};
Note that the macro adds the following data member to the class declaration: private: Teuchos::RefCountPtr< TYPE > NAME_; Definition at line 63 of file Teuchos_StandardCompositionMacros.hpp. |
|
|
Value: void set_ ## NAME ( const Teuchos::RefCountPtr< TYPE >& NAME ) \ { NAME ## _ = NAME ; } \ Teuchos::RefCountPtr< TYPE > get_ ## NAME() const \ { return NAME ## _; } \ TYPE& NAME() const \ { return *NAME ## _; } \ private: \ Teuchos::RefCountPtr< TYPE > NAME ## _; \ public: \ typedef Teuchos::RefCountPtr< TYPE > NAME ## _ptr_t;
This form is for when the object being held will have non-const attributes irrespective of the const of For example, if you want to include a <<std comp="">> association with an non-const object of type MyClass of the name my_object you would include the macro in the public section of YourClass declaration as follows:
class YourClass {
public:
STANDARD_NONCONST_COMPOSITION_MEMBERS( MyClass, my_object )
};
Note that the macro adds the following data member to the class declaration: private: Teuchos::RefCountPtr< TYPE > NAME_; Definition at line 102 of file Teuchos_StandardCompositionMacros.hpp. |
|
|
Value: public: \ void set_ ## NAME ( const Teuchos::RefCountPtr< const TYPE >& NAME ) \ { NAME ## _ = NAME ; } \ Teuchos::RefCountPtr< const TYPE > get_ ## NAME() const \ { return NAME ## _; } \ const TYPE& NAME() const \ { return *NAME ## _; } \ private: \ Teuchos::RefCountPtr< const TYPE > NAME ## _; \ public: \ typedef Teuchos::RefCountPtr< const TYPE > NAME ## _ptr_t;
This form is for when the object being held will have const attributes irrespective of the const of For example, if you want to include a <<std comp="">> association with a const object of type MyClass of the name my_object you would include the macro in the public section of YourClass declaration as follows:
class YourClass {
public:
STANDARD_CONST_COMPOSITION_MEMBERS( MyClass, my_object )
};
Note that the macro adds the following data member to the class declaration: private: NAME_ptr_t NAME_; Definition at line 139 of file Teuchos_StandardCompositionMacros.hpp. |
1.3.9.1