/*****************************************************************************
FILE:               O2CI7Object.h
LANGUAGE:           Objective-C
SYSTEM:             None
USER-INTERFACE:     None
DESCRIPTION
    $Header: /cvsroot/gnustep/gnustep/dev-libs/db/eoadaptors/Oracle7/O2CI7Object.h,v 1.1 2000/02/22 16:27:13 pjb Exp $

    This is the definition of the O2CI7Object class.
    The class O2CI7Object generalize the O2CI7Context and the O2CI7Cursor
    classes providing them a commun error reporting scheme (like that of
    O2CI8Object).

AUTHORS
    <PJB>  Pascal J. Bourguignon  <pjb@imaginet.fr>
MODIFICATIONS
    $Log: O2CI7Object.h,v $
    Revision 1.1  2000/02/22 16:27:13  pjb
    First release of the Oracle7Adaptor.

    1999/08/08 Creation.
BUGS
LEGAL
    Written by:  Pascal J. Bourguignon <pjb@imaginet.fr>
    Funds from:  Orange Concept (http://www.orange-concept.com/)
    Date:        August 1999 - February 2000

    This file is part of the Oracle7 Adaptor, GNUstep Database Library.
    The Oracle7 Adaptor allows access to Oracle[678] databases from GDL.

    Copyright (C) 2000 Free Software Foundation, Inc.

    This  library is  free software;  you can  redistribute  it and/or
    modify it under the terms of the GNU Lesser General Public License
    as published by the Free  Software Foundation; either version 2 of
    the License, or (at your option) any later version.

    This library  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
    Lesser General Public License for more details.

    You should have  received a copy of the  GNU Lesser General Public
    License  along  with this  library;  if  not,  write to  the  Free
    Software  Foundation, Inc.,  59 Temple  Place, Suite  330, Boston,
    MA 02111-1307 USA
*****************************************************************************/
#ifndef __O2CI7Object_h__
#define __O2CI7Object_h__
#include <Foundation/Foundation.h>


// exceptions:
extern NSString* O2CI7Object_eBadInitializer;
extern NSString* O2CI7Object_eInternalError;




@interface O2CI7Object:NSObject
{
    NSMutableArray*    errorMessages;
}

// NSObject methods:

    -(id)init;
    -(void)dealloc;


// O2CI7Object methods:

    -(NSArray*)errorMessages;
        /*
            RETURN:     an autoreleased array containing 0 or more NSString
                        with the error messages of the last OCI call done
                        by this instance. No string in the array is not
                        terminated by a new-line, and normaly would not
                        contain any new-line. The firt string is set
                        by O2CI8Object, and the others come from OCI.
                        The first string contains the location given to
                        processErrorCode:... and the description of self.

            NOTE:       [[o errorMessages]count]==0 
                                    <=> ociResult was OCI_SUCCESS.
        */



    -(void)cleanErrorMessages;
        /*
            POST:       [[self errorMessages]count]==0.
        */

    -(void)reportErrorMessage:(NSString*)message;
        /*
            PRE:        [[self errorMessages]count]==c.

            DO:         Add the message to the list of error messages.

            POST:       [[self errorMessages]count]==c+1,
                        [[self errorMessages]objectAtIndex:c]==message,
                        the other error messages are not touched.
        */

@end //O2CI7Object;

#endif /*__O2CI7Object_h__*/

/*** O2CI7Object.h                    -- 2000-02-21 07:11:20 -- PJB ***/
