+2000-05-09 Dekel Tsur <dekel@math.tau.ac.il>
+
+ * src/Bullet.[Ch]: Fixed a small bug.
+
2000-05-21 Dekel Tsur <dekel@math.tau.ac.il>
* src/paragraph.C (String): Several fixes/improvements
2000-05-21 Dekel Tsur <dekel@math.tau.ac.il>
* src/paragraph.C (String): Several fixes/improvements
-string Bullet::getText()
+string const & Bullet::getText() const
{
if (user_text == 0) {
generateText();
{
if (user_text == 0) {
generateText();
/*--------------------Private Member Functions-------------------*/
/*--------------------Private Member Functions-------------------*/
-void Bullet::generateText()
+void Bullet::generateText() const
{
// Assumption:
// user hasn't defined their own text and/or I haven't generated
{
// Assumption:
// user hasn't defined their own text and/or I haven't generated
///
int getSize() const;
///
///
int getSize() const;
///
- string getText() const;
- ///
- string getText();
+ string const & getText() const;
///
char const * c_str() const;
///
///
char const * c_str() const;
///
+ void generateText() const;
///
static string bulletSize(short int);
///
///
static string bulletSize(short int);
///
or if I can use it to generate strings (0)
or have already (-1)
*/
or if I can use it to generate strings (0)
or have already (-1)
*/
+ mutable short user_text;
//NOTE: Arranging these four shorts above to be together
// like this should ensure they are in a single cache line
//NOTE: Arranging these four shorts above to be together
// like this should ensure they are in a single cache line
or one generated internally from the font, character
and size settings.
*/
or one generated internally from the font, character
and size settings.
*/
-inline
-string Bullet::getText() const
-{
- return text;
-}
-
-
inline
Bullet & Bullet::operator=(Bullet const & b)
{
inline
Bullet & Bullet::operator=(Bullet const & b)
{
inline
char const * Bullet::c_str() const
{
inline
char const * Bullet::c_str() const
{
- return this->getText().c_str();
+ return getText().c_str();