]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/d/dmd/root/object.h
2 /* Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved
3 * http://www.digitalmars.com
4 * Distributed under the Boost Software License, Version 1.0.
5 * (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
6 * https://github.com/dlang/dmd/blob/master/src/root/object.h
9 #define POSIX (__linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun)
15 typedef size_t hash_t
;
32 * Root of our class library.
39 virtual bool equals(RootObject
*o
);
42 * Return <0, ==0, or >0 if this is less than, equal to, or greater than obj.
43 * Useful for sorting Objects.
45 virtual int compare(RootObject
*obj
);
48 * Pretty-print an Object. Useful for debugging the old-fashioned way.
52 virtual const char *toChars();
53 virtual void toBuffer(OutBuffer
*buf
);
56 * Used as a replacement for dynamic_cast. Returns a unique number
57 * defined by the library user. For Object, the return value is 0.
59 virtual int dyncast() const;