NLPACS::CPrimitiveBlock Class Reference

#include <primitive_block.h>

Inheritance diagram for NLPACS::CPrimitiveBlock:

NLPACS::UPrimitiveBlock

Detailed Description

Block of pacs primitive
Author:
Cyril 'Hulud' Corvazier

Nevrax France

Date:
2002

Definition at line 97 of file pacs/primitive_block.h.

from UPrimitive block, create a P.B. from a stream

uint getNbPrimitive ()
 get the number of primitives in the block

UMovePrimitive::TUserData getUserData (uint nPrimNb)
 return the user data for a primitive of the block

UPrimitiveBlockcreatePrimitiveBlock (NLMISC::IStream &src)
UPrimitiveBlockcreatePrimitiveBlockFromFile (const std::string &fileName)

Public Member Functions

void serial (NLMISC::IStream &s)

Data Fields

std::vector< CPrimitiveDescPrimitives


Member Function Documentation

UPrimitiveBlock* NLPACS::CPrimitiveBlock::createPrimitiveBlock NLMISC::IStream src  )  [static]
 

Create a primitive block from a stream. This may raise exception if loading failed

Reimplemented from NLPACS::UPrimitiveBlock.

UPrimitiveBlock* NLPACS::CPrimitiveBlock::createPrimitiveBlockFromFile const std::string &  fileName  )  [static]
 

Create a primitive block from its file name. This may raise exceptions if loading failed.

Reimplemented from NLPACS::UPrimitiveBlock.

uint NLPACS::CPrimitiveBlock::getNbPrimitive  )  [inline, virtual]
 

get the number of primitives in the block

Implements NLPACS::UPrimitiveBlock.

Definition at line 111 of file pacs/primitive_block.h.

References Primitives, and uint.

00111 { return Primitives.size(); }

UMovePrimitive::TUserData NLPACS::CPrimitiveBlock::getUserData uint  nPrimNb  )  [inline, virtual]
 

return the user data for a primitive of the block

Implements NLPACS::UPrimitiveBlock.

Definition at line 112 of file pacs/primitive_block.h.

References nlassert, Primitives, NLPACS::UMovePrimitive::TUserData, and uint.

00112                                                           { nlassert(nPrimNb < Primitives.size()); 
00113                                                                                                                         return Primitives[nPrimNb].UserData; }

void NLPACS::CPrimitiveBlock::serial NLMISC::IStream s  ) 
 

Definition at line 93 of file primitive_block_pacs.cpp.

References Primitives, s, and uint32.

00094 {
00095         s.xmlPush ("PRIMITIVE_BLOCK");
00096 
00097         // Serial checks
00098         s.serialCheck ((uint32)'KBRP');
00099 
00100         // Serial the version
00101         (void)s.serialVersion (0);
00102 
00103         s.xmlPush ("PRIMITIVES");
00104         s.serialCont (Primitives);
00105         s.xmlPop ();
00106 
00107         s.xmlPop ();
00108 }


Field Documentation

std::vector<CPrimitiveDesc> NLPACS::CPrimitiveBlock::Primitives
 

Definition at line 102 of file pacs/primitive_block.h.

Referenced by getNbPrimitive(), getUserData(), and serial().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 14:19:51 2004 for NeL by doxygen 1.3.6