API reference - Class RdbItemValue

Notation used in Ruby API documentation

Description: A value object inside the report database

Value objects are attached to items to provide markers. An arbitrary number of such value objects can be attached to an item. Currently, a value can represent a box, a polygon or an edge. Geometrical objects are represented in micron units and are therefore "D" type objects (DPolygon, DEdge and DBox).

Public constructors

new RdbItemValuenew(string arg1)Creates a value representing a string
new RdbItemValuenew(const DPolygon arg1)Creates a value representing a DPolygon object
new RdbItemValuenew(const DPath arg1)Creates a value representing a DPath object
new RdbItemValuenew(const DText arg1)Creates a value representing a DText object
new RdbItemValuenew(const DEdge arg1)Creates a value representing a DEdge object
new RdbItemValuenew(const DEdgePair arg1)Creates a value representing a DEdgePair object
new RdbItemValuenew(const DBox arg1)Creates a value representing a DBox object

Public methods

[const]voidassign(const RdbItemValue other)Assign the contents of another object to self
[const]DBoxboxGets the box if the value represents one or nil if it does not.
voidcreateEnsures the C++ object is created
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
[const]RdbItemValuedupCreates a copy of self
[const]DEdgeedgeGets the edge if the value represents one or nil if it does not.
[const]DEdgePairedge_pairGets the edge pair if the value represents one or nil if it does not.
[const]boolis_box?Returns true if the value object represents a box
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
[const]boolis_edge?Returns true if the value object represents an edge
[const]boolis_edge_pair?Returns true if the value object represents an edge pair
[const]boolis_path?Returns true if the value object represents a path
[const]boolis_polygon?Returns true if the value object represents a polygon
[const]boolis_string?Returns true if the value object represents a string
[const]boolis_text?Returns true if the value object represents a text
[const]DPathpathGets the path if the value represents one or nil if it does not.
[const]DPolygonpolygonGets the polygon if the value represents one or nil if it does not.
[const]stringstringGets the string if the value represents one or nil if it does not.
[const]DTexttextGets the text if the value represents one or nil if it does not.
[const]stringto_sConverts a value to a string

Public static methods and constants

RdbItemValue ptrfrom_s(string arg1)Creates a value object from a string

Detailed description

[const] void assign(const RdbItemValue other)

Description: Assign the contents of another object to self

This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.

[const] DBox box

Description: Gets the box if the value represents one or nil if it does not.

Returns:The DBox object or nil

void create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] RdbItemValue dup

Description: Creates a copy of self

[const] DEdge edge

Description: Gets the edge if the value represents one or nil if it does not.

Returns:The DEdge object or nil

[const] DEdgePair edge_pair

Description: Gets the edge pair if the value represents one or nil if it does not.

Returns:The DEdgePair object or nil

[static] RdbItemValue ptr from_s(string arg1)

Description: Creates a value object from a string

The string format is the same than obtained by the to_s method.

[const] bool is_box?

Description: Returns true if the value object represents a box

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

[const] bool is_edge?

Description: Returns true if the value object represents an edge

[const] bool is_edge_pair?

Description: Returns true if the value object represents an edge pair

[const] bool is_path?

Description: Returns true if the value object represents a path

This method has been introduced in version 0.22.

[const] bool is_polygon?

Description: Returns true if the value object represents a polygon

[const] bool is_string?

Description: Returns true if the value object represents a string

[const] bool is_text?

Description: Returns true if the value object represents a text

This method has been introduced in version 0.22.

[static] new RdbItemValue new(string arg1)

Description: Creates a value representing a string

[static] new RdbItemValue new(const DPolygon arg1)

Description: Creates a value representing a DPolygon object

[static] new RdbItemValue new(const DPath arg1)

Description: Creates a value representing a DPath object

This method has been introduced in version 0.22.

[static] new RdbItemValue new(const DText arg1)

Description: Creates a value representing a DText object

This method has been introduced in version 0.22.

[static] new RdbItemValue new(const DEdge arg1)

Description: Creates a value representing a DEdge object

[static] new RdbItemValue new(const DEdgePair arg1)

Description: Creates a value representing a DEdgePair object

[static] new RdbItemValue new(const DBox arg1)

Description: Creates a value representing a DBox object

[const] DPath path

Description: Gets the path if the value represents one or nil if it does not.

Returns:The DPath object or nil

This method has been introduced in version 0.22.

[const] DPolygon polygon

Description: Gets the polygon if the value represents one or nil if it does not.

Returns:The DPolygon object or nil

[const] string string

Description: Gets the string if the value represents one or nil if it does not.

Returns:The string object or nil

[const] DText text

Description: Gets the text if the value represents one or nil if it does not.

Returns:The DText object or nil

This method has been introduced in version 0.22.

[const] string to_s

Description: Converts a value to a string

Returns:The string

The string can be used by the string constructor to create another object from it.