struct mrpt::obs::gnss::gnss_message_ptr

A smart pointer to a GNSS message.

See also:

gnss_message, mrpt::obs::CObservationGPS

#include <mrpt/obs/gnss_messages_common.h>

struct gnss_message_ptr
{
    // construction

    gnss_message_ptr();
    gnss_message_ptr(const gnss_message_ptr& o);
    gnss_message_ptr(const gnss_message* p);

    //
methods

    gnss_message_ptr& operator = (const gnss_message_ptr& o);
    bool operator == (const gnss_message* o) const;
    bool operator == (const gnss_message_ptr& o) const;
    bool operator != (const gnss_message* o) const;
    bool operator != (const gnss_message_ptr& o) const;
    gnss_message*& get();
    const gnss_message* get() const;
    gnss_message*& operator -> ();
    const gnss_message* operator -> () const;
    void set(gnss_message* p);
};

Construction

gnss_message_ptr()

Ctor (default: nullptr pointer)

gnss_message_ptr(const gnss_message_ptr& o)

Makes a copy of the pointee.

gnss_message_ptr(const gnss_message* p)

Assigns a pointer.

Memory now belongs to this class.

Methods

void set(gnss_message* p)

Replaces the pointee with a new pointer.

Its memory now belongs to this object, do not free manually.