/* 
   NGObjCClass.h

   Copyright (C) 1998 MDlink online service center, Helge Hess
   All rights reserved.

   Author: Helge Hess (helge@mdlink.de)

   This file is part of the MDlink Object Framework 2 (MOF2)

   Permission to use, copy, modify, and distribute this software and its
   documentation for any purpose and without fee is hereby granted, provided
   that the above copyright notice appear in all copies and that both that
   copyright notice and this permission notice appear in supporting
   documentation.

   We disclaim all warranties with regard to this software, including all
   implied warranties of merchantability and fitness, in no event shall
   we be liable for any special, indirect or consequential damages or any
   damages whatsoever resulting from loss of use, data or profits, whether in
   an action of contract, negligence or other tortious action, arising out of
   or in connection with the use or performance of this software.
*/
// $Id: NGObjCClass.h,v 1.1 2000/03/20 15:45:34 mguesdon Exp $

#ifndef __NGReflection_NGObjCClass_H__
#define __NGReflection_NGObjCClass_H__

#import <Foundation/NSObject.h>
#import <Foundation/NSMapTable.h>

@class NSMutableArray, NSMutableDictionary, NSDictionary, NSEnumerator;

/*
  Adds some capabilities to a Class object.
*/

@interface NGObjCClass : NSObject
{
@protected
  NGObjCClass *superClass;
  NGObjCClass *metaClass;
  Class       peer;
  BOOL        isInstalled;

  NSMutableArray *categories;
  NSMutableArray *protocols;
  NSMutableArray *methods;
  NSMapTable     *instanceVariables;
}

+ (NGObjCClass *)infoForClass:(Class)_class;
+ (NGObjCClass *)infoForClassNamed:(NSString *)_className;

// accessors

- (Class)peerClass;
- (NGObjCClass *)superClassInfo;
- (NGObjCClass *)metaClassInfo;

- (NSString *)className;
- (NSString *)superClassName;
- (NSString *)metaClassName;

- (BOOL)isRootClass;
- (BOOL)isMetaClass;
- (BOOL)isResolved;
- (BOOL)isInitialized;

- (void)setClassNumber:(unsigned short)_number;
- (unsigned short)classNumber;

#if LIB_FOUNDATION_BOEHM_GC
- (void *)gcObjectType;
#endif

- (void)setClassVersion:(long)_version;
- (int)classVersion;
- (unsigned)instanceSize;

- (NSArray *)categories;
- (NSArray *)protocols;
- (NSArray *)methods;
- (NSArray *)classMethods; // methods of meta class
- (NSArray *)subclasses;
- (BOOL)hasSubclasses;
- (NSDictionary *)instanceVariables;

+(Class)createClassWithName:(NSString*)_name
			 superClassName:(NSString*)_superName
					  iVars:(NSArray*)_iVars;
-(BOOL)addMethods:(NSArray*)_methods;
-(BOOL)addClassMethods:(NSArray*)_methods;
-(BOOL)addMethods:(NSArray*)_methods
isInstanceMethods:(BOOL)_instance;

// description

- (NSDictionary *)propertyList;

@end

#endif /* __NGReflection_NGObjCClass_H__ */
