Leonardus
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
SOshptr Class Referenceabstract

Semantic Object with shared pointer to data. More...

#include <so.h>

+ Inheritance diagram for SOshptr:
+ Collaboration diagram for SOshptr:

Public Member Functions

std::string opequal () const override
 String representation of object for operators '=', 'cvs' and 'stack'.
 
bool equal (const SO *p_other) const override
 Checks if this SO is equal to another SO.
 
 SO ()
 Ctor.
 
 SO (bool p_exec)
 Ctor.
 
 SO (const SO &p_other)
 Copy ctor.
 
 SO (SO &&)=delete
 
- Public Member Functions inherited from SO
 SO ()
 Ctor.
 
 SO (bool p_exec)
 Ctor.
 
 SO (const SO &p_other)
 Copy ctor.
 
virtual ~SO ()=default
 Virtual dtor.
 
 SO (SO &&)=delete
 
SO & operator= (const SO &)=delete
 
SO & operator= (SO &&)=delete
 
bool getExec () const
 Getter for exec_.
 
void setExec (bool p_exec)
 Setter for exec_.
 
virtual size_t getSize () const
 Returns the size of the SO.
 
virtual SO * dup () const =0
 Creates a new instance as copy following the red book definition.
 
virtual SO * clone () const
 Creates a new instance as copy with deep cloning.
 
virtual std::string opequalequal () const
 String representation for operators '==' and 'pstack'.
 
virtual OTCode ot () const =0
 Returns an OTCode.
 
virtual std::string_view type () const =0
 Returns a type name.
 
virtual bool gt (OpError &p_ec, const SO *) const
 Greater than.
 
virtual bool ge (OpError &p_ec, const SO *) const
 Greater or equal.
 
- Public Member Functions inherited from Counter< SO >
 Counter (Counter< SO > &&)=delete
 
Counter< SO > & operator= (const Counter< SO > &)=delete
 
Counter< SO > & operator= (Counter< SO > &&)=delete
 

Protected Member Functions

virtual void * shptr () const =0
 Pointer to the shared object.
 
bool invariant () const noexcept override
 Checks class invariants.
 
- Protected Member Functions inherited from Counter< SO >
 Counter ()
 Ctor.
 
 Counter (const Counter< SO > &)
 Copy ctor.
 
 ~Counter ()
 Dtor.
 
- Protected Member Functions inherited from DbC
 ~DbC ()=default
 Protected dtor.
 

Additional Inherited Members

- Static Public Member Functions inherited from Counter< SO >
static size_t getTotalCounter ()
 Static getter for totaly created objects.
 
static size_t getAliveCounter ()
 Static getter for objects alive.
 
static size_t getWatermarkCounter ()
 Static getter for the object counter watermark.
 

Detailed Description

Semantic Object with shared pointer to data.

Invariant
shared pointer != nullptr
No instantiation. Has pure virtual functions.

Member Function Documentation

◆ equal()

bool SOshptr::equal ( const SO *  p_other) const
inlineoverridevirtual

Checks if this SO is equal to another SO.

Equality means:
SOL und SOM are always equal.
For SOD, SOF and SOK, share_ptr<> points to the same object.
For SOA, share_ptr<> points to the same object, but empty arrays are equal nonetheless.
For SOO and SOo the function pointer must be the same.
Otherwise the value must be the same, even for SOS with shared_ptr<>.

Precondition
parameter != nullptr
Returns
bool ... true if the SO's are of the same type and equal
See also
Will be used directly and unchanged as operator eq
Parameters
[in]p_otherThe object to compare with.

Implements SO.

◆ invariant()

bool SOshptr::invariant ( ) const
inlineoverrideprotectedvirtualnoexcept

Checks class invariants.

Returns
bool ... Indicates whether the class invariants are maintained.

Reimplemented from DbC.

◆ opequal()

std::string SOshptr::opequal ( ) const
inlineoverridevirtual

String representation of object for operators '=', 'cvs' and 'stack'.

Returns
std::string ... The representation.

Implements SO.

◆ shptr()

virtual void * SOshptr::shptr ( ) const
protectedpure virtual

Pointer to the shared object.

Returns
void * ... The naked pointer.

Implemented in SOA, SOD, SOF, SOK, and SOS.

◆ SO()

SO::SO ( bool  p_exec)
inlineexplicit

Ctor.

Parameters
[in]p_execThe executive attribute of the semantic object.

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