|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <coehelp.h> |
|
17 |
|
18 /** Default constructor. |
|
19 |
|
20 Constructs a default TCoeHelpContext object, identifying a null CS Help file |
|
21 UID and context. */ |
|
22 EXPORT_C TCoeHelpContext::TCoeHelpContext() |
|
23 : iMajor(KNullUid), iContext(KNullDesC) |
|
24 {} |
|
25 |
|
26 /** Constructor specifying a Help file and a topic context descriptor. |
|
27 |
|
28 @param aMajor The UID of a Help file containing a set of related help topics. |
|
29 @param aContext The literal descriptor for a particular Help topic. This is |
|
30 generated from a context string by the CS Help compiler */ |
|
31 EXPORT_C TCoeHelpContext::TCoeHelpContext(TUid aMajor,const TDesC& aContext) |
|
32 : iMajor(aMajor), iContext(aContext) |
|
33 {} |
|
34 |
|
35 /** Tests if the TCoeHelpContext is NULL. |
|
36 |
|
37 @return ETrue if the object is NULL, EFalse if either the context or Help |
|
38 file UID have been set. */ |
|
39 EXPORT_C TBool TCoeHelpContext::IsNull() const |
|
40 { |
|
41 return (iMajor==KNullUid && iContext.Length()==0); |
|
42 } |
|
43 |
|
44 /** Tests for equality. |
|
45 |
|
46 @param aContext The Help context to compare to this object. |
|
47 @return ETrue if aContext has the same data member values as this object, otherwise |
|
48 EFalse. */ |
|
49 EXPORT_C TBool TCoeHelpContext::operator==(const TCoeHelpContext& aContext) const |
|
50 { |
|
51 return (iMajor==aContext.iMajor && iContext==aContext.iContext); |
|
52 } |
|
53 |
|
54 /** Tests for inequality. |
|
55 |
|
56 @param aContext The Help context to compare to this object. |
|
57 @return ETrue if aContext has any different data member values as this object, |
|
58 otherwise EFalse. */ |
|
59 EXPORT_C TBool TCoeHelpContext::operator!=(const TCoeHelpContext& aContext) const |
|
60 { |
|
61 return (iMajor!=aContext.iMajor || iContext!=aContext.iContext); |
|
62 } |