]> err.no Git - sope/blobdiff - sope-core/samples/EOQualTool.m
added OSX framework support
[sope] / sope-core / samples / EOQualTool.m
index 3d56f2bfc8d2f8a7fe08fc61d25ef0f2c8db5aa2..60e9dced4a5672ab77511ba147ad31d66975ea5b 100644 (file)
@@ -1,24 +1,23 @@
 /*
-  Copyright (C) 2000-2003 SKYRIX Software AG
+  Copyright (C) 2000-2005 SKYRIX Software AG
 
-  This file is part of OGo
+  This file is part of SOPE.
 
-  OGo is free software; you can redistribute it and/or modify it under
+  SOPE is free software; you can redistribute it and/or modify it under
   the terms of the GNU Lesser General Public License as published by the
   Free Software Foundation; either version 2, or (at your option) any
   later version.
 
-  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
   WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
   License for more details.
 
   You should have received a copy of the GNU Lesser General Public
-  License along with OGo; see the file COPYING.  If not, write to the
+  License along with SOPE; see the file COPYING.  If not, write to the
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
 
 #import "EOQualTool.h"
 #import "common.h"
     [self printQualifier:q nesting:_level];
 }
 
-- (void)printQualifier:(id)_q nesting:(int)_level {
+- (void)printQualifier:(EOQualifier *)_q nesting:(int)_level {
   [self indent:_level];
   
   if ([_q isKindOfClass:[EOAndQualifier class]]) {
     printf("AND\n");
-    [self printQualifiers:[_q qualifiers] nesting:_level + 1];
+    [self printQualifiers:[(EOAndQualifier *)_q qualifiers] 
+         nesting:_level + 1];
   }
   else if ([_q isKindOfClass:[EOOrQualifier class]]) {
     printf("OR\n");
-    [self printQualifiers:[_q qualifiers] nesting:_level + 1];
+    [self printQualifiers:[(EOOrQualifier *)_q qualifiers] nesting:_level + 1];
   }
   else if ([_q isKindOfClass:[EONotQualifier class]]) {
     printf("NOT\n");
-    [self printQualifier:[_q qualifier] nesting:_level + 1];
+    [self printQualifier:[(EONotQualifier *)_q qualifier] nesting:_level + 1];
   }
   else if ([_q isKindOfClass:[EOKeyValueQualifier class]]) {
-    id v = [_q value];
+    id v = [(EOKeyValueQualifier *)_q value];
     printf("key OP value\n");
     _level++;
     [self indent:_level];
-    printf("key:   %s\n", [[_q key] cString]);
+    printf("key:   %s\n", [[(EOKeyValueQualifier *)_q key] cString]);
     [self indent:_level];
     printf("value: '%s' (class=%s)\n",
           [[v stringValue] cString],
           [NSStringFromClass([v class]) cString]);
     [self indent:_level];
-    printf("OP:    %s\n", [NSStringFromSelector([_q selector]) cString]);
+    printf("OP:    %s\n", 
+          [NSStringFromSelector([(EOKeyValueQualifier *)_q selector]) 
+                                cString]);
     _level--;
   }
   else if ([_q isKindOfClass:[EOKeyComparisonQualifier class]]) {
     printf("key1 OP key1\n");
     _level++;
     [self indent:_level];
-    printf("left:  %s\n", [[_q leftKey] cString]);
+    printf("left:  %s\n", [[(EOKeyComparisonQualifier *)_q leftKey] cString]);
     [self indent:_level];
-    printf("right: %s\n", [[_q rightKey] cString]);
+    printf("right: %s\n", [[(EOKeyComparisonQualifier *)_q rightKey] cString]);
     [self indent:_level];
-    printf("OP:    %s\n", [NSStringFromSelector([_q selector]) cString]);
+    printf("OP:    %s\n",
+          [NSStringFromSelector([(EOKeyComparisonQualifier *)_q selector]) 
+                               cString]);
     _level--;
   }
   else