00001
00006 #ifndef __BGDNetNDSObject_h__
00007 #define __BGDNetNDSObject_h__
00008
00009 #include "BGDNetConfig.h"
00010
00011 #include "BGDNetShare.h"
00012 #include "BGDNetString.h"
00013 #include "BGDNetException.h"
00014 #include "BGDNetCollection.h"
00015
00016 namespace BGDNet
00017 {
00018
00019 class Context;
00020 class NDSObject;
00021
00022 #ifdef _MSC_VER
00023 # pragma warning(disable:4231)
00024 #endif
00025
00026 BGDNET_TEMPLATE(SharePtr<NDSObject>);
00027 BGDNET_TEMPLATE(Collection<SharePtr<NDSObject> >);
00028 BGDNET_TEMPLATE(Collection<String>);
00029
00030 #ifdef _MSC_VER
00031 # pragma warning(default:4231)
00032 #endif
00033
00034 typedef Collection<SharePtr<NDSObject> > NDSObjects;
00035 typedef Collection<String> Strings;
00036
00041 class BGDNET_API NDSObject : public Share
00042 {
00043 public:
00044
00045 explicit NDSObject( const Context& ctx, const char* name = 0 )
00046 throw(Exception);
00053 const String& dn( void ) const;
00059 const String& rdn( void ) const;
00065 String baseClass( void ) const;
00071 bool isContainerEntry( void ) const;
00078 bool isContainerAlias( void ) const;
00084 bool isContainer( void ) const;
00091 void getSubordinates( NDSObjects* pColl ) const
00092 throw(Exception);
00099 bool attr( const char* name, String* pVal ) const;
00108 bool attr( const char* name, Strings* pValues ) const;
00117 private:
00118
00119 nuint32 entryFlags( void ) const;
00125 const Context& m_ctx;
00130 String m_dn;
00135 String m_rdn;
00139 };
00140
00141 }
00142
00143 #endif //__BGDNetNDSObject_h__