123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- //////////////////////////////////////////////////////////////////////////////
- //
- // Copyright 2015 Autodesk, Inc. All rights reserved.
- //
- // Use of this software is subject to the terms of the Autodesk license
- // agreement provided at the time of installation or download, or which
- // otherwise accompanies this software in either electronic or hard copy form.
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- //
- // DESCRIPTION:
- //
- // This file contains the inlined versions of the comparsion operators
- // for the AcDbObjectId class, that are for use by adjacent applications.
- // These operators call out to explicit functions, to allow behavioral
- // modification of these operators between c4 and c5. Presumably, the
- // AutoCAD/adjacent app division of these operators will be collapsed back
- // into dbid.h at a future date.
- //
- // See dbid.cc for the body of the function calls.
- // See dbid.h for further description of the AcDbObjectId types.
- #ifndef _AD_DBID_APPS_H
- #define _AD_DBID_APPS_H 1
- #include "adesk.h"
- #include "dbid.h"
- #include "dbid_ops.h"
- #pragma pack (push, 8)
- //////////////////// AcDbObjectId inlines ////////////////////
- // LHS AcDbObjectId -- RHS AcDbObjectId
- inline bool
- AcDbObjectId::operator < (const AcDbObjectId& id) const
- { return c5ObjIdIsLessThan(*this, id); }
- inline bool
- AcDbObjectId::operator > (const AcDbObjectId& id) const
- { return c5ObjIdIsGreaterThan(*this, id); }
- inline bool
- AcDbObjectId::operator <= (const AcDbObjectId& id) const
- { return c5ObjIdLessThanOrEqual(*this, id); }
- inline bool
- AcDbObjectId::operator >= (const AcDbObjectId& id) const
- { return c5ObjIdGreaterThanOrEqual(*this, id); }
- inline bool
- AcDbObjectId::operator == (const AcDbObjectId& id) const
- { return c5ObjIdIsEqualTo(*this, id); }
- inline bool
- AcDbObjectId::operator != (const AcDbObjectId& id) const
- { return !c5ObjIdIsEqualTo(*this, id); }
- // LHS AcDbObjectId -- RHS AcDbStub*
- inline bool
- AcDbObjectId::operator < (const AcDbStub* pStub) const
- { return c5ObjIdIsLessThan(*this, pStub); }
- inline bool
- AcDbObjectId::operator > (const AcDbStub* pStub) const
- { return c5ObjIdIsGreaterThan(*this, pStub); }
- inline bool
- AcDbObjectId::operator <= (const AcDbStub* pStub) const
- { return c5ObjIdLessThanOrEqual(*this, pStub); }
- inline bool
- AcDbObjectId::operator >= (const AcDbStub* pStub) const
- { return c5ObjIdGreaterThanOrEqual(*this, pStub); }
- inline bool
- AcDbObjectId::operator == (const AcDbStub* pStub) const
- { return c5ObjIdIsEqualTo(*this, pStub); }
- inline bool
- AcDbObjectId::operator != (const AcDbStub* pStub) const
- { return !c5ObjIdIsEqualTo(*this, pStub); }
- //////////////////// AcDbR13ObjectId inlines ////////////////////
- // The behavior of AcDbObjectId's in 3rd party applications with
- // respect to the boolean operators defined by this class has
- // changed from R13. If applications need to return to the old-style
- // behavior for some reason (they shouldn't, but you never know ...)
- // they can cast objectIds to this class.
- class AcDbR13ObjectId : public AcDbObjectId
- {
- public:
- bool operator < (const AcDbR13ObjectId& id) const;
- bool operator > (const AcDbR13ObjectId& id) const;
- bool operator <= (const AcDbR13ObjectId& id) const;
- bool operator >= (const AcDbR13ObjectId& id) const;
- bool operator == (const AcDbR13ObjectId& id) const;
- bool operator != (const AcDbR13ObjectId& id) const;
- bool operator < (const AcDbStub* pStub) const;
- bool operator > (const AcDbStub* pStub) const;
- bool operator <= (const AcDbStub* pStub) const;
- bool operator >= (const AcDbStub* pStub) const;
- bool operator == (const AcDbStub* pStub) const;
- bool operator != (const AcDbStub* pStub) const;
- };
- // LHS AcDbObjectId -- RHS AcDbObjectId
- inline bool
- AcDbR13ObjectId::operator < (const AcDbR13ObjectId& id) const
- { return c4ObjIdIsLessThan(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(id.mId));
- }
- inline bool
- AcDbR13ObjectId::operator > (const AcDbR13ObjectId& id) const
- { return c4ObjIdIsGreaterThan(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(id.mId));
- }
- inline bool
- AcDbR13ObjectId::operator <= (const AcDbR13ObjectId& id) const
- { return c4ObjIdLessThanOrEqual(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(id.mId));
- }
- inline bool
- AcDbR13ObjectId::operator >= (const AcDbR13ObjectId& id) const
- { return c4ObjIdGreaterThanOrEqual(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(id.mId));
- }
- inline bool
- AcDbR13ObjectId::operator == (const AcDbR13ObjectId& id) const
- { return c4ObjIdIsEqualTo(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(id.mId));
- }
- inline bool
- AcDbR13ObjectId::operator != (const AcDbR13ObjectId& id) const
- { return c4ObjIdNotEqualTo(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(id.mId));
- }
- // LHS AcDbObjectId -- RHS AcDbStub*
- inline bool
- AcDbR13ObjectId::operator < (const AcDbStub* pStub) const
- { return c4ObjIdIsLessThan(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(pStub)); }
- inline bool
- AcDbR13ObjectId::operator > (const AcDbStub* pStub) const
- { return c4ObjIdIsGreaterThan(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(pStub)); }
- inline bool
- AcDbR13ObjectId::operator <= (const AcDbStub* pStub) const
- { return c4ObjIdLessThanOrEqual(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(pStub)); }
- inline bool
- AcDbR13ObjectId::operator >= (const AcDbStub* pStub) const
- { return c4ObjIdGreaterThanOrEqual(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(pStub)); }
- inline bool
- AcDbR13ObjectId::operator == (const AcDbStub* pStub) const
- { return c4ObjIdIsEqualTo(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(pStub)); }
- inline bool
- AcDbR13ObjectId::operator != (const AcDbStub* pStub) const
- { return c4ObjIdNotEqualTo(reinterpret_cast<Adesk::ULongPtr>(mId),
- reinterpret_cast<Adesk::ULongPtr>(pStub)); }
- #pragma pack (pop)
- #endif // _AD_DBID_APPS_H
|