SketchUp SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
modelexporterplugin.h
Go to the documentation of this file.
1 // Copyright 2012 Trimble Navigation Ltd. All Rights Reserved.
2 
3 #ifndef MODELEXPORTERPLUGIN_H_
4 #define MODELEXPORTERPLUGIN_H_
5 
6 #include <map>
7 #include <string>
8 
10 
17  public:
27  virtual std::string GetIdentifier() const = 0;
28 
34  virtual int GetFileExtensionCount() const = 0;
35 
43  virtual std::string GetFileExtension(int index) const = 0;
44 
55  virtual std::string GetDescription(int index) const = 0;
56 
57 
65  virtual bool SupportsOptions() const {
66  return false;
67  }
68 
80  virtual void ShowOptionsDialog(bool model_has_selection) {}
81 
89  virtual bool ExportSelectionSetOnly() {
90  return false;
91  }
92 
101  virtual bool SupportsProgress() const { return true; }
102 
122  virtual bool ConvertFromSkp(const std::string& input_skp,
123  const std::string& output,
125  void* reserved) = 0;
131  virtual void ShowSummaryDialog() {}
132 };
133 
135 
143 
144 public:
157  virtual bool DeprecatedConvertFromSkp(
158  void* document,
159  const std::string& output,
160  SketchUpPluginProgressCallback* progress) = 0;
161 
162 private:
163  bool ConvertFromSkp(const std::string&,
164  const std::string&,
166  void*) {
167  return false;
168  }
169 };
171 
172 #ifdef __OBJC__
173 
175 @protocol SketchUpModelExporterPlugin <NSObject>
179 + (id<SketchUpModelExporterPlugin>)exporter;
180 
184 - (SketchUpModelExporterInterface*)sketchUpModelExporterInterface;
185 @end
186 
187 #else
188 
191  (*GetSketchUpModelExporterInterfaceFunc)(void);
192 #endif
193 #endif // MODELEXPORTERPLUGIN_H_