ilang  1.1.4
ILAng: A Modeling and Verification Platform for SoCs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros
object.h
Go to the documentation of this file.
1 
4 #ifndef ILANG_ILA_OBJECT_H__
5 #define ILANG_ILA_OBJECT_H__
6 
7 #include <memory>
8 #include <string>
9 
10 #include <ilang/ila/symbol.h>
11 
13 namespace ilang {
14 
17 class Object {
18 public:
19  // ------------------------- CONSTRUCTOR/DESTRUCTOR ----------------------- //
21  Object();
23  Object(const std::string& name);
25  virtual ~Object();
26 
28  typedef std::shared_ptr<Object> ObjPtr;
29 
30  // ------------------------- ACCESSORS/MUTATORS --------------------------- //
32  const Symbol& name() const;
33 
35  virtual bool is_instr_lvl_abs() const { return false; }
37  virtual bool is_instr() const { return false; }
39  virtual bool is_ast() const { return false; }
40 
41  // ------------------------- METHODS -------------------------------------- //
43  virtual std::ostream& Print(std::ostream& out) const = 0;
44 
45 private:
46  // ------------------------- MEMBERS -------------------------------------- //
48  Symbol symbol_;
49 
50  // ------------------------- HELPERS -------------------------------------- //
51 
52 }; // class Object
53 
56 
57 } // namespace ilang
58 
59 #endif // ILANG_ILA_OBJECT_H__
virtual bool is_ast() const
Is type Ast.
Definition: object.h:39
virtual bool is_instr_lvl_abs() const
Is type InstrLvlAbs.
Definition: object.h:35
virtual bool is_instr() const
Is type Instr.
Definition: object.h:37
virtual ~Object()
Default destructor.
virtual std::ostream & Print(std::ostream &out) const =0
Output function.
std::shared_ptr< Object > ObjPtr
Pointer type for normal use of Object.
Definition: object.h:28
The basest type in the ILA structure. It can be either Ast, Instr, or InstrLvlAbs.
Definition: object.h:17
The symbol is the name and ID of an object. Every object has an unique symbol.
Definition: symbol.h:16
Object::ObjPtr ObjPtr
Pointer type for normal use of Object.
Definition: object.h:55
Object()
Default constructor.
const Symbol & name() const
Get the symbol (name).