CodeForge QQ客服 CodeForge 400电话 客服电话 4006316121

ManagedObjectDataFormatter.m ( 文件浏览 )

  • 发布于2010-08-14
  • 浏览次数:32
  • 下载次数:1
  • 下载需 1 积分
  • 侵权举报
			
#include <stdlib.h>
#include <stdarg.h>
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

// Developers writing their own custom data formatters should be sure to read the information in DataFormatterPlugin.h
#import "/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Headers/DataFormatterPlugin.h"

_pbxgdb_plugin_function_list *_pbxgdb_plugin_functions = NULL;

static char *nullPluginFunctions = "ManagedObject Data Formatter error: _pbxgdb_plugin_functions not set!";

char *SampleCode_ManagedObjectSummary(NSManagedObject *managedObject, int identifier)
{

    char *result;
    if (_pbxgdb_plugin_functions) {

        NSAutoreleasePool *autoreleasePool = [[NSAutoreleasePool alloc] init];
        
        NSEntityDescription *entity = [managedObject entity];
        NSString *entityName = [entity name];
        NSArray *properties = [entity properties];
        NSString *faultString = [managedObject isFault] ? @", is fault" : @"";
        
        NSString *summaryString = [NSString stringWithFormat:@"Entity: %@, %u properties%@.", entityName, [properties count], faultString];
        result = _pbxgdb_plugin_functions->message(identifier, [summaryString UTF8String]);

        [autoreleasePool release];
    
} else {

        result = nullPluginFunctions;
    
}
    return result;

}

/*

File: ManagedObjectDataFormatter.m

Abstract: Custom data formatter that displays interesting information about a NSManagedObject

Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
Computer, Inc. ("Apple") in consideration of your agreement to the
following terms, and your use, installation, modification or
redistribution of this Apple software constitutes acceptance of these
terms.  If you do not agree with these terms, please do not use,
install, modify or redistribute this Apple software.

In consideration of your agreement to abide by the following terms, and
subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the Apple
Software, with or without modifications, in source and/or binary forms;
provided that if you redistribute the Apple Software in its entirety and
without modifications, you must retain this notice and the following
text and disclaimers in all such redistributions of the Apple Software. 
Neither the name, trademarks, service marks or logos of Apple Computer,
Inc. may be used to endorse or promote products deri
...
...
(完整源码请下载查看)
			
...
展开> <收缩

下载源码到电脑,阅读使用更方便

1 积分

快速下载
还剩0行未阅读,继续阅读
Ʋ

源码文件列表

温馨提示: 点击源码文件名可预览文件内容哦 ^_^
...
名称 大小 修改日期
06.00 B
About2.07 kB05-28-05|01:11
CustomDataViews.plist390.00 B05-28-05|01:11
06.00 B
InfoPlist.strings318.00 B05-28-05|01:11
Info.plist741.00 B05-28-05|01:11
05.00 B
05.00 B
Info.plist645.00 B05-28-05|01:36
05.00 B
ManagedObjectDataFormatter13.42 kB05-28-05|01:37
05.00 B
CustomDataViews.plist390.00 B05-28-05|01:36
05.00 B
InfoPlist.strings318.00 B05-28-05|01:36
ManagedObjectDataFormatter.m3.75 kB05-28-05|01:11
06.00 B
project.pbxproj11.26 kB05-28-05|01:40
Ʋ

ManagedObjectDataFormatter.m (12.87 kB)

需要 1 积分
您持有 积分

CodeForge积分(原CF币)全新升级,功能更强大,使用更便捷,不仅可以用来下载海量源代码马上还可兑换精美小礼品了 了解更多

您的积分不足

支付宝优惠套餐快速获取 30 积分

订单支付完成后,积分将自动加入到您的账号。以下是优惠期的人民币价格,优惠期过后将恢复美元价格。

更多付款方式:网银PayPal

上传代码,免费获取

您本次下载所消耗的积分将转交上传作者。

同一源码,30天内重复下载,只扣除一次积分。

登录 CodeForge

还没有CodeForge账号? 立即注册
关注微博
联系客服

Switch to the English version?

Yes
CodeForge 英文版
No
CodeForge 中文版

完善个人资料,获价值¥30元积分奖励!

^_^"呃 ...

Sorry!这位大神很神秘,未开通博客呢,请浏览一下其他的吧
好的