sc_vector.hh (13271:f001f9287ba3) sc_vector.hh (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

--- 43 unchanged lines hidden (view full) ---

52#include <stdint.h>
53
54#include <exception>
55#include <iterator>
56#include <vector>
57
58#include "../core/sc_module.hh"
59#include "../core/sc_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

--- 43 unchanged lines hidden (view full) ---

52#include <stdint.h>
53
54#include <exception>
55#include <iterator>
56#include <vector>
57
58#include "../core/sc_module.hh"
59#include "../core/sc_object.hh"
60#include "messages.hh"
60
61namespace sc_gem5
62{
63
64// Goop for supporting sc_vector_iter, simplified from the Accellera version.
65
66#if __cplusplus >= 201103L
67

--- 109 unchanged lines hidden (view full) ---

177
178 // What's returned by get_elements, which really returns the elemenets
179 // which are also objects.
180 mutable std::vector<sc_object *> elements;
181
182 sc_object *implicitCast(sc_object *p) const { return p; }
183 sc_object *implicitCast(...) const
184 {
61
62namespace sc_gem5
63{
64
65// Goop for supporting sc_vector_iter, simplified from the Accellera version.
66
67#if __cplusplus >= 201103L
68

--- 109 unchanged lines hidden (view full) ---

178
179 // What's returned by get_elements, which really returns the elemenets
180 // which are also objects.
181 mutable std::vector<sc_object *> elements;
182
183 sc_object *implicitCast(sc_object *p) const { return p; }
184 sc_object *implicitCast(...) const
185 {
185 SC_REPORT_ERROR(
186 "(E808) sc_vector::get_elements called for element type "
187 "not derived from sc_object", name());
186 SC_REPORT_ERROR(SC_ID_VECTOR_NONOBJECT_ELEMENTS_, name());
188 return nullptr;
189 }
190 virtual sc_object *objectCast(void *) const = 0;
191
192 void checkIndex(size_type index) const;
193 void forceParent() const;
194 void unforceParent() const;
195

--- 594 unchanged lines hidden ---
187 return nullptr;
188 }
189 virtual sc_object *objectCast(void *) const = 0;
190
191 void checkIndex(size_type index) const;
192 void forceParent() const;
193 void unforceParent() const;
194

--- 594 unchanged lines hidden ---