# Namespace

## Content

# Class: Namespace

Represents a namespace within a structure tree.

## Extends

- [`ObjectBase`](ObjectBase)

## Constructors

### Constructor

```ts
new Namespace(ns?): Namespace;
```

Creates a new Namespace object.

#### Parameters

##### ns?

`string`

The value of the [Namespace#ns](#ns) property.

#### Returns

`Namespace`

#### Overrides

```ts
ObjectBase.constructor
```

### Constructor

```ts
new Namespace(om, ns?): Namespace;
```

Creates a new Namespace object.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

An object manager that controls the lifetime of the Namespace object.

##### ns?

`string`

The value of the [Namespace#ns](#ns) property.

#### Returns

`Namespace`

#### Overrides

```ts
ObjectBase.constructor
```

## Accessors

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### ns

#### Get Signature

```ts
get ns(): string;
```

Gets the string defining the namespace name which this entry identifies
(conventionally a uniform resource identifier, or URI).

##### Returns

`string`

#### Set Signature

```ts
set ns(value): void;
```

Sets the string defining the namespace name which this entry identifies
(conventionally a uniform resource identifier, or URI).

##### Parameters

###### value

`string`

##### Returns

`void`

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

## Methods

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
