00001 #ifndef symdir_h 00002 #define symdir_h 00003 00004 #include <InterViews/resource.h> 00005 #include <OS/table.h> 00006 #include <OS/string.h> 00007 00008 struct Object; 00009 class SymDirectoryImpl; 00010 struct Symbol; 00011 00012 declareTable(SymbolTable, String, Symbol*) 00013 00014 class IvocAliases { 00015 public: 00016 IvocAliases(Object*); 00017 virtual ~IvocAliases(); 00018 Symbol* lookup(const char*); 00019 Symbol* install(const char*); 00020 void remove(Symbol*); 00021 int count(); 00022 Symbol* symbol(int); 00023 00024 Object* ob_; // not referenced 00025 SymbolTable* symtab_; 00026 }; 00027 00028 /* List of Symbols considered as a directory */ 00029 00030 class SymDirectory : public Resource { 00031 public: 00032 SymDirectory(const String& parent_path, Object* parent_object, 00033 Symbol*, int array_index=nil, int node_index=nil); 00034 SymDirectory(Object*); 00035 SymDirectory(int type); 00036 virtual ~SymDirectory(); 00037 00038 virtual const String& path() const; 00039 virtual int count() const; 00040 virtual const String& name(int index) const; 00041 virtual int index(const String&) const; 00042 virtual void whole_name(int index, CopyString&) const; 00043 virtual boolean is_directory(int index) const; 00044 virtual double* variable(int index); 00045 virtual int whole_vector(int index); 00046 00047 static boolean match(const String& name, const String& pattern); 00048 Symbol* symbol(int index) const; 00049 int array_index(int index) const; 00050 Object* object() const; // the parent_object 00051 Object* obj(int index); // non-nil if SymbolItem is an object 00052 private: 00053 SymDirectoryImpl* impl_; 00054 }; 00055 00056 #endif