convert line ends
[canaan.git] / prj / tech / libsrc / comtools / constrid.h
blobeead52f5402b68c7eb6ac994ac463dca3f74c66b
1 ///////////////////////////////////////////////////////////////////////////////
2 // $Source: x:/prj/tech/libsrc/comtools/RCS/constrid.h $
3 // $Author: TOML $
4 // $Date: 1996/06/26 12:17:04 $
5 // $Revision: 1.1 $
6 //
8 #ifndef __CONSTRID_H
9 #define __CONSTRID_H
11 ///////////////////////////////////////
13 // Fully specified constraint
16 struct sAbsoluteConstraint
18 const GUID * pIDBefore;
19 const GUID * pIDAfter;
22 typedef struct sAbsoluteConstraint sAbsoluteConstraint;
25 ///////////////////////////////////////
27 // Context-relative constraint kind
30 enum eConstraintKind
32 kNullConstraint,
33 kConstrainBefore,
34 kConstrainAfter
37 typedef enum eConstraintKind eConstraintKind;
40 ///////////////////////////////////////
42 // Context-relative constraint
45 struct sRelativeConstraint
47 eConstraintKind kind;
48 const GUID * pIDAgainst;
51 typedef struct sRelativeConstraint sRelativeConstraint;
54 ///////////////////////////////////////
56 #ifdef __cplusplus
57 inline void MakeAbsolute(const sRelativeConstraint & relative,
58 const GUID * pRelativeID,
59 sAbsoluteConstraint & absolute)
61 if (relative.kind == kConstrainBefore)
63 absolute.pIDBefore = pRelativeID;
64 absolute.pIDAfter = relative.pIDAgainst;
66 else
68 absolute.pIDBefore = relative.pIDAgainst;
69 absolute.pIDAfter = pRelativeID;
72 #endif
74 ///////////////////////////////////////
76 #endif /* !__CONSTRID_H */