メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TFileProperty.hh

解説を見る。
00001 // ============================================================================
00032 // ============================================================================
00033 #ifndef CLDAQ__TFILEPROPERTY_HH
00034 #define CLDAQ__TFILEPROPERTY_HH
00035 
00036 #include "Tglobals.h"
00037 
00038 
00058 class TFileProperty
00059 {
00060 
00061   private:
00062     Tstring thePathName;
00063     Tstring theDirectoryName;
00064     Tstring theFileName;
00065     Tstring theFileRootName;
00066     Tstring theFileExtensionName;
00067     Tint theDeviceNumber;
00068     Tint theDeviceMajorNumber;
00069     Tint theDeviceMiorNumber;
00070     Tint theInodeNumber;
00071     Tint theProtection;
00072     Tint theNumberOfHardLinks;
00073     Tint theDeviceType;
00074     Tint theTotalSize;
00075     Tint theBlockSize;
00076     Tint theNumberOfBlocks;
00077     Tint theUserID;
00078     Tint theGroupID;
00079     Tint theLastAccess;
00080     Tint theLastModification;
00081     Tint theLastChange;
00082     Tstring theStringUserID;
00083     Tstring theStringGroupID;
00084     Tstring theStringLastAccess;
00085     Tstring theStringLastModification;
00086     Tstring theStringLastChange;
00087 
00088   public:
00089     TFileProperty();
00090     TFileProperty( const Tstring& path );
00091     TFileProperty( const TFileProperty& right );
00092     ~TFileProperty();
00093 
00094   public:
00095     const TFileProperty& operator=( const TFileProperty& right );
00096     Tbool operator==( const TFileProperty& right ) const;
00097     Tbool operator!=( const TFileProperty& right ) const;
00098 
00099   public:
00100     const Tstring& GetPathName() const;
00101     const Tstring& GetDirectoryName() const;
00102     const Tstring& GetFileName() const;
00103     const Tstring& GetFileRootName() const;
00104     const Tstring& GetFileExtensionName() const;
00105     Tint GetDeviceNumber() const;
00106     Tint GetDeviceMajorNumber() const;
00107     Tint GetDeviceMiorNumber() const;
00108     Tint GetInodeNumber() const;
00109     Tint GetProtection() const;
00110     Tint GetNumberOfHardLinks() const;
00111     Tint GetDeviceType() const;
00112     Tint GetTotalSize() const;
00113     Tint GetBlockSize() const;
00114     Tint GetNumberOfBlocks() const;
00115     Tint GetUserID() const;
00116     Tint GetGroupID() const;
00117     Tint GetLastAccess() const;
00118     Tint GetLastModification() const;
00119     Tint GetLastChange() const;
00120     const Tstring& GetStringUserID() const;
00121     const Tstring& GetStringGroupID() const;
00122     const Tstring& GetStringLastAccess() const;
00123     const Tstring& GetStringLastModification() const;
00124     const Tstring& GetStringLastChange() const;
00125 
00126   public:
00127     Tvoid SetPathName( const Tstring& path );
00128     Tvoid Analyse();
00129     Tvoid Update();
00130     // ChangeMode とか Rename をする SetProtection(), SetUserID()
00131 
00132   public:
00133     Tbool IsCharacterDevice() const;
00134     Tbool IsBlockDevice() const;
00135     Tbool IsFIFO() const;
00136     Tbool IsSocket() const;
00137     Tbool IsSymbolicLink() const;
00138     Tbool IsRegularFile() const;
00139     Tbool IsDirectory() const;
00140     Tbool IsReadable() const;
00141     Tbool IsWritable() const;
00142     Tbool IsExecutable() const;
00143 
00144   public:
00145     friend Tostream& operator<<( Tostream& tos, const TFileProperty& right );
00146 
00147 };
00148 
00149 inline const Tstring& TFileProperty::GetPathName() const
00150 {
00151   return thePathName;
00152 }
00153 
00154 inline const Tstring& TFileProperty::GetDirectoryName() const
00155 {
00156   return theDirectoryName;
00157 }
00158 
00159 inline const Tstring& TFileProperty::GetFileName() const
00160 {
00161   return theFileName;
00162 }
00163 
00164 inline const Tstring& TFileProperty::GetFileRootName() const
00165 {
00166   return theFileRootName;
00167 }
00168 
00169 inline const Tstring& TFileProperty::GetFileExtensionName() const
00170 {
00171   return theFileExtensionName;
00172 }
00173 
00174 inline Tint TFileProperty::GetDeviceNumber() const
00175 {
00176   return theDeviceNumber;
00177 }
00178 
00179 inline Tint TFileProperty::GetDeviceMajorNumber() const
00180 {
00181   return theDeviceMajorNumber;
00182 }
00183 
00184 inline Tint TFileProperty::GetDeviceMiorNumber() const
00185 {
00186   return theDeviceMiorNumber;
00187 }
00188 
00189 inline Tint TFileProperty::GetInodeNumber() const
00190 {
00191   return theInodeNumber;
00192 }
00193 
00194 inline Tint TFileProperty::GetProtection() const
00195 {
00196   return theProtection;
00197 }
00198 
00199 inline Tint TFileProperty::GetNumberOfHardLinks() const
00200 {
00201   return theNumberOfHardLinks;
00202 }
00203 
00204 inline Tint TFileProperty::GetDeviceType() const
00205 {
00206   return theDeviceType;
00207 }
00208 
00209 inline Tint TFileProperty::GetTotalSize() const
00210 {
00211   return theTotalSize;
00212 }
00213 
00214 inline Tint TFileProperty::GetBlockSize() const
00215 {
00216   return theBlockSize;
00217 }
00218 
00219 inline Tint TFileProperty::GetNumberOfBlocks() const
00220 {
00221   return theNumberOfBlocks;
00222 }
00223 
00224 inline Tint TFileProperty::GetUserID() const
00225 {
00226   return theUserID;
00227 }
00228 
00229 inline Tint TFileProperty::GetGroupID() const
00230 {
00231   return theGroupID;
00232 }
00233 
00234 inline Tint TFileProperty::GetLastAccess() const
00235 {
00236   return theLastAccess;
00237 }
00238 
00239 inline Tint TFileProperty::GetLastModification() const
00240 {
00241   return theLastModification;
00242 }
00243 
00244 inline Tint TFileProperty::GetLastChange() const
00245 {
00246   return theLastChange;
00247 }
00248 
00249 inline const Tstring& TFileProperty::GetStringUserID() const
00250 {
00251   return theStringUserID;
00252 }
00253 
00254 inline const Tstring& TFileProperty::GetStringGroupID() const
00255 {
00256   return theStringGroupID;
00257 }
00258 
00259 inline const Tstring& TFileProperty::GetStringLastAccess() const
00260 {
00261   return theStringLastAccess;
00262 }
00263 
00264 inline const Tstring& TFileProperty::GetStringLastModification() const
00265 {
00266   return theStringLastModification;
00267 }
00268 
00269 inline const Tstring& TFileProperty::GetStringLastChange() const
00270 {
00271   return theStringLastChange;
00272 }
00273 
00274 inline Tvoid TFileProperty::SetPathName( const Tstring& path )
00275 {
00276   thePathName = path;
00277   Analyse();
00278   return;
00279 }
00280 
00281 inline Tvoid TFileProperty::Update()
00282 {
00283   Analyse();
00284   return;
00285 }
00286 
00287 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.12.0)
Go IWAI <goiwai@users.sourceforge.jp>