C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
object-factory-interface.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2021 Intel Corporation
5
6 This software and the related documents are Intel copyrighted materials, and
7 your use of them is governed by the express license under which they were
8 provided to you ("License"). Unless the License provides otherwise, you may
9 not use, modify, copy, publish, distribute, disclose or transmit this software
10 or the related documents without Intel's prior written permission.
11
12 This software and the related documents are provided as is, with no express or
13 implied warranties, other than those that are expressly stated in the License.
14*/
15
16#ifndef SIMICS_IFACE_OBJECT_FACTORY_INTERFACE_H
17#define SIMICS_IFACE_OBJECT_FACTORY_INTERFACE_H
18
19#include <simics/base/conf-object.h>
20
21namespace simics {
22
23class ConfObject;
24
25namespace iface {
26
27/*
28 * An interface support factory pattern to create ConfObject
29 * function create creates a pointer of ConfObject from a pointer of
30 * conf_object_t
31 * function clone clones and returns the current class pointer
32 */
34 public:
35 virtual ~ObjectFactoryInterface() = default;
36 virtual ConfObject *create(conf_object_t *obj) const = 0;
37 virtual ObjectFactoryInterface *clone() const = 0;
38};
39
40} // namespace iface
41} // namespace simics
42
43
44#endif
struct conf_object conf_object_t
Definition: bank-issue-callbacks-interface.h:23
A class inherited by a model class to support Simics configuration.
Definition: conf-object.h:114
Definition: object-factory-interface.h:33
virtual ConfObject * create(conf_object_t *obj) const =0
virtual ObjectFactoryInterface * clone() const =0
Definition: attr-value.h:23