/* * Copyright (c) 1995, 1996 Gunther Schadow. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PG_EXTERNALCODE_H_ #define PG_EXTERNALCODE_H_ #include #pragma interface #include class ExternalCode : public Code { public: const int invalid = -3; const int not_present = -2; const int null = -1; const int member = 0; const int first = member; const int last = member; void unset(); void nullify(); bool valid(const char*) const; operator const char* () const; const ExternalCode& operator = (const char *s); const ExternalCode& operator = (const ExternalCode&); bool OK() const; int lookup(const char *str) const; static char *new_dbf_path(char* &dbf_path, const char *dbf_base); protected: ExternalCode(char* &dbf_path, const char *dbf_base); ExternalCode(const char *s, char* &dbf_path, const char *dbf_base); ExternalCode(const ExternalCode&); private: static const char *_dbf_libdir; const char *_dbf_path; char *_string; void set_dbf_path(char* &dbf_path, const char *dbf_base); void set(const char *); }; #ifndef OUTLINE # include "ExternalCode.icc" #endif #endif /* !PG_EXTERNALCODE_H_ */