pjs/dom/tools/IdlInterface.h

93 строки
2.8 KiB
C
Исходник Обычный вид История

1998-05-13 00:30:45 +04:00
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef _IdlInterface_h__
#define _IdlInterface_h__
#include "IdlObject.h"
class nsVoidArray;
class IdlTypedef;
class IdlStruct;
class IdlUnion;
class IdlEnum;
class IdlAttribute;
class IdlFunction;
1998-05-15 22:49:17 +04:00
class IdlVariable;
1998-05-13 00:30:45 +04:00
class IdlException;
class IdlInterface : public IdlObject {
private:
nsVoidArray *mIIDs;
1998-05-13 00:30:45 +04:00
nsVoidArray *mBaseClasses;
nsVoidArray *mAttributes;
nsVoidArray *mFunctions;
nsVoidArray *mEnums;
nsVoidArray *mStructs;
nsVoidArray *mUnions;
nsVoidArray *mConsts;
nsVoidArray *mTypedefs;
nsVoidArray *mExceptions;
public:
IdlInterface();
~IdlInterface();
char* GetIIDAt(long aIndex);
long IIDCount();
void AddIID(char *aIID);
1998-05-13 00:30:45 +04:00
void InheritsFrom(char *aBase);
1998-05-19 09:21:21 +04:00
long BaseClassCount();
1998-05-13 00:30:45 +04:00
char* GetBaseClassAt(long aIndex);
void AddTypedef(IdlTypedef *aTypedef);
long TypedefCount();
IdlTypedef* GetTypedefAt(long aIndex);
void AddStruct(IdlStruct *aStruct);
long StructCount();
IdlStruct* GetStructAt(long aIndex);
void AddEnum(IdlEnum *aEnum);
long EnumCount();
IdlEnum* GetEnumAt(long aIndex);
void AddUnion(IdlUnion *aUnion);
long UnionCount();
IdlUnion* GetUnionAt(long aIndex);
1998-05-15 22:49:17 +04:00
void AddConst(IdlVariable *aConst);
1998-05-13 00:30:45 +04:00
long ConstCount();
1998-05-15 22:49:17 +04:00
IdlVariable* GetConstAt(long aIndex);
1998-05-13 00:30:45 +04:00
void AddException(IdlException *aException);
long ExceptionCount();
IdlException* GetExceptionAt(long aIndex);
void AddAttribute(IdlAttribute *aAttribute);
long AttributeCount();
IdlAttribute* GetAttributeAt(long aIndex);
void AddFunction(IdlFunction *aFunction);
long FunctionCount();
IdlFunction* GetFunctionAt(long aIndex);
};
#ifdef XP_MAC
#include <ostream.h> // required for namespace resolution
#else
1998-05-15 22:49:17 +04:00
class ostream;
#endif
1998-05-15 22:49:17 +04:00
ostream& operator<<(ostream &s, IdlInterface &aInterface);
1998-05-13 00:30:45 +04:00
#endif