degate  0.1.2
Public Member Functions | Protected Member Functions | Private Attributes
degate::RemoteObject Class Reference

#include <RemoteObject.h>

Inheritance diagram for degate::RemoteObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 RemoteObject ()
virtual ~RemoteObject ()
void cloneDeepInto (DeepCopyable_shptr dest, oldnew_t *oldnew) const
 Deep-copy all members to destination.
virtual bool has_remote_object_id () const
virtual object_id_t get_remote_object_id () const
virtual void set_remote_object_id (object_id_t oid)
virtual object_id_t push (std::string const &server_url)

Protected Member Functions

virtual object_id_t push_object_to_server (std::string const &server_url)=0

Private Attributes

object_id_t remote_oid

Detailed Description

Definition at line 35 of file RemoteObject.h.


Constructor & Destructor Documentation

Definition at line 47 of file RemoteObject.h.

                   : remote_oid(0) {
    }
virtual degate::RemoteObject::~RemoteObject ( ) [inline, virtual]

Definition at line 50 of file RemoteObject.h.

                            {
    }

Member Function Documentation

void degate::RemoteObject::cloneDeepInto ( DeepCopyable_shptr  destination,
oldnew_t oldnew 
) const [inline, virtual]

Deep-copy all members to destination.

Todo:
Find out whether the default assignment operator can be used to simplify implementations of this method.

Implements degate::DeepCopyableBase.

Reimplemented in degate::Via, degate::EMarker, and degate::Wire.

Definition at line 53 of file RemoteObject.h.

References remote_oid.

                                                                        {
      auto clone = std::dynamic_pointer_cast<RemoteObject>(dest);
      clone->remote_oid = remote_oid;
    }
virtual object_id_t degate::RemoteObject::get_remote_object_id ( ) const [inline, virtual]

Definition at line 62 of file RemoteObject.h.

References remote_oid.

                                                     {
      return remote_oid;
    }
virtual bool degate::RemoteObject::has_remote_object_id ( ) const [inline, virtual]

Definition at line 58 of file RemoteObject.h.

References remote_oid.

                                              {
      return remote_oid != 0;
    }
virtual object_id_t degate::RemoteObject::push ( std::string const &  server_url) [inline, virtual]

Definition at line 71 of file RemoteObject.h.

References debug(), push_object_to_server(), remote_oid, and TM.

                                                          {
      if(remote_oid == 0) {
        debug(TM, "RemoteObject::push(): push object to server.");
        return push_object_to_server(server_url);
      }
      else {
        debug(TM, "RemoteObject::push(): object is already pushed to server.");
        return 0;
      }
    }

Here is the call graph for this function:

virtual object_id_t degate::RemoteObject::push_object_to_server ( std::string const &  server_url) [protected, pure virtual]

Implemented in degate::Via, degate::EMarker, and degate::Wire.

Referenced by push().

Here is the caller graph for this function:

virtual void degate::RemoteObject::set_remote_object_id ( object_id_t  oid) [inline, virtual]

Definition at line 66 of file RemoteObject.h.

References remote_oid.

Referenced by degate::Wire::push_object_to_server(), degate::EMarker::push_object_to_server(), and degate::Via::push_object_to_server().

                                                       {
      remote_oid = oid;
    }

Here is the caller graph for this function:


Member Data Documentation


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