Show kblockId.h syntax highlighted
/*
Copyright (C) 2003, 2004, 2005 by Luca Cappa
Written by Luca Cappa groton@users.sourceforge.net
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __KBLOCKID_H__
#define __KBLOCKID_H__
#include "kconstant.h"
class KBlockId : public KConstant<KBlockId>
{
friend class KConstant<KBlockId>;
protected:
KBlockId (char* p_name) : KConstant<KBlockId> (p_name)
{
#ifdef KAS_OLD_WAY
KBlockId l_temp[] = {KBlockId::I1, KBlockId::I2, KBlockId::L1, KBlockId::L2,
KBlockId::L3, KBlockId::L4, KBlockId::T1, KBlockId::T2, KBlockId::F, KBlockId::C,
KBlockId::D1, KBlockId::D2};
SetWholeArray (l_temp, sizeof(l_temp)/sizeof (KBlockId));
//??KBlockId::INVALID = KBlockId ("INVALID");
#endif // KAS_OLD_WAY
};
public:
KBlockId () : KConstant<KBlockId> ()
{
}
KBlockId const & operator= (const KBlockId& p_t2) const
{
SetName (p_t2.m_name);
return *this;
}
static KBlockId* s_idArray;
static const KBlockId I1;
static const KBlockId I2;
static const KBlockId L1;
static const KBlockId L2;
static const KBlockId L3;
static const KBlockId L4;
static const KBlockId T1;
static const KBlockId T2;
static const KBlockId F;
static const KBlockId C;
static const KBlockId D1;
static const KBlockId D2;
};
#endif // __KBLOCKID_H__
See more files for this project here