torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NetDelay.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 /**
22  * Set derivation
23  *
24  * @param[in] value Derivation value
25  */
26 void NetDelay::setDerivation(const Derivation& value) {
27  mDerivation = value;
28 }
29 
30 /**
31  * Set delay value
32  *
33  * @param[in] value Delay value. Must be Value::MiNoMax
34  */
35 void NetDelay::setDelay(const Value::MiNoMax& value) {
36  mDelay = value;
37 }
38 
39 /**
40  * Set the pointer to logic state value(transition/becomes).
41  *
42  * @param[in] inSource Pointer to logic state value(transition/becomes).
43  */
45  mTransition = inSource;
46 }
47 
48 NetDelay::NetDelay() : mDerivation(eDerivationUndefined), mDelay(), mTransition() {}
49 
50 NetDelay::~NetDelay() throw () {}
51 
52 NetDelay::NetDelay(const NetDelay& source) :
53  mDerivation(source.mDerivation), mDelay(source.mDelay), mTransition(source.mTransition) {}
54 
56  if(this != &source) {
57  mDerivation = source.mDerivation;
58  mDelay = source.mDelay;
59  mTransition = source.mTransition;
60  }
61  return *this;
62 }
63 
64 } // namespace generic
65 } // namespace torc
Value::MiNoMax mDelay
Definition: NetDelay.hpp:86
LogicElementSharedPtr mTransition
Definition: NetDelay.hpp:87
boost::shared_ptr< LogicElement > LogicElementSharedPtr
Represents the netDelay attribute of Net.
Definition: NetDelay.hpp:32
void setDerivation(const Derivation &value)
Definition: NetDelay.cpp:26
NetDelay & operator=(const NetDelay &source)
Definition: NetDelay.cpp:55
Derivation mDerivation
Definition: NetDelay.hpp:85
void setDelay(const Value::MiNoMax &value)
Definition: NetDelay.cpp:35
void setTransition(const LogicElementSharedPtr &inSource)
Definition: NetDelay.cpp:44