objects 0.547
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3116
Rose::HTML::Objects 0.547
Rose::HTML::Objects is a Perl object-oriented interfaces for HTML. more>>
Rose::HTML::Objects is a Perl object-oriented interfaces for HTML.
SYNOPSIS
use Rose::HTML::Form;
$form = Rose::HTML::Form->new(action => /foo,
method => post);
$form->add_fields
(
name => { type => text, size => 20, required => 1 },
height => { type => text, size => 5, maxlength => 5 },
bday => { type => datetime },
);
$form->params(name => John, height => 6ft, bday => 01/24/1984);
$form->init_fields();
$bday = $form->field(bday)->internal_value; # DateTime object
print $bday->strftime(%A); # Tuesday
print $form->field(bday)->html;
The Rose::HTML::Object::* family of classes represent HTML tags, or groups of tags. These objects allow HTML to be arbitrarily manipulated, then serialized to actual HTML (or XHTML). Currently, the process only works in one direction. Objects cannot be constructed from their serialized representations. In practice, given the purpose of these modules, this is not an important limitation.
Any HTML tag can theoretically be represented by a Rose::HTML::Object-derived class, but this family of modules was originally motivated by a desire to simplify the use of HTML forms.
The form/field object interfaces have been heavily abstracted to allow for input and output filtering, inflation/deflation of values, and compound fields (fields that contain other fields). The classes are also designed to be subclassed. The creation of custom form and field subclasses is really the "big win" for these modules.
There is also a simple image tag class which is useful for auto-populating the width and height attributes of img tags. Future releases may include object representations of other HTML tags. Contributions are welcome.
<<lessSYNOPSIS
use Rose::HTML::Form;
$form = Rose::HTML::Form->new(action => /foo,
method => post);
$form->add_fields
(
name => { type => text, size => 20, required => 1 },
height => { type => text, size => 5, maxlength => 5 },
bday => { type => datetime },
);
$form->params(name => John, height => 6ft, bday => 01/24/1984);
$form->init_fields();
$bday = $form->field(bday)->internal_value; # DateTime object
print $bday->strftime(%A); # Tuesday
print $form->field(bday)->html;
The Rose::HTML::Object::* family of classes represent HTML tags, or groups of tags. These objects allow HTML to be arbitrarily manipulated, then serialized to actual HTML (or XHTML). Currently, the process only works in one direction. Objects cannot be constructed from their serialized representations. In practice, given the purpose of these modules, this is not an important limitation.
Any HTML tag can theoretically be represented by a Rose::HTML::Object-derived class, but this family of modules was originally motivated by a desire to simplify the use of HTML forms.
The form/field object interfaces have been heavily abstracted to allow for input and output filtering, inflation/deflation of values, and compound fields (fields that contain other fields). The classes are also designed to be subclassed. The creation of custom form and field subclasses is really the "big win" for these modules.
There is also a simple image tag class which is useful for auto-populating the width and height attributes of img tags. Future releases may include object representations of other HTML tags. Contributions are welcome.
Download (0.13MB)
Added: 2007-03-26 License: Perl Artistic License Price:
942 downloads
PObject 0.90
PObject is a base class for perl objects, takes the irritation out of creating properties for objects. more>>
PObject is a base class for perl objects, takes the irritation out of creating properties for objects. Allows quick creation of attributes and easy inheritance. I have stopped developing this class in favor of Class::Accessor, please use that instead.
To install, the good old method:
perl Makefile.PL
make
make test
make install
Enhancements:
- Changed handling to be case sensitive for object methods. Also added support for package defaults and allowing changes to them. **NOTE any modules made with PObject < 0.90 WILL NEED TO BE CHANGED. The AUTOFIELDS hash needs to be updated and all method
<<lessTo install, the good old method:
perl Makefile.PL
make
make test
make install
Enhancements:
- Changed handling to be case sensitive for object methods. Also added support for package defaults and allowing changes to them. **NOTE any modules made with PObject < 0.90 WILL NEED TO BE CHANGED. The AUTOFIELDS hash needs to be updated and all method
Download (0.004MB)
Added: 2006-07-17 License: GPL (GNU General Public License) Price:
1194 downloads
Rose::Object 0.84
Rose::Object is a simple object base class. more>>
Rose::Object is a simple object base class.
SYNOPSIS
package MyObject;
use Rose::Object;
our @ISA = qw(Rose::Object);
sub foo { ... }
sub bar { ... }
...
my $o = MyObject->new(foo => abc, bar => 5);
...
Rose::Object is a generic object base class. It provides very little functionality, but a healthy dose of convention.
METHODS
new PARAMS
Constructs a new, empty, hash-based object based on PARAMS, where PARAMS are name/value pairs, and then calls init (see below), passing PARAMS to it unmodified.
init PARAMS
Given a list of name/value pairs in PARAMS, calls the object method of each name, passing the corresponding value as an argument. The methods are called in the order that they appear in PARAMS. For example:
$o->init(foo => 1, bar => 2);
is equivalent to the sequence:
$o->foo(1);
$o->bar(2);
<<lessSYNOPSIS
package MyObject;
use Rose::Object;
our @ISA = qw(Rose::Object);
sub foo { ... }
sub bar { ... }
...
my $o = MyObject->new(foo => abc, bar => 5);
...
Rose::Object is a generic object base class. It provides very little functionality, but a healthy dose of convention.
METHODS
new PARAMS
Constructs a new, empty, hash-based object based on PARAMS, where PARAMS are name/value pairs, and then calls init (see below), passing PARAMS to it unmodified.
init PARAMS
Given a list of name/value pairs in PARAMS, calls the object method of each name, passing the corresponding value as an argument. The methods are called in the order that they appear in PARAMS. For example:
$o->init(foo => 1, bar => 2);
is equivalent to the sequence:
$o->foo(1);
$o->bar(2);
Download (0.028MB)
Added: 2007-05-21 License: Perl Artistic License Price:
886 downloads
HTML Objects 1.2.4
HTML Objects is a Perl module library for turning HTML tags into Perl objects. more>>
HTML Objects is a Perl module library for turning HTML tags into Perl objects. HTML Objects allows Web pages to be manipulated as a data structure rather than text.
Once manipulation is done, the entire page is generated via depth-first recursion.
<<lessOnce manipulation is done, the entire page is generated via depth-first recursion.
Download (0.025MB)
Added: 2006-05-09 License: GPL (GNU General Public License) Price:
1263 downloads
Math Objects 0.1.3
Math Objects is a math template library for C++ using generic programming techniques. more>>
Math Objects is a math template library written in C++ using generic programming techniques. In order to use the "Math Objects" library, the user only has to include the header files he needs (e.g. Matrix.h, Polynomial.h etc.).
In order to compile the library the user needs an ISO/IEC 14882:1998 standard compliant C++ compiler (e.g. one that supports partial template specializations).
The math library has math objects like matrices, polynomials, rational functions, extended precision numbers, complex numbers etc. that can be handled in a similar way like basic numerical types (e.g. integers or floating point numbers).
One can access properties of a mathematical type through a (partial) specialization of a traits class for that type (AlgebraicTraits). Having the traits classes to expose properties of mathematical objects, one can define for example matrices of polynomials having extended precision complex coefficients and apply to them basic linear algebra algorithms using normal C++ syntax.
This library also implements two functions using two deterministic algorithms that compute the Smith form for polynomial matrices, and the Smith-McMillan form of a transfer functions matrix also keeping track of the transformation matrices.
These algorithms can be used to describe a MIMO (multi input-multi output) system by means of its zeros and poles and also give the MFD (matrix fraction description) of the system.
Enhancements:
- Recoded the LongInt class aiming for better runtime efficiency.
<<lessIn order to compile the library the user needs an ISO/IEC 14882:1998 standard compliant C++ compiler (e.g. one that supports partial template specializations).
The math library has math objects like matrices, polynomials, rational functions, extended precision numbers, complex numbers etc. that can be handled in a similar way like basic numerical types (e.g. integers or floating point numbers).
One can access properties of a mathematical type through a (partial) specialization of a traits class for that type (AlgebraicTraits). Having the traits classes to expose properties of mathematical objects, one can define for example matrices of polynomials having extended precision complex coefficients and apply to them basic linear algebra algorithms using normal C++ syntax.
This library also implements two functions using two deterministic algorithms that compute the Smith form for polynomial matrices, and the Smith-McMillan form of a transfer functions matrix also keeping track of the transformation matrices.
These algorithms can be used to describe a MIMO (multi input-multi output) system by means of its zeros and poles and also give the MFD (matrix fraction description) of the system.
Enhancements:
- Recoded the LongInt class aiming for better runtime efficiency.
Download (0.28MB)
Added: 2006-02-21 License: GPL (GNU General Public License) Price:
1343 downloads
C++ XML Objects 1.0.0.7
C++ XML Objects is a framework for persisting hierarchies of C++ objects to and from XML. more>>
C++ XML Objects is a framework for persisting hierarchies of C++ objects to and from XML. Boost, The STL and Patterns are used extensively. All platforms which support Boost will be supported.
Sometimes there is a need to save hierarchies of C++ objects to a file (or DB etc), and then retrieve them at a later date. This project allows your classes to derive from a single object (called "xmlobj"), provide a few extra methods which allow the visitor pattern to work on them and register them so that they can be read or written to an XML stream.
The only overhead is a per-class type and name of each object (as std::string). The members dont need to be wrapped which means that your memory footprint wont really get any larger.
There are actually 2 separate projects which are combined to make "cppxmlobj". The first is a called "cppreflect" and provides a framework for providing reflection to C++ objects. Reflection is the mechanism by which your class members can be referenced by a string name. To achieve this, "cppreflect" uses the visitor pattern. The other project is "cpppersist" which adds the right methods to each object so that it can be read or written to some type of stream.
These projects are included as part of this (they arent separate SourceForge projects), but they are completely independent of each other, so you could build your own scheme to persist your objects to a different type of file, or provide some other type of mechanism to read and write your objects data.
To interoperate, these two projects share a common base class which is provided by another independent project called "cppcommon". This is a simple class which provides the abstract interfaces necessary for an object to provide different types of facilities.
The project uses all the facilities of Boost for the build system (and for a bunch of the implementation) so you will need to get and build it. It uses the same license as Boost which means you can freely use it (its really only useful as source code anywhere), as long as you dont change the copyright message at the top of the files.
If you find it useful, or find some bugs (and fix them, then get back to me and Ill incorporate the changes. If you do this through SourceForge, then we can track the bugs etc.
Enhancements:
- Added in delayed loading. This allows a system to only load in an object in an XML file when the object is actually referenced. Added in "platforms" to documentation for supported platforms. Now builds on OS X Tiger, GCC 4.0 and latest BOOST (1.33.1). Also builds on latest Linux. Change the documentation layout (thanks Spirit), and added Generic objects. Also changed to use a single license.txt referenced at the top of each file. Since this code has been stable and working for a while, next release will be beta if I can build on a few more systems.
<<lessSometimes there is a need to save hierarchies of C++ objects to a file (or DB etc), and then retrieve them at a later date. This project allows your classes to derive from a single object (called "xmlobj"), provide a few extra methods which allow the visitor pattern to work on them and register them so that they can be read or written to an XML stream.
The only overhead is a per-class type and name of each object (as std::string). The members dont need to be wrapped which means that your memory footprint wont really get any larger.
There are actually 2 separate projects which are combined to make "cppxmlobj". The first is a called "cppreflect" and provides a framework for providing reflection to C++ objects. Reflection is the mechanism by which your class members can be referenced by a string name. To achieve this, "cppreflect" uses the visitor pattern. The other project is "cpppersist" which adds the right methods to each object so that it can be read or written to some type of stream.
These projects are included as part of this (they arent separate SourceForge projects), but they are completely independent of each other, so you could build your own scheme to persist your objects to a different type of file, or provide some other type of mechanism to read and write your objects data.
To interoperate, these two projects share a common base class which is provided by another independent project called "cppcommon". This is a simple class which provides the abstract interfaces necessary for an object to provide different types of facilities.
The project uses all the facilities of Boost for the build system (and for a bunch of the implementation) so you will need to get and build it. It uses the same license as Boost which means you can freely use it (its really only useful as source code anywhere), as long as you dont change the copyright message at the top of the files.
If you find it useful, or find some bugs (and fix them, then get back to me and Ill incorporate the changes. If you do this through SourceForge, then we can track the bugs etc.
Enhancements:
- Added in delayed loading. This allows a system to only load in an object in an XML file when the object is actually referenced. Added in "platforms" to documentation for supported platforms. Now builds on OS X Tiger, GCC 4.0 and latest BOOST (1.33.1). Also builds on latest Linux. Change the documentation layout (thanks Spirit), and added Generic objects. Also changed to use a single license.txt referenced at the top of each file. Since this code has been stable and working for a while, next release will be beta if I can build on a few more systems.
Download (0.40MB)
Added: 2006-04-05 License: Freeware Price:
736 downloads
C++ Machine Objects 0.9.4
C++ Machine Objects class library supports a subset of the UML statechart notation. more>>
C++ Machine Objects class library supports a subset of the UML statechart notation for implementing hierarchical state machines in straight C++, similar in spirit to the GoF "State" design pattern.
The currently supported features are hierarchical states, entry and exit actions, state histories, and state variables.
Installation:
The class library as such does not need to be installed. Just include the header file Macho.hpp to make use of it. Prerequisite however is a C++ compiler with sane support for templates.
Included are the example state machines HelloWorld, Example, Microwave and Test. To make the examples run just compile them in the directory they are in, for example:
# GCC
g++ -o microwave Microwave.cpp
# MSVC7
cl /EHsc Microwave.cpp
I like the GoF "State" design pattern. It enables implementing the important concept of state machines with common programming language features. By utilising only basic language mechanisms it is easy to apply in real-life software development.
Another important property that stems from this simplicity is orthogonality, meaning that the pattern can be combined with other design elements, patterns and idioms in arbitrary ways.
In contrast stand the tool supported approaches to state machine creation (of which there is no shortage). Based on code generators and graphical editors, they tend to generate incomprehensible code and forfeit orthogonality by necessarily being outside the domain of the programming language.
Unfortunately the "State" pattern is limited in scope because it does not allow for hierarchical state machines. This is regrettable because flat state machines tend to become unwieldy when getting bigger, for the sheer number of states they produce.
Hierarchical state machines as defined by the statechart notation alleviate this problem by giving an additional structural element through grouping states into hierarchies.
The "State" pattern in its original form is not capable of modeling state hierarchies. The Macho class library extends the concept with this possibility, while keeping the properties of simplicity (there possible) and tool independence from its inspiration.
Enhancements:
- This release adds the feature of backtracking to previous states by using "Snapshots".
<<lessThe currently supported features are hierarchical states, entry and exit actions, state histories, and state variables.
Installation:
The class library as such does not need to be installed. Just include the header file Macho.hpp to make use of it. Prerequisite however is a C++ compiler with sane support for templates.
Included are the example state machines HelloWorld, Example, Microwave and Test. To make the examples run just compile them in the directory they are in, for example:
# GCC
g++ -o microwave Microwave.cpp
# MSVC7
cl /EHsc Microwave.cpp
I like the GoF "State" design pattern. It enables implementing the important concept of state machines with common programming language features. By utilising only basic language mechanisms it is easy to apply in real-life software development.
Another important property that stems from this simplicity is orthogonality, meaning that the pattern can be combined with other design elements, patterns and idioms in arbitrary ways.
In contrast stand the tool supported approaches to state machine creation (of which there is no shortage). Based on code generators and graphical editors, they tend to generate incomprehensible code and forfeit orthogonality by necessarily being outside the domain of the programming language.
Unfortunately the "State" pattern is limited in scope because it does not allow for hierarchical state machines. This is regrettable because flat state machines tend to become unwieldy when getting bigger, for the sheer number of states they produce.
Hierarchical state machines as defined by the statechart notation alleviate this problem by giving an additional structural element through grouping states into hierarchies.
The "State" pattern in its original form is not capable of modeling state hierarchies. The Macho class library extends the concept with this possibility, while keeping the properties of simplicity (there possible) and tool independence from its inspiration.
Enhancements:
- This release adds the feature of backtracking to previous states by using "Snapshots".
Download (0.035MB)
Added: 2006-06-02 License: MIT/X Consortium License Price:
1240 downloads
Games::Object 0.11
Games::Object is a Perl module to provide a base class for game objects. more>>
Games::Object is a Perl module to provide a base class for game objects.
SYNOPSIS
package MyGameObject;
use Games::Object;
use vars qw(@ISA);
@ISA = qw(Games::Object);
sub new {
# Create object
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new(@_);
bless $self, $class;
# Add attributes
$self->new_attr(-name => "hit_points",
-type => int,
-value => 20,
-tend_to_rate => 1);
$self->new_attr(-name => "strength",
-type => int,
-value => 12,
-minimum => 3,
-maximum => 18);
...
return $self;
}
package MyObjectManager;
use Games::Object::Manager;
use vars qw(@ISA);
@ISA = qw(Games::Object::Manager);
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new( , @_);
bless $self, $class;
...
return $self;
}
my $world = new MyObjectManager;
my $object = new MyGameObject;
$world->add($object);
ABSTRACT
The purpose of this module is to allow a programmer to write a game in Perl easily by providing a basic framework in the form of a module that can be either subclassed to a module of your own or used directly as its own object class. The most important items in this framework are:
Attributes
You can define arbitrary attributes on objects with rules on how they may be updated, as well as set up automatic update of attributes whenever the objects process() method is invoked. For example, you could set an attribute on an object such that:
It ranges from 0 to 100.
Internally it tracks fractional changes to the value but accessing the attribute will always round the result to an integer.
It will automatically tend towards the maximum by 1 every time process() is called on the object.
A method in your subclass will be invoked automatically if the value falls to 0.
This is just one example of what you can do with attributes.
Flags
You can define any number of arbitrarily-named flags on an object. A flag is a little like a boolean attribute, in that it can have a value of either true or false. Like attributes, flags can be created independently on different objects. No "global" flag list is imposed.
Load/Save functionality
Basic functionality is provided for saving data from an object to a file, and for loading data back into an object. This handles the bulk of load game / save game processing, freeing the programmer to worry about the mechanics of the game itself.
The load functionality can also be used to create objects from object templates. An object template would be a save file that contains a single object.
Object Managers
New to version 0.10 of this module is object managers. An object manager is a Perl object that allows you to manage groups of related game objects. The object manager allows you to relate objects together (for example, you could define a relationship that allows certain objects to act as containers for other objects). In effect, the object manager acts as your world or universe.
Like the game object class, the manager class can be subclassed, allowing you augment its functionality. An object manager can be loaded and saved, which in turn performs a load or save of the objects being managed by it.
<<lessSYNOPSIS
package MyGameObject;
use Games::Object;
use vars qw(@ISA);
@ISA = qw(Games::Object);
sub new {
# Create object
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new(@_);
bless $self, $class;
# Add attributes
$self->new_attr(-name => "hit_points",
-type => int,
-value => 20,
-tend_to_rate => 1);
$self->new_attr(-name => "strength",
-type => int,
-value => 12,
-minimum => 3,
-maximum => 18);
...
return $self;
}
package MyObjectManager;
use Games::Object::Manager;
use vars qw(@ISA);
@ISA = qw(Games::Object::Manager);
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new( , @_);
bless $self, $class;
...
return $self;
}
my $world = new MyObjectManager;
my $object = new MyGameObject;
$world->add($object);
ABSTRACT
The purpose of this module is to allow a programmer to write a game in Perl easily by providing a basic framework in the form of a module that can be either subclassed to a module of your own or used directly as its own object class. The most important items in this framework are:
Attributes
You can define arbitrary attributes on objects with rules on how they may be updated, as well as set up automatic update of attributes whenever the objects process() method is invoked. For example, you could set an attribute on an object such that:
It ranges from 0 to 100.
Internally it tracks fractional changes to the value but accessing the attribute will always round the result to an integer.
It will automatically tend towards the maximum by 1 every time process() is called on the object.
A method in your subclass will be invoked automatically if the value falls to 0.
This is just one example of what you can do with attributes.
Flags
You can define any number of arbitrarily-named flags on an object. A flag is a little like a boolean attribute, in that it can have a value of either true or false. Like attributes, flags can be created independently on different objects. No "global" flag list is imposed.
Load/Save functionality
Basic functionality is provided for saving data from an object to a file, and for loading data back into an object. This handles the bulk of load game / save game processing, freeing the programmer to worry about the mechanics of the game itself.
The load functionality can also be used to create objects from object templates. An object template would be a save file that contains a single object.
Object Managers
New to version 0.10 of this module is object managers. An object manager is a Perl object that allows you to manage groups of related game objects. The object manager allows you to relate objects together (for example, you could define a relationship that allows certain objects to act as containers for other objects). In effect, the object manager acts as your world or universe.
Like the game object class, the manager class can be subclassed, allowing you augment its functionality. An object manager can be loaded and saved, which in turn performs a load or save of the objects being managed by it.
Download (0.083MB)
Added: 2006-09-30 License: Perl Artistic License Price:
1119 downloads
Object::LocalVars 0.16
Object::LocalVars is a Perl module with outside-in objects with local aliasing of $self and object variables. more>>
Object::LocalVars is a Perl module with outside-in objects with local aliasing of $self and object variables.
SYNOPSIS
package My::Object;
use strict;
use Object::LocalVars;
give_methods our $self; # this exact line is required
our $field1 : Prop;
our $field2 : Prop;
sub as_string : Method {
return "$self has properties $field1 and $field2";
}
This is a development release. The API may change slightly. Do not use for production purposes. Comments appreciated.
This module helps developers create "outside-in" objects. Properties (and $self) are declared as package globals. Method calls are wrapped such that these globals take on a local value that is correct for the specific calling object and the duration of the method call. I.e. $self is locally aliased to the calling object and properties are locally aliased to the values of the properties for that object. The package globals themselves only declare properties in the package and hold no data themselves. Data are stored in a separate namespace for each property, keyed off the reference memory addresses of the objects.
Outside-in objects are similar to "inside-out" objects, which store data in a single lexical hash (or closure) for each property, which is keyed off the reference memory addresses of the objects. Both differ from classic Perl objects, which hold data for the object directly using a blessed reference or closure to a data structure, typically a hash. For both outside-in and inside-out objects, data are stored centrally and the blessed reference is simply a key to look up the right data in the central data store.
The use of package variables for outside-in objects allows for the use of dynamic symbol table manipulation and aliasing. As a result, Object::LocalVars delivers a variety of features -- though with some corresponding drawbacks.
Main features:
- Provides $self automatically to methods without my $self = shift and the like
- Provides dynamic aliasing of properties within methods -- methods can access properties directly as variables without the overhead of calls to accessors or mutators, eliminating the overhead of these calls in methods
- Array and hash properties may be accessed via direct dereference of simple variables, allowing developers to push, pop, splice, etc. without the usual tortured syntax to dereference an accessor call
- Properties no longer require accessors to have compile time syntax checking under strictures (i.e. use strict); public properties have accessors automatically provided as needed
- Uses attributes to mark properties and methods, but only in the BEGIN phase so should be mod_perl friendly (though this has not been tested yet)
- Provides attributes for public, protected and private properties, class properties, and methods
- Orthogonality -- can subclass just about any other class, regardless of implementation.
- Multiple inheritance supported in initializers and destructors (though only one superclass can be of a special, orthogonal type)
- Minimally thread-safe under Perl 5.8 or greater -- objects are safely cloned across thread boundaries (or a pseudo-fork on Win32)
- Achieves these features without source filtering
<<lessSYNOPSIS
package My::Object;
use strict;
use Object::LocalVars;
give_methods our $self; # this exact line is required
our $field1 : Prop;
our $field2 : Prop;
sub as_string : Method {
return "$self has properties $field1 and $field2";
}
This is a development release. The API may change slightly. Do not use for production purposes. Comments appreciated.
This module helps developers create "outside-in" objects. Properties (and $self) are declared as package globals. Method calls are wrapped such that these globals take on a local value that is correct for the specific calling object and the duration of the method call. I.e. $self is locally aliased to the calling object and properties are locally aliased to the values of the properties for that object. The package globals themselves only declare properties in the package and hold no data themselves. Data are stored in a separate namespace for each property, keyed off the reference memory addresses of the objects.
Outside-in objects are similar to "inside-out" objects, which store data in a single lexical hash (or closure) for each property, which is keyed off the reference memory addresses of the objects. Both differ from classic Perl objects, which hold data for the object directly using a blessed reference or closure to a data structure, typically a hash. For both outside-in and inside-out objects, data are stored centrally and the blessed reference is simply a key to look up the right data in the central data store.
The use of package variables for outside-in objects allows for the use of dynamic symbol table manipulation and aliasing. As a result, Object::LocalVars delivers a variety of features -- though with some corresponding drawbacks.
Main features:
- Provides $self automatically to methods without my $self = shift and the like
- Provides dynamic aliasing of properties within methods -- methods can access properties directly as variables without the overhead of calls to accessors or mutators, eliminating the overhead of these calls in methods
- Array and hash properties may be accessed via direct dereference of simple variables, allowing developers to push, pop, splice, etc. without the usual tortured syntax to dereference an accessor call
- Properties no longer require accessors to have compile time syntax checking under strictures (i.e. use strict); public properties have accessors automatically provided as needed
- Uses attributes to mark properties and methods, but only in the BEGIN phase so should be mod_perl friendly (though this has not been tested yet)
- Provides attributes for public, protected and private properties, class properties, and methods
- Orthogonality -- can subclass just about any other class, regardless of implementation.
- Multiple inheritance supported in initializers and destructors (though only one superclass can be of a special, orthogonal type)
- Minimally thread-safe under Perl 5.8 or greater -- objects are safely cloned across thread boundaries (or a pseudo-fork on Win32)
- Achieves these features without source filtering
Download (0.040MB)
Added: 2007-06-22 License: Perl Artistic License Price:
854 downloads
Object::InsideOut 3.17
Object::InsideOut is a comprehensive inside-out object support module. more>>
Object::InsideOut is a comprehensive inside-out object support module.
SYNOPSIS
package My::Class; {
use Object::InsideOut;
# Numeric field
# With combined get+set accessor
my @data
:Field
:Type(numeric)
:Accessor(data);
# Takes INPUT (or input, etc.) as a mandatory parameter to ->new()
my %init_args :InitArgs = (
INPUT => {
Regex => qr/^input$/i,
Mandatory => 1,
Type => numeriC,
},
);
# Handle class-specific args as part of ->new()
sub init :Init
{
my ($self, $args) = @_;
# Put input parameter into data field
$self->set(@data, $args->{INPUT});
}
}
package My::Class::Sub; {
use Object::InsideOut qw(My::Class);
# List field
# With standard get_X and set_X accessors
# Takes INFO as an optional list parameter to ->new()
# Value automatically added to @info array
# Defaults to [ empty ]
my @info
:Field
:Type(list)
:Standard(info)
:Arg(Name => INFO, Default => empty);
}
package Foo; {
use Object::InsideOut;
# Field containing My::Class objects
# With combined accessor
# Plus automatic parameter processing on object creation
my @foo
:Field
:Type(My::Class)
:All(foo);
}
package main;
my $obj = My::Class::Sub->new(Input => 69);
my $info = $obj->get_info(); # [ empty ]
my $data = $obj->data(); # 69
$obj->data(42);
$data = $obj->data(); # 42
$obj = My::Class::Sub->new(INFO => help, INPUT => 86);
$data = $obj->data(); # 86
$info = $obj->get_info(); # [ help ]
$obj->set_info(qw(foo bar baz));
$info = $obj->get_info(); # [ foo, bar, baz ]
my $foo_obj = Foo->new(foo => $obj);
$foo_obj->foo()->data(); # 86
<<lessSYNOPSIS
package My::Class; {
use Object::InsideOut;
# Numeric field
# With combined get+set accessor
my @data
:Field
:Type(numeric)
:Accessor(data);
# Takes INPUT (or input, etc.) as a mandatory parameter to ->new()
my %init_args :InitArgs = (
INPUT => {
Regex => qr/^input$/i,
Mandatory => 1,
Type => numeriC,
},
);
# Handle class-specific args as part of ->new()
sub init :Init
{
my ($self, $args) = @_;
# Put input parameter into data field
$self->set(@data, $args->{INPUT});
}
}
package My::Class::Sub; {
use Object::InsideOut qw(My::Class);
# List field
# With standard get_X and set_X accessors
# Takes INFO as an optional list parameter to ->new()
# Value automatically added to @info array
# Defaults to [ empty ]
my @info
:Field
:Type(list)
:Standard(info)
:Arg(Name => INFO, Default => empty);
}
package Foo; {
use Object::InsideOut;
# Field containing My::Class objects
# With combined accessor
# Plus automatic parameter processing on object creation
my @foo
:Field
:Type(My::Class)
:All(foo);
}
package main;
my $obj = My::Class::Sub->new(Input => 69);
my $info = $obj->get_info(); # [ empty ]
my $data = $obj->data(); # 69
$obj->data(42);
$data = $obj->data(); # 42
$obj = My::Class::Sub->new(INFO => help, INPUT => 86);
$data = $obj->data(); # 86
$info = $obj->get_info(); # [ help ]
$obj->set_info(qw(foo bar baz));
$info = $obj->get_info(); # [ foo, bar, baz ]
my $foo_obj = Foo->new(foo => $obj);
$foo_obj->foo()->data(); # 86
Download (0.010MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
Basset::Object 1.04
Basset::Object is a Perl module used to create objects. more>>
Basset::Object is a Perl module used to create objects.
This is my ultimate object creation toolset to date. It has roots in Mail::Bulkmail, Text::Flowchart, and the unreleased abstract object constructors that Ive tooled around with in the past.
If you want an object to be compatible with anything else Ive written, then subclass it off of here.
Of course, you dont have to use this to create subclasses, but youll run the risk of making something with an inconsistent interface vs. the rest of the system. Thatll confuse people and make them unhappy. So I recommend subclassing off of here to be consistent. Of course, you may not like these objects, but they do work well and are consistent. Consistency is very important in interface design, IMHO.
<<lessThis is my ultimate object creation toolset to date. It has roots in Mail::Bulkmail, Text::Flowchart, and the unreleased abstract object constructors that Ive tooled around with in the past.
If you want an object to be compatible with anything else Ive written, then subclass it off of here.
Of course, you dont have to use this to create subclasses, but youll run the risk of making something with an inconsistent interface vs. the rest of the system. Thatll confuse people and make them unhappy. So I recommend subclassing off of here to be consistent. Of course, you may not like these objects, but they do work well and are consistent. Consistency is very important in interface design, IMHO.
Download (0.14MB)
Added: 2007-06-20 License: GPL (GNU General Public License) Price:
856 downloads
Ace::Object 1.89
Ace::Object is a Perl module to manipulate Ace Data Objects. more>>
Ace::Object is a Perl module to manipulate Ace Data Objects.
SYNOPSIS
# open database connection and get an object
use Ace;
$db = Ace->connect(-host => beta.crbm.cnrs-mop.fr,
-port => 20000100);
$sequence = $db->fetch(Sequence => D12345);
# Inspect the object
$r = $sequence->at(Visible.Overlap_Right);
@row = $sequence->row;
@col = $sequence->col;
@tags = $sequence->tags;
# Explore object substructure
@more_tags = $sequence->at(Visible)->tags;
@col = $sequence->at("Visible.$more_tags[1]")->col;
# Follow a pointer into database
$r = $sequence->at(Visible.Overlap_Right)->fetch;
$next = $r->at(Visible.Overlap_left)->fetch;
# Classy way to do the same thing
$r = $sequence->Overlap_right;
$next = $sequence->Overlap_left;
# Pretty-print object
print $sequence->asString;
print $sequence->asTabs;
print $sequence->asHTML;
# Update object
$sequence->replace(Visible.Overlap_Right,$r,M55555);
$sequence->add(Visible.Homology,GR91198);
$sequence->delete(Source.Clone,MBR122);
$sequence->commit();
# Rollback changes
$sequence->rollback()
# Get errors
print $sequence->error;
Ace::Object is the base class for objects returned from ACEDB databases. Currently there is only one type of Ace::Object, but this may change in the future to support more interesting object-specific behaviors.
Using the Ace::Object interface, you can explore the internal structure of an Ace::Object, retrieve its content, and convert it into various types of text representation. You can also fetch a representation of any object as a GIF image.
If you have write access to the databases, add new data to an object, replace existing data, or kill it entirely. You can also create a new object de novo and write it into the database.
<<lessSYNOPSIS
# open database connection and get an object
use Ace;
$db = Ace->connect(-host => beta.crbm.cnrs-mop.fr,
-port => 20000100);
$sequence = $db->fetch(Sequence => D12345);
# Inspect the object
$r = $sequence->at(Visible.Overlap_Right);
@row = $sequence->row;
@col = $sequence->col;
@tags = $sequence->tags;
# Explore object substructure
@more_tags = $sequence->at(Visible)->tags;
@col = $sequence->at("Visible.$more_tags[1]")->col;
# Follow a pointer into database
$r = $sequence->at(Visible.Overlap_Right)->fetch;
$next = $r->at(Visible.Overlap_left)->fetch;
# Classy way to do the same thing
$r = $sequence->Overlap_right;
$next = $sequence->Overlap_left;
# Pretty-print object
print $sequence->asString;
print $sequence->asTabs;
print $sequence->asHTML;
# Update object
$sequence->replace(Visible.Overlap_Right,$r,M55555);
$sequence->add(Visible.Homology,GR91198);
$sequence->delete(Source.Clone,MBR122);
$sequence->commit();
# Rollback changes
$sequence->rollback()
# Get errors
print $sequence->error;
Ace::Object is the base class for objects returned from ACEDB databases. Currently there is only one type of Ace::Object, but this may change in the future to support more interesting object-specific behaviors.
Using the Ace::Object interface, you can explore the internal structure of an Ace::Object, retrieve its content, and convert it into various types of text representation. You can also fetch a representation of any object as a GIF image.
If you have write access to the databases, add new data to an object, replace existing data, or kill it entirely. You can also create a new object de novo and write it into the database.
Download (0.29MB)
Added: 2006-10-12 License: Perl Artistic License Price:
1108 downloads
Object::Declare 0.13
Object::Declare is a Perl module for declarative object constructor. more>>
Object::Declare is a Perl module for declarative object constructor.
SYNOPSIS
use Object::Declare [MyApp::Column, MyApp::Param];
my %objects = declare {
param foo =>
!is global,
is immutable,
valid_values are qw( more values );
column bar =>
field1 is value,
field2 is some_other_value;
};
print $objects{foo}; # a MyApp::Param object
print $objects{bar}; # a MyApp::Column object
This module exports one function, declare, for building named objects with a declarative syntax, similar to how Jifty::DBI::Schema defines its columns.
In list context, declare returns a list of name/object pairs in the order of declaration (allowing duplicates), suitable for putting into a hash. In scalar context, declare returns a hash reference.
Using a flexible import interface, one can change exported helper functions names (declarator), words to link labels and values together (copula), and the table of named classes to declare (mapping):
use Object::Declare
declarator => [declare], # list of declarators
copula => { # list of words, or a map
is => , # from copula to prefixes for
are => , # labels built with that copula
}
aliases => { # list of label aliases:
more => less, # turns "is more" into "is less"
# and "more is 1" into "less is 1"
},
mapping => {
column => MyApp::Column, # class name to call ->new to
param => sub { # arbitrary coderef also works
bless(@_, MyApp::Param);
},
};
After the declarator block finishes execution, all helper functions are removed from the package. Same-named functions (such as &is and &are) that existed before the declarators execution are restored correctly.
<<lessSYNOPSIS
use Object::Declare [MyApp::Column, MyApp::Param];
my %objects = declare {
param foo =>
!is global,
is immutable,
valid_values are qw( more values );
column bar =>
field1 is value,
field2 is some_other_value;
};
print $objects{foo}; # a MyApp::Param object
print $objects{bar}; # a MyApp::Column object
This module exports one function, declare, for building named objects with a declarative syntax, similar to how Jifty::DBI::Schema defines its columns.
In list context, declare returns a list of name/object pairs in the order of declaration (allowing duplicates), suitable for putting into a hash. In scalar context, declare returns a hash reference.
Using a flexible import interface, one can change exported helper functions names (declarator), words to link labels and values together (copula), and the table of named classes to declare (mapping):
use Object::Declare
declarator => [declare], # list of declarators
copula => { # list of words, or a map
is => , # from copula to prefixes for
are => , # labels built with that copula
}
aliases => { # list of label aliases:
more => less, # turns "is more" into "is less"
# and "more is 1" into "less is 1"
},
mapping => {
column => MyApp::Column, # class name to call ->new to
param => sub { # arbitrary coderef also works
bless(@_, MyApp::Param);
},
};
After the declarator block finishes execution, all helper functions are removed from the package. Same-named functions (such as &is and &are) that existed before the declarators execution are restored correctly.
Download (0.027MB)
Added: 2006-10-18 License: Perl Artistic License Price:
1101 downloads
Color::Object 0.1_02
Color::Object is a OO-Color Module. more>>
Color::Object is a OO-Color Module.
A module for manipulation Colors within RGB, HSV and HSL color-spaces for usage within PDF-Documents especially with the Text::PDF::API modules.
SYNOPSIS
use Color::Object;
$cl = Color::Object->new;
$cl = Color::Object->newRGB($r,$g,$b);
$cl = Color::Object->newHSV($h,$s,$v);
$cl = Color::Object->newHSL($h,$s,$l);
$cl->setRGB($r,$g,$b);
$cl->addBrightness($br);
($h,$s,$l) = $cl->asHSL;
METHODS
Color::Object->new
Color::Object->newRGB $r, $g, $b
Color::Object->newHSV $h, $s, $v
Color::Object->newHSL $h, $s, $l
Color::Object->newGrey $grey
( $r, $g, $b ) = $cl->asRGB
Returns $cls rgb values. Range [0 .. 1].
( $h, $s, $v ) = $cl->asHSV
Returns $cls hsv values. Ranges h [0 .. 360], s/v [0 .. 1].
( $h, $s, $l ) = $cl->asHSL
Returns $cls hsl values. Ranges h [0 .. 360], s/l [0 .. 1].
$grey = $cl->asGrey
$grey = $cl->asGrey2
Returns $cls grey value. Range [0 .. 1]. Functions 2 returns the geometric mean of the corresponding RGB values.
( $c, $m, $y )= $cl->asCMY
Returns $cls cmy values. Range [0 .. 1].
( $c, $m, $y, $k )= $cl->asCMYK
( $c, $m, $y, $k )= $cl->asCMYK2
( $c, $m, $y, $k )= $cl->asCMYK3
Returns $cls cmyk values. Range [0 .. 1]. Function 2 returns a 25% lighter color-equivalent. Function 3 returns a 25% lighter color-equivalent.
$hex = $cl->asHex
Returns $cls rgb values as 6 hex-digits.
$cl->setRGB $r, $g, $b
Sets the $cls rgb values. Valid range [0 .. 1].
$cl->setHSV $h, $s, $v
Sets the $cls hsv values. Valid ranges: h [0..360], s/v [0..1].
$cl->setHSL $h, $s, $l
Sets the $cls hsl values. Valid ranges: h [0..360], s/l [0..1].
$cl->setGrey $grey
Sets the $cls grey value. Valid range [0 .. 1].
$cl->setHex $hex
Sets the $cls rgb values using 6 hex-nibbles.
$cl->addSaturation $saturation
Adds to the $cls saturation in the HSV model. Valid range [-1 .. 1].
$cl->setSaturation $saturation
Sets the $cls saturation in the HSV model. Valid range [0 .. 1].
$cl->rotHue $degrees
Rotates the $cls hue in the HSV/L model. Valid range [-360 .. 360].
$cl->setHue $hue
Sets the $cls hue in the HSV/L model. Valid range [0 .. 360].
$cl->addBrightness $brightness
Adds to the $cls brightness in the HSV model. Valid range [-1 .. 1].
$cl->setBrightness $brightness
Sets the $cls brightness in the HSV model. Valid range [0 .. 1].
$cl->addLightness $lightness
Adds to the $cls lightness in the HSL model. Valid range [-1 .. 1].
$cl->setLightness $lightness
Sets the $cls lightness in the HSL model. Valid range [0 .. 1].
<<lessA module for manipulation Colors within RGB, HSV and HSL color-spaces for usage within PDF-Documents especially with the Text::PDF::API modules.
SYNOPSIS
use Color::Object;
$cl = Color::Object->new;
$cl = Color::Object->newRGB($r,$g,$b);
$cl = Color::Object->newHSV($h,$s,$v);
$cl = Color::Object->newHSL($h,$s,$l);
$cl->setRGB($r,$g,$b);
$cl->addBrightness($br);
($h,$s,$l) = $cl->asHSL;
METHODS
Color::Object->new
Color::Object->newRGB $r, $g, $b
Color::Object->newHSV $h, $s, $v
Color::Object->newHSL $h, $s, $l
Color::Object->newGrey $grey
( $r, $g, $b ) = $cl->asRGB
Returns $cls rgb values. Range [0 .. 1].
( $h, $s, $v ) = $cl->asHSV
Returns $cls hsv values. Ranges h [0 .. 360], s/v [0 .. 1].
( $h, $s, $l ) = $cl->asHSL
Returns $cls hsl values. Ranges h [0 .. 360], s/l [0 .. 1].
$grey = $cl->asGrey
$grey = $cl->asGrey2
Returns $cls grey value. Range [0 .. 1]. Functions 2 returns the geometric mean of the corresponding RGB values.
( $c, $m, $y )= $cl->asCMY
Returns $cls cmy values. Range [0 .. 1].
( $c, $m, $y, $k )= $cl->asCMYK
( $c, $m, $y, $k )= $cl->asCMYK2
( $c, $m, $y, $k )= $cl->asCMYK3
Returns $cls cmyk values. Range [0 .. 1]. Function 2 returns a 25% lighter color-equivalent. Function 3 returns a 25% lighter color-equivalent.
$hex = $cl->asHex
Returns $cls rgb values as 6 hex-digits.
$cl->setRGB $r, $g, $b
Sets the $cls rgb values. Valid range [0 .. 1].
$cl->setHSV $h, $s, $v
Sets the $cls hsv values. Valid ranges: h [0..360], s/v [0..1].
$cl->setHSL $h, $s, $l
Sets the $cls hsl values. Valid ranges: h [0..360], s/l [0..1].
$cl->setGrey $grey
Sets the $cls grey value. Valid range [0 .. 1].
$cl->setHex $hex
Sets the $cls rgb values using 6 hex-nibbles.
$cl->addSaturation $saturation
Adds to the $cls saturation in the HSV model. Valid range [-1 .. 1].
$cl->setSaturation $saturation
Sets the $cls saturation in the HSV model. Valid range [0 .. 1].
$cl->rotHue $degrees
Rotates the $cls hue in the HSV/L model. Valid range [-360 .. 360].
$cl->setHue $hue
Sets the $cls hue in the HSV/L model. Valid range [0 .. 360].
$cl->addBrightness $brightness
Adds to the $cls brightness in the HSV model. Valid range [-1 .. 1].
$cl->setBrightness $brightness
Sets the $cls brightness in the HSV model. Valid range [0 .. 1].
$cl->addLightness $lightness
Adds to the $cls lightness in the HSL model. Valid range [-1 .. 1].
$cl->setLightness $lightness
Sets the $cls lightness in the HSL model. Valid range [0 .. 1].
Download (0.003MB)
Added: 2007-07-31 License: Perl Artistic License Price:
815 downloads
Active Objects 2007-03-04
Active Objects is an implementation of the Active Object concept based on the boost::thread, boost::bind, boost::function libs. more>>
Active Objects is an implementation of the Active Object concept based on the boost::thread, boost::bind, and boost::function libraries.
The point of the library is to make taking advantage of multiprocessor machines as easy as possible. The library provides two types of functionality. The first is the ability to execute a function in a separate thread and automatically synchronize with the thread when the return value is needed.
The second is the ability to easily create a message cue for any existing class, and have that class process its messages asynchronously.
Enhancements:
- Minor code cleanup and code documentation updates.
<<lessThe point of the library is to make taking advantage of multiprocessor machines as easy as possible. The library provides two types of functionality. The first is the ability to execute a function in a separate thread and automatically synchronize with the thread when the return value is needed.
The second is the ability to easily create a message cue for any existing class, and have that class process its messages asynchronously.
Enhancements:
- Minor code cleanup and code documentation updates.
Download (0.32MB)
Added: 2007-03-07 License: Other/Proprietary License with Source Price:
961 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above objects 0.547 search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed