C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
hierarchical-object-interface.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2022 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_HIERARCHICAL_OBJECT_INTERFACE_H
17#define SIMICS_IFACE_HIERARCHICAL_OBJECT_INTERFACE_H
18
19#include <string_view>
20#include <string>
21#include "../conf-object.h"
22
23namespace simics {
24
25class MappableConfObject;
26class FieldInterface;
27class RegisterInterface;
28class BankInterface;
29
30enum class Level {BANK = 0, REGISTER = 1, FIELD = 2};
31
33 public:
34 // @return the full name of the object starts with the bank name
35 virtual const std::string &hierarchical_name() const = 0;
36 // @return the name of the object only
37 virtual std::string_view name() const = 0;
38 // @return the description of the object
39 virtual const std::string &description() const = 0;
40 virtual void set_description(std::string_view desc) = 0;
41 // @return the hierarchy level of the object
42 virtual Level hierarchy_level() const = 0;
43 // @return the name of the bank where the hierarchical object starts with
44 virtual std::string_view bank_name() const = 0;
45 // @return the device object holds the bank
46 virtual MappableConfObject *dev_obj() const = 0;
47 // @return the bank ConfObjectRef that the hierarchical object
48 // associated with
49 virtual ConfObjectRef bank_obj_ref() const = 0;
50 // @return the parent's hierarchical name
51 virtual std::string_view parent_name() const = 0;
52 // @return the field interface according to a field name
53 virtual FieldInterface *lookup_field(const std::string &name) const = 0;
54 // @return the register interface according to a register name
56 const std::string &name) const = 0;
57 // @return the bank interface according to a bank name
58 virtual BankInterface *lookup_bank(const std::string &name) const = 0;
59};
60
61} // namespace simics
62
63#endif
Definition: bank-interface.h:45
Represents Simics C type conf_object_t.
Definition: conf-object.h:37
Definition: field-interface.h:34
Definition: hierarchical-object-interface.h:32
virtual std::string_view parent_name() const =0
virtual BankInterface * lookup_bank(const std::string &name) const =0
virtual std::string_view bank_name() const =0
virtual Level hierarchy_level() const =0
virtual const std::string & hierarchical_name() const =0
virtual MappableConfObject * dev_obj() const =0
virtual std::string_view name() const =0
virtual void set_description(std::string_view desc)=0
virtual const std::string & description() const =0
virtual FieldInterface * lookup_field(const std::string &name) const =0
virtual ConfObjectRef bank_obj_ref() const =0
virtual RegisterInterface * lookup_register(const std::string &name) const =0
Definition: mappable-conf-object.h:131
Definition: register-interface.h:36
Definition: attr-value.h:23
Level
Definition: hierarchical-object-interface.h:30