OpendTect  6.6
googlexmlwriter.h
Go to the documentation of this file.
1 #pragma once
2 /*+
3  * (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
4  * AUTHOR : Bert
5  * DATE : Nov 2007
6  * ID : $Id$
7 -*/
8 
9 #include "generalmod.h"
10 #include "uistring.h"
11 
12 class LatLong;
13 class SurveyInfo;
14 class od_ostream;
15 
16 
17 namespace ODGoogle
18 {
19 class XMLItem;
20 
27 public:
28 
29  XMLWriter(const char* elemname,const char* fnm=0,
30  const char* survnm=0);
31  ~XMLWriter() { close(); }
32 
33  bool isOK() const;
34  uiString errMsg() const { return errmsg_; }
35 
36  void setElemName( const char* nm )
37  { elemnm_ = nm; }
38  void setSurveyName( const char* nm )
39  { survnm_ = nm; }
40 
41  bool open(const char* fnm);
42  void close();
43 
44  void start(const XMLItem&);
45  void finish(const XMLItem&);
46 
47  od_ostream& strm() { return *strm_; }
48  const od_ostream& strm() const { return *strm_; }
49 
50  void writeIconStyles(const char* iconnm,int xpixoffs,
51  const char* ins=0);
52  void writePlaceMark(const char* iconnm,const Coord&,
53  const char* nm);
54  void writePlaceMark(const char* iconnm,const Coord&,
55  const char* nm,float hght);
56  void writePlaceMark(const char* iconnm,const LatLong&,
57  const char* nm,float hght,
58  const char* desc=0);
59  void writeLine(const char* iconnm,const TypeSet<Coord>&,
60  const char* nm);
61 
62  void writePolyStyle(const char* stlnm,const Color&,int wdth);
63  void writePoly(const char* stlnm,const char* polynm,
64  const TypeSet<Coord>&,float hght,
65  const SurveyInfo* si=0);
66 
67 protected:
68 
73 
74 };
75 
76 
77 } // namespace ODGoogle
78 
ODGoogle::XMLWriter::strm
od_ostream & strm()
Definition: googlexmlwriter.h:47
ODGoogle::XMLWriter::finish
void finish(const XMLItem &)
ODGoogle::XMLWriter::writePlaceMark
void writePlaceMark(const char *iconnm, const Coord &, const char *nm)
ODGoogle::XMLWriter::writeLine
void writeLine(const char *iconnm, const TypeSet< Coord > &, const char *nm)
ODGoogle::XMLWriter::strm_
od_ostream * strm_
Definition: googlexmlwriter.h:71
ODGoogle
Definition: googlexmlwriter.h:18
uistring.h
ODGoogle::XMLWriter::XMLWriter
XMLWriter(const char *elemname, const char *fnm=0, const char *survnm=0)
ODGoogle::XMLWriter::mODTextTranslationClass
mODTextTranslationClass(XMLWriter)
ODGoogle::XMLWriter::writePlaceMark
void writePlaceMark(const char *iconnm, const LatLong &, const char *nm, float hght, const char *desc=0)
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
ODGoogle::XMLWriter::errMsg
uiString errMsg() const
Definition: googlexmlwriter.h:34
ODGoogle::XMLWriter::writePolyStyle
void writePolyStyle(const char *stlnm, const Color &, int wdth)
ODGoogle::XMLWriter::errmsg_
uiString errmsg_
Definition: googlexmlwriter.h:72
ODGoogle::XMLWriter::writePoly
void writePoly(const char *stlnm, const char *polynm, const TypeSet< Coord > &, float hght, const SurveyInfo *si=0)
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
ODGoogle::XMLWriter
XML Writer.
Definition: googlexmlwriter.h:26
ODGoogle::XMLWriter::start
void start(const XMLItem &)
ODGoogle::XMLWriter::setElemName
void setElemName(const char *nm)
Definition: googlexmlwriter.h:36
ODGoogle::XMLWriter::close
void close()
ODGoogle::XMLWriter::writeIconStyles
void writeIconStyles(const char *iconnm, int xpixoffs, const char *ins=0)
ODGoogle::XMLWriter::strm
const od_ostream & strm() const
Definition: googlexmlwriter.h:48
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
ODGoogle::XMLWriter::writePlaceMark
void writePlaceMark(const char *iconnm, const Coord &, const char *nm, float hght)
ODGoogle::XMLWriter::elemnm_
BufferString elemnm_
Definition: googlexmlwriter.h:69
ODGoogle::XMLWriter::survnm_
BufferString survnm_
Definition: googlexmlwriter.h:70
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
ODGoogle::XMLWriter::setSurveyName
void setSurveyName(const char *nm)
Definition: googlexmlwriter.h:38
ODGoogle::XMLWriter::~XMLWriter
~XMLWriter()
Definition: googlexmlwriter.h:31
MPE::errmsg_
BufferString errmsg_
Definition: horizontracker.h:118
LatLong
Geographical coordinates in Decimal Degrees but with conv to deg, min, sec.
Definition: latlong.h:27
ODGoogle::XMLWriter::isOK
bool isOK() const
ODGoogle::XMLWriter::open
bool open(const char *fnm)
Color
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
od_ostream
OD class for stream write common access to the user log file, or std::cout in other than od_main.
Definition: od_ostream.h:26
SurveyInfo
Holds survey general information.
Definition: survinfo.h:45
TypeSet< Coord >

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021