sc_vector.cc (13271:f001f9287ba3) | sc_vector.cc (13322:7391057615bd) |
---|---|
1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 36 unchanged lines hidden (view full) --- 45 * 46 * Authors: Gabe Black 47 */ 48 49#include <sstream> 50 51#include "base/cprintf.hh" 52#include "systemc/core/object.hh" | 1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 36 unchanged lines hidden (view full) --- 45 * 46 * Authors: Gabe Black 47 */ 48 49#include <sstream> 50 51#include "base/cprintf.hh" 52#include "systemc/core/object.hh" |
53#include "systemc/ext/utils/messages.hh" |
|
53#include "systemc/ext/utils/sc_report_handler.hh" 54#include "systemc/ext/utils/sc_vector.hh" 55 56namespace sc_core 57{ 58 59sc_vector_base::size_type sc_vector_base::size() const { return objs.size(); } 60 --- 10 unchanged lines hidden (view full) --- 71} 72 73void 74sc_vector_base::checkIndex(size_type index) const 75{ 76 if (index >= size()) { 77 std::ostringstream ss; 78 ccprintf(ss, "%s[%d] >= size() = %d", name(), index, size()); | 54#include "systemc/ext/utils/sc_report_handler.hh" 55#include "systemc/ext/utils/sc_vector.hh" 56 57namespace sc_core 58{ 59 60sc_vector_base::size_type sc_vector_base::size() const { return objs.size(); } 61 --- 10 unchanged lines hidden (view full) --- 72} 73 74void 75sc_vector_base::checkIndex(size_type index) const 76{ 77 if (index >= size()) { 78 std::ostringstream ss; 79 ccprintf(ss, "%s[%d] >= size() = %d", name(), index, size()); |
79 SC_REPORT_ERROR("(E5) out of bounds", ss.str().c_str()); | 80 SC_REPORT_ERROR(sc_core::SC_ID_OUT_OF_BOUNDS_, ss.str().c_str()); |
80 sc_abort(); 81 } 82} 83 84void 85sc_vector_base::forceParent() const 86{ 87 sc_gem5::pushParentObj(get_parent_object()); --- 14 unchanged lines hidden (view full) --- 102 103 if (!size()) 104 ss << "not initialised yet"; 105 else if (empty_dest) 106 ss << "empty range given"; 107 else 108 ss << "empty destination range given"; 109 | 81 sc_abort(); 82 } 83} 84 85void 86sc_vector_base::forceParent() const 87{ 88 sc_gem5::pushParentObj(get_parent_object()); --- 14 unchanged lines hidden (view full) --- 103 104 if (!size()) 105 ss << "not initialised yet"; 106 else if (empty_dest) 107 ss << "empty range given"; 108 else 109 ss << "empty destination range given"; 110 |
110 SC_REPORT_WARNING("(W807) sc_vector::bind called with empty range", 111 ss.str().c_str()); | 111 SC_REPORT_WARNING(SC_ID_VECTOR_BIND_EMPTY_, ss.str().c_str()); |
112} 113 114} // namespace sc_core | 112} 113 114} // namespace sc_core |