1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/libraries/libmbutil/withlab.cc,v 1.10 2017/01/12 14:44:05 masarati Exp $ */
2 /*
3 * This library comes with MBDyn (C), a multibody analysis code.
4 * http://www.mbdyn.org
5 *
6 * Copyright (C) 1996-2017
7 *
8 * Pierangelo Masarati <masarati@aero.polimi.it>
9 *
10 * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
11 * via La Masa, 34 - 20156 Milano, Italy
12 * http://www.aero.polimi.it
13 *
14 * Changing this copyright notice is forbidden.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation (version 2 of the License).
19 *
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 */
30
31 #include "mbconfig.h" /* This goes first in every *.c,*.cc file */
32
33 #include "withlab.h"
34
35
36 /* WithLabel - begin */
37
WithLabel(unsigned int uL,const std::string & sN)38 WithLabel::WithLabel(unsigned int uL, const std::string& sN)
39 : uLabel(uL), sName(sN)
40 {
41 NO_OP;
42 }
43
~WithLabel(void)44 WithLabel::~WithLabel(void)
45 {
46 NO_OP;
47 }
48
49 void
PutLabel(unsigned int uL)50 WithLabel::PutLabel(unsigned int uL)
51 {
52 uLabel = uL;
53 }
54
55 void
PutName(const std::string & sN)56 WithLabel::PutName(const std::string& sN)
57 {
58 sName = sN;
59 }
60
61 unsigned int
GetLabel(void) const62 WithLabel::GetLabel(void) const
63 {
64 return uLabel;
65 }
66
67 const std::string&
GetName(void) const68 WithLabel::GetName(void) const
69 {
70 return sName;
71 }
72
73 /* WithLabel - end */
74