QTimeSeries Homepage

Main Page   Alphabetical List   Compound List   File List   Compound Members  

QTS_Table Class Reference

Represents a table (as in a set of records - not a GUI table). More...

#include <qts_table.h>

List of all members.

Public Types

enum  QTS_RecordPeriod {
  MINUTE_1, MINUTE_5, MINUTE_10, MINUTE_15,
  MINUTE_30, HOUR_1, DAY_1, WEEK_1,
  MONTH_1, YEAR_1
}

Public Methods

 QTS_Table ()
 ~QTS_Table ()
bool load (const QString &filename)
 Import records from a text file with the format. More...

bool save (const QString &filename)
 Saves this table to the given file. More...

bool setRecordPeriod (const QString &info)
 Sets the record period from a string which contains relevant information. More...

void complete ()
 Completes this table with the missing days (e.g. More...

int compareItems (QPtrCollection::Item item1, QPtrCollection::Item item2)
 Comparison of two records. More...


Detailed Description

Represents a table (as in a set of records - not a GUI table).

Author:
Andrew Mustun


Member Function Documentation

int QTS_Table::compareItems QPtrCollection::Item    item1,
QPtrCollection::Item    item2
 

Comparison of two records.

Needed for the sorting algorithm.

void QTS_Table::complete  
 

Completes this table with the missing days (e.g.

weekends).

bool QTS_Table::load const QString &    filename
 

Import records from a text file with the format.

Date,Open,High,Low,Close,Volume 21-Nov-01,64.36,64.60,63.48,64.05,25392600

With a month period, the date would be 'Nov 01'. With a week period, the first token of the first line would be 'Week of'.

Returns:
true on success false otherwise

bool QTS_Table::save const QString &    filename
 

Saves this table to the given file.

Returns:
true on success false otherwise

bool QTS_Table::setRecordPeriod const QString &    info
 

Sets the record period from a string which contains relevant information.

Parameters:
info  This string can be one of the following: "date", "week of", a date in the format "dd-mmm-yy" or a date in the format "mmm yy".
Returns:
true on success false otherwise


The documentation for this class was generated from the following files:
Copyright © 2002, Andrew Mustun <andrew@mustun.com>. All rights reserved.
System documentation was generated using doxygen.