NAObjectId

NAObjectId — The Identified Object Base Class Definition

Synopsis

#include <nautilus-actions/na-object-id.h>

#define             NA_OBJECT_ID_TYPE
#define             NA_OBJECT_ID                        (object)
#define             NA_IS_OBJECT_ID                     (object)
                    NAObjectId;
                    NAObjectIdClass;
gint                na_object_id_sort_alpha_asc         (const NAObjectId *a,
                                                         const NAObjectId *b);
gint                na_object_id_sort_alpha_desc        (const NAObjectId *a,
                                                         const NAObjectId *b);
void                na_object_id_prepare_for_paste      (NAObjectId *object,
                                                         gboolean relabel,
                                                         gboolean renumber,
                                                         NAObjectId *parent);
void                na_object_id_set_copy_of_label      (NAObjectId *object);
void                na_object_id_set_new_id             (NAObjectId *object,
                                                         const NAObjectId *new_parent);

Object Hierarchy

  GObject
   +----NAObject
         +----NAObjectId
               +----NAObjectItem
               +----NAObjectProfile

Implemented Interfaces

NAObjectId implements NAIDuplicable.

Description

This is a pure virtual class, i.e. not an instantiatable one. It serves as the base class for NAObject -derived object which have a unique Id, i.e. for NAObjectItem and NAObjectProfile.

Details

NA_OBJECT_ID_TYPE

#define NA_OBJECT_ID_TYPE                  ( na_object_id_get_type())

NA_OBJECT_ID()

#define NA_OBJECT_ID( object )             ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_OBJECT_ID_TYPE, NAObjectId ))

NA_IS_OBJECT_ID()

#define NA_IS_OBJECT_ID( object )          ( G_TYPE_CHECK_INSTANCE_TYPE( object, NA_OBJECT_ID_TYPE ))

NAObjectId

typedef struct _NAObjectId NAObjectId;

NAObjectIdClass

typedef struct {
	/**
	 * new_id:
	 * @object: a NAObjectId object.
	 * @new_parent: possibly the new NAObjectId parent, or NULL.
	 * If not NULL, this should actually be a NAObjectItem.
	 *
	 * If @object is a NAObjectProfile, then @new_parent must be a
	 * not null NAObjectAction. This function ensures that the new
	 * profile name does not already exist in the given @new_parent.
	 *
	 * This is a pure virtual function which should be implemented by
	 * the actual class. Actually, we asks for the most-derived class
	 * which implements this function.
	 *
	 * Returns: a new id suitable for this @object.
	 *
	 * Since: 2.30
	 */
	gchar * ( *new_id )( const NAObjectId *object, const NAObjectId *new_parent );
} NAObjectIdClass;

The NAObjectIdClass defines some methods available to derived classes.

new_id ()

Allocate a new id to an existing NAObjectId.

na_object_id_sort_alpha_asc ()

gint                na_object_id_sort_alpha_asc         (const NAObjectId *a,
                                                         const NAObjectId *b);

na_object_id_sort_alpha_desc ()

gint                na_object_id_sort_alpha_desc        (const NAObjectId *a,
                                                         const NAObjectId *b);

na_object_id_prepare_for_paste ()

void                na_object_id_prepare_for_paste      (NAObjectId *object,
                                                         gboolean relabel,
                                                         gboolean renumber,
                                                         NAObjectId *parent);

na_object_id_set_copy_of_label ()

void                na_object_id_set_copy_of_label      (NAObjectId *object);

na_object_id_set_new_id ()

void                na_object_id_set_new_id             (NAObjectId *object,
                                                         const NAObjectId *new_parent);