00001 /* 00002 * NamedSet.h - scripter access to named node selection sets 00003 * 00004 * John Wainwright 00005 * Copyright (c) Autodesk, Inc. 1997 00006 * 00007 */ 00008 00009 #pragma once 00010 00011 #include "..\kernel\value.h" 00012 #include "..\foundation\collection.h" 00013 00014 /* ---------------------- MAXNamedSetArray ----------------------- */ 00015 00016 // provides array-like access to the table of named selection sets 00017 00018 visible_class (MAXNamedSetArray) 00019 00020 class MAXNamedSetArray : public Value, public Collection 00021 { 00022 public: 00023 MAXNamedSetArray(); 00024 00025 classof_methods (MAXNamedSetArray, Value); 00026 void collect() { delete this; } 00027 ScripterExport void sprin1(CharStream* s); 00028 00029 // operations 00030 ScripterExport Value* map(node_map& m); 00031 00032 #include "..\macros\define_implementations.h" 00033 # include "..\protocols\arrays.inl" 00034 00035 // built-in property accessors 00036 def_property ( count ); 00037 00038 }; 00039 00040 /* ---------------------- MAXNamedSet ----------------------- */ 00041 00042 visible_class (MAXNamedSet) 00043 00044 class MAXNamedSet : public Value, public Collection 00045 { 00046 public: 00047 MSTR name; 00048 00049 MAXNamedSet(MCHAR* iname); 00050 # define is_namedset(v) ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(MAXNamedSet)) 00051 00052 classof_methods (MAXNamedSet, Value); 00053 BOOL _is_collection() { return 1; } 00054 void collect() { delete this; } 00055 ScripterExport void sprin1(CharStream* s); 00056 00057 // operations 00058 ScripterExport Value* map(node_map& m); 00059 00060 #include "..\macros\define_implementations.h" 00061 # include "..\protocols\arrays.inl" 00062 00063 // built-in property accessors 00064 def_property ( count ); 00065 def_property ( center ); 00066 def_property ( min ); 00067 def_property ( max ); 00068 def_property ( name ); 00069 }; 00070 00071 extern MAXNamedSetArray theNamedSetArray; 00072 00073