-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathAnchor.h
64 lines (55 loc) · 1.28 KB
/
Anchor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* @file Anchor.h
* @brief Anchor declaration.
* @author Masayuki YAMAYA
* @date 2008-03-07
*/
#import <Foundation/Foundation.h>
/**
* Anchor class
*/
@interface Anchor : NSObject
{
NSString * url_;
NSString * title_;
}
/// URL
@property (nonatomic, retain) NSString * URL;
/// title
@property (nonatomic, retain) NSString * title;
/// html tag
@property (nonatomic, readonly) NSString * html;
/**
* initialize Anchor object.
* @param[in] url URL string
* @param[in] title title string
* @return initialized Anchor object
*/
- (id)initWithURL:(NSString *)url title:(NSString *)title;
/**
* initialize Anchor object.
* @param[in] html TAB separated string for URL and title
* @return initialized Anchor object
*/
- (id)initWithHTML:(NSString *)html;
/**
* create Anchor object.
* @param[in] url URL string
* @param[in] title title string
* @return Anchor object
*/
+ (Anchor *)anchorWithURL:(NSString *)url title:(NSString *)title;
/**
* create Anchor object.
* @param[in] html HTML anchor tag
* @return Anchor object
*/
+ (Anchor *)anchorWithHTML:(NSString *)html;
/**
* create HTML anchor tag string
* @param[in] url URL string
* @param[in] title title string
* @return HTML anchor tag
*/
+ (NSString *)htmlWithURL:(NSString *)URL title:(NSString *)title;
@end