TCommandSpecified.hh Source File

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

# TCommandSpecified.hh

解説を見る。

    00001 // =====================================================================
    00021 // =====================================================================
    00022 #ifndef __TCOMMANDSPECIFIED_HH
    00023 #define __TCOMMANDSPECIFIED_HH
    00024
    00025 #include "Tglobals.h"
    00026
    00027 class TCommand;
    00028
    00029
    00030
    00050 class TCommandSpecified
    00051 {
    00052   public:
    00053     enum {
    00054       tBuiltinDepth = -1,
    00055       tAliasDepth = -2,
    00056       tNotDefineDepth = 0x8fffffff
    00057     };
    00058
    00059   private:
    00060     Tstring theName;
    00061     Tstring theFullName;
    00062     Tstring theAbsolutePath;
    00063     Tint theDirectoryDepth;
    00064     Tbool theBuiltinFlag;
    00065     TCommand* theCommand;
    00066
    00067   public:
    00068     TCommandSpecified();
    00069     TCommandSpecified( const Tstring& name, const Tstring& fullname, const Tstring& path, Tint depth, Tbool flag, TCommand* command );
    00070     TCommandSpecified( const TCommandSpecified& right );
    00071     ~TCommandSpecified();
    00072
    00073   public:
    00074     const TCommandSpecified& operator=( const TCommandSpecified& right );
    00075     Tbool operator==( const TCommandSpecified& right ) const;
    00076     Tbool operator!=( const TCommandSpecified& right ) const;
    00077
    00078   public:
    00079     friend Tostream& operator<<( Tostream& tos, const TCommandSpecified& right );
    00080
    00081   public:
    00082     const Tstring& GetName() const;
    00083     const Tstring& GetFullName() const;
    00084     const Tstring& GetAbsolutePath() const;
    00085     Tint GetDirectoryDepth() const;
    00086     Tbool IsBuiltinCommand() const;
    00087     Tbool IsAliasedCommand() const;
    00088     TCommand* GetCommand() const;
    00089     Tvoid SetName( const Tstring& name );
    00090     Tvoid SetFullName( const Tstring& name );
    00091     Tvoid SetAbsolutePath( const Tstring& path );
    00092     Tvoid SetDirectoryDepth( Tint depth );
    00093     Tvoid SetBuiltinFlag( Tbool flag );
    00094     Tvoid SetCommand( TCommand* command );
    00095
    00096 };
    00097
    00098 inline const Tstring& TCommandSpecified::GetName() const
    00099 {
    00100   return theName;
    00101 }
    00102
    00103 inline const Tstring& TCommandSpecified::GetFullName() const
    00104 {
    00105   return theFullName;
    00106 }
    00107
    00108 inline const Tstring& TCommandSpecified::GetAbsolutePath() const
    00109 {
    00110   return theAbsolutePath;
    00111 }
    00112
    00113 inline Tint TCommandSpecified::GetDirectoryDepth() const
    00114 {
    00115   return theDirectoryDepth;
    00116 }
    00117
    00118 inline Tbool TCommandSpecified::IsBuiltinCommand() const
    00119 {
    00120   return theBuiltinFlag;
    00121 }
    00122
    00123 inline Tbool TCommandSpecified::IsAliasedCommand() const
    00124 {
    00125   return theDirectoryDepth == tAliasDepth;
    00126 }
    00127
    00128 inline TCommand* TCommandSpecified::GetCommand() const
    00129 {
    00130   return theCommand;
    00131 }
    00132
    00133 inline Tvoid TCommandSpecified::SetName( const Tstring& name )
    00134 {
    00135   theName = name;
    00136   return;
    00137 }
    00138
    00139 inline Tvoid TCommandSpecified::SetFullName( const Tstring& name )
    00140 {
    00141   theFullName = name;
    00142   return;
    00143 }
    00144
    00145 inline Tvoid TCommandSpecified::SetAbsolutePath( const Tstring& path )
    00146 {
    00147   theAbsolutePath = path;
    00148   return;
    00149 }
    00150
    00151 inline Tvoid TCommandSpecified::SetDirectoryDepth( Tint depth )
    00152 {
    00153   theDirectoryDepth = depth;
    00154   return;
    00155 }
    00156
    00157 inline Tvoid TCommandSpecified::SetBuiltinFlag( Tbool flag )
    00158 {
    00159   theBuiltinFlag = flag;
    00160   return;
    00161 }
    00162
    00163 inline Tvoid TCommandSpecified::SetCommand( TCommand* command )
    00164 {
    00165   theCommand = command;
    00166   return;
    00167 }
    00168
    00169 #endif