Caffa  1.1.0
C++ Application Framework for Embedded Systems with introspection
cafVisitor.h
1 // ##################################################################################################
2 //
3 // CAFFA
4 // Copyright (C) 2023- Kontur AS
5 //
6 // GNU Lesser General Public License Usage
7 // This library is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as published by
9 // the Free Software Foundation; either version 2.1 of the License, or
10 // (at your option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
17 // for more details.
18 //
19 // ##################################################################################################
20 #pragma once
21 
22 namespace caffa
23 {
24 class ChildFieldBaseHandle;
25 class ObjectHandle;
26 class FieldHandle;
27 
31 class Inspector
32 {
33 public:
34  virtual void visitObject( const ObjectHandle* object ) = 0;
35  virtual void visitChildField( const ChildFieldBaseHandle* field ) = 0;
36  virtual void visitField( const FieldHandle* field ) = 0;
37 };
38 
42 class Editor
43 {
44 public:
45  virtual void visitObject( ObjectHandle* object ) = 0;
46  virtual void visitChildField( ChildFieldBaseHandle* field ) = 0;
47  virtual void visitField( FieldHandle* field ) = 0;
48 };
49 
50 } // namespace caffa
Definition: cafChildFieldHandle.h:35
Definition: cafVisitor.h:43
Base class for all fields, making it possible to handle them generically.
Definition: cafFieldHandle.h:23
Definition: cafVisitor.h:32
Definition: cafObjectHandle.h:55
Main Caffa namespace.
Definition: __init__.py:1