/*
 * ************************************************************************************************************
 * Author: Marcin Załęczny
 * Copyright (C)2010 Marcin Załęczny <mzaleczny@hotmail.com>
 * License: The GNU Lesser General Public License, version 3.0 (LGPLv3)
 * Library Name: mzstd
 * Version: 1.07
 * First release date:   2010-11-08
 * Current release date: 2011-03-04
 *
 *
 * This file is part of mzstd library
 * 
 * mzstd 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 3 of the License, or
 * (at your option) any later version.
 * 
 * mzstd 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 program. If not, see <http://www.gnu.org/licenses/>.
 * ************************************************************************************************************
 */

#ifndef __MZSTD_OBJECT_H__
#define __MZSTD_OBJECT_H__

#include "mzstdCommon.h"
#include "mzString.h"


class CObject;
DECLSPEC_MZSTD VOID WINAPI swap(CObject** val1, CObject** val2);

class DECLSPEC_MZSTD CObject {
protected:
    // WARNING!
    // this two protcted attributes must be first in class structure, to allow proper CObject* class
    // recognition.
    WCHAR* _originClassName;
    WCHAR* _realClassName;

public:    
    // konstruktor domyślny
    WINAPI CObject();
    // konstruktor kopiujący
    WINAPI CObject(const CObject& object);
    virtual WINAPI ~CObject();
    VOID WINAPI setRealClassName(WCHAR* realClassName);
    WCHAR* WINAPI getOriginClassName() { return this->_originClassName; }
    WCHAR* WINAPI getRealClassName() { return this->_realClassName; }

    virtual BOOL WINAPI equals(CObject* obj);
    virtual CString WINAPI toString();
    virtual inline BOOL WINAPI isString() { return FALSE; }

    WINAPI operator WCHAR*();

private:
    LONG _objectId;
    
    VOID WINAPI _commonInit();
};

#endif
