| Tibco-Rv documentation | Contained in the Tibco-Rv distribution. |
Tibco::Rv::Status - status code
my ( $status ) =
new Tibco::Rv::Status( status => Tibco::Rv::INVALID_ARG );
$status = $msg->removeField( $fieldName, $fieldId );
print "returned: $status\n" if ( $status != Tibco::Rv::OK );
Wrapper class for status codes.
%args:
status => $status
Creates a Tibco::Rv::Status object with the given status. $status
should be one of the
Tibco::Rv Status Constants, or an equivalent
numeric value.
Returns a descriptive string of $status. Or, simply use $status in
a string context.
Returns the numeric value of $status. Or, simply use $status in a
numeric context.
Paul Sturm <sturm@branewave.com>
| Tibco-Rv documentation | Contained in the Tibco-Rv distribution. |
package Tibco::Rv::Status; use vars qw/ $VERSION /; $VERSION = '1.02'; use Inline with => 'Tibco::Rv::Inline'; use Inline C => 'DATA', NAME => __PACKAGE__, VERSION => $Tibco::Rv::Inline::VERSION; use overload '""' => 'toString', '0+' => 'toNum', fallback => 1; sub new { my ( $proto ) = shift; my ( %params ) = ( status => Tibco::Rv::OK ); my ( %args ) = @_; map { Tibco::Rv::die( Tibco::Rv::INVALID_ARG ) unless ( exists $params{$_} ) } keys %args; %params = ( %params, %args ); my ( $class ) = ref( $proto ) || $proto; my ( $self ) = bless { status => $params{status} }, $class; return $self; } sub toString { return tibrvStatus_GetText( shift->{status} ) } sub toNum { return shift->{status} } 1;
__DATA__ __C__ const char * tibrvStatus_GetText( tibrv_status status );