CoreLinux++  0.4.32
Prototype.hpp
1 #if !defined(__PROTOTYPE_HPP)
2 #define __PROTOTYPE_HPP
3 
4 /*
5  CoreLinux++
6  Copyright (C) 1999 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 namespace corelinux
29 {
35  template< class TypeImpl >
36  class Prototype : public CoreLinuxObject
37  {
38  public:
39 
40  //
41  // Constructors and destructor
42  //
43 
45 
46  Prototype( void )
47  :
49  {
50  ; // do nothing
51  }
52 
58  Prototype( const Prototype & aPrototype )
59  :
60  CoreLinuxObject( aPrototype )
61  {
62  ; // do nothing
63  }
64 
66 
67  virtual ~Prototype( void )
68  {
69  ; // do nothing
70  }
71 
72  //
73  // Operator overload
74  //
75 
82  Prototype & operator=( const Prototype & aPrototype )
83  {
84  CoreLinuxObject::operator=( aPrototype );
85  return ( *this );
86  }
87 
94  bool operator==( const Prototype & aPrototype ) const
95  {
96  return CoreLinuxObject::operator==( aPrototype );
97  }
98 
99  //
100  // Pure virtual methods
101  //
102 
109  virtual TypeImpl * clone( void ) const = 0 ;
110 
111 
112  };
113 }
114 
115 #endif // if !defined(__PROTOTYPE_HPP)
116 
117 /*
118  Common rcs information do not modify
119  $Author: prudhomm $
120  $Revision: 1.1 $
121  $Date: 2000/04/23 20:43:13 $
122  $Locker: $
123 */
124 
Prototype & operator=(const Prototype &aPrototype)
Assignment operator.
Definition: Prototype.hpp:82
bool operator==(const Prototype &aPrototype) const
Equality operator.
Definition: Prototype.hpp:94
virtual ~Prototype(void)
Virtual destructor.
Definition: Prototype.hpp:67
Specify the kinds of objects to create using a prototypical instance, and create new objects by copyi...
Definition: Prototype.hpp:36
virtual TypeImpl * clone(void) const =0
clone is used to create a copy of the current prototype instance.
Prototype(const Prototype &aPrototype)
Copy constructor.
Definition: Prototype.hpp:58
An CoreLinuxObject is a base class for the library.
Definition: CoreLinuxObject.hpp:39
CoreLinuxObjectRef operator=(CoreLinuxObjectCref)
Assignment operator overload.
Definition: CoreLinuxObject.cpp:58
Prototype(void)
Default constructor.
Definition: Prototype.hpp:46
bool operator==(CoreLinuxObjectCref) const
Equality operator overload.
Definition: CoreLinuxObject.cpp:67

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