torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NetAttributes.cpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
17 
18 namespace torc {
19 namespace generic {
20 
21 void NetAttributes::setCriticality(const int32_t& inSource) {
22  mCriticality = inSource;
23  mCriticalitySet = true;
24 }
25 
26 void NetAttributes::setNetDelay(const NetDelay& inSource) {
27  mNetDelay = inSource;
28  mNetDelaySet = true;
29 }
30 
31 NetAttributes::NetAttributes() : mCriticality(), mNetDelay(), mCriticalitySet(false),
32  mNetDelaySet(false) {}
33 
35 
36 NetAttributes::NetAttributes(const NetAttributes& inSource) : mCriticality(inSource.mCriticality),
37  mNetDelay(inSource.mNetDelay), mCriticalitySet(inSource.mCriticalitySet),
38  mNetDelaySet(inSource.mNetDelaySet) {}
39 
41  if(this != &inSource) {
42  mCriticality = inSource.mCriticality;
43  mNetDelay = inSource.mNetDelay;
45  mNetDelaySet = inSource.mNetDelaySet;
46  }
47  return *this;
48 }
49 
50 } // namespace generic
51 } // namespace torc
void setCriticality(const int32_t &value)
Represents attributes of a Net object.
void setNetDelay(const NetDelay &inSource)
Represents the netDelay attribute of Net.
Definition: NetDelay.hpp:32
NetAttributes & operator=(const NetAttributes &source)