00001 #ifndef hook_h
00002 #define hook_h
00003
00004 #include "tag.h"
00005
00007 class HookTag : public Tag
00008 {
00009 protected:
00010 std::string hook;
00011
00012 bool has;
00013 bool has_checked;
00014
00015 public:
00016 HookTag( Line& line, bool no_warning_check = false )
00017 : Tag( line, no_warning_check ),
00018 has_checked( false )
00019 {
00020
00021 }
00022
00023
00024 bool has_hook()
00025 {
00026 if( !has_checked )
00027 {
00028 has = get_option( "hook", hook );
00029 has_checked = true;
00030 }
00031
00032 return has;
00033 }
00034
00035
00036 std::string get_hook()
00037 {
00038 if( !has_checked )
00039 has_hook();
00040
00041 return hook;
00042 }
00043 };
00044
00045 #endif