FACT++  1.0
char * DimInfo::getFormat ( )

Definition at line 120 of file diccpp.cxx.

References dic_get_format(), itsFormat, and itsId.

Referenced by ServiceDim::GetFormat(), and FactGui::infoHandlerService().

121 {
122  char *def;
123  int len = 0, new_len;
124 
125  if(itsFormat)
126  {
127  len = (int)strlen(itsFormat)+1;
128  if(len > 1)
129  return itsFormat;
130  }
131  def = dic_get_format(itsId);
132  new_len = (int)strlen(def)+1;
133  if(new_len > len)
134  {
135  if(itsFormat)
136  delete[] itsFormat;
137  itsFormat = new char[(int)strlen(def)+1];
138  }
139  strcpy(itsFormat, def);
140  return itsFormat;
141 }
int itsId
Definition: dic.hxx:125
char * itsFormat
Definition: dic.hxx:129
char * dic_get_format(unsigned serv_id)
Definition: dic.c:961

+ Here is the call graph for this function:

+ Here is the caller graph for this function: