LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Aggregation.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef AGGREGATION_H_6014714286
16#define AGGREGATION_H_6014714286
17
24
25namespace LibCarna
26{
27
28namespace base
29{
30
31
32
33// ----------------------------------------------------------------------------------
34// Aggregation
35// ----------------------------------------------------------------------------------
36
42template< typename AssociatedObjectType >
43class Aggregation : public Association< AssociatedObjectType >
44{
45
48 {
49 }
50
51public:
52
57
66
70 explicit Aggregation( AssociatedObjectType& associatedObject )
71 : Association< AssociatedObjectType >( &associatedObject )
72 {
73 }
74
82
83}; // Aggregation
84
85
86template< typename AssociatedObjectType >
87const Aggregation< AssociatedObjectType > Aggregation< AssociatedObjectType >::NULL_PTR
89
90
91
92} // namespace LibCarna :: base
93
94} // namespace LibCarna
95
96#endif // AGGREGATION_H_6014714286
Defines LibCarna::base::Association.
Represents an aggregation, i.e. a weak reference.
static const Aggregation< AssociatedObjectType > NULL_PTR
Holds instance of this class template that behaves like a nullptr pointer.
Aggregation(const Aggregation< AssociatedObjectType > &other)
Copies reference from other.
static Aggregation< AssociatedObjectType > createNullPtr()
Creates instance of this class template that behaves like a nullptr pointer. For internal usage only....
Aggregation(AssociatedObjectType &associatedObject)
Instantiates.
Represents an association.
AssociatedObjectType * get() const
Returns raw pointer to the referenced object.