#ifndef _CEGOPROCOBJECT_H_INCLUDED_
#define _CEGOPROCOBJECT_H_INCLUDED_
///////////////////////////////////////////////////////////////////////////////
//                                                         
// CegoProcObject.h
// ----------------
// Cego procedure object class definition
//     
// Design and Implementation by Bjoern Lemke
//
// (C)opyright 2000-2013 Bjoern Lemke
//
// INTERFACE MODULE
//
// Class: CegoProcObject
// 
// Description: Container class for Cego stored procedures
//
// Status: QG-2.6
//
///////////////////////////////////////////////////////////////////////////////

// base includes
#include <lfcbase/Chain.h>

// xml includes
#include <lfcxml/Element.h>

// cego includes
#include "CegoField.h"
#include "CegoDecodableObject.h"

class CegoProcObject : public CegoDecodableObject {

 public:

    CegoProcObject();
    CegoProcObject(const CegoProcObject& ko);
    CegoProcObject(const Chain& procName, int tabSetId = 0);

    CegoProcObject(int tabSetId, const Chain& procName, const Chain& procText);
	
    ~CegoProcObject();
    
    int getEntrySize() const;

    void encode(char *buf);
    void decode(char *buf);

    const Chain& getProcText() const;

    void setEmpty();
    
    CegoProcObject& operator = ( const CegoProcObject& oe);
    bool operator == ( const CegoProcObject& oe);
    
    Chain toChain() const;

    Element* getElement() const;
    void putElement(Element* pElement);
    Chain getFormatted() const;

 private:

    Chain _procText;
    Chain fill(const Chain& s, int num) const;
};

#endif
