Changeset 1997 for trunk/eraser


Ignore:
Timestamp:
5/1/2010 9:34:00 AM (5 years ago)
Author:
lowjoel
Message:

Converted all documentation to XML documentation used in .NET. Fixes #324.

Location:
trunk/eraser/Eraser.Util.Native
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.Util.Native/Eraser.Util.Native.vcproj

    r1802 r1997  
    5151                RuntimeLibrary="3" 
    5252                UsePrecompiledHeader="2" 
     53                GenerateXMLDocumentationFiles="true" 
    5354                WarningLevel="4" 
    5455                DebugInformationFormat="3" 
     
    126127                RuntimeLibrary="3" 
    127128                UsePrecompiledHeader="2" 
     129                GenerateXMLDocumentationFiles="true" 
    128130                WarningLevel="4" 
    129131                DebugInformationFormat="3" 
     
    200202                RuntimeLibrary="2" 
    201203                UsePrecompiledHeader="2" 
     204                GenerateXMLDocumentationFiles="true" 
    202205                WarningLevel="4" 
    203206                DebugInformationFormat="3" 
     
    274277                RuntimeLibrary="2" 
    275278                UsePrecompiledHeader="2" 
     279                GenerateXMLDocumentationFiles="true" 
    276280                WarningLevel="4" 
    277281                DebugInformationFormat="3" 
  • trunk/eraser/Eraser.Util.Native/Fat.h

    r1802 r1997  
    133133    union 
    134134    { 
    135         /// EA-Index (used by OS/2 and NT) in FAT12 and FAT16 
     135        // EA-Index (used by OS/2 and NT) in FAT12 and FAT16 
    136136        unsigned short EAIndex; 
    137137 
    138         /// High 2 bytes of first cluster number in FAT32 
     138        // High 2 bytes of first cluster number in FAT32 
    139139        unsigned short StartClusterHigh; 
    140140    }; 
  • trunk/eraser/Eraser.Util.Native/FatApi.h

    r1802 r1997  
    3030    ref class FatDirectoryBase; 
    3131 
    32     /// Represents an abstract API to interface with FAT file systems. 
     32    /// <summary> 
     33    /// Represents an abstract API to interface with FAT file systems 
     34    /// </summary> 
    3335    public ref class FatApi abstract 
    3436    { 
    3537    protected: 
     38        /// <summary> 
    3639        /// Constructor. 
     40        /// </summary> 
    3741        ///  
    38         /// \param[in] info   The volume to create the FAT API for. The volume handle 
    39         ///                   created has read access only. 
     42        /// <param name="info">The volume to create the FAT API for. The volume 
     43        /// handle created has read access only.</param> 
    4044        FatApi(VolumeInfo^ info); 
    4145 
     46        /// <summary> 
    4247        /// Constructor. 
     48        /// </summary> 
    4349        ///  
    44         /// \param[in] stream The stream to use to read/write to the disk. 
     50        /// <param name="stream">The stream to use to read/write to the disk.</param> 
    4551        FatApi(IO::Stream^ stream); 
    4652 
    4753    public: 
     54        /// <summary> 
    4855        /// Loads the File Allocation Table from disk. 
     56        /// </summary> 
    4957        virtual void LoadFat() = 0; 
    5058         
     59        /// <summary> 
    5160        /// Helper function to loads the directory structure representing the 
    5261        /// directory with the given volume-relative path. 
    53         /// 
    54         /// \overload LoadDirectory 
     62        /// </summary> 
    5563        FatDirectoryBase^ LoadDirectory(String^ directory); 
    5664 
     65        /// <summary> 
    5766        /// Loads the directory structure at the given cluster. 
     67        /// </summary> 
    5868        virtual FatDirectoryBase^ LoadDirectory(unsigned cluster, String^ name, 
    5969            FatDirectoryBase^ parent) = 0; 
    6070 
    6171    internal: 
     72        /// <summary> 
    6273        /// Converts a sector-based address to a byte offset relative to the start 
    6374        /// of the volume. 
     75        /// </summary> 
    6476        virtual unsigned long long SectorToOffset(unsigned long long sector); 
    6577 
     78        /// <summary> 
    6679        /// Converts a cluster-based address to a byte offset relative to the start 
    6780        /// of the volume. 
     81        /// </summary> 
    6882        virtual long long ClusterToOffset(unsigned cluster) = 0; 
    6983 
     
    7185        unsigned SectorSizeToSize(unsigned size); 
    7286 
     87        /// <summary> 
    7388        /// Converts a cluster-based file size fo the actual size of the file in bytes. 
     89        /// </summary> 
    7490        unsigned ClusterSizeToSize(unsigned size); 
    7591 
     92        /// <summary> 
    7693        /// Verifies that the given cluster is allocated and in use. 
    77         ///  
    78         /// \param[in] cluster The cluster to verify. 
     94        /// </summary> 
     95        /// <param name="cluster">The cluster to verify.</param> 
    7996        virtual bool IsClusterAllocated(unsigned cluster) = 0; 
    8097 
     98        /// <summary> 
    8199        /// Gets the next cluster in the file. 
    82         /// 
    83         /// \param[in] cluster The current cluster to check. 
    84         /// \return            0xFFFFFFFF if the cluster given is the last one, 
    85         ///                    otherwise the next cluster in the file. 
     100        /// </summary> 
     101        /// <param name="cluster">The current cluster to check.</param> 
     102        /// <return>0xFFFFFFFF if the cluster given is the last one, otherwise 
     103        /// the next cluster in the file.</return> 
    86104        virtual unsigned GetNextCluster(unsigned cluster) = 0; 
    87105 
     106        /// <summary> 
    88107        /// Gets the size of the file in bytes starting at the given cluster. 
    89108        /// Make sure that the given cluster is the first one, there is no way 
    90109        /// to verify it is indeed the first one and if later clusters are given 
    91110        /// the calculated size will be wrong. 
     111        /// </summary> 
    92112        virtual unsigned FileSize(unsigned cluster) = 0; 
    93113 
     114        /// <summary> 
    94115        /// Gets the contents of the file starting at the given cluster. 
     116        /// </summary> 
    95117        array<Byte>^ GetFileContents(unsigned cluster); 
    96118 
     119        /// <summary> 
    97120        /// Set the contents of the file starting at the given cluster. The length 
    98121        /// of the contents must exactly match the length of the file. 
    99         ///  
    100         /// \param[in] buffer  The data to write. 
    101         /// \param[in] cluster The cluster to begin writing to. 
     122        /// </summary> 
     123        /// <param name="buffer">The data to write.</param> 
     124        /// <param name="cluster">The cluster to begin writing to.</param> 
    102125        void SetFileContents(array<Byte>^ buffer, unsigned cluster); 
    103126 
     127        /// <summary> 
    104128        /// Resolves a directory to the position on-disk 
    105         /// 
    106         /// \param[in] path A volume-relative path to the directory. 
     129        /// </summary> 
     130        /// <param name="path">A volume-relative path to the directory.</param> 
    107131        virtual unsigned DirectoryToCluster(String^ path) = 0; 
    108132 
    109133    protected: 
     134        /// <summary> 
    110135        /// The stream used to access the volume. 
     136        /// </summary> 
    111137        property IO::Stream^ VolumeStream 
    112138        { 
     
    135161    }; 
    136162 
     163    /// <summary> 
    137164    /// Represents the types of FAT directory entries. 
     165    /// </summary> 
    138166    public enum class FatDirectoryEntryType 
    139167    { 
     
    142170    }; 
    143171 
     172    /// <summary> 
    144173    /// Represents a FAT directory entry. 
     174    /// </summary> 
    145175    public ref class FatDirectoryEntry 
    146176    { 
    147177    public: 
     178        /// <summary> 
    148179        /// Gets the name of the file or directory. 
     180        /// </summary> 
    149181        property String^ Name 
    150182        { 
     
    154186        } 
    155187 
     188        /// <summary> 
    156189        /// Gets the full path to the file or directory. 
     190        /// </summary> 
    157191        property String^ FullName 
    158192        { 
     
    160194        } 
    161195 
     196        /// <summary> 
    162197        /// Gets the parent directory of this entry. 
     198        /// </summary> 
    163199        property FatDirectoryBase^ Parent 
    164200        { 
     
    168204        } 
    169205 
     206        /// <summary> 
    170207        /// Gets the type of this entry. 
     208        /// </summary> 
    171209        property FatDirectoryEntryType EntryType 
    172210        { 
     
    176214        } 
    177215 
     216        /// <summary> 
    178217        /// Gets the first cluster of this entry. 
     218        /// </summary> 
    179219        property unsigned Cluster 
    180220        { 
     
    185225 
    186226    internal: 
     227        /// <summary> 
    187228        /// Constructor. 
    188         ///  
    189         /// \param[in] name    The name of the entry. 
    190         /// \param[in] parent  The parent directory containing this file. 
    191         /// \param[in] type    The type of this entry. 
    192         /// \param[in] cluster The first cluster of the file. 
     229        /// </summary> 
     230        /// <param name="name">The name of the entry.</param> 
     231        /// <param name="parent">The parent directory containing this file.</param> 
     232        /// <param name="type">The type of this entry.</param> 
     233        /// <param name="cluster">The first cluster of the file.</param> 
    193234        FatDirectoryEntry(String^ name, FatDirectoryBase^ parent, FatDirectoryEntryType type, 
    194235            unsigned cluster); 
     
    201242    }; 
    202243 
     244    /// <summary> 
    203245    /// Represents an abstract FAT directory (can also represent the root directory of 
    204246    /// FAT12 and FAT16 volumes.) 
     247    /// </summary> 
    205248    public ref class FatDirectoryBase abstract : FatDirectoryEntry 
    206249    { 
    207250    protected: 
     251        /// <summary> 
    208252        /// Constructor. 
    209         ///  
    210         /// \param[in] name    The name of the current directory. 
    211         /// \param[in] parent  The parent directory containing this directory. 
    212         /// \param[in] cluster The cluster at which the directory list starts. 
     253        /// </summary> 
     254        /// <param name="name">The name of the current directory.</param> 
     255        /// <param name="parent">The parent directory containing this directory.</param> 
     256        /// <param name="cluster">The cluster at which the directory list starts.</param> 
    213257        FatDirectoryBase(String^ name, FatDirectoryBase^ parent, unsigned cluster); 
    214258 
    215259    public: 
     260        /// <summary> 
    216261        /// Compacts the directory structure, updating the structure on-disk as well. 
     262        /// </summary> 
    217263        void ClearDeletedEntries(); 
    218264 
     265        /// <summary> 
    219266        /// The list of files and subfolders in this directory. 
     267        /// </summary> 
    220268        property Collections::Generic::Dictionary<String^, FatDirectoryEntry^>^ Items 
    221269        { 
     
    227275 
    228276    protected: 
     277        /// <summary> 
    229278        /// Reads the directory structures from disk. 
    230         ///  
    231         /// \remarks This function must set the \see Directory instance as well as the 
    232         ///          \see DirectorySize fields. Furthermore, call the \see ParseDirectory 
    233         ///          function to initialise the directory entries on-disk. 
     279        /// </summary> 
     280        /// <remarks>This function must set the <see cref="Directory" /> instance 
     281        /// as well as the <see cref="DirectorySize" /> fields. Furthermore, call 
     282        /// the <see cref="ParseDirectory" /> function to initialise the directory 
     283        /// entries on-disk.</remarks> 
    234284        virtual void ReadDirectory() = 0; 
    235285 
     286        /// <summary> 
    236287        /// Writes the directory to disk. 
     288        /// </summary> 
    237289        virtual void WriteDirectory() = 0; 
    238290 
    239         /// This function reads the raw directory structures in \see Directory and 
    240         /// sets the \see Entries field for easier access to the directory entries. 
     291        /// <summary> 
     292        /// This function reads the raw directory structures in <see cref="Directory" /> 
     293        /// and sets the <see cref="Entries" /> field for easier access to the directory 
     294        /// entries. 
     295        /// </summary> 
    241296        void ParseDirectory(); 
    242297 
     298        /// <summary> 
    243299        /// Gets the start cluster from the given directory entry. 
     300        /// </summary> 
    244301        virtual unsigned GetStartCluster(::FatDirectoryEntry& directory) = 0; 
    245302 
    246303    protected: 
     304        /// <summary> 
    247305        /// A pointer to the directory structure. 
     306        /// </summary> 
    248307        property ::FatDirectory Directory 
    249308        { 
     
    252311        } 
    253312 
     313        /// <summary> 
    254314        /// The number of entries in the directory 
     315        /// </summary> 
    255316        property size_t DirectorySize 
    256317        { 
     
    260321 
    261322    private: 
     323        /// <summary> 
    262324        /// The list of parsed entries in the folder. 
     325        /// </summary> 
    263326        Collections::Generic::Dictionary<String^, FatDirectoryEntry^>^ Entries; 
    264327 
     
    267330    }; 
    268331 
     332    /// <summary> 
    269333    /// Represents a FAT directory file. 
     334    /// </summary> 
    270335    public ref class FatDirectory abstract : FatDirectoryBase 
    271336    { 
    272337    protected: 
     338        /// <summary> 
    273339        /// Constructor. 
    274         ///  
    275         /// \param[in] name    The name of the current directory. 
    276         /// \param[in] parent  The parent directory containing this directory. 
    277         /// \param[in] cluster The cluster at which the directory list starts. 
    278         /// \param[in] api     The FAT API object which is creating this object. 
     340        /// </summary> 
     341        /// <param name="name">The name of the current directory.</param> 
     342        /// <param name="parent">The parent directory containing this directory.</param> 
     343        /// <param name="cluster">The cluster at which the directory list starts.</param> 
     344        /// <param name="api">The FAT API object which is creating this object.</param> 
    279345        FatDirectory(String^ name, FatDirectoryBase^ parent, unsigned cluster, FatApi^ api); 
    280346 
     
    341407 
    342408    private: 
     409        /// <summary> 
    343410        /// Retrieves the FAT value for the given cluster. 
     411        /// </summary> 
    344412        unsigned GetFatValue(unsigned cluster); 
    345413    }; 
  • trunk/eraser/Eraser.Util.Native/OpenHandle.h

    r1812 r1997  
    3131namespace Eraser { 
    3232namespace Util { 
     33    /// <summary> 
    3334    /// Represents one open handle in the system. 
     35    /// </summary> 
    3436    public ref class OpenHandle 
    3537    { 
    3638    internal: 
     39        /// <summary> 
    3740        /// Constructor. 
    38         ///  
    39         /// \param[in] handle The handle to wrap. 
    40         /// \param[in] pid The Process ID of the handle. 
    41         /// \param[in] path The path to the file. 
     41        /// </summary> 
     42        /// <param name="handle">The handle to wrap.</param> 
     43        /// <param name="pid">The Process ID of the handle.</param> 
     44        /// <param name="path">The path to the file.</param> 
    4245        OpenHandle(IntPtr handle, int pid, String^ path) 
    4346        { 
     
    4851 
    4952    public: 
     53        /// <summary> 
    5054        /// Retrieves all open handles on the system 
     55        /// </summary> 
    5156        static property IList<OpenHandle^>^ Items 
    5257        { 
     
    5459        } 
    5560 
     61        /// <summary> 
    5662        /// Force the handle to close. 
     63        /// </summary> 
    5764        bool Close(); 
    5865 
     66        /// <summary> 
    5967        /// The handle to the file, in the context of the owning process. 
     68        /// </summary> 
    6069        property IntPtr Handle 
    6170        { 
     
    6675        } 
    6776 
     77        /// <summary> 
    6878        /// The path to the file. 
     79        /// </summary> 
    6980        property String^ Path 
    7081        { 
     
    7586        } 
    7687 
     88        /// <summary> 
    7789        /// The process ID of the process owning the handle. 
     90        /// </summary> 
    7891        property int ProcessId 
    7992        { 
     
    8598 
    8699    private: 
     100        /// <summary> 
    87101        /// Resolves a handle to a file name. 
    88         /// 
    89         /// \param[in] handle The file handle to resolve. 
    90         /// \param[in] pid The process ID of the owning process. 
    91         /// \return A string containing the path to the file, or null. 
     102        /// </summary> 
     103        /// <param name="handle">The file handle to resolve.</param> 
     104        /// <param name="pid">The process ID of the owning process.</param> 
     105        /// <returns>A string containing the path to the file, or null.</returns> 
    92106        static String^ ResolveHandlePath(IntPtr handle, int pid); 
    93107 
Note: See TracChangeset for help on using the changeset viewer.