rllib  1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Private Attributes | List of all members
rlSpreadsheetCell Class Reference

#include <rlspreadsheet.h>

Collaboration diagram for rlSpreadsheetCell:
Collaboration graph
[legend]

Public Member Functions

 rlSpreadsheetCell (const char *text=0)
 
virtual ~rlSpreadsheetCell ()
 
const char * text ()
 
void setText (const char *text)
 
int printf (const char *format,...)
 
void clear ()
 
void setNextCell (rlSpreadsheetCell *next)
 
rlSpreadsheetCellgetNextCell ()
 
int exists ()
 

Private Attributes

char * txt
 
rlSpreadsheetCellnextCell
 

Detailed Description

A cell of a spreadsheet.

Definition at line 24 of file rlspreadsheet.h.

Constructor & Destructor Documentation

rlSpreadsheetCell::rlSpreadsheetCell ( const char *  text = 0)

Definition at line 25 of file rlspreadsheet.cpp.

{
if(Text != NULL)
{
txt = new char[strlen(Text)+1];
strcpy(txt,Text);
}
else
{
txt = NULL;
}
nextCell = NULL;
}
rlSpreadsheetCell::~rlSpreadsheetCell ( )
virtual

Definition at line 39 of file rlspreadsheet.cpp.

{
if(txt != NULL) delete [] txt;
}

Member Function Documentation

void rlSpreadsheetCell::clear ( )

Definition at line 75 of file rlspreadsheet.cpp.

{
if(txt != NULL) delete [] txt;
txt = NULL;
}
int rlSpreadsheetCell::exists ( )

Definition at line 91 of file rlspreadsheet.cpp.

{
return 1;
}
rlSpreadsheetCell * rlSpreadsheetCell::getNextCell ( )

Definition at line 86 of file rlspreadsheet.cpp.

{
return nextCell;
}
int rlSpreadsheetCell::printf ( const char *  format,
  ... 
)

Definition at line 62 of file rlspreadsheet.cpp.

{
int ret;
char buf[rl_PRINTF_LENGTH_SPREADSHEET]; // should be big enough
va_list ap;
va_start(ap,format);
ret = rlvsnprintf(buf, rl_PRINTF_LENGTH_SPREADSHEET - 1, format, ap);
va_end(ap);
setText(buf);
return ret;
}
void rlSpreadsheetCell::setNextCell ( rlSpreadsheetCell next)

Definition at line 81 of file rlspreadsheet.cpp.

{
nextCell = next;
}
void rlSpreadsheetCell::setText ( const char *  text)

Definition at line 50 of file rlspreadsheet.cpp.

{
if(txt != NULL) delete [] txt;
if(Text == NULL)
{
txt = NULL;
return;
}
txt = new char[strlen(Text)+1];
strcpy(txt,Text);
}
const char * rlSpreadsheetCell::text ( )

Definition at line 44 of file rlspreadsheet.cpp.

{
if(txt == NULL) return null_string;
return txt;
}

Member Data Documentation

rlSpreadsheetCell* rlSpreadsheetCell::nextCell
private

Definition at line 38 of file rlspreadsheet.h.

char* rlSpreadsheetCell::txt
private

Definition at line 37 of file rlspreadsheet.h.


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