nechung_oracle Class Reference

#include <nechung_oracle.h>

Collaboration diagram for nechung_oracle:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nechung_oracle (const basis::astring &data_filename, const basis::astring &index_filename)
virtual ~nechung_oracle ()
 DEFINE_CLASS_NAME ("nechung_oracle")
basis::astring pick_random ()
void display_random ()

Detailed Description

Definition at line 47 of file nechung_oracle.h.


Constructor & Destructor Documentation

nechung_oracle::nechung_oracle ( const basis::astring data_filename,
const basis::astring index_filename 
)

Definition at line 37 of file nechung_oracle.cpp.

nechung_oracle::~nechung_oracle (  )  [virtual]

Definition at line 45 of file nechung_oracle.cpp.


Member Function Documentation

nechung_oracle::DEFINE_CLASS_NAME ( "nechung_oracle"   ) 
void nechung_oracle::display_random (  ) 

Definition at line 252 of file nechung_oracle.cpp.

References basis::astring::end(), is_eol(), LOG, pick_random(), and basis::astring::zap().

Referenced by main().

astring nechung_oracle::pick_random (  ) 

printf("num forts = %d\n", c_number_of_fortunes );

printf("rand chose= %d\n", to_display);

hmmm: this bit could be more efficient by just jumping to the Nth line instead of reading through up to the Nth line.

Definition at line 177 of file nechung_oracle.cpp.

References basis::array< contents >::access(), FUNCDEF, mathematics::chaos::inclusive(), LOG, MAX_LINE_LENGTH, NECHUNG_SEPARATION_CHARACTER, non_continuable_error, basis::astring::observe(), and basis::astring::s().

Referenced by display_random(), and main().


The documentation for this class was generated from the following files:
Generated on Sat Jan 28 04:25:10 2012 for hoople2 project by  doxygen 1.6.3