Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Data Fields
KML_GroundOverlay Class Reference

#include <KML_GroundOverlay.h>

Inheritance diagram for KML_GroundOverlay:
KML_Overlay KML_Feature KML_Object Object

Public Member Functions

 KML_GroundOverlay ()
 
 ~KML_GroundOverlay ()
 
void Echo ()
 
void DeepEcho ()
 
void DeepEcho (const char *indent)
 
void Write (FILE *fid, const char *indent)
 
void Read (FILE *fid, char *kstr)
 
int Id ()
 
int ObjectEnum ()
 
Objectcopy ()
 
void Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
 
- Public Member Functions inherited from KML_Overlay
 KML_Overlay ()
 
 ~KML_Overlay ()
 
void Echo ()
 
void DeepEcho ()
 
void DeepEcho (const char *indent)
 
void Write (FILE *fid, const char *indent)
 
void Read (FILE *fid, char *kstr)
 
int Id ()
 
int ObjectEnum ()
 
Objectcopy ()
 
void Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
 
- Public Member Functions inherited from KML_Feature
 KML_Feature ()
 
 ~KML_Feature ()
 
- Public Member Functions inherited from KML_Object
 KML_Object ()
 
 ~KML_Object ()
 
virtual void WriteExp (FILE *fid, const char *nstr, int sgn, double cm, double sp)
 
virtual void AddAttrib (const char *name, const char *value)
 
virtual void WriteAttrib (FILE *fid, const char *indent)
 
virtual void AddCommnt (int ncom, char **pcom)
 
virtual void AddCommnt (char *value)
 
virtual void WriteCommnt (FILE *fid, const char *indent)
 
- Public Member Functions inherited from Object
virtual ~Object ()
 

Data Fields

double altitude
 
char altmode [KML_GROUNDOVERLAY_ALTMODE_LENGTH+1]
 
KML_LatLonBoxllbox
 
- Data Fields inherited from KML_Overlay
char color [KML_OVERLAY_COLOR_LENGTH+1]
 
int draword
 
KML_Iconicon
 
- Data Fields inherited from KML_Feature
char name [KML_FEATURE_NAME_LENGTH+1]
 
bool visibility
 
bool open
 
char snippet [KML_FEATURE_SNIPPET_LENGTH+1]
 
char descript [KML_FEATURE_DESCRIPT_LENGTH+1]
 
char styleurl [KML_FEATURE_STYLEURL_LENGTH+1]
 
DataSetstyle
 
- Data Fields inherited from KML_Object
DataSetattrib
 
DataSetcommnt
 
DataSetkmlobj
 

Detailed Description

Definition at line 17 of file KML_GroundOverlay.h.

Constructor & Destructor Documentation

◆ KML_GroundOverlay()

KML_GroundOverlay::KML_GroundOverlay ( )

Definition at line 21 of file KML_GroundOverlay.cpp.

21  {/*{{{*/
22 
23  altitude = 0.;
24  memcpy(altmode,"clampToGround",(strlen("clampToGround")+1)*sizeof(char));
25 
26  llbox =NULL;
27 
28 }

◆ ~KML_GroundOverlay()

KML_GroundOverlay::~KML_GroundOverlay ( )

Definition at line 30 of file KML_GroundOverlay.cpp.

30  {/*{{{*/
31 
32  if (llbox) {
33  delete llbox;
34  llbox =NULL;
35  }
36 
37 }

Member Function Documentation

◆ Echo()

void KML_GroundOverlay::Echo ( void  )
virtual

Reimplemented from KML_Feature.

Definition at line 41 of file KML_GroundOverlay.cpp.

41  {/*{{{*/
42 
43  _printf_("KML_GroundOverlay:\n");
45 
46  _printf_(" altitude: " << altitude << "\n");
47  _printf_(" altmode: " << altmode << "\n");
48  _printf_(" llbox: " << llbox << "\n");
49 }

◆ DeepEcho() [1/2]

void KML_GroundOverlay::DeepEcho ( void  )
virtual

Reimplemented from KML_Feature.

Definition at line 51 of file KML_GroundOverlay.cpp.

51  {/*{{{*/
52 
53  char indent[81]="";
54 
56 
57  return;
58 }

◆ DeepEcho() [2/2]

void KML_GroundOverlay::DeepEcho ( const char *  indent)
virtual

Reimplemented from KML_Feature.

Definition at line 60 of file KML_GroundOverlay.cpp.

60  {/*{{{*/
61 
62  char indent2[81];
63 
64  _printf_(indent << "KML_GroundOverlay:\n");
65  KML_Overlay::DeepEcho(indent);
66 
67  memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
68  strcat(indent2," ");
69 
70  _printf_(indent<<" altitude: " << altitude << "\n");
71  _printf_(indent<<" altmode: " << altmode << "\n");
72  if (llbox)
73  llbox->DeepEcho(indent2);
74  else
75  _printf_(indent<<" llbox: " << llbox << "\n");
76 }

◆ Write()

void KML_GroundOverlay::Write ( FILE *  fid,
const char *  indent 
)
virtual

Reimplemented from KML_Feature.

Definition at line 78 of file KML_GroundOverlay.cpp.

78  {/*{{{*/
79 
80  char indent2[81];
81 
82  fprintf(filout,"%s<GroundOverlay",indent);
83  WriteAttrib(filout," ");
84  fprintf(filout,">\n");
85  WriteCommnt(filout,indent);
86 
87  KML_Overlay::Write(filout,indent);
88 
89  memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
90 
91  strcat(indent2," ");
92 
93  fprintf(filout,"%s <altitude>%0.16g</altitude>\n",indent,altitude);
94  fprintf(filout,"%s <altitudeMode>%s</altitudeMode>\n",indent,altmode);
95  if (llbox)
96  llbox->Write(filout,indent2);
97 
98  fprintf(filout,"%s</GroundOverlay>\n",indent);
99 
100  return;
101 }

◆ Read()

void KML_GroundOverlay::Read ( FILE *  fid,
char *  kstr 
)
virtual

Reimplemented from KML_Feature.

Definition at line 103 of file KML_GroundOverlay.cpp.

103  {/*{{{*/
104 
105  char* kstri;
106  int ncom=0;
107  char** pcom=NULL;
108 
109 /* get object attributes and check for solo tag */
110 
111  if (KMLFileTagAttrib(this,
112  kstr))
113  return;
114 
115 /* loop over and process fields within opening and closing tags */
116 
117  while((kstri=KMLFileToken(fid, &ncom,&pcom))){
118  if (!strncmp(kstri,"</GroundOverlay",15)) {
119  xDelete<char>(kstri);
120  break;
121  }
122  else if (!strncmp(kstri,"</",2))
123  {_error_("KML_GroundOverlay::Read -- Unexpected closing tag " << kstri << ".\n");}
124  else if (strncmp(kstri,"<",1))
125  {_error_("KML_GroundOverlay::Read -- Unexpected field \"" << kstri << "\".\n");}
126 
127  else if (!strcmp(kstri,"<altitude>"))
129  kstri,
130  fid);
131  else if (!strcmp(kstri,"<altitudeMode>"))
133  kstri,
134  fid);
135  else if (!strncmp(kstri,"<LatLonBox",10)) {
136  llbox =new KML_LatLonBox();
137  llbox ->Read(fid,kstri);
138  }
139 
140  else if (!strncmp(kstri,"<",1))
141  KML_Overlay::Read(fid,kstri);
142 
143  xDelete<char>(kstri);
144  }
145 
146  this->AddCommnt(ncom,pcom);
147 
148  for(ncom=ncom; ncom>0; ncom--)
149  xDelete<char>(pcom[ncom-1]);
150  xDelete<char*>(pcom);
151 
152  return;
153 }

◆ Id()

int KML_GroundOverlay::Id ( void  )
inlinevirtual

Reimplemented from KML_Feature.

Definition at line 35 of file KML_GroundOverlay.h.

35 {_error_("Not implemented yet.");};

◆ ObjectEnum()

int KML_GroundOverlay::ObjectEnum ( void  )
inlinevirtual

Reimplemented from KML_Feature.

Definition at line 36 of file KML_GroundOverlay.h.

36 {_error_("Not implemented yet.");};

◆ copy()

Object* KML_GroundOverlay::copy ( void  )
inlinevirtual

Reimplemented from KML_Feature.

Definition at line 37 of file KML_GroundOverlay.h.

37 {_error_("Not implemented yet.");};

◆ Marshall()

void KML_GroundOverlay::Marshall ( char **  pmarshalled_data,
int *  pmarshalled_data_size,
int  marshall_direction 
)
inlinevirtual

Reimplemented from KML_Feature.

Definition at line 38 of file KML_GroundOverlay.h.

38 { _error_("not implemented yet!");};

Field Documentation

◆ altitude

double KML_GroundOverlay::altitude

Definition at line 21 of file KML_GroundOverlay.h.

◆ altmode

char KML_GroundOverlay::altmode[KML_GROUNDOVERLAY_ALTMODE_LENGTH+1]

Definition at line 22 of file KML_GroundOverlay.h.

◆ llbox

KML_LatLonBox* KML_GroundOverlay::llbox

Definition at line 23 of file KML_GroundOverlay.h.


The documentation for this class was generated from the following files:
KML_Object::WriteAttrib
virtual void WriteAttrib(FILE *fid, const char *indent)
Definition: KML_Object.cpp:288
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
KML_Overlay::Write
void Write(FILE *fid, const char *indent)
Definition: KML_Overlay.cpp:74
KMLFileTagAttrib
int KMLFileTagAttrib(KML_Object *kobj, char *ktag)
Definition: KMLFileReadUtils.cpp:287
KML_GROUNDOVERLAY_ALTMODE_LENGTH
#define KML_GROUNDOVERLAY_ALTMODE_LENGTH
Definition: KML_GroundOverlay.h:8
KML_LatLonBox::Read
void Read(FILE *fid, char *kstr)
Definition: KML_LatLonBox.cpp:90
KML_GroundOverlay::llbox
KML_LatLonBox * llbox
Definition: KML_GroundOverlay.h:23
KMLFileToken
char * KMLFileToken(FILE *fid, int *pncom=NULL, char ***ppcom=NULL)
Definition: KMLFileReadUtils.cpp:18
KML_LatLonBox::Write
void Write(FILE *fid, const char *indent)
Definition: KML_LatLonBox.cpp:70
KML_LatLonBox
Definition: KML_LatLonBox.h:14
KML_Overlay::Read
void Read(FILE *fid, char *kstr)
Definition: KML_Overlay.cpp:93
KMLFileTokenParse
int KMLFileTokenParse(int *pival, char *ktag, FILE *fid)
Definition: KMLFileReadUtils.cpp:335
KML_Overlay::DeepEcho
void DeepEcho()
Definition: KML_Overlay.cpp:49
KML_Overlay::Echo
void Echo()
Definition: KML_Overlay.cpp:41
KML_LatLonBox::DeepEcho
void DeepEcho()
Definition: KML_LatLonBox.cpp:49
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
KML_GroundOverlay::DeepEcho
void DeepEcho()
Definition: KML_GroundOverlay.cpp:51
KML_GroundOverlay::altmode
char altmode[KML_GROUNDOVERLAY_ALTMODE_LENGTH+1]
Definition: KML_GroundOverlay.h:22
KML_GroundOverlay::altitude
double altitude
Definition: KML_GroundOverlay.h:21
KML_Object::AddCommnt
virtual void AddCommnt(int ncom, char **pcom)
Definition: KML_Object.cpp:301
KML_Object::WriteCommnt
virtual void WriteCommnt(FILE *fid, const char *indent)
Definition: KML_Object.cpp:326