// This file is part of cxsd, copyright (c) 2016 BusFaster Ltd.
// Released under the MIT license, see LICENSE.

import {Namespace} from './Namespace';
import {Type} from './Type';

export class Member {
	constructor(name: string) {
		this.surrogateKey = Member.nextKey++;
		this.name = name;
	}

	name: string;
	namespace: Namespace;

	typeList: Type[];

	comment: string;

	isExported: boolean;

	isAbstract: boolean;
	isSubstituted: boolean;
	substitutes: Member;

	surrogateKey: number;
	private static nextKey = 0;

	static abstractFlag = 1;
	static substitutedFlag = 2;
	static anyFlag = 4;
}

// This file is part of cxsd, copyright (c) 2016 BusFaster Ltd.
// Released under the MIT license, see LICENSE.

import * as cxml from 'cxml';

import {Namespace} from './Namespace';
import {Type} from './Type';

export class Member extends cxml.MemberBase<Member, Namespace, cxml.ItemBase<Member>> {
	constructor(name: string) {
		super(null, name);
		this.surrogateKey = Member.nextKey++;
	}

	typeList: Type[];

	comment: string;

	isExported: boolean;

	surrogateKey: number;
	private static nextKey = 0;
}

Use member base class from cxml.
Use member base class from cxml.
