PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.h

http://macfuse.googlecode.com/
C++ Header | 46 lines | 9 code | 6 blank | 31 comment | 0 complexity | f5c0b544f17c1b368eb7fb955ba23148 MD5 | raw file
 1//
 2//  GTMLightweightProxy.h
 3//
 4//  Copyright 2006-2008 Google Inc.
 5//
 6//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 7//  use this file except in compliance with the License.  You may obtain a copy
 8//  of the License at
 9// 
10//  http://www.apache.org/licenses/LICENSE-2.0
11// 
12//  Unless required by applicable law or agreed to in writing, software
13//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15//  License for the specific language governing permissions and limitations under
16//  the License.
17//
18
19#import <Foundation/Foundation.h>
20
21//
22// GTMLightweightProxy
23//
24// An object which does nothing but stand in for another object and forward
25// messages (other than basic NSObject messages) to it, suitable for breaking
26// retain cycles. It does *not* retain the represented object, so the
27// represented object must be set to nil when that object is deallocated.
28//
29// Messages sent to a GTMLightweightProxy with no represented object set will
30// be silently discarded.
31//
32@interface GTMLightweightProxy : NSProxy {
33 @private
34  __weak id representedObject_;
35}
36
37// Initializes the object to represent |object|.
38- (id)initWithRepresentedObject:(id)object;
39
40// Gets the object that the proxy represents.
41- (id)representedObject;
42
43// Changes the proxy to represent |object|
44- (void)setRepresentedObject:(id)object;
45
46@end