MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
withlab.cc
Go to the documentation of this file.
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 
38 WithLabel::WithLabel(unsigned int uL, const std::string& sN)
39 : uLabel(uL), sName(sN)
40 {
41  NO_OP;
42 }
43 
45 {
46  NO_OP;
47 }
48 
49 void
50 WithLabel::PutLabel(unsigned int uL)
51 {
52  uLabel = uL;
53 }
54 
55 void
56 WithLabel::PutName(const std::string& sN)
57 {
58  sName = sN;
59 }
60 
61 unsigned int
63 {
64  return uLabel;
65 }
66 
67 const std::string&
68 WithLabel::GetName(void) const
69 {
70  return sName;
71 }
72 
73 /* WithLabel - end */
void PutName(const std::string &sN)
Definition: withlab.cc:56
virtual ~WithLabel(void)
Definition: withlab.cc:44
#define NO_OP
Definition: myassert.h:74
unsigned int uLabel
Definition: withlab.h:44
std::string sName
Definition: withlab.h:45
void PutLabel(unsigned int uL)
Definition: withlab.cc:50
const std::string & GetName(void) const
Definition: withlab.cc:68
unsigned int GetLabel(void) const
Definition: withlab.cc:62
WithLabel(unsigned int uL=0, const std::string &sN="")
Definition: withlab.cc:38