~ubuntu-branches/ubuntu/gutsy/libcorelinux/gutsy

« back to all changes in this revision

Viewing changes to src/testdrivers/ex6/Equipment.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2001-12-29 17:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20011229174334-ejlsuilsiro5vmzr
Tags: 0.4.32-4
* fix config.{guess,sub} out of date on hppa and s390 (closes: #124296,#121830)
* try to be more descriptive in the description of the package  (closes: #115758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  CoreLinux++ 
 
3
  Copyright (C) 1999,2000 CoreLinux Consortium
 
4
  
 
5
   The CoreLinux++ Library is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Library General Public License as
 
7
   published by the Free Software Foundation; either version 2 of the
 
8
   License, or (at your option) any later version.
 
9
 
 
10
   The CoreLinux++ Library Library is distributed in the hope that it will 
 
11
   be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
   Library General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU Library General Public
 
16
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
 
17
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
   Boston, MA 02111-1307, USA.  
 
19
*/   
 
20
 
 
21
#if   !defined(__COMMON_HPP)
 
22
#include <Common.hpp>
 
23
#endif
 
24
 
 
25
#if   !defined(__EQUIPMENT_HPP)
 
26
#include <Equipment.hpp>
 
27
#endif
 
28
 
 
29
using namespace corelinux;
 
30
 
 
31
//
 
32
// Default constructor throws
 
33
// exception
 
34
//
 
35
 
 
36
Equipment::Equipment( void ) throw( CompositeException )
 
37
   :
 
38
   theName("")
 
39
{
 
40
   throw CompositeException( LOCATION );
 
41
}
 
42
 
 
43
//
 
44
// Valid default constructor
 
45
//
 
46
 
 
47
Equipment::Equipment( NameCref aName )
 
48
   :
 
49
   theName( aName )
 
50
{
 
51
   ;  // do nothing
 
52
}
 
53
 
 
54
//
 
55
// Copy constructor
 
56
//
 
57
 
 
58
Equipment::Equipment( EquipmentCref aRef )
 
59
   :
 
60
   theName( aRef.getName() )
 
61
{
 
62
   ;  // do nothing
 
63
}
 
64
 
 
65
//
 
66
// Destructor
 
67
//
 
68
 
 
69
Equipment::~Equipment( void )
 
70
{
 
71
   ;  // do nothing
 
72
}
 
73
 
 
74
//
 
75
// Assignment operator throws exception
 
76
//
 
77
 
 
78
EquipmentRef   Equipment::operator=( EquipmentCref )
 
79
   throw(CORELINUX(CompositeException))
 
80
{
 
81
   throw CompositeException( LOCATION );
 
82
   return (*this);
 
83
}
 
84
 
 
85
//
 
86
// Equality operator overload
 
87
//
 
88
 
 
89
bool  Equipment::operator==( EquipmentCref aRef ) const
 
90
{
 
91
   return (theName == aRef.getName() );
 
92
}
 
93
 
 
94
//
 
95
// Retrieve theName
 
96
//
 
97
 
 
98
NameCref Equipment::getName( void ) const
 
99
{
 
100
   return theName;
 
101
}
 
102
 
 
103
/*
 
104
   Common rcs information do not modify
 
105
   $Author: frankc $
 
106
   $Revision: 1.1 $
 
107
   $Date: 2000/01/21 03:44:01 $
 
108
   $Locker:  $
 
109
*/
 
110