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

#include <KML_LineStyle.h>

Inheritance diagram for KML_LineStyle:
KML_ColorStyle KML_SubStyle KML_Object Object

Public Member Functions

 KML_LineStyle ()
 
 ~KML_LineStyle ()
 
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

float width
 
- 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_LineStyle.h.

Constructor & Destructor Documentation

◆ KML_LineStyle()

KML_LineStyle::KML_LineStyle ( )

Definition at line 19 of file KML_LineStyle.cpp.

19  {/*{{{*/
20 
21  width =1.;
22 
23 }

◆ ~KML_LineStyle()

KML_LineStyle::~KML_LineStyle ( )

Definition at line 25 of file KML_LineStyle.cpp.

25  {/*{{{*/
26 
27  ;
28 
29 }

Member Function Documentation

◆ Echo()

void KML_LineStyle::Echo ( void  )
virtual

Reimplemented from KML_ColorStyle.

Definition at line 33 of file KML_LineStyle.cpp.

33  {/*{{{*/
34 
35  bool flag=true;
36 
37  if(flag) _printf0_("KML_LineStyle:\n");
39 
40  if(flag) _printf0_(" width: " << width << "\n");
41 
42  return;
43 }

◆ DeepEcho() [1/2]

void KML_LineStyle::DeepEcho ( void  )
virtual

Reimplemented from KML_ColorStyle.

Definition at line 45 of file KML_LineStyle.cpp.

45  {/*{{{*/
46 
47  char indent[81]="";
48 
50 
51  return;
52 }

◆ DeepEcho() [2/2]

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

Reimplemented from KML_ColorStyle.

Definition at line 54 of file KML_LineStyle.cpp.

54  {/*{{{*/
55 
56  bool flag=true;
57 
58  if(flag) _printf0_(indent << "KML_LineStyle:\n");
60 
61  if(flag) _printf0_(indent << " width: " << width << "\n");
62 
63  return;
64 }

◆ Write()

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

Reimplemented from KML_ColorStyle.

Definition at line 66 of file KML_LineStyle.cpp.

66  {/*{{{*/
67 
68  fprintf(filout,"%s<LineStyle",indent);
69  WriteAttrib(filout," ");
70  fprintf(filout,">\n");
71  WriteCommnt(filout,indent);
72 
73  KML_ColorStyle::Write(filout,indent);
74 
75  fprintf(filout,"%s <width>%g</width>\n",indent,width);
76 
77  fprintf(filout,"%s</LineStyle>\n",indent);
78 
79  return;
80 }

◆ Read()

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

Reimplemented from KML_ColorStyle.

Definition at line 82 of file KML_LineStyle.cpp.

82  {/*{{{*/
83 
84  char* kstri;
85  int ncom=0;
86  char** pcom=NULL;
87 
88 /* get object attributes and check for solo tag */
89 
90  if (KMLFileTagAttrib(this,
91  kstr))
92  return;
93 
94 /* loop over and process fields within opening and closing tags */
95 
96  while((kstri=KMLFileToken(fid, &ncom,&pcom))){
97  if (!strncmp(kstri,"</LineStyle",11)) {
98  xDelete<char>(kstri);
99  break;
100  }
101  else if (!strncmp(kstri,"</",2))
102  {_error_("KML_LineStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
103  else if (strncmp(kstri,"<",1))
104  {_error_("KML_LineStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
105 
106  else if (!strcmp(kstri,"<width>"))
108  kstri,
109  fid);
110 
111  else if (!strncmp(kstri,"<",1))
112  KML_ColorStyle::Read(fid,kstri);
113 
114  xDelete<char>(kstri);
115  }
116 
117  this->AddCommnt(ncom,pcom);
118 
119  for(ncom=ncom; ncom>0; ncom--)
120  xDelete<char>(pcom[ncom-1]);
121  xDelete<char*>(pcom);
122 
123  return;
124 }

◆ Id()

int KML_LineStyle::Id ( void  )
inlinevirtual

Reimplemented from KML_ColorStyle.

Definition at line 30 of file KML_LineStyle.h.

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

◆ ObjectEnum()

int KML_LineStyle::ObjectEnum ( void  )
inlinevirtual

Reimplemented from KML_ColorStyle.

Definition at line 31 of file KML_LineStyle.h.

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

◆ copy()

Object* KML_LineStyle::copy ( void  )
inlinevirtual

Reimplemented from KML_ColorStyle.

Definition at line 32 of file KML_LineStyle.h.

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

◆ Marshall()

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

Reimplemented from KML_ColorStyle.

Definition at line 33 of file KML_LineStyle.h.

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

Field Documentation

◆ width

float KML_LineStyle::width

Definition at line 18 of file KML_LineStyle.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_LineStyle::width
float width
Definition: KML_LineStyle.h:18
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
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
KML_LineStyle::DeepEcho
void DeepEcho()
Definition: KML_LineStyle.cpp:45
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
KML_ColorStyle::DeepEcho
void DeepEcho()
Definition: KML_ColorStyle.cpp:47
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