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

#include <KML_Icon.h>

Inheritance diagram for KML_Icon:
KML_Object Object

Public Member Functions

 KML_Icon ()
 
 ~KML_Icon ()
 
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_Object
 KML_Object ()
 
 ~KML_Object ()
 
int Id ()
 
int ObjectEnum ()
 
Objectcopy ()
 
void Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
 
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

char href [KML_ICON_HREF_LENGTH+1]
 
char refmode [KML_ICON_REFMODE_LENGTH+1]
 
float refint
 
char vrefmode [KML_ICON_VREFMODE_LENGTH+1]
 
float vreftime
 
float vboundsc
 
char vformat [KML_ICON_VFORMAT_LENGTH+1]
 
char hquery [KML_ICON_HQUERY_LENGTH+1]
 
- Data Fields inherited from KML_Object
DataSetattrib
 
DataSetcommnt
 
DataSetkmlobj
 

Detailed Description

Definition at line 20 of file KML_Icon.h.

Constructor & Destructor Documentation

◆ KML_Icon()

KML_Icon::KML_Icon ( )

Definition at line 19 of file KML_Icon.cpp.

19  {/*{{{*/
20 
21  strcpy(href ,"");
22  strcpy(refmode ,"onChange");
23  refint = 4.;
24  strcpy(vrefmode ,"never");
25  vreftime = 4.;
26  vboundsc = 1.;
27  strcpy(vformat ,"");
28  strcpy(hquery ,"");
29 
30 }

◆ ~KML_Icon()

KML_Icon::~KML_Icon ( )

Definition at line 32 of file KML_Icon.cpp.

32  {/*{{{*/
33 
34  ;
35 
36 }

Member Function Documentation

◆ Echo()

void KML_Icon::Echo ( void  )
virtual

Reimplemented from KML_Object.

Definition at line 40 of file KML_Icon.cpp.

40  {/*{{{*/
41 
42  bool flag=true;
43 
44  if(flag) _printf0_("KML_Icon:\n");
46 
47  if(flag) _printf0_(" href: \"" << href << "\"\n");
48  if(flag) _printf0_(" refmode: \"" << refmode << "\"\n");
49  if(flag) _printf0_(" refint: " << refint << "\n");
50  if(flag) _printf0_(" vrefmode: \"" << vrefmode << "\"\n");
51  if(flag) _printf0_(" vreftime: " << vreftime << "\n");
52  if(flag) _printf0_(" vboundsc: " << vboundsc << "\n");
53  if(flag) _printf0_(" vformat: \"" << vformat << "\"\n");
54  if(flag) _printf0_(" hquery: \"" << hquery << "\"\n");
55 
56  return;
57 }

◆ DeepEcho() [1/2]

void KML_Icon::DeepEcho ( void  )
virtual

Reimplemented from KML_Object.

Definition at line 59 of file KML_Icon.cpp.

59  {/*{{{*/
60 
61  char indent[81]="";
62 
63  KML_Icon::DeepEcho(indent);
64 
65  return;
66 }

◆ DeepEcho() [2/2]

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

Reimplemented from KML_Object.

Definition at line 68 of file KML_Icon.cpp.

68  {/*{{{*/
69 
70  bool flag=true;
71 
72  if(flag) _printf0_(indent << "KML_Icon:\n");
73  KML_Object::DeepEcho(indent);
74 
75  if(flag) _printf0_(indent << " href: \"" << href << "\"\n");
76  if(flag) _printf0_(indent << " refmode: \"" << refmode << "\"\n");
77  if(flag) _printf0_(indent << " refint: " << refint << "\n");
78  if(flag) _printf0_(indent << " vrefmode: \"" << vrefmode << "\"\n");
79  if(flag) _printf0_(indent << " vreftime: " << vreftime << "\n");
80  if(flag) _printf0_(indent << " vboundsc: " << vboundsc << "\n");
81  if(flag) _printf0_(indent << " vformat: \"" << vformat << "\"\n");
82  if(flag) _printf0_(indent << " hquery: \"" << hquery << "\"\n");
83 
84  return;
85 }

◆ Write()

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

Implements KML_Object.

Definition at line 87 of file KML_Icon.cpp.

87  {/*{{{*/
88 
89  fprintf(filout,"%s<Icon",indent);
90  WriteAttrib(filout," ");
91  fprintf(filout,">\n");
92  WriteCommnt(filout,indent);
93 
94  KML_Object::Write(filout,indent);
95 
96  if (href && strlen(href))
97  fprintf(filout,"%s <href>%s</href>\n",indent,href);
98  if (refmode && strlen(refmode))
99  fprintf(filout,"%s <refreshMode>%s</refreshMode>\n",indent,refmode);
100  fprintf(filout,"%s <refreshInterval>%g</refreshInterval>\n",indent,refint);
101  if (vrefmode && strlen(vrefmode))
102  fprintf(filout,"%s <viewRefreshMode>%s</viewRefreshMode>\n",indent,vrefmode);
103  fprintf(filout,"%s <viewRefreshTime>%g</viewRefreshTime>\n",indent,vreftime);
104  fprintf(filout,"%s <viewBoundScale>%g</viewBoundScale>\n",indent,vboundsc);
105  if (vformat && strlen(vformat))
106  fprintf(filout,"%s <viewFormat>%s</viewFormat>\n",indent,vformat);
107  if (hquery && strlen(hquery))
108  fprintf(filout,"%s <httpQuery>%s</httpQuery>\n",indent,hquery);
109 
110  fprintf(filout,"%s</Icon>\n",indent);
111 
112  return;
113 }

◆ Read()

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

Implements KML_Object.

Definition at line 115 of file KML_Icon.cpp.

115  {/*{{{*/
116 
117  char* kstri;
118  int ncom=0;
119  char** pcom=NULL;
120 
121 /* get object attributes and check for solo tag */
122 
123  if (KMLFileTagAttrib(this,
124  kstr))
125  return;
126 
127 /* loop over and process fields within opening and closing tags */
128 
129  while((kstri=KMLFileToken(fid, &ncom,&pcom))){
130  if (!strncmp(kstri,"</Icon", 6)) {
131  xDelete<char>(kstri);
132  break;
133  }
134  else if (!strncmp(kstri,"</",2))
135  {_error_("KML_Icon::Read -- Unexpected closing tag " << kstri << ".\n");}
136  else if (strncmp(kstri,"<",1))
137  {_error_("KML_Icon::Read -- Unexpected field \"" << kstri << "\".\n");}
138 
139  else if (!strcmp(kstri,"<href>"))
140  KMLFileTokenParse( href ,NULL,KML_ICON_HREF_LENGTH, kstri, fid);
141  else if (!strcmp(kstri,"<refreshMode>"))
143  else if (!strcmp(kstri,"<refreshInterval>"))
144  KMLFileTokenParse(&refint , kstri, fid);
145  else if (!strcmp(kstri,"<viewRefreshMode>"))
147  else if (!strcmp(kstri,"<viewRefreshTime>"))
148  KMLFileTokenParse(&vreftime , kstri, fid);
149  else if (!strcmp(kstri,"<viewBoundScale>"))
150  KMLFileTokenParse(&vboundsc , kstri, fid);
151  else if (!strcmp(kstri,"<viewFormat>"))
153  else if (!strcmp(kstri,"<httpQuery>"))
154  KMLFileTokenParse( hquery ,NULL,KML_ICON_HQUERY_LENGTH, kstri, fid);
155 
156  else if (!strncmp(kstri,"<",1))
157  KML_Object::Read(fid,kstri);
158 
159  xDelete<char>(kstri);
160  }
161 
162  this->AddCommnt(ncom,pcom);
163 
164  for(ncom=ncom; ncom>0; ncom--)
165  xDelete<char>(pcom[ncom-1]);
166  xDelete<char*>(pcom);
167 
168  return;
169 }

◆ Id()

int KML_Icon::Id ( void  )
inlinevirtual

Implements Object.

Definition at line 43 of file KML_Icon.h.

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

◆ ObjectEnum()

int KML_Icon::ObjectEnum ( void  )
inlinevirtual

Implements Object.

Definition at line 44 of file KML_Icon.h.

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

◆ copy()

Object* KML_Icon::copy ( void  )
inlinevirtual

Implements Object.

Definition at line 45 of file KML_Icon.h.

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

◆ Marshall()

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

Implements Object.

Definition at line 46 of file KML_Icon.h.

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

Field Documentation

◆ href

char KML_Icon::href[KML_ICON_HREF_LENGTH+1]

Definition at line 24 of file KML_Icon.h.

◆ refmode

char KML_Icon::refmode[KML_ICON_REFMODE_LENGTH+1]

Definition at line 25 of file KML_Icon.h.

◆ refint

float KML_Icon::refint

Definition at line 26 of file KML_Icon.h.

◆ vrefmode

char KML_Icon::vrefmode[KML_ICON_VREFMODE_LENGTH+1]

Definition at line 27 of file KML_Icon.h.

◆ vreftime

float KML_Icon::vreftime

Definition at line 28 of file KML_Icon.h.

◆ vboundsc

float KML_Icon::vboundsc

Definition at line 29 of file KML_Icon.h.

◆ vformat

char KML_Icon::vformat[KML_ICON_VFORMAT_LENGTH+1]

Definition at line 30 of file KML_Icon.h.

◆ hquery

char KML_Icon::hquery[KML_ICON_HQUERY_LENGTH+1]

Definition at line 31 of file KML_Icon.h.


The documentation for this class was generated from the following files:
KML_ICON_REFMODE_LENGTH
#define KML_ICON_REFMODE_LENGTH
Definition: KML_Icon.h:9
_printf0_
#define _printf0_(StreamArgs)
Definition: Print.h:29
KML_Object::WriteAttrib
virtual void WriteAttrib(FILE *fid, const char *indent)
Definition: KML_Object.cpp:288
KML_ICON_VFORMAT_LENGTH
#define KML_ICON_VFORMAT_LENGTH
Definition: KML_Icon.h:11
KMLFileTagAttrib
int KMLFileTagAttrib(KML_Object *kobj, char *ktag)
Definition: KMLFileReadUtils.cpp:287
KML_Icon::hquery
char hquery[KML_ICON_HQUERY_LENGTH+1]
Definition: KML_Icon.h:31
KML_Icon::vrefmode
char vrefmode[KML_ICON_VREFMODE_LENGTH+1]
Definition: KML_Icon.h:27
KML_ICON_HREF_LENGTH
#define KML_ICON_HREF_LENGTH
Definition: KML_Icon.h:8
KML_Object::Read
virtual void Read(FILE *fid, char *kstr)=0
Definition: KML_Object.cpp:143
KML_Icon::vboundsc
float vboundsc
Definition: KML_Icon.h:29
KMLFileToken
char * KMLFileToken(FILE *fid, int *pncom=NULL, char ***ppcom=NULL)
Definition: KMLFileReadUtils.cpp:18
KML_Icon::vreftime
float vreftime
Definition: KML_Icon.h:28
KML_Object::Write
virtual void Write(FILE *fid, const char *indent)=0
Definition: KML_Object.cpp:122
KML_Object::DeepEcho
virtual void DeepEcho()
Definition: KML_Object.cpp:72
KML_ICON_HQUERY_LENGTH
#define KML_ICON_HQUERY_LENGTH
Definition: KML_Icon.h:12
KMLFileTokenParse
int KMLFileTokenParse(int *pival, char *ktag, FILE *fid)
Definition: KMLFileReadUtils.cpp:335
KML_ICON_VREFMODE_LENGTH
#define KML_ICON_VREFMODE_LENGTH
Definition: KML_Icon.h:10
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
KML_Icon::refmode
char refmode[KML_ICON_REFMODE_LENGTH+1]
Definition: KML_Icon.h:25
KML_Object::Echo
virtual void Echo()
Definition: KML_Object.cpp:61
KML_Icon::href
char href[KML_ICON_HREF_LENGTH+1]
Definition: KML_Icon.h:24
KML_Icon::DeepEcho
void DeepEcho()
Definition: KML_Icon.cpp:59
KML_Icon::refint
float refint
Definition: KML_Icon.h:26
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
KML_Icon::vformat
char vformat[KML_ICON_VFORMAT_LENGTH+1]
Definition: KML_Icon.h:30