Standard SystemC AMS extensions Language Reference Manual March 8 2010
Copyright © 2008-2010 by the Open SystemC Initiative (OSCI). All rights reserved.
5
• Cross references to terms defined in Subclause 2.1, “Terminology”, Subclause 2.2, “Syntactical
conventions”, and Annex B, “Glossary”.
• Arguments of member functions in class definitions and in the text that are generally substituted with
real values by the implementation or application.
2. The bold font is used for all reserved keywords of SystemC and the AMS extensions as defined in
namespaces, macros, constants, enum literals, classes, member functions, data members and types.
3. The constant-width (Courier) font is used:
• for the SystemC AMS class definition including its member functions, data members and data types.
• to illustrate SystemC AMS language examples when the exact usage is depicted.
• for references to the SystemC AMS language syntax and headers.
The conventions listed previously are for ease of reading only. Editorial inconsistencies in the use of
typography are unintentional and have no normative meaning in this standard.
2.4. Semantic conventions
2.4.1. Class definitions and the inheritance hierarchy
An implementation may differ from this standard in that an implementation may introduce additional base
classes, class members, and friends to the classes defined in this standard. An implementation may modify
the inheritance hierarchy by moving class members defined by this standard into base classes not defined
by this standard. Such additions and modifications may be made as necessary in order to implement the
semantics defined by this standard or in order to introduce additional functionality not defined by this
standard.
2.4.2. Function definitions and side-effects
This standard explicitly defines the semantics of the C++ functions for the AMS class library for SystemC.
Such functions shall not have any side-effects that would contradict the behavior explicitly mandated by
this standard. In general, the reader should assume the common-sense rule that if it is explicitly stated that
a function shall perform action A, that function shall not perform any action other than A, either directly
or by calling another function defined in this standard. However, a function may, and indeed in certain
circumstances shall, perform any tasks necessary for resource management, performance optimization, or to
support any ancillary features of an implementation. As an example of resource management, it is assumed
that a destructor will perform any tasks necessary to release the resources allocated by the corresponding
constructor. As an example of an ancillary feature, an implementation could have the constructor for class
sca_core::sca_module increment a count of the number of module instances in the module hierarchy.
2.4.3. Functions whose return type is a reference or a pointer
Many functions in this standard return a reference to an object or a pointer to an object, that is, the return
type of the function is a reference or a pointer. This subclause gives some general rules defining the lifetime
and the validity of such objects.
An object returned from a function by pointer or by reference is said to be valid during any period in which
the object is not deleted and the value or behavior of the object remains accessible to the application. If
an application refers to the returned object after it ceases to be valid, the behavior of the implementation
shall be undefined.
2.4.3.1. Functions that return *this or an actual argument
In certain cases, the object returned is either an object (*this) returned by reference from its own member
function (for example, the assignment operators), or is an object that was passed by reference as an actual
argument to the function being called (for example, std::ostream& operator<<(std::ostream&, const T&) ).
In either case, the function call itself places no additional obligations on the implementation concerning the
lifetime and validity of the object following return from the function call.