<commit_before>#ifndef PETABRICKSREGIONMATRIXPROXY_H
#define PETABRICKSREGIONMATRIXPROXY_H

#include "iregionreplyproxy.h"
#include "regiondataremote.h"
#include "regionmatrixi.h"
#include "remoteobject.h"

namespace petabricks {
  using namespace petabricks::RegionDataRemoteMessage;

  class RegionMatrixProxy;
  typedef jalib::JRef<RegionMatrixProxy> RegionMatrixProxyPtr;

  class RegionMatrixProxyRemoteObject;
  typedef jalib::JRef<RegionMatrixProxyRemoteObject> RegionMatrixProxyRemoteObjectPtr;

  class RegionMatrixProxy : public RegionMatrixI, public IRegionReplyProxy {
    RegionMatrixProxyRemoteObject* _remoteObject;

  public:
    RegionMatrixProxy(RegionHandlerPtr regionHandler);
    RegionMatrixProxy(RegionHandlerPtr regionHandler, RegionMatrixProxyRemoteObjectPtr remoteObject);
    ~RegionMatrixProxy() {
      JTRACE("Destruct RegionMatrixProxy");
    };

    ElementT readCell(const IndexT* coord);
    void writeCell(const IndexT* coord, ElementT value);

    void onRecv(const void* data, size_t len);

    RegionMatrixProxyRemoteObjectPtr genLocal();
    static RemoteObjectPtr genRemote();

    // IRegionReplyProxy
    void processReplyMsg(const BaseMessageHeader* base, size_t baseLen);
    void sendReply(const void* data, size_t len, const BaseMessageHeader* base);

  private:
    void forwardReplyMsg(const BaseMessageHeader* base, size_t baseLen);
  };

  class RegionMatrixProxyRemoteObject : public RemoteObject {
  protected:
    RegionMatrixProxyPtr _regionMatrix;
  public:
    RegionMatrixProxyRemoteObject() {};
    RegionMatrixProxyRemoteObject(RegionMatrixProxyPtr regionMatrix) {
      _regionMatrix = regionMatrix;
    }

    ~RegionMatrixProxyRemoteObject() {
      JTRACE("Destruct RegionMatrixProxyRemoteObject");
    }

    void onRecv(const void* data, size_t len) {
      _regionMatrix->onRecv(data, len);
    }

    void onRecvInitial(const void* buf, size_t len);

    EncodedPtr remoteObjPtr() {
      return remoteObj();
    }<commit_msg>remove print out<commit_after>#ifndef PETABRICKSREGIONMATRIXPROXY_H
#define PETABRICKSREGIONMATRIXPROXY_H

#include "iregionreplyproxy.h"
#include "regiondataremote.h"
#include "regionmatrixi.h"
#include "remoteobject.h"

namespace petabricks {
  using namespace petabricks::RegionDataRemoteMessage;

  class RegionMatrixProxy;
  typedef jalib::JRef<RegionMatrixProxy> RegionMatrixProxyPtr;

  class RegionMatrixProxyRemoteObject;
  typedef jalib::JRef<RegionMatrixProxyRemoteObject> RegionMatrixProxyRemoteObjectPtr;

  class RegionMatrixProxy : public RegionMatrixI, public IRegionReplyProxy {
    RegionMatrixProxyRemoteObject* _remoteObject;

  public:
    RegionMatrixProxy(RegionHandlerPtr regionHandler);
    RegionMatrixProxy(RegionHandlerPtr regionHandler, RegionMatrixProxyRemoteObjectPtr remoteObject);

    ElementT readCell(const IndexT* coord);
    void writeCell(const IndexT* coord, ElementT value);

    void onRecv(const void* data, size_t len);

    RegionMatrixProxyRemoteObjectPtr genLocal();
    static RemoteObjectPtr genRemote();

    // IRegionReplyProxy
    void processReplyMsg(const BaseMessageHeader* base, size_t baseLen);
    void sendReply(const void* data, size_t len, const BaseMessageHeader* base);

  private:
    void forwardReplyMsg(const BaseMessageHeader* base, size_t baseLen);
  };

  class RegionMatrixProxyRemoteObject : public RemoteObject {
  protected:
    RegionMatrixProxyPtr _regionMatrix;
  public:
    RegionMatrixProxyRemoteObject() {};
    RegionMatrixProxyRemoteObject(RegionMatrixProxyPtr regionMatrix) {
      _regionMatrix = regionMatrix;
    }

    void onRecv(const void* data, size_t len) {
      _regionMatrix->onRecv(data, len);
    }

    void onRecvInitial(const void* buf, size_t len);

    EncodedPtr remoteObjPtr() {
      return remoteObj();
    }
{'fraction_non_alphanumeric': 0.07482278813336833, 'fraction_numerical': 0.0, 'mean_word_length': 5.35, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3494848', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1079, 'n_words': 242}