| RWDE documentation | Contained in the RWDE distribution. |
Proxy object for getting the specific functionality of a particular object
To avoid require and instantiation the proxy object returns the decoded value of the passed encoded id.
To avoid require and instantiation the proxy object returns the id value from the passed ccr.
override base method "invoke" from Proxy.pm
| RWDE documentation | Contained in the RWDE distribution. |
package RWDE::CCRproxy; use strict; use warnings; use base qw(RWDE::Proxy); use vars qw($VERSION); $VERSION = sprintf "%d", q$Revision: 507 $ =~ /(\d+)/;
sub decode { my ($self,$params) = @_; return $self->invoke({class => $$params{'type'}, function => 'decode', params => $$params{'enc'}}); }
sub ccr_to_id { my ($self,$params) = @_; return $self->invoke({class => $$params{'type'}, function => 'ccr_to_id', params => $$params{'ccr'} }); }
sub invoke { my ($self,$params) = @_; my $function = $$params{'function'} or throw RWDE::DevelException({ info => 'Proxy::Parameter error - function not specified'}); my $term = RWDE::AbstractFactory->instantiate({class => $$params{'class'}}); return $term->$function($$params{'params'}); } 1;