Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sc_length_param.cpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003   The following code is derived, directly or indirectly, from the SystemC
00004   source code Copyright (c) 1996-2004 by all Contributors.
00005   All Rights reserved.
00006 
00007   The contents of this file are subject to the restrictions and limitations
00008   set forth in the SystemC Open Source License Version 2.3 (the "License");
00009   You may not use this file except in compliance with such restrictions and
00010   limitations. You may obtain instructions on how to receive a copy of the
00011   License at http://www.systemc.org/. Software distributed by Contributors
00012   under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
00013   ANY KIND, either express or implied. See the License for the specific
00014   language governing rights and limitations under the License.
00015 
00016  *****************************************************************************/
00017 
00018 /*****************************************************************************
00019 
00020   sc_length_param.cpp - 
00021 
00022   Original Author: Martin Janssen, Synopsys, Inc., 2002-03-19
00023 
00024  *****************************************************************************/
00025 
00026 /*****************************************************************************
00027 
00028   MODIFICATION LOG - modifiers, enter your name, affiliation, date and
00029   changes you are making here.
00030 
00031       Name, Affiliation, Date:
00032   Description of Modification:
00033 
00034  *****************************************************************************/
00035 
00036 
00037 #include "systemc/datatypes/int/sc_length_param.h"
00038 
00039 
00040 namespace sc_dt
00041 {
00042 
00043 // ----------------------------------------------------------------------------
00044 //  CLASS : sc_length_param
00045 //
00046 //  Length parameter type.
00047 // ----------------------------------------------------------------------------
00048 
00049 const sc_string
00050 sc_length_param::to_string() const
00051 {
00052     sc_string s;
00053 
00054     char buf[BUFSIZ];
00055 
00056     s += "(";
00057     sprintf( buf, "%d", m_len );
00058     s += buf;
00059     s += ")";
00060 
00061     return s;
00062 }
00063 
00064 
00065 void
00066 sc_length_param::print( ostream& os ) const
00067 {
00068     os << to_string();
00069 }
00070 
00071 void
00072 sc_length_param::dump( ostream& os ) const
00073 {
00074     os << "sc_length_param" << endl;
00075     os << "(" << endl;
00076     os << "len = " << m_len << endl;
00077     os << ")" << endl;
00078 }
00079 
00080 } // namespace sc_dt
00081 
00082 
00083 // Taf!

Generated on Fri Jan 14 08:29:03 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18