List Info

Thread: Combining Classes




Combining Classes
country flaguser name
Denmark
2007-03-05 07:50:10
Hi all.

I have tried several thing to acomplish combing two casses
into one -
wihtout any luck so far.

Dos anyone have succeded in this, using only the already
defined classes
? 
I mean without making any class match validation again.


class "one" {
            match substring (hardware, 1, 3);
                    }
        subclass "one" 00:11:22; # 
}       

class "two" {
         match if  substring ( (option agent.circuit-id) ,
0,4)= "1234"
);
}



So far a have tried with combinations like these, but none
of them work:

### Combined ###
class "combined" {
         match if  ( (class = "one") AND (class =
"two") );
}        
### Combined ###
class "combined" { match if  ( ("one")
AND ("two") );
}        
### Combined ###
class "combined" {
         match if  ( (members of "one") AND
(members of "two") );
}        
### Combined ###
class "combined" {
         members of  ( ("one") AND
("two") );
}   
### Combined ###
class "combined" {
         ( (members of "one") and (members of
"two") );
}       

Reason I want to do it this way instead of adding the
complete
validation syntax to the "combined" class, is
because a have thousands
of classes already defined based on more complex equations
than the
above example, and I don't want to do them all over again
just because I
want to do a combination match.

Regards
/Lars

 

[Lars Jacobsen] 
[Lars Jacobsen] 
[Lars Jacobsen] 


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )