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

#include <KML_ColorStyle.h>

Inheritance diagram for KML_ColorStyle:
KML_SubStyle KML_Object Object KML_LineStyle KML_PolyStyle

Public Member Functions

 KML_ColorStyle ()
 
 ~KML_ColorStyle ()
 
void Echo ()
 
void DeepEcho ()
 
void DeepEcho (const char *indent)
 
void Write (FILE *fid, const char *indent)
 
void Read (FILE *fid, char *kstr)
 
int Id ()
 
void Demarshall (char **pmarshalled_dataset)
 
int ObjectEnum ()
 
Objectcopy ()
 
void Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
 
- 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

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 17 of file KML_ColorStyle.h.

Constructor & Destructor Documentation

◆ KML_ColorStyle()

KML_ColorStyle::KML_ColorStyle ( )

Definition at line 20 of file KML_ColorStyle.cpp.

20  {/*{{{*/
21 
22  strcpy(color ,"ffffffff");
23  strcpy(colormode ,"normal");
24 
25 }

◆ ~KML_ColorStyle()

KML_ColorStyle::~KML_ColorStyle ( )

Definition at line 27 of file KML_ColorStyle.cpp.

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

Member Function Documentation

◆ Echo()

void KML_ColorStyle::Echo ( void  )
virtual

Reimplemented from KML_Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 35 of file KML_ColorStyle.cpp.

35  {/*{{{*/
36 
37  bool flag=true;
38 
40 
41  if(flag) _printf0_(" color: " << color << "\n");
42  if(flag) _printf0_(" colormode: " << colormode << "\n");
43 
44  return;
45 }

◆ DeepEcho() [1/2]

void KML_ColorStyle::DeepEcho ( void  )
virtual

Reimplemented from KML_Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 47 of file KML_ColorStyle.cpp.

47  {/*{{{*/
48 
49  char indent[81]="";
50 
52 
53  return;
54 }

◆ DeepEcho() [2/2]

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

Reimplemented from KML_Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 56 of file KML_ColorStyle.cpp.

56  {/*{{{*/
57 
58  bool flag=true;
59 
60  KML_SubStyle::DeepEcho(indent);
61 
62  if(flag) _printf0_(indent << " color: " << color << "\n");
63  if(flag) _printf0_(indent << " colormode: " << colormode << "\n");
64 }

◆ Write()

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

Implements KML_Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 66 of file KML_ColorStyle.cpp.

66  {/*{{{*/
67 
68  KML_SubStyle::Write(filout,indent);
69 
70  if (color && strlen(color))
71  fprintf(filout,"%s <color>%s</color>\n",indent,color);
72  if (colormode && strlen(colormode))
73  fprintf(filout,"%s <colorMode>%s</colorMode>\n",indent,colormode);
74 
75  return;
76 }

◆ Read()

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

Implements KML_Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 78 of file KML_ColorStyle.cpp.

78  {/*{{{*/
79 
80 /* process field within opening and closing tags */
81 
82  if (!strncmp(kstr,"</ColorStyle",12))
83  return;
84  else if (!strncmp(kstr,"</",2))
85  {_error_("KML_ColorStyle::Read -- Unexpected closing tag " << kstr);}
86  else if (strncmp(kstr,"<",1))
87  {_error_("KML_ColorStyle::Read -- Unexpected field \"" << kstr << "\"");}
88 
89  else if (!strcmp(kstr,"<color>"))
91  else if (!strcmp(kstr,"<colorMode>"))
93 
94  else if (!strncmp(kstr,"<",1))
95  KML_SubStyle::Read(fid,kstr);
96 
97  return;
98 }

◆ Id()

int KML_ColorStyle::Id ( void  )
inlinevirtual

Implements Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 34 of file KML_ColorStyle.h.

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

◆ Demarshall()

void KML_ColorStyle::Demarshall ( char **  pmarshalled_dataset)
inline

Definition at line 35 of file KML_ColorStyle.h.

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

◆ ObjectEnum()

int KML_ColorStyle::ObjectEnum ( void  )
inlinevirtual

Implements Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 36 of file KML_ColorStyle.h.

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

◆ copy()

Object* KML_ColorStyle::copy ( void  )
inlinevirtual

Implements Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 37 of file KML_ColorStyle.h.

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

◆ Marshall()

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

Implements Object.

Reimplemented in KML_PolyStyle, and KML_LineStyle.

Definition at line 38 of file KML_ColorStyle.h.

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

Field Documentation

◆ color

char KML_ColorStyle::color[KML_COLORSTYLE_COLOR_LENGTH+1]

Definition at line 21 of file KML_ColorStyle.h.

◆ colormode

char KML_ColorStyle::colormode[KML_COLORSTYLE_COLORMODE_LENGTH+1]

Definition at line 22 of file KML_ColorStyle.h.


The documentation for this class was generated from the following files:
_printf0_
#define _printf0_(StreamArgs)
Definition: Print.h:29
KML_COLORSTYLE_COLOR_LENGTH
#define KML_COLORSTYLE_COLOR_LENGTH
Definition: KML_ColorStyle.h:8
KML_ColorStyle::colormode
char colormode[KML_COLORSTYLE_COLORMODE_LENGTH+1]
Definition: KML_ColorStyle.h:22
KML_SubStyle::Write
void Write(FILE *fid, const char *indent)
Definition: KML_SubStyle.cpp:56
KMLFileTokenParse
int KMLFileTokenParse(int *pival, char *ktag, FILE *fid)
Definition: KMLFileReadUtils.cpp:335
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
KML_SubStyle::Echo
void Echo()
Definition: KML_SubStyle.cpp:33
KML_SubStyle::DeepEcho
void DeepEcho()
Definition: KML_SubStyle.cpp:40
KML_SubStyle::Read
void Read(FILE *fid, char *kstr)
Definition: KML_SubStyle.cpp:63
KML_ColorStyle::DeepEcho
void DeepEcho()
Definition: KML_ColorStyle.cpp:47
KML_COLORSTYLE_COLORMODE_LENGTH
#define KML_COLORSTYLE_COLORMODE_LENGTH
Definition: KML_ColorStyle.h:9
KML_ColorStyle::color
char color[KML_COLORSTYLE_COLOR_LENGTH+1]
Definition: KML_ColorStyle.h:21