DATAKIT API  V2025.1
Dtk_Stream Class Referenceabstract

This is the Dtk_Stream Class.
The Dtk_Stream object is used to store any informations about stream file. More...

+ Inheritance diagram for Dtk_Stream:

Public Types

enum  Dtk_StreamType { DTK_STREAM_UNKNOWN, DTK_STREAM_X_B, DTK_STREAM_JT, DTK_STREAM_XMM_B }
 

Public Member Functions

Dtk_Int32 DtkDynamicType (const Dtk_Int32 &inId)
 Retrieves the dynamic entity type. More...
 
virtual int DtkDynamicType (const int &inId)=0
 
virtual void dump (FILE *file=stdout)
 
type_detk get_type_detk () const
 
const Dtk_Char8 *const GetBinaryContent () const
 Returns the file size. More...
 
const Dtk_Size_t GetBinaryContentSize () const
 Returns the file data. More...
 
Dtk_string GetName () const
 Returns the file name. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_StreamType GetStreamType () const
 Returns the stream type. More...
 
void SetBinaryContent (const Dtk_Char8 *const inNewContent, const Dtk_Size_t inNewContentSize)
 Set the file data. More...
 

Static Public Member Functions

static Dtk_StreamPtr Create (const Dtk_Stream &inToBeCopied)
 Copy constructor. More...
 
static Dtk_StreamPtr Create (const Dtk_string &inName, const Dtk_Char8 *const inBinaryContent, const Dtk_Size_t &inBinaryContentSize, Dtk_StreamType inType)
 Create a Dtk_StreamPtr. More...
 
static Dtk_StreamDtkDynamicCast (Dtk_Object *o)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_STREAM }
 

Protected Member Functions

void _copy (const Dtk_Object &s)
 
void _init ()
 
void _reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_Stream (const Dtk_Stream &o)
 Copy Constructor. More...
 
 Dtk_Stream (const Dtk_string &inName, const Dtk_Char8 *const inBinaryContent, const Dtk_Size_t &inBinaryContentSize, Dtk_StreamType inType)
 Base Constructor. More...
 
 ~Dtk_Stream ()
 Destructor. More...
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_Stream >
 

Detailed Description

This is the Dtk_Stream Class.
The Dtk_Stream object is used to store any informations about stream file.

See also
Please use the Dtk_StreamPtr class to handle it.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
29  {
31  };

◆ Dtk_StreamType

Enumerator
DTK_STREAM_UNKNOWN 
DTK_STREAM_X_B 
DTK_STREAM_JT 
DTK_STREAM_XMM_B 
19  {
24  };

Constructor & Destructor Documentation

◆ Dtk_Stream() [1/2]

Dtk_Stream::Dtk_Stream ( const Dtk_string inName,
const Dtk_Char8 *const  inBinaryContent,
const Dtk_Size_t inBinaryContentSize,
Dtk_StreamType  inType 
)
protected

Base Constructor.

◆ Dtk_Stream() [2/2]

Dtk_Stream::Dtk_Stream ( const Dtk_Stream o)
protected

Copy Constructor.

◆ ~Dtk_Stream()

Dtk_Stream::~Dtk_Stream ( )
protected

Destructor.

Member Function Documentation

◆ _copy()

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _init()

void Dtk_Object::_init ( )
protectedinherited

◆ _reset()

void Dtk_Object::_reset ( )
protectedinherited

◆ Clone()

virtual Dtk_Object* Dtk_Stream::Clone ( )
protectedvirtual
43  {
44  return new Dtk_Stream(*this);
45  }

◆ Create() [1/2]

static Dtk_StreamPtr Dtk_Stream::Create ( const Dtk_Stream inToBeCopied)
static

Copy constructor.

Parameters
inToBeCopiedObject to copy.

◆ Create() [2/2]

static Dtk_StreamPtr Dtk_Stream::Create ( const Dtk_string inName,
const Dtk_Char8 *const  inBinaryContent,
const Dtk_Size_t inBinaryContentSize,
Dtk_StreamType  inType 
)
static

Create a Dtk_StreamPtr.

Parameters
binaryContentfile data.
binaryContentSizefile size.

◆ DtkDynamicCast()

static Dtk_Stream* Dtk_Stream::DtkDynamicCast ( Dtk_Object o)
static

Performs a dynamic cast - doesn't need RTTI -.

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_Stream::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

◆ DtkDynamicType() [2/2]

◆ dump()

virtual void Dtk_Object::dump ( FILE *  file = stdout)
virtualinherited

◆ get_type_detk()

type_detk Dtk_Stream::get_type_detk ( ) const
70  {
71  return DTK_TYPE_STREAM;
72  }

◆ GetBinaryContent()

const Dtk_Char8* const Dtk_Stream::GetBinaryContent ( ) const

Returns the file size.

◆ GetBinaryContentSize()

const Dtk_Size_t Dtk_Stream::GetBinaryContentSize ( ) const

Returns the file data.

◆ GetName()

Dtk_string Dtk_Stream::GetName ( ) const

Returns the file name.

◆ GetSize()

◆ GetStreamType()

Dtk_StreamType Dtk_Stream::GetStreamType ( ) const

Returns the stream type.

◆ SetBinaryContent()

void Dtk_Stream::SetBinaryContent ( const Dtk_Char8 *const  inNewContent,
const Dtk_Size_t  inNewContentSize 
)

Set the file data.

Parameters
inNewContentThe file data.
inNewContentSizeThe file data size.

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_Stream >

friend class Dtk_SmartPtr< Dtk_Stream >
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_Stream::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_Stream::Dtk_Stream
Dtk_Stream(const Dtk_string &inName, const Dtk_Char8 *const inBinaryContent, const Dtk_Size_t &inBinaryContentSize, Dtk_StreamType inType)
Base Constructor.
Dtk_Stream::DTK_STREAM_JT
@ DTK_STREAM_JT
Definition: dtk_stream.hpp:22
Dtk_Stream::DTK_STREAM_UNKNOWN
@ DTK_STREAM_UNKNOWN
Definition: dtk_stream.hpp:20
Dtk_Stream::DTK_STREAM_XMM_B
@ DTK_STREAM_XMM_B
Definition: dtk_stream.hpp:23
DTK_TYPE_STREAM
@ DTK_TYPE_STREAM
Definition: define.h:619
Dtk_Stream::DTK_STREAM_X_B
@ DTK_STREAM_X_B
Definition: dtk_stream.hpp:21
Dtk_Stream::_typeID
@ _typeID
Definition: dtk_stream.hpp:30