GL Studio C++ Runtime API
GlsMultiVal< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > Class Template Reference

#include <util.h>

Inheritance diagram for GlsMultiVal< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >:
GlsMultiValBase

Public Member Functions

 GlsMultiVal ()
 
 GlsMultiVal (const GlsMultiVal &src)
 
 GlsMultiVal (const T1 &val1, const T2 &val2=T2(), const T3 &val3=T3(), const T4 &val4=T4(), const T5 &val5=T5(), const T6 &val6=T6(), const T7 &val7=T7(), const T8 &val8=T8(), const T9 &val9=T9(), const T10 &val10=T10())
 
virtual bool operator== (const GlsMultiVal &val) const
 
virtual bool operator!= (const GlsMultiVal &val) const
 
virtual void StreamOut (ostreamType &outstr) const override
 
virtual void StreamIn (istreamType &instr) override
 
virtual void StreamOut (ostreamType &outstr) const =0
 
virtual void StreamIn (istreamType &instr)=0
 

Public Attributes

T1 _val1
 The first value.
 
T2 _val2
 The second value.
 
T3 _val3
 The third value.
 
T4 _val4
 The fourth value.
 
T5 _val5
 The fifth value.
 
T6 _val6
 The sixth value.
 
T7 _val7
 The seventh value.
 
T8 _val8
 The eighth value.
 
T9 _val9
 The ninth value.
 
T10 _val10
 The tenth value.
 

Additional Inherited Members

- Public Types inherited from GlsMultiValBase
typedef std::ostream ostreamType
 Typedef shorthand for std::ostream.
 
typedef std::istream istreamType
 Typedef shorthand for std::istream.
 

Detailed Description

template<class T1, class T2 = void*, class T3 = void*, class T4 = void*, class T5 = void*, class T6 = void*, class T7 = void*, class T8 = void*, class T9 = void*, class T10 = void*>
class disti::GlsMultiVal< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >

GlsMultiVal is used to effectivly create a structure containing up to 10 values of varying types. An instance of the class is capable of streaming itself to and from a text stream. The individual values will be separated by spaces when written and read from the stream. The types have to follow some rules:

  • They must themselves have the << and >> stream operators defined.
  • operator>> must read all data written by operator<< and must not consume spaces or other characters that follow it
  • They must have a default constructor
  • They must have a copy constructor
  • They shall not be void* (it is used for determining the end of the desired types).
  • If a GlsPropString is used, there must be only one, and it must be the last entry in the GlsMultiVal instance.
  • A GlsPropStringQuoted will work in any position. This is intended primarily for the GL Studio end user to use as a Class Property type.

Constructor & Destructor Documentation

◆ GlsMultiVal() [1/3]

GlsMultiVal ( )
inline

Default constructor. The _val member types must have default constructors.

◆ GlsMultiVal() [2/3]

GlsMultiVal ( const GlsMultiVal< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > &  src)
inline

Copy constructor. This GlsMultiVal will copy values from the src GlsMultiVal.

Parameters
srcGlsMultiVal object to use for initialization.

◆ GlsMultiVal() [3/3]

GlsMultiVal ( const T1 &  val1,
const T2 &  val2 = T2(),
const T3 &  val3 = T3(),
const T4 &  val4 = T4(),
const T5 &  val5 = T5(),
const T6 &  val6 = T6(),
const T7 &  val7 = T7(),
const T8 &  val8 = T8(),
const T9 &  val9 = T9(),
const T10 &  val10 = T10() 
)
inline

Full constructor. Creates a GlsMultiVal object with the provided data.

Parameters
val1First value to use for intialization of type T1.
val2Second value to use for intialization of type T2.
val3Third value to use for intialization of type T3.
val4Fourth value to use for intialization of type T4.
val5Fifth value to use for intialization of type T5.
val6Sixth value to use for intialization of type T6.
val7Seventh value to use for intialization of type T7.
val8Eighth value to use for intialization of type T8.
val9Ninth value to use for intialization of type T9.
val10Tenth value to use for intialization of type T10.

Member Function Documentation

◆ operator!=()

virtual bool operator!= ( const GlsMultiVal< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > &  val) const
inlinevirtual

Inequality operator

Parameters
valThe object to compare against.
Returns
True if the objects are not equal.

◆ operator==()

virtual bool operator== ( const GlsMultiVal< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > &  val) const
inlinevirtual

Equality operator

Parameters
valThe object to compare against.
Returns
True if the objects are equal.

◆ StreamIn()

virtual void StreamIn ( istreamType instr)
inlineoverridevirtual

Uses the provided istream object to populate the current GlsMultiVal object.

Parameters
instrThis is the stream object used by the GlsMultiVal instance to populate itself.

Implements GlsMultiValBase.

◆ StreamOut()

virtual void StreamOut ( ostreamType outstr) const
inlineoverridevirtual

This function serializes itself into the provided stream object.

Parameters
outstrThis is the object used by the GlsMultiVal class to serialize itself onto.

Implements GlsMultiValBase.


The documentation for this class was generated from the following file: