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

#include <KML_PolyStyle.h>

Inheritance diagram for KML_PolyStyle:
KML_ColorStyle KML_SubStyle KML_Object Object

Public Member Functions

 KML_PolyStyle ()
 
 ~KML_PolyStyle ()
 
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_ColorStyle
 KML_ColorStyle ()
 
 ~KML_ColorStyle ()
 
void Demarshall (char **pmarshalled_dataset)
 
- Public Member Functions inherited from KML_SubStyle
 KML_SubStyle ()
 
 ~KML_SubStyle ()
 
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 ()
 
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

int fill
 
int outline
 
- Data Fields inherited from KML_ColorStyle
char color [KML_COLORSTYLE_COLOR_LENGTH+1]
 
char colormode [KML_COLORSTYLE_COLORMODE_LENGTH+1]
 
- Data Fields inherited from KML_Object
DataSetattrib
 
DataSetcommnt
 
DataSetkmlobj
 

Detailed Description

Definition at line 14 of file KML_PolyStyle.h.

Constructor & Destructor Documentation

◆ KML_PolyStyle()

KML_PolyStyle::KML_PolyStyle ( )

Definition at line 21 of file KML_PolyStyle.cpp.

21  {/*{{{*/
22 
23  fill =true;
24  outline =true;
25 
26 }

◆ ~KML_PolyStyle()

KML_PolyStyle::~KML_PolyStyle ( )

Definition at line 28 of file KML_PolyStyle.cpp.

28  {/*{{{*/
29 
30  ;
31 
32 }

Member Function Documentation

◆ Echo()

void KML_PolyStyle::Echo ( void  )
virtual

Reimplemented from KML_ColorStyle.

Definition at line 36 of file KML_PolyStyle.cpp.

36  {/*{{{*/
37 
38  bool flag=true;
39 
40  if(flag) _printf0_("KML_PolyStyle:\n");
42 
43  if(flag) _printf0_(" fill: " << fill << "\n");
44  if(flag) _printf0_(" outline: " << outline << "\n");
45 
46  return;
47 }

◆ DeepEcho() [1/2]

void KML_PolyStyle::DeepEcho ( void  )
virtual

Reimplemented from KML_ColorStyle.

Definition at line 49 of file KML_PolyStyle.cpp.

49  {/*{{{*/
50 
51  char indent[81]="";
52 
54 
55  return;
56 }

◆ DeepEcho() [2/2]

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

Reimplemented from KML_ColorStyle.

Definition at line 58 of file KML_PolyStyle.cpp.

58  {/*{{{*/
59 
60  bool flag=true;
61 
62  if(flag) _printf0_(indent << "KML_PolyStyle:\n");
64 
65  if(flag) _printf0_(indent << " fill: " << fill << "\n");
66  if(flag) _printf0_(indent << " outline: " << outline << "\n");
67 
68  return;
69 }

◆ Write()

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

Reimplemented from KML_ColorStyle.

Definition at line 71 of file KML_PolyStyle.cpp.

71  {/*{{{*/
72 
73  fprintf(filout,"%s<PolyStyle",indent);
74  WriteAttrib(filout," ");
75  fprintf(filout,">\n");
76  WriteCommnt(filout,indent);
77 
78  KML_ColorStyle::Write(filout,indent);
79 
80  fprintf(filout,"%s <fill>%d</fill>\n",indent,fill);
81  fprintf(filout,"%s <outline>%d</outline>\n",indent,outline);
82 
83  fprintf(filout,"%s</PolyStyle>\n",indent);
84 
85  return;
86 }

◆ Read()

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

Reimplemented from KML_ColorStyle.

Definition at line 88 of file KML_PolyStyle.cpp.

88  {/*{{{*/
89 
90  char* kstri;
91  int ncom=0;
92  char** pcom=NULL;
93 
94 /* get object attributes and check for solo tag */
95 
96  if (KMLFileTagAttrib(this,
97  kstr))
98  return;
99 
100 /* loop over and process fields within opening and closing tags */
101 
102  while((kstri=KMLFileToken(fid, &ncom,&pcom))){
103  if (!strncmp(kstri,"</PolyStyle",11)) {
104  xDelete<char>(kstri);
105  break;
106  }
107  else if (!strncmp(kstri,"</",2))
108  {_error_("KML_PolyStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
109  else if (strncmp(kstri,"<",1))
110  {_error_("KML_PolyStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
111 
112  else if (!strcmp(kstri,"<fill>"))
114  kstri,
115  fid);
116  else if (!strcmp(kstri,"<outline>"))
118  kstri,
119  fid);
120 
121  else if (!strncmp(kstri,"<",1))
122  KML_ColorStyle::Read(fid,kstri);
123 
124  xDelete<char>(kstri);
125  }
126 
127  this->AddCommnt(ncom,pcom);
128 
129  for(ncom=ncom; ncom>0; ncom--)
130  xDelete<char>(pcom[ncom-1]);
131  xDelete<char*>(pcom);
132 
133  return;
134 }

◆ Id()

int KML_PolyStyle::Id ( void  )
inlinevirtual

Reimplemented from KML_ColorStyle.

Definition at line 31 of file KML_PolyStyle.h.

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

◆ ObjectEnum()

int KML_PolyStyle::ObjectEnum ( void  )
inlinevirtual

Reimplemented from KML_ColorStyle.

Definition at line 32 of file KML_PolyStyle.h.

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

◆ copy()

Object* KML_PolyStyle::copy ( void  )
inlinevirtual

Reimplemented from KML_ColorStyle.

Definition at line 33 of file KML_PolyStyle.h.

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

◆ Marshall()

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

Reimplemented from KML_ColorStyle.

Definition at line 34 of file KML_PolyStyle.h.

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

Field Documentation

◆ fill

int KML_PolyStyle::fill

Definition at line 18 of file KML_PolyStyle.h.

◆ outline

int KML_PolyStyle::outline

Definition at line 19 of file KML_PolyStyle.h.


The documentation for this class was generated from the following files:
KML_ColorStyle::Echo
void Echo()
Definition: KML_ColorStyle.cpp:35
_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_ColorStyle::Write
void Write(FILE *fid, const char *indent)
Definition: KML_ColorStyle.cpp:66
KMLFileTagAttrib
int KMLFileTagAttrib(KML_Object *kobj, char *ktag)
Definition: KMLFileReadUtils.cpp:287
KML_ColorStyle::Read
void Read(FILE *fid, char *kstr)
Definition: KML_ColorStyle.cpp:78
KML_PolyStyle::fill
int fill
Definition: KML_PolyStyle.h:18
KML_PolyStyle::outline
int outline
Definition: KML_PolyStyle.h:19
KMLFileToken
char * KMLFileToken(FILE *fid, int *pncom=NULL, char ***ppcom=NULL)
Definition: KMLFileReadUtils.cpp:18
KMLFileTokenParse
int KMLFileTokenParse(int *pival, char *ktag, FILE *fid)
Definition: KMLFileReadUtils.cpp:335
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
KML_ColorStyle::DeepEcho
void DeepEcho()
Definition: KML_ColorStyle.cpp:47
KML_PolyStyle::DeepEcho
void DeepEcho()
Definition: KML_PolyStyle.cpp:49
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