~ubuntu-branches/debian/squeeze/gmsh/squeeze

« back to all changes in this revision

Viewing changes to Plugin/Plugin.h

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme
  • Date: 2009-09-02 18:12:15 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090902181215-yla8zvcas2ucvkm9
[Christophe Prud'homme]
* New upstream release
  + fixed surface mesh orientation bug introduced in 2.4.0;
  + mesh and graphics code refactoring;
  + small usability enhancements and bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
//  Some Plugins are default gmsh plugins and are insterted directly
14
14
//  in the executable. I think that it's a good way to start.
15
15
 
16
 
#include <string.h>
17
 
#include <stdio.h>
 
16
#include <string>
18
17
#include "Options.h"
19
18
#include "GmshMessage.h"
20
19
#include "PView.h"
46
45
 
47
46
  // return plugin type, name and info
48
47
  virtual GMSH_PLUGIN_TYPE getType() const = 0;
49
 
  virtual void getName(char *name) const = 0;
50
 
  virtual void getInfos(char *author, char *copyright, char *helpText) const = 0;
 
48
  virtual std::string getName() const = 0;
 
49
  virtual std::string getHelp() const = 0;
 
50
  virtual std::string getAuthor() const { return "C. Geuzaine, J.-F. Remacle"; }
 
51
  virtual std::string getCopyright() const { return "C. Geuzaine, J.-F. Remacle"; }
51
52
 
52
53
  // when an error is thrown by the plugin, the plugin manager will
53
54
  // show the message and hopefully continue
54
 
  virtual void catchErrorMessage(char *errorMessage) const = 0;
 
55
  virtual void catchErrorMessage(char *errorMessage) const;
55
56
 
56
57
  // gmsh-style numeric options
57
58
  virtual int getNbOptions() const = 0;
63
64
 
64
65
  // run the plugin
65
66
  virtual void run() = 0;
 
67
 
 
68
  // dynamic pointer to a drawing function
 
69
  static void setDrawFunction(void (*fct)(void *));
 
70
  static void (*draw)(void*);
66
71
};
67
72
 
68
73
// The base class for post-processing plugins. The user can either
81
86
  // get the view given an index and a default value
82
87
  virtual PView *getView(int index, PView *view);
83
88
  // get the data in list format
84
 
  virtual PViewDataList *getDataList(PView *view);
 
89
  virtual PViewDataList *getDataList(PView *view, bool showError=true);
85
90
  virtual void assignSpecificVisibility() const {}
86
91
  virtual bool geometricalFilter(gmshMatrix<double> *) const { return true; }
87
92
};