GL Studio SCECpp Runtime Library
gls_composite_object.h
Go to the documentation of this file.
1 #ifndef _GLS_COMPOSITE_OBJECT_H
2 #define _GLS_COMPOSITE_OBJECT_H
3 
4 /*! \file gls_composite_object.h
5 \brief This header defines the GlsCompositeObject class used in
6  the GL Studio DO-178B Runtime Library.
7 
8 \par Copyright Information
9 Copyright (C) 1999-2012 The DiSTI Corporation<br>
10 Orlando, FL USA<br>
11 All rights reserved.<br>
12 
13  This file is copyrighted software and contains proprietary trade secrets of
14 DiSTI, and embodies substantial creative efforts as well as confidential
15 information, ideas, and expressions.
16 
17  Permission to use, and copy this software and its documentation for any
18 purpose is hereby granted per the Distribution Agreement and/or the Licensing
19 Agreement signed with DiSTI. This permission is granted provided that:
20  1. The above copyright notice appears in all copies.
21  2. That both the copyright notice and this permission notice appear in
22  the supporting documentation.
23  3. That the names DiSTI and GL Studio not be used in advertising or
24  publicity pertaining to distribution of the software without specific,
25  written prior permission of DiSTI.
26 
27  Permission to modify the software is granted, but not the right to
28 distribute the source code whether modified, or non-modified. Modifying the
29 software might invalidate the DO-178B certification package.
30 
31  Permission to distribute binaries produced by compiling source code, or
32 modified source code is granted, provided you:
33  1. Provide your name and address as the primary contact for the support
34  of your modified version.
35  2. Retain our contact information in regard to use of the base software.
36 
37  DiSTI does not provide warranty for this software or guarantee that it
38 satisfies any specification or requirement unless otherwise stated in a
39 specific contractual arrangement between the customer and DiSTI.
40 
41 */
42 
43 #include "gls_include.h"
44 #include "gls_render_settings.h"
45 #include "gls_display_object.h"
46 #include "gls_class_invariant.h"
47 
48 /** The GlsCompositeObject is an abstract base class that serves as an interface for manipulating
49  * sets of display objects.
50  * \invariant base class invariant holds
51  */
53 {
54 public:
56 
57  /** Initialization parameters for a GlsCompositeObject */
59  {
60  const GlsDisplayObject::InitParameters displayInitParameters; /**< init parameters for base class */
61 
62  #if defined( GLS_DEBUG )
63  /** Determine if the initialization parameters are valid ( GLS_DEBUG only )
64  * \return GLS_TRUE if valid else GLS_FALSE
65  * \pre none
66  * \post none
67  */
68  GlsBool IsValid( void ) const;
69  #endif // GLS_DEBUG
70  };
71 
72  /** Set the alpha mode of the contained objects
73  * \param alphaMode desired alpha mode
74  * \pre GlsAlphaModeIsValid( alphaMode )
75  * \post contained objects have new alpha mode
76  */
77  virtual void SetChildrenAlphaMode( const GlsAlphaMode alphaMode ) = 0;
78 
79  /** Set the fill color of the contained objects
80  * \param fillColor desired fill color
81  * \pre fillColor.IsValid()
82  * \post contained objects have new fill color
83  */
84  virtual void SetChildrenFillColor( const GlsColor &fillColor ) = 0;
85 
86  /** Set the line color of the contained objects
87  * \param lineColor desired line color
88  * \pre lineColor.IsValid()
89  * \post contained objects have new line color
90  */
91  virtual void SetChildrenLineColor( const GlsColor &lineColor )= 0;
92 
93  /** Set the line width of the contained objects
94  * \param lineWidth new line width, GlsRenderObject::LINE_WIDTH_MIN <= lineWidth <= GlsRenderObject::LINE_WIDTH_MAX
95  * \pre GlsLineWidthIsValid( lineWidth )
96  * \post contained objects have new line width
97  */
98  virtual void SetChildrenLineWidth( const GlsFloat32 lineWidth )= 0;
99 
100  /** Set the polygon mode of the contained objects
101  * \param polygonMode new polygon mode
102  * \pre GlsPolygonModeIsValid( polygonMode )
103  * \post contained objects have new polygon mode
104  */
105  virtual void SetChildrenPolygonMode( const GlsPolygonMode polygonMode )= 0;
106 
107 protected:
108  /** Constructor - create instance
109  * \param initParameters initialization parameters for instance
110  * \param eventDispatcher event dispatcher for this object else GLS_NULL
111  * \pre initParameters.IsValid()
112  * \post instance is constructed
113  */
114  GlsCompositeObject( const InitParameters &initParameters, GlsEventDispatcher* const eventDispatcher );
115 
116  /** Destructor - shall never be called
117  * \pre none
118  * \post none
119  */
120  virtual ~GlsCompositeObject();
121 
122 private:
123  typedef GlsDisplayObject _BaseClass; /**< base class alias */
124 
125  // Disable implicit generated Members
126  GlsCompositeObject& operator=( const GlsCompositeObject &rhs );
128 };
129 
130 #endif // _GLS_COMPOSITE_OBJECT_H
Definition: gls_event.h:304
This header defines the base class for all graphical objects in the GL Studio DO-178B Runtime Library...
virtual ~GlsCompositeObject()
GlsPolygonMode
Definition: gls_render_settings.h:131
GlsAlphaMode
Definition: gls_render_settings.h:162
This header defines a GLS_DEBUG only macro for facilitating evaluating class invariants in the GL Stu...
const GlsDisplayObject::InitParameters displayInitParameters
Definition: gls_composite_object.h:60
Definition: gls_composite_object.h:58
This header defines the basic render setting types used in the GL Studio DO-178B Runtime Library...
Definition: gls_composite_object.h:52
virtual void SetChildrenAlphaMode(const GlsAlphaMode alphaMode)=0
This header defines any preprocessor defines needed to configure the GL Studio DO-178B Runtime Librar...
virtual void SetChildrenFillColor(const GlsColor &fillColor)=0
Definition: gls_display_object.h:110
float GlsFloat32
Definition: gls_types.h:78
virtual void SetChildrenLineWidth(const GlsFloat32 lineWidth)=0
#define GLS_CLASS_INVARIANT_DECLARATION(ClassName)
Definition: gls_class_invariant.h:80
virtual void SetChildrenLineColor(const GlsColor &lineColor)=0
bool GlsBool
Definition: gls_types.h:96
GlsCompositeObject(const InitParameters &initParameters, GlsEventDispatcher *const eventDispatcher)
virtual void SetChildrenPolygonMode(const GlsPolygonMode polygonMode)=0
Definition: gls_color.h:47
Definition: gls_display_object.h:64