Orcus
Public Member Functions | List of all members
orcus::spreadsheet::iface::import_shared_strings Class Referenceabstract

#include <import_interface.hpp>

Inheritance diagram for orcus::spreadsheet::iface::import_shared_strings:
orcus::spreadsheet::import_shared_strings

Public Member Functions

virtual size_t append (const char *s, size_t n)=0
 
virtual size_t add (const char *s, size_t n)=0
 
virtual void set_segment_font (size_t font_index)=0
 
virtual void set_segment_bold (bool b)=0
 
virtual void set_segment_italic (bool b)=0
 
virtual void set_segment_font_name (const char *s, size_t n)=0
 
virtual void set_segment_font_size (double point)=0
 
virtual void set_segment_font_color (color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue)=0
 
virtual void append_segment (const char *s, size_t n)=0
 
virtual size_t commit_segments ()=0
 

Detailed Description

Interface class designed to be derived by the implementor.

Member Function Documentation

virtual size_t orcus::spreadsheet::iface::import_shared_strings::add ( const char *  s,
size_t  n 
)
pure virtual

Similar to the append method, it adds new string to the string pool; however, this method checks if the string being added is already in the pool before each insertion, to avoid duplicated strings.

Parameters
spointer to the first character of the string array. The string array doesn't necessary have to be null-terminated.
nlength of the string.
Returns
ID of the string just inserted.

Implemented in orcus::spreadsheet::import_shared_strings.

virtual size_t orcus::spreadsheet::iface::import_shared_strings::append ( const char *  s,
size_t  n 
)
pure virtual

Append new string to the string list. Order of insertion is important since that determines the numerical ID values of inserted strings. Note that this method assumes that the caller knows the string being appended is not yet in the pool.

Parameters
spointer to the first character of the string array. The string array doesn't necessary have to be null-terminated.
nlength of the string.
Returns
ID of the string just inserted.

Implemented in orcus::spreadsheet::import_shared_strings.