JSBSim Flight Dynamics Model 1.2.3 (07 Jun 2025)
An Open Source Flight Dynamics and Control Software Library in C++
Loading...
Searching...
No Matches
SGRawValueContainer< T > Class Template Reference

Detailed Description

template<class T>
class SGRawValueContainer< T >

A raw value that contains its value.

This provides a way for property nodes to contain values that shouldn't be stored in the property node itself.

Definition at line 648 of file props.hxx.

#include <props.hxx>

+ Inheritance diagram for SGRawValueContainer< T >:
+ Collaboration diagram for SGRawValueContainer< T >:

Public Member Functions

 SGRawValueContainer (const T &obj)
 Explicit constructor.
 
virtual ~SGRawValueContainer ()
 Destructor.
 
virtual SGRawclone () const
 Create a copy of this raw value.
 
virtual T getValue () const
 Get the underlying value.
 
virtual bool setValue (T value)
 Set the underlying value.
 
- Public Member Functions inherited from SGRawValue< T >
 SGRawValue ()
 Constructor.
 
virtual ~SGRawValue ()
 Destructor.
 
bool DefaultValue ()
 
const char * DefaultValue ()
 
virtual simgear::props::Type getType () const
 Return the type tag for this raw value type.
 

Additional Inherited Members

- Static Public Member Functions inherited from SGRawValue< T >
static T DefaultValue ()
 The default underlying value for this type.
 

Constructor & Destructor Documentation

◆ SGRawValueContainer()

template<class T >
SGRawValueContainer ( const T &  obj)
inline

Explicit constructor.

Definition at line 655 of file props.hxx.

655: _obj(obj) {}

◆ ~SGRawValueContainer()

template<class T >
virtual ~SGRawValueContainer ( )
inlinevirtual

Destructor.

Definition at line 660 of file props.hxx.

660{}

Member Function Documentation

◆ clone()

template<class T >
virtual SGRaw * clone ( ) const
inlinevirtual

Create a copy of this raw value.

Definition at line 678 of file props.hxx.

678 {
679 return new SGRawValueContainer(_obj);
680 }
A raw value that contains its value.
Definition props.hxx:649

◆ getValue()

template<class T >
virtual T getValue ( ) const
inlinevirtual

Get the underlying value.

Implements SGRawValue< T >.

Definition at line 665 of file props.hxx.

665{ return _obj; }

◆ setValue()

template<class T >
virtual bool setValue ( value)
inlinevirtual

Set the underlying value.

This method will dereference the pointer and change the variable's value.

Implements SGRawValue< T >.

Definition at line 673 of file props.hxx.

673{ _obj = value; return true; }

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