Home | Libraries | People | FAQ | More |
boost::cell
// In header: <boost/document/cell.hpp> class cell { public: // construct/copy/destruct explicit cell(const std::shared_ptr< cell_interface >); cell(const cell &); cell & operator=(const cell &); cell & operator=(const std::string &); cell & operator=(double); ~cell(); // public member functions void set_formula(const std::string &); void set_string(const std::string &); void set_value(double); void reset(); std::string get_formula() const; std::string get_string() const; double get_value() const; std::size_t get_row_index() const; std::size_t get_column_index() const; bool empty() const; boost::cell_content_type::type get_content_type() const; bool operator<(const std::string &); bool operator>(const std::string &); bool operator==(const std::string &); bool operator==(const cell &); };
cell
public
construct/copy/destructexplicit cell(const std::shared_ptr< cell_interface > impl);
The default constructor which takes in the corresponding cell_interface for operation. Follows the pimpl idiom to support MS and LibreOffice.
cell(const cell & c);The copy constructor of the cell.
cell & operator=(const cell & c);The assignment operator of the cell class. Makes all operations non shallow with respect to the internal cells.
cell & operator=(const std::string & str);The overloaded = operator sets a string in the cell.
cell & operator=(double x);The overloaded = operator sets a double in the cell.
~cell();Default Destructor. Does nothing.
cell
public member functionsvoid set_formula(const std::string & s);Sets a formula in the cell.
void set_string(const std::string & str);Sets a string in the cell.
void set_value(double x);Sets a double in the cell.
void reset();Resets the contents of the cell.
std::string get_formula() const;Gets the formula in the cell.
std::string get_string() const;Gets the string present in the cell.
double get_value() const;Gets the value present in the cell.
std::size_t get_row_index() const;Gets the row index of the cell.
std::size_t get_column_index() const;Gets the column index of the cell.
bool empty() const;Returns whether the cell is empty or not as a boolean.
boost::cell_content_type::type get_content_type() const;Given the cell content, returns the type of cell content currently present in it in the. form of boost::cell_content_type::type enum which can be of the following values, EMPTY,STRING,VALUE,FORMULA,ERROR.
bool operator<(const std::string & str);Compares the cell with a string assuming that the cell contains a string.
bool operator>(const std::string & str);Compares the cell with a string assuming that the cell contains a string.
bool operator==(const std::string & str);Compares the cell with a string assuming that the cell contains a string.
bool operator==(const cell & c);Compares the cell with another cell.