KiCad PCB EDA Suite
DS_DATA_MODEL_IO Class Reference
Inheritance diagram for DS_DATA_MODEL_IO:
DS_DATA_MODEL_FILEIO DS_DATA_MODEL_STRINGIO

Public Member Functions

void Format (DS_DATA_MODEL *aSheet) const
 
void Format (DS_DATA_MODEL *aModel, std::vector< DS_DATA_ITEM * > &aItemsList) const
 
void Format (DS_DATA_MODEL *aModel, DS_DATA_ITEM *aItem, int aNestLevel) const
 

Protected Member Functions

 DS_DATA_MODEL_IO ()
 
virtual ~DS_DATA_MODEL_IO ()
 

Protected Attributes

OUTPUTFORMATTERm_out
 

Private Member Functions

void format (DS_DATA_ITEM_TEXT *aItem, int aNestLevel) const
 
void format (DS_DATA_MODEL *aModel, DS_DATA_ITEM *aItem, int aNestLevel) const
 
void format (DS_DATA_ITEM_POLYGONS *aItem, int aNestLevel) const
 
void format (DS_DATA_ITEM_BITMAP *aItem, int aNestLevel) const
 
void formatCoordinate (const char *aToken, POINT_COORD &aCoord) const
 
void formatRepeatParameters (DS_DATA_ITEM *aItem) const
 
void formatOptions (DS_DATA_ITEM *aItem) const
 

Detailed Description

Definition at line 52 of file ds_data_model_io.cpp.

Constructor & Destructor Documentation

◆ DS_DATA_MODEL_IO()

DS_DATA_MODEL_IO::DS_DATA_MODEL_IO ( )
inlineprotected

Definition at line 61 of file ds_data_model_io.cpp.

61 { m_out = NULL; }
OUTPUTFORMATTER * m_out

◆ ~DS_DATA_MODEL_IO()

virtual DS_DATA_MODEL_IO::~DS_DATA_MODEL_IO ( )
inlineprotectedvirtual

Definition at line 62 of file ds_data_model_io.cpp.

62 {}

Member Function Documentation

◆ Format() [1/3]

void DS_DATA_MODEL_IO::Format ( DS_DATA_MODEL aSheet) const

Definition at line 199 of file ds_data_model_io.cpp.

200 {
201  LOCALE_IO toggle; // switch on/off the locale "C" notation
202 
203  m_out->Print( 0, "(kicad_wks (version %d) (generator pl_editor)\n",
205 
206  // Setup
207  int nestLevel = 1;
208  // Write default values:
209  m_out->Print( nestLevel, "(setup " );
210  m_out->Print( 0, "(textsize %s %s)",
211  double2Str( aSheet->m_DefaultTextSize.x ).c_str(),
212  double2Str( aSheet->m_DefaultTextSize.y ).c_str() );
213  m_out->Print( 0, "(linewidth %s)", double2Str( aSheet->m_DefaultLineWidth ).c_str() );
214  m_out->Print( 0, "(textlinewidth %s)", double2Str( aSheet->m_DefaultTextThickness ).c_str() );
215  m_out->Print( 0, "\n" );
216 
217  // Write margin values
218  m_out->Print( nestLevel, "(left_margin %s)", double2Str( aSheet->GetLeftMargin() ).c_str() );
219  m_out->Print( 0, "(right_margin %s)", double2Str( aSheet->GetRightMargin() ).c_str() );
220  m_out->Print( 0, "(top_margin %s)", double2Str( aSheet->GetTopMargin() ).c_str() );
221  m_out->Print( 0, "(bottom_margin %s)", double2Str( aSheet->GetBottomMargin() ).c_str() );
222  m_out->Print( 0, ")\n" );
223 
224  // Save the graphical items on the drawing sheet
225  for( unsigned ii = 0; ii < aSheet->GetCount(); ii++ )
226  {
227  DS_DATA_ITEM* item = aSheet->GetItem( ii );
228  Format( aSheet, item, nestLevel );
229  }
230 
231  m_out->Print( 0, ")\n" );
232 }
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: locale_io.h:40
double GetRightMargin()
Definition: ds_data_model.h:66
double m_DefaultLineWidth
double GetTopMargin()
Definition: ds_data_model.h:69
double GetLeftMargin()
Definition: ds_data_model.h:63
double m_DefaultTextThickness
OUTPUTFORMATTER * m_out
DSIZE m_DefaultTextSize
double GetBottomMargin()
Definition: ds_data_model.h:72
void Format(DS_DATA_MODEL *aSheet) const
#define SEXPR_WORKSHEET_FILE_VERSION
This file contains the file format version information for the s-expression drawing sheet file format...
DS_DATA_ITEM * GetItem(unsigned aIdx) const
Drawing sheet structure type definitions.
Definition: ds_data_item.h:95
unsigned GetCount() const
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
#define double2Str

References double2Str, Format(), DS_DATA_MODEL::GetBottomMargin(), DS_DATA_MODEL::GetCount(), DS_DATA_MODEL::GetItem(), DS_DATA_MODEL::GetLeftMargin(), DS_DATA_MODEL::GetRightMargin(), DS_DATA_MODEL::GetTopMargin(), DS_DATA_MODEL::m_DefaultLineWidth, DS_DATA_MODEL::m_DefaultTextSize, DS_DATA_MODEL::m_DefaultTextThickness, SEXPR_WORKSHEET_FILE_VERSION, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by DS_DATA_MODEL::Save(), and DS_DATA_MODEL::SaveInString().

◆ Format() [2/3]

void DS_DATA_MODEL_IO::Format ( DS_DATA_MODEL aModel,
std::vector< DS_DATA_ITEM * > &  aItemsList 
) const

Definition at line 158 of file ds_data_model_io.cpp.

159 {
160  LOCALE_IO toggle; // switch on/off the locale "C" notation
161 
162  m_out->Print( 0, "(kicad_wks (version %d) (generator pl_editor)\n",
164 
165  for( DS_DATA_ITEM* item : aItemsList )
166  Format( aModel, item, 1 );
167 
168  m_out->Print( 0, ")\n" );
169 }
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: locale_io.h:40
OUTPUTFORMATTER * m_out
void Format(DS_DATA_MODEL *aSheet) const
#define SEXPR_WORKSHEET_FILE_VERSION
This file contains the file format version information for the s-expression drawing sheet file format...
Drawing sheet structure type definitions.
Definition: ds_data_item.h:95
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426

References Format(), and SEXPR_WORKSHEET_FILE_VERSION.

◆ Format() [3/3]

void DS_DATA_MODEL_IO::Format ( DS_DATA_MODEL aModel,
DS_DATA_ITEM aItem,
int  aNestLevel 
) const

Definition at line 172 of file ds_data_model_io.cpp.

173 {
174  switch( aItem->GetType() )
175  {
177  format( (DS_DATA_ITEM_TEXT*) aItem, aNestLevel );
178  break;
179 
182  format( aModel, aItem, aNestLevel );
183  break;
184 
186  format( (DS_DATA_ITEM_POLYGONS*) aItem, aNestLevel );
187  break;
188 
190  format( (DS_DATA_ITEM_BITMAP*) aItem, aNestLevel );
191  break;
192 
193  default:
194  wxFAIL_MSG( wxT( "Cannot format item" ) );
195  }
196 }
DS_ITEM_TYPE GetType() const
Definition: ds_data_item.h:128
void format(DS_DATA_ITEM_TEXT *aItem, int aNestLevel) const

References DS_DATA_ITEM::DS_BITMAP, DS_DATA_ITEM::DS_POLYPOLYGON, DS_DATA_ITEM::DS_RECT, DS_DATA_ITEM::DS_SEGMENT, DS_DATA_ITEM::DS_TEXT, and DS_DATA_ITEM::GetType().

◆ format() [1/4]

void DS_DATA_MODEL_IO::format ( DS_DATA_ITEM_TEXT aItem,
int  aNestLevel 
) const
private

Definition at line 235 of file ds_data_model_io.cpp.

236 {
237  m_out->Print( aNestLevel, "(tbtext" );
238  m_out->Print( 0, " %s", m_out->Quotew( aItem->m_TextBase ).c_str() );
239  m_out->Print( 0, " (name %s)", m_out->Quotew( aItem->m_Name ).c_str() );
240 
241  formatCoordinate( getTokenName( T_pos ), aItem->m_Pos );
242  formatOptions( aItem );
243 
244  if( aItem->m_Orient )
245  m_out->Print( 0, " (rotate %s)", double2Str(aItem->m_Orient ).c_str() );
246 
247  // Write font info, only if it is not the default setup
248  bool write_size = aItem->m_TextSize.x != 0.0 || aItem->m_TextSize.y != 0.0;
249  bool write_thickness = aItem->m_LineWidth != 0.0;
250 
251  if( write_thickness || write_size || aItem->m_Bold || aItem->m_Italic )
252  {
253  m_out->Print( 0, " (font" );
254 
255  if( write_thickness )
256  m_out->Print( 0, " (linewidth %s)", double2Str( aItem->m_LineWidth ).c_str() );
257 
258  if( write_size )
259  {
260  m_out->Print( 0, " (size %s %s)",
261  double2Str( aItem->m_TextSize.x ).c_str(),
262  double2Str( aItem->m_TextSize.y ).c_str() );
263  }
264 
265  if( aItem->m_Bold )
266  m_out->Print( 0, " bold" );
267 
268  if( aItem->m_Italic )
269  m_out->Print( 0, " italic" );
270 
271  m_out->Print( 0, ")" );
272  }
273 
274  // Write text justification
276  {
277  m_out->Print( 0, " (justify" );
278 
279  // Write T_center opt first, because it is
280  // also a center for both m_Hjustify and m_Vjustify
281  if( aItem->m_Hjustify == GR_TEXT_HJUSTIFY_CENTER )
282  m_out->Print( 0, " center" );
283  else if( aItem->m_Hjustify == GR_TEXT_HJUSTIFY_RIGHT )
284  m_out->Print( 0, " right" );
285 
286  if( aItem->m_Vjustify == GR_TEXT_VJUSTIFY_TOP )
287  m_out->Print( 0, " top" );
288  else if( aItem->m_Vjustify == GR_TEXT_VJUSTIFY_BOTTOM )
289  m_out->Print( 0, " bottom" );
290 
291  m_out->Print( 0, ")" );
292  }
293 
294  // write constraints
295  if( aItem->m_BoundingBoxSize.x )
296  m_out->Print( 0, " (maxlen %s)", double2Str(aItem->m_BoundingBoxSize.x ).c_str() );
297 
298  if( aItem->m_BoundingBoxSize.y )
299  m_out->Print( 0, " (maxheight %s)", double2Str(aItem->m_BoundingBoxSize.y ).c_str() );
300 
301  formatRepeatParameters( aItem );
302 
303  if( !aItem->m_Info.IsEmpty() )
304  m_out->Print( 0, " (comment %s)\n", m_out->Quotew( aItem->m_Info ).c_str() );
305 
306  m_out->Print( 0, ")\n" );
307 }
void formatCoordinate(const char *aToken, POINT_COORD &aCoord) const
wxString m_Info
Definition: ds_data_item.h:199
EDA_TEXT_VJUSTIFY_T m_Vjustify
Definition: ds_data_item.h:339
static const char * getTokenName(T aTok)
EDA_TEXT_HJUSTIFY_T m_Hjustify
Definition: ds_data_item.h:338
OUTPUTFORMATTER * m_out
double m_LineWidth
Definition: ds_data_item.h:202
POINT_COORD m_Pos
Definition: ds_data_item.h:200
void formatRepeatParameters(DS_DATA_ITEM *aItem) const
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
wxString m_Name
Definition: ds_data_item.h:198
#define double2Str
std::string Quotew(const wxString &aWrapee) const
Definition: richio.cpp:494
void formatOptions(DS_DATA_ITEM *aItem) const

References double2Str, getTokenName(), GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, DS_DATA_ITEM_TEXT::m_Bold, DS_DATA_ITEM_TEXT::m_BoundingBoxSize, DS_DATA_ITEM_TEXT::m_Hjustify, DS_DATA_ITEM::m_Info, DS_DATA_ITEM_TEXT::m_Italic, DS_DATA_ITEM::m_LineWidth, DS_DATA_ITEM::m_Name, DS_DATA_ITEM_TEXT::m_Orient, DS_DATA_ITEM::m_Pos, DS_DATA_ITEM_TEXT::m_TextBase, DS_DATA_ITEM_TEXT::m_TextSize, DS_DATA_ITEM_TEXT::m_Vjustify, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ format() [2/4]

void DS_DATA_MODEL_IO::format ( DS_DATA_MODEL aModel,
DS_DATA_ITEM aItem,
int  aNestLevel 
) const
private

Definition at line 310 of file ds_data_model_io.cpp.

311 {
312  if( aItem->GetType() == DS_DATA_ITEM::DS_RECT )
313  m_out->Print( aNestLevel, "(rect" );
314  else
315  m_out->Print( aNestLevel, "(line" );
316 
317  m_out->Print( 0, " (name %s)", m_out->Quotew( aItem->m_Name ).c_str() );
318 
319  formatCoordinate( getTokenName( T_start ), aItem->m_Pos );
320  formatCoordinate( getTokenName( T_end ), aItem->m_End );
321  formatOptions( aItem );
322 
323  if( aItem->m_LineWidth && aItem->m_LineWidth != aModel->m_DefaultLineWidth )
324  m_out->Print( 0, " (linewidth %s)", double2Str( aItem->m_LineWidth ).c_str() );
325 
326  formatRepeatParameters( aItem );
327 
328  if( !aItem->m_Info.IsEmpty() )
329  m_out->Print( 0, " (comment %s)\n", m_out->Quotew( aItem->m_Info ).c_str() );
330 
331  m_out->Print( 0, ")\n" );
332 }
void formatCoordinate(const char *aToken, POINT_COORD &aCoord) const
wxString m_Info
Definition: ds_data_item.h:199
double m_DefaultLineWidth
static const char * getTokenName(T aTok)
POINT_COORD m_End
Definition: ds_data_item.h:201
OUTPUTFORMATTER * m_out
double m_LineWidth
Definition: ds_data_item.h:202
DS_ITEM_TYPE GetType() const
Definition: ds_data_item.h:128
POINT_COORD m_Pos
Definition: ds_data_item.h:200
void formatRepeatParameters(DS_DATA_ITEM *aItem) const
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
wxString m_Name
Definition: ds_data_item.h:198
#define double2Str
std::string Quotew(const wxString &aWrapee) const
Definition: richio.cpp:494
void formatOptions(DS_DATA_ITEM *aItem) const

References double2Str, DS_DATA_ITEM::DS_RECT, getTokenName(), DS_DATA_ITEM::GetType(), DS_DATA_MODEL::m_DefaultLineWidth, DS_DATA_ITEM::m_End, DS_DATA_ITEM::m_Info, DS_DATA_ITEM::m_LineWidth, DS_DATA_ITEM::m_Name, and DS_DATA_ITEM::m_Pos.

◆ format() [3/4]

void DS_DATA_MODEL_IO::format ( DS_DATA_ITEM_POLYGONS aItem,
int  aNestLevel 
) const
private

Definition at line 335 of file ds_data_model_io.cpp.

336 {
337  m_out->Print( aNestLevel, "(polygon" );
338  m_out->Print( 0, " (name %s)", m_out->Quotew( aItem->m_Name ).c_str() );
339  formatCoordinate( "pos", aItem->m_Pos );
340  formatOptions( aItem );
341 
342  formatRepeatParameters( aItem );
343 
344  if( aItem->m_Orient )
345  m_out->Print( 0, " (rotate %s)", double2Str(aItem->m_Orient ).c_str() );
346 
347  if( aItem->m_LineWidth )
348  m_out->Print( 0, " (linewidth %s)\n", double2Str( aItem->m_LineWidth ).c_str() );
349 
350  if( !aItem->m_Info.IsEmpty() )
351  m_out->Print( 0, " (comment %s)\n", m_out->Quotew( aItem->m_Info ).c_str() );
352 
353  // Write polygon corners list
354  for( int kk = 0; kk < aItem->GetPolyCount(); kk++ )
355  {
356  m_out->Print( aNestLevel+1, "(pts" );
357  // Create current polygon corners list
358  unsigned ist = aItem->GetPolyIndexStart( kk );
359  unsigned iend = aItem->GetPolyIndexEnd( kk );
360  int ii = 0;
361 
362  while( ist <= iend )
363  {
364  DPOINT pos = aItem->m_Corners[ist++];
365  int nestLevel = 0;
366 
367  if( ii++ > 4)
368  {
369  m_out->Print( 0, "\n" );
370  nestLevel = aNestLevel+2;
371  ii = 0;
372  }
373 
374  m_out->Print( nestLevel, " (xy %s %s)",
375  double2Str( pos.x ).c_str(),
376  double2Str( pos.y ).c_str() );
377  }
378 
379  m_out->Print( 0, ")\n" );
380  }
381 
382  m_out->Print( aNestLevel, ")\n" );
383 }
void formatCoordinate(const char *aToken, POINT_COORD &aCoord) const
wxString m_Info
Definition: ds_data_item.h:199
unsigned GetPolyIndexStart(unsigned aContour) const
Definition: ds_data_item.h:252
int GetPolyCount() const
Definition: ds_data_item.h:246
std::vector< DPOINT > m_Corners
Definition: ds_data_item.h:288
unsigned GetPolyIndexEnd(unsigned aContour) const
Definition: ds_data_item.h:264
OUTPUTFORMATTER * m_out
double m_LineWidth
Definition: ds_data_item.h:202
POINT_COORD m_Pos
Definition: ds_data_item.h:200
void formatRepeatParameters(DS_DATA_ITEM *aItem) const
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
wxString m_Name
Definition: ds_data_item.h:198
#define double2Str
std::string Quotew(const wxString &aWrapee) const
Definition: richio.cpp:494
void formatOptions(DS_DATA_ITEM *aItem) const

References double2Str, DS_DATA_ITEM_POLYGONS::GetPolyCount(), DS_DATA_ITEM_POLYGONS::GetPolyIndexEnd(), DS_DATA_ITEM_POLYGONS::GetPolyIndexStart(), DS_DATA_ITEM_POLYGONS::m_Corners, DS_DATA_ITEM::m_Info, DS_DATA_ITEM::m_LineWidth, DS_DATA_ITEM::m_Name, DS_DATA_ITEM_POLYGONS::m_Orient, DS_DATA_ITEM::m_Pos, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ format() [4/4]

void DS_DATA_MODEL_IO::format ( DS_DATA_ITEM_BITMAP aItem,
int  aNestLevel 
) const
private

Definition at line 386 of file ds_data_model_io.cpp.

387 {
388  m_out->Print( aNestLevel, "(bitmap" );
389  m_out->Print( 0, " (name %s)", m_out->Quotew( aItem->m_Name ).c_str() );
390  formatCoordinate( "pos", aItem->m_Pos );
391  formatOptions( aItem );
392 
393  m_out->Print( 0, " (scale %s)", double2Str( aItem->m_ImageBitmap->GetScale() ).c_str() );
394 
395  formatRepeatParameters( aItem );
396  m_out->Print( 0,"\n");
397 
398  if( !aItem->m_Info.IsEmpty() )
399  m_out->Print( 0, " (comment %s)\n", m_out->Quotew( aItem->m_Info ).c_str() );
400 
401  // Write image in png readable format
402  m_out->Print( aNestLevel, "(pngdata\n" );
403  wxArrayString pngStrings;
404  aItem->m_ImageBitmap->SaveData( pngStrings );
405 
406  for( unsigned ii = 0; ii < pngStrings.GetCount(); ii++ )
407  m_out->Print( aNestLevel+1, "(data \"%s\")\n", TO_UTF8(pngStrings[ii]) );
408 
409  m_out->Print( aNestLevel+1, ")\n" );
410 
411  m_out->Print( aNestLevel, ")\n" );
412 }
void formatCoordinate(const char *aToken, POINT_COORD &aCoord) const
wxString m_Info
Definition: ds_data_item.h:199
bool SaveData(FILE *aFile) const
Write the bitmap data to aFile.
double GetScale() const
Definition: bitmap_base.h:79
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: macros.h:96
OUTPUTFORMATTER * m_out
BITMAP_BASE * m_ImageBitmap
Definition: ds_data_item.h:368
POINT_COORD m_Pos
Definition: ds_data_item.h:200
void formatRepeatParameters(DS_DATA_ITEM *aItem) const
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
wxString m_Name
Definition: ds_data_item.h:198
#define double2Str
std::string Quotew(const wxString &aWrapee) const
Definition: richio.cpp:494
void formatOptions(DS_DATA_ITEM *aItem) const

References double2Str, BITMAP_BASE::GetScale(), DS_DATA_ITEM_BITMAP::m_ImageBitmap, DS_DATA_ITEM::m_Info, DS_DATA_ITEM::m_Name, DS_DATA_ITEM::m_Pos, BITMAP_BASE::SaveData(), and TO_UTF8.

◆ formatCoordinate()

void DS_DATA_MODEL_IO::formatCoordinate ( const char *  aToken,
POINT_COORD aCoord 
) const
private

Definition at line 415 of file ds_data_model_io.cpp.

416 {
417  m_out->Print( 0, " (%s %s %s", aToken,
418  double2Str( aCoord.m_Pos.x ).c_str(),
419  double2Str( aCoord.m_Pos.y ).c_str() );
420 
421  switch( aCoord.m_Anchor )
422  {
423  case RB_CORNER: break;
424  case LT_CORNER: m_out->Print( 0, " ltcorner" ); break;
425  case LB_CORNER: m_out->Print( 0, " lbcorner" ); break;
426  case RT_CORNER: m_out->Print( 0, " rtcorner" ); break;
427  }
428 
429  m_out->Print( 0, ")" );
430 }
OUTPUTFORMATTER * m_out
DPOINT m_Pos
Definition: ds_data_item.h:80
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
#define double2Str

References double2Str, LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, POINT_COORD::m_Pos, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ formatOptions()

void DS_DATA_MODEL_IO::formatOptions ( DS_DATA_ITEM aItem) const
private

Definition at line 451 of file ds_data_model_io.cpp.

452 {
453  if( aItem->GetPage1Option() == FIRST_PAGE_ONLY )
454  m_out->Print( 0, " (option page1only)" );
455  else if( aItem->GetPage1Option() == SUBSEQUENT_PAGES )
456  m_out->Print( 0, " (option notonpage1)" );
457 }
OUTPUTFORMATTER * m_out
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
PAGE_OPTION GetPage1Option() const
Definition: ds_data_item.h:133

References FIRST_PAGE_ONLY, DS_DATA_ITEM::GetPage1Option(), and SUBSEQUENT_PAGES.

◆ formatRepeatParameters()

void DS_DATA_MODEL_IO::formatRepeatParameters ( DS_DATA_ITEM aItem) const
private

Definition at line 433 of file ds_data_model_io.cpp.

434 {
435  if( aItem->m_RepeatCount <= 1 )
436  return;
437 
438  m_out->Print( 0, " (repeat %d)", aItem->m_RepeatCount );
439 
440  if( aItem->m_IncrementVector.x )
441  m_out->Print( 0, " (incrx %s)", double2Str(aItem-> m_IncrementVector.x ).c_str() );
442 
443  if( aItem->m_IncrementVector.y )
444  m_out->Print( 0, " (incry %s)", double2Str( aItem->m_IncrementVector.y ).c_str() );
445 
446  if( aItem->m_IncrementLabel != 1 && aItem->GetType() == DS_DATA_ITEM::DS_TEXT )
447  m_out->Print( 0, " (incrlabel %d)", aItem->m_IncrementLabel );
448 }
DPOINT m_IncrementVector
Definition: ds_data_item.h:204
OUTPUTFORMATTER * m_out
DS_ITEM_TYPE GetType() const
Definition: ds_data_item.h:128
int m_IncrementLabel
Definition: ds_data_item.h:205
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
#define double2Str

References double2Str, DS_DATA_ITEM::DS_TEXT, DS_DATA_ITEM::GetType(), DS_DATA_ITEM::m_IncrementLabel, DS_DATA_ITEM::m_IncrementVector, DS_DATA_ITEM::m_RepeatCount, VECTOR2< T >::x, and VECTOR2< T >::y.

Member Data Documentation

◆ m_out

OUTPUTFORMATTER* DS_DATA_MODEL_IO::m_out
protected

Definition at line 74 of file ds_data_model_io.cpp.


The documentation for this class was generated from the following file: