Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
Teuchos_AbstractFactory.hpp
1
// @HEADER
2
// *****************************************************************************
3
// Teuchos: Common Tools Package
4
//
5
// Copyright 2004 NTESS and the Teuchos contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef TEUCHOS_ABSTRACT_FACTORY_HPP
11
#define TEUCHOS_ABSTRACT_FACTORY_HPP
12
13
#include "
Teuchos_RCP.hpp
"
14
15
namespace
Teuchos
{
16
28
template
<
class
T>
29
class
AbstractFactory
{
30
public
:
31
32
#ifndef DOXYGEN_COMPILE
34
typedef
Teuchos::RCP<T>
obj_ptr_t
;
35
#endif
36
38
virtual
~AbstractFactory
() {}
39
43
virtual
obj_ptr_t
create
()
const
= 0;
44
45
};
// class AbstractFactory
46
47
}
// end Teuchos
48
49
#endif
// TEUCHOS_ABSTRACT_FACTORY_HPP
Teuchos_RCP.hpp
Reference-counted pointer class and non-member templated function implementations.
Teuchos::AbstractFactory
Simple, universal "Abstract Factory" interface for the dynamic creation of objects.
Definition
Teuchos_AbstractFactory.hpp:29
Teuchos::AbstractFactory::~AbstractFactory
virtual ~AbstractFactory()
Definition
Teuchos_AbstractFactory.hpp:38
Teuchos::AbstractFactory::create
virtual obj_ptr_t create() const =0
Create an object of type T returned as a smart reference counting pointer object.
Teuchos::RCP
Smart reference counting pointer class for automatic garbage collection.
Definition
Teuchos_RCPDecl.hpp:397
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0