Directory Services |
In the example provider component, an example of the directory service path parser is in Parse.cpp. The path parser is a key component in ADs provider components. It verifies the syntactic validity of an ADs path passed to this provider. If the syntax is valid, an OBJECTINFO structure is constructed, which contains a componentized version of the ADs pathname for this object.
Be aware that this is only a syntax verification. Rather than special-case every new iteration of path name, all path verification must conform to the grammar rules laid out by the parser.
The following table lists the functions and methods implemented in Parse.cpp.
Item | Description |
---|---|
ADsObject | Parses the ADs pathname passed to it. This function follows the
following grammar rules:
<ADsObject> -> <ProviderName> <SampleDSObject> |
SampleDSObject | Parses the following grammar rules:
<SampleDSObject> -> "\\" <identifier> "\" <Pathname> |
ProviderName | Adds in the syntactically correct provider name if not there. |
PathName | Parses the following grammar rules:
<Pathname> -> <Component> "\\" <Pathname> OR <Pathname> -> <Component> |
Component | Parses the following grammar rules:
<Identifier> OR <Identifier> "=" <Identifier> |
CLexer::CLexer | Standard constructor. |
CLexer::~CLexer | Standard destructor. |
CLexer::GetNextToken | Tokenizer. |
CLexer::NextChar | Retrieves next single character. |
CLexer::PushBackToken | Backs up to the start of the last token. |
CLexer::PushbackChar | Backs up one character. |
CLexer::IsKeyword | Checks keyword list (defined in Globals.h). |
AddComponent | Adds this component to the component array. |
AddProviderName | Adds a syntactically correct provider name to the OBJECTINFO structure. |
AddRootRDN | Adds the syntactically correct root relative distinguished name (RDN) ]name to the OBJECTINFO structure. |
SetType | Sets the type of the object. |
Type | Parses Type-> "user" | "group" and so on. |