hi all
im working in tcsh shell.
In sh shell i write for example:
case in $www
1 | 2 | 3)
arguments;;
4 | 5 | 6)
arguments;;
esac
can anybody tell me the equivalent to tcsh of
1 | 2 | 3)? (2 Replies)
Hi,
I have a base class and derived a class from the base class, i want to print & read the data for the object created for the derived class,so i have overloaded both the << and >> operators and also have done the foward declaration.
Below is the code snippet,
#include <iostream>
class... (3 Replies)
is it possible to use multiple conditions in a CASE statement? And if so, what is the syntax? I'm trying to use one but can't seem to get it right. I want the statement to be
CASE $vendor OR $alias
condition 1) statements;
condition 2) statements;
etc.
esac
but I keep... (25 Replies)
Hi all,
I am attempting to create a shell script to optimize some routine process.
I want this script can let user select the actions they want to do.
But I met a problem that my script can only read one input and then do one action.
Is it possible to let my script to run more than one... (2 Replies)
Hi all!
I am trying to register a device in an existing device class, but I am
having trouble getting the pointer to an existing class.
I can create a class in a module, get the pointer to it and then use
it to register the device with:
*cl = class_create(THIS_MODULE, className);... (0 Replies)
Hi,
In multi-level inheritance:
class A {
public:
void fun() { cout << "A" << endl; }
};
class B : public A {
public:
void fun() { cout << "A" << endl; }
};
class C : public B { };
int main() {
C c;
c.fun(); // Ans: A
} (1 Reply)
I have the two class definition as follows.
class A { public: int a; };
class B : virtual public A{ };
The size of class A is shown as 4, and size of class B is shown as 16. Why is this effect ?. (2 Replies)
Hello All,
I am a learner in C++. I was testing my inheritance knowledge with following piece of code.
#include <iostream>
using namespace std;
class base
{
public :
void display()
{
cout << "In base display()" << endl;
}
void display(int k)
{... (2 Replies)
Discussion started by: anand.shah
2 Replies
LEARN ABOUT SUSE
tk::derived
Derived(3) User Contributed Perl Documentation Derived(3)NAME
Tk::Derived - Base class for widgets derived from others
SYNOPSIS
package Tk::MyNewWidget;
use Tk::widgets qw/ BaseWidget, list of Tk widgets /;
use base qw/ Tk::Derived Tk::BaseWidget /;
Construct Tk::Widget 'MyNewWidget';
sub ClassInit {
my( $class, $mw ) = @_;
#... e.g., class bindings here ...
$class->SUPER::ClassInit( $mw );
}
sub Populate {
my( $self, $args ) = @_;
my $flag = delete $args->{-flag};
if( defined $flag ) {
# handle -flag => xxx which can only be done at create
# time the delete above ensures that new() does not try
# and do $self->configure( -flag => xxx );
}
$self->SUPER::Populate( $args );
$self = $self->Component( ... );
$self->Delegates( ... );
$self->ConfigSpecs(
'-cursor' => [ SELF, 'cursor', 'Cursor', undef ],
'-something' => [ METHOD, dbName, dbClass, default ],
'-text' => [ $label, dbName, dbClass, default ],
'-heading' => [ {-text => $head},
heading, Heading, 'My Heading' ],
);
}
sub something {
my( $self, $value) = @_;
if ( @_ > 1 ) {
# set it
}
return # current value
}
DESCRIPTION
Tk::Derived is used with Perl's multiple inheritance to override some methods normally inherited from Tk::Widget.
Tk::Derived should precede any Tk widgets in the class's base class definition.
Tk::Derived's main purpose is to apply wrappers to "configure" and "cget" methods of widgets to allow the derived widget to add to or
modify behaviour of the configure options supported by the base widget.
The derived class should normally override the "Populate" method provided by Tk::Derived and call "ConfigSpecs" to declare configure
options.
The public methods provided by Tk::Derived are as follows:
->ConfigSpecs(-key => [kind, name, Class, default], ...)
SEE ALSO
Tk::ConfigSpecs Tk::mega Tk::composite
perl v5.12.1 2007-05-05 Derived(3)