Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
MyTree.h
Package: celestia-1.6.0.tar.gz [view]
Upload User: center1979
Upload Date: 2022-07-26
Package Size: 50633k
Code Size: 2k
Category:
OpenGL program
Development Platform:
Visual C++
- //
- // MyTree.h
- // celestia
- //
- // Created by Bob Ippolito on Thu Jun 20 2002.
- // Copyright (c) 2002 Chris Laurel. All rights reserved.
- //
- #import "NSArray_Extensions.h"
- @interface MyVector : NSMutableArray /*<NSCoding>*/ {
- NSMutableArray *_array;
- Class _myClass;
- }
- -(void)encodeWithCoder:(NSCoder*)coder;
- -(id)initWithCoder:(NSCoder*)coder;
- -(id)initWithClass:(Class)myClass;
- -(void)addObject:(id)obj;
- -(void)insertObject:(id)obj atIndex:(unsigned)idx;
- -(void)removeLastObject;
- -(void)removeObjectAtIndex:(unsigned)idx;
- -(void)replaceObjectAtIndex:(unsigned)idx withObject:(id)obj;
- -(unsigned)count;
- -(id)objectAtIndex:(unsigned)idx;
- @end
- @interface MyTree : NSObject <NSCoding> {
- id <NSCoding> _nodeValue;
- MyVector* _children;
- MyTree* _parent;
- }
- -(void)encodeWithCoder:(NSCoder*)coder;
- -(id)initWithCoder:(NSCoder*)coder;
- // for initializing a tree root node
- -(id)init;
- // initializing a leaf node
- -(id)initWithNode:(id)obj parent:(MyTree*)parent;
- // initializing a branch node
- -(id)initWithNode:(id)obj parent:(MyTree*)parent children:(NSArray*)children;
- -(MyVector*)children;
- -(void)setNode:(id)obj;
- -(void)setChildren:(NSArray*)children;
- -(void)setParent:(MyTree*)parent;
- -(MyTree*)parent;
- -(id)nodeValue;
- -(BOOL)isLeaf;
- -(BOOL)isDescendantOfNode:(MyTree*)node;
- -(BOOL)isDescendantOfNodeInArray:(NSArray*)array;
- +(NSArray*)minimumNodeCoverFromNodesInArray:(NSArray*)allNodes;
- -(id)initWithDictionary:(NSDictionary*)dict parent:(MyTree*)parent;
- -(NSDictionary*)dictionary;
- -(NSDictionary*)recursiveDictionary;
- - (void)insertChild:(MyTree*)child atIndex:(int)index;
- - (void)insertChildren:(NSArray*)children atIndex:(int)index;
- - (void)removeChild:(MyTree*)child;
- - (void)removeFromParent;
- - (int)indexOfChild:(MyTree*)child;
- - (int)indexOfChildIdenticalTo:(MyTree*)child;
- - (int)numberOfChildren;
- - (MyTree*)firstChild;
- - (MyTree*)lastChild;
- - (MyTree*)childAtIndex:(int)index;
- @end