CoreLinux++  0.4.32
Component.hpp
1 #if !defined (__COMPONENT_HPP)
2 #define __COMPONENT_HPP
3 
4 /*
5  CoreLinux++
6  Copyright (C) 1999,2000 CoreLinux Consortium
7 
8  The CoreLinux++ Library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version.
12 
13  The CoreLinux++ Library Library is distributed in the hope that it will
14  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public
19  License along with the GNU C Library; see the file COPYING.LIB. If not,
20  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  Boston, MA 02111-1307, USA.
22 */
23 
24 #if !defined(__COMMON_HPP)
25 #include <Common.hpp>
26 #endif
27 
28 
29 namespace corelinux
30 {
31 
32  DECLARE_CLASS( Visitor );
33  DECLARE_CLASS( Component );
34 
42  class Component : public CoreLinuxObject
43  {
44  public:
45 
47 
48  Component( void );
49 
55 
57 
58  virtual ~Component( void );
59 
60  //
61  // Operator overloads
62  //
70 
77  bool operator==( ComponentCref ) const;
78 
85  bool operator!=( ComponentCref ) const;
86 
87  //
88  // Visitor access
89  //
90 
99  virtual void accept( VisitorPtr ) throw ( NullPointerException );
100 
101  };
102 
103 }
104 
105 #endif // if !defined(__COMPONENT_HPP)
106 
107 /*
108  Common rcs information do not modify
109  $Author: frankc $
110  $Revision: 1.2 $
111  $Date: 2000/05/12 03:27:47 $
112  $Locker: $
113 */
114 
115 
116 
Represent an operation to be performed on the components of an object structure.
Definition: Visitor.hpp:41
bool operator!=(ComponentCref) const
Non-equality operator overload.
Definition: Component.cpp:98
ComponentRef operator=(ComponentCref)
Assignment operator overload.
Definition: Component.cpp:70
A Component declares the interface for the objects in a composition and implements default behavior...
Definition: Component.hpp:42
virtual ~Component(void)
Virtual Destructor.
Definition: Component.cpp:61
Forward reference the various common classes.
Definition: AbstractAllocator.hpp:32
NullPointerException is the base exception type for NullPointer.
Definition: NullPointerException.hpp:40
bool operator==(ComponentCref) const
Equality operator overload.
Definition: Component.cpp:79
virtual void accept(VisitorPtr)
Accept is a double dispatch method which allows components to have new operations defined without cha...
Definition: Component.cpp:107
Component(void)
Default Constructor.
Definition: Component.cpp:39
An CoreLinuxObject is a base class for the library.
Definition: CoreLinuxObject.hpp:39

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium