
CONTENTS

	INTRODUCTION
	OSTREAM METHODS
	CHAR POINTER METHODS
	PIX METHODS
	PIX TO ITERATOR EXAMPLES
	OTHER DEPRECATED METHODS
	
---------------------------------------------------------------------------

INTRODUCTION

This file lists methods that were marked as deprecated in previous versions
of the library and have now been removed. In all cases there are relacement
methods. The changes documented here correspond to going from the 3.5 to 3.6
versions of libdap.

For some of the methods, I've listed only the most general version
since all the more speciifc versions were also removed. For example, if
BaseType::print_val(...) was removed, so was Int32::print_val, ...

OSTREAM METHODS

virtual void BaseType::print_val(ostream &os, string space = "", 
			   bool print_decl_p = true);
			   
virtual void BaseType::print_decl(ostream &os, string space = "    ",
			    bool print_semi = true,
			    bool constraint_info = false,
			    bool constrained = false);			   
			    
virtual void Constructor::print_decl(ostream &os, string space = "    ",
			    bool print_semi = true,
			    bool constraint_info = false,
			    bool constrained = false);
void DAS::print(ostream &os = cout, bool dereference = false);

void DDS::parse_constraint(const string &constraint, ostream &os,
			  bool server = true);
void DDS::parse_constraint(const string &constraint, FILE *out,
			  bool server = true);
void DDS::print(ostream &os = cout);
void DDS::print_constrained(ostream &os = cout);

virtual void DODS_Filter::send_das(ostream &os, DAS &das,
			  const string &anc_location="",
                          bool with_mime_headers = true);
virtual void DODSFilter::send_dds(ostream &os, DDS &dds, bool constrained = false,
			  const string &anc_location = "",
                          bool with_mime_headers = true);
                          
void Error::print(ostream &os = cout) const;                          

virtual void Sequence::print_one_row(ostream &os, int row, string space,
			       bool print_row_num = false);
virtual void Sequence::print_val_by_rows(ostream &os, string space = "",
				   bool print_decl_p = true,
				   bool print_row_numners = true);
virtual void Sequence::print_all_vals(ostream& os, XDR *src, DDS *dds, 
				string space = "", bool print_decl_p = true);			   
				
unsigned int Array::print_array(ostream &os, unsigned int index, 
			     unsigned int dims, unsigned int shape[]);
			     
void AttrTable::simple_print(ostream &os, string pad, Attr_iter i,
		      bool dereference);
void AttrTable::print(ostream &os, string pad = "    ", bool dereference = false);

These functions are in the file cgi_util.cc/h:

void set_mime_text(ostream &os, ObjectType type = unknown_type, 
		   const string &version = "", EncodingType enc = x_plain,
		   const time_t last_modified = 0);
void set_mime_html(ostream &os, ObjectType type = unknown_type, 
		   const string &version = "", EncodingType enc = x_plain,
		   const time_t last_modified = 0);
void set_mime_binary(ostream &os, ObjectType type = unknown_type, 
		     const string &version = "", EncodingType enc = x_plain,
		     const time_t last_modified = 0);
void set_mime_error(ostream &os, int code = 404, 
		    const string &reason = "Dataset not found",
		    const string &version = "");
void set_mime_not_modified(ostream &os);

CHAR POINTER METHODS

Methods which provide 'const char *' parameters

There were several methods that provided both const string & and const char * 
versions. I've removed the 'const char *' versions since string literals are
automatically converted to string by C++. These methods were added back when
libdap used GNU's String and Pix classes. In that context a C++ compiler 
could not tell what to do when a method was called with a string literal and
had two versions, one which took a String and one which took a Pix. Since the
library no longer uses either of those classes, it seems foolish to keep those
methods around. Here's a list of the removed methods:

AttrTable.h:    unsigned int append_attr(const char *name, const char *type,
AttrTable.h:                         const char *value) throw (Error);
AttrTable.h:    AttrTable *get_attr_table(const char *name);
AttrTable.h:    string get_type(const char *name);
AttrTable.h:    AttrType get_attr_type(const char *name);
AttrTable.h:    unsigned int get_attr_num(const char *name);
AttrTable.h:    string get_attr(const char *name, unsigned int i = 0);
AttrTable.h:    vector<string> *get_attr_vector(const char *name);

DAS.h:    AttrTable *add_table(const char *name, AttrTable *at);
DDS.h:    BaseType *var(const char *n, btp_stack *s = 0);

PIX METHODS

The file Pix.h has been removed, along with the *IterAdapter.cc/h class files

void Array::add_constraint(Pix p, int start, int stride, int stop);
Pix Array::first_dim();
void Array::next_dim(Pix p);
int Array::dimension_size(Pix p, bool constrained = false);
int Array::dimension_start(Pix p, bool constrained = false);
int Array::dimension_stop(Pix p, bool constrained = false);
int Array::dimension_stride(Pix p, bool constrained = false);

Pix AttrTable::simple_find(const string &target);
Pix AttrTable::first_attr();
void AttrTable::next_attr(Pix p);
AttrTable::entry *AttrTable::attr(Pix p);
string AttrTable::get_name(Pix p);
bool AttrTable::is_container(Pix p);
AttrTable *AttrTable::get_attr_table(Pix p);
string AttrTable::get_type(Pix p);
AttrType AttrTable::get_attr_type(Pix p);
unsigned int AttrTable::get_attr_num(Pix p);
string AttrTable::get_attr(Pix p, unsigned int i = 0);
vector<string> *AttrTable::get_attr_vector(Pix p);
Pix AttrTable::find(const string &target, AttrTable **at);

virtual Pix Constructor::first_var();
virtual void Constructor::next_var(Pix p);
virtual BaseType *Constructor::var(Pix p);

Pix DAS::first_var();
void DAS::next_var(Pix p);
string DAS::get_name(Pix p);
AttrTable *DAS::get_table(Pix p);

BaseType *DDS::var(Pix p);
Pix DDS::first_var();
void DDS::next_var(Pix p);
Pix DDS::first_clause();
void DDS::next_clause(Pix p);
Clause *DDS::clause(Pix p);
bool DDS::clause_value(Pix p, const string &dataset);

Pix Grid::first_map_var();
void Grid::next_map_var(Pix p);
BaseType *Grid::map_var(Pix p);

Pix Sequence::first_var();
void Sequence::next_var(Pix p);
BaseType *Sequence::var(Pix p);

Pix Structure::first_var();
void Structure::next_var(Pix p);
BaseType *Structure::var(Pix p);

PIX TO ITERATOR EXAMPLES

Some examples of STL iterator versus Pix code:

From FFGrid.cc:
    // read maps elements
    Grid::Map_iter i = map_begin();
    while (i != map_end())
        (*i++)->read(dataset);
#if 0        
    for (Pix p = first_map_var(); p; next_map_var(p)) {
	map_var(p)->read(dataset);
    }
#endif

From FFArray.cc:
    int id = 0;
    long nels = 1;
    *has_stride = false;

    Array:Dim_iter i = dim_begin();
    while (i != dim_end()) {
        start = (long) dimension_start(i, true); 
        stride = (long) dimension_stride(i, true);
        stop = (long) dimension_stop(i, true);
        string dimname = dimension_name(i);
#if 0
    for (Pix p = first_dim(); p ; next_dim(p), id++) {
	start = (long) dimension_start(p, true); 
	stride = (long) dimension_stride(p, true);
	stop = (long) dimension_stop(p, true);
	string dimname = dimension_name(p);
#endif
	// Check for empty constraint
	if(start+stop+stride == 0)
	    return -1;
	
	dim_nms[id]= dimname;
	//	(void) strcpy(dim_nms[id], dimname.c_str());
	
	cor[id]= start;
	step[id]= stride;
	edg[id]= ((stop - start)/stride) + 1; // count of elements
	
	nels *= edg[id];      // total number of values for variable
	
	if (stride != 1)
	    *has_stride = true;

        ++id;
        ++i;
    }
    return nels;

OTHER DEPRECATED METHODS

Other deprecated methods that have been removed:

Removed from Error

    Error(ErrorCode ec, string msg, ProgramType pt, char *pgm);
    ProgramType get_program_type() const;
    const char *get_program() const;
    void set_program_type(ProgramType pt = undefined_prog_type);
    void set_program(char *program);
    void display_message(void *gui = 0) const;
    string correct_error(void *gui) const;
    string error_message(string msg = "");
    ProgramType program_type(ProgramType pt = undefined_prog_type);
    char *program(char *program = 0);
    ErrorCode error_code(ErrorCode ec = undefined_error);

Note: Replace display_error() with 'cerr << get_error_message() << endl'.
Replace error_message() with get_error_message().

Removed from InternalErr

    InternalErr(string msg, ProgramType pt, char *pgm);
    
Removed from Connect 

void *Connect::gui();
bool Connect::request_dds(bool, const string &) throw(Error, InternalErr);
DDS *Connect::request_data(string expr, bool, bool, const string &) 
        throw(Error, InternalErr);
bool Connect::request_das(bool,  const string &) throw(Error, InternalErr);
DDS *Connect::read_data(FILE *data_source, bool, bool) throw(Error, InternalErr);
DAS &Connect::das();
DDS &Connect::dds();
Error &Connect::error();

Removed from DDS

add_function()
find_function()
append_clause()
functional_expression()
boolean_expression()
eval_expression()
eval_selection()
eval_function()
clause_begin()
clause_end()
clause_value()
parse_constraint()
append_constant()
send()

Removed from cgi_util.cc

do_data_transfer()