Skip to content
Snippets Groups Projects
Select Git revision
  • 7f7031739048ad04cdb915b7e55995e0bb0b47c4
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

gmshLocalNetworkClient.h

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    gmshLocalNetworkClient.h 1.23 KiB
    // Gmsh - Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to the public mailing list <gmsh@geuz.org>.
    
    #ifndef _GMSH_LOCAL_NETWORK_CLIENT_H_
    #define _GMSH_LOCAL_NETWORK_CLIENT_H_
    
    #include <vector>
    #include <algorithm>
    #include "onelab.h"
    
    class gmshLocalNetworkClient : public onelab::localNetworkClient{
     private:
      std::vector<gmshLocalNetworkClient*> _clients;
     public:
      gmshLocalNetworkClient(const std::string &name, const std::string &executable,
                             const std::string &remoteLogin="")
        : onelab::localNetworkClient(name, executable, remoteLogin)
      {
        addClient(this);
      }
      void addClient(gmshLocalNetworkClient *client)
      {
        _clients.push_back(client);
      }
      void removeClient(gmshLocalNetworkClient *client)
      {
        std::vector<gmshLocalNetworkClient*>::iterator it;
        it = std::find(_clients.begin(), _clients.end(), client);
        if(it != _clients.end()) _clients.erase(it);
      }
      int getNumClients(){ return _clients.size(); }
      gmshLocalNetworkClient *getClient(int i)
      {
        if(i >= 0 && i < getNumClients()) return _clients[i];
        return 0;
      }
      bool receiveMessage();
      bool run();
      bool kill();
    };
    
    #endif