Skip to content
June 30, 2012 / jeroencoenders

Properties in NetworkedDesign

As mentioned in my previous post in NetworkedDesign objects start out as empty containers. In this post we will look at properties of objects which ‘fill’ these containers.

Example of properties on an object

Properties are characteristics of objects with a key (name) and a value. For example, an object Point can have properties X, Y and Z which respective value 0, 0 and 1. Typically these values are primitives, such as booleans (true or false), strings of characters (“this is a string value), a whole number (integer) or floating point number (double).Properties can also be names of other objects which recreate a relationship to that object. That will be discussed in a later post.

Properties get added to objects by Methods, which will also be discussed in one of the later posts.

In NetworkedDesign it is important to understand that properties can be assigned by the user, by a relationship to another object or by a method.

In case of the example image we see an example of all: point_1 has a number of properties:

  • a CoordinateSystem: a relationship to another object named coordinatesystem_1. The user can created the relationship by typing the object name on creation of the object.
  • a X, Y, Z coordinate: each a user-assigned double of 50. Note the brackets behind the first 50. The first 50 is the value the user entered. The second value is the interpretation of the system.
  • a RadialDistance, Azimuth and Inclination: each doubles assigned by the transformation method transform_XYZ_to_spherical_1 which transforms objects defined by a Cartesian coordinate system to a spherical coordinate system and vice versa. Transformation methods will be discussed in later posts too.

In last thing to mention, but not further explain in this post, is that NetworkedDesign inherited a special trick called Replication from Robert Aish (as far as I know) introduced the concept. So, for those familiar with the concept, yes, we can use one object definition to define multiple sub-objects.

I hope you enjoyed this second post just as much as the first one. Again, if you have any questions, feel free to add a comment.

Regards,
Jeroen

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: