Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCD_detector_ID Class Reference

#include <LCD_detector_ID.hh>

Inheritance diagram for LCD_detector_ID:

Inheritance graph
[legend]
Collaboration diagram for LCD_detector_ID:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LCD_detector_ID (const char *)
 ~LCD_detector_ID ()
int getMajor ()
int getMinor ()
const char * getType ()
void setMajor (int)
void setMinor (int)
void setType (char *)
unsigned int xfer (SIO_stream *, SIO_operation, unsigned int)
unsigned int version ()

Private Attributes

int major
int minor
std::string type

Constructor & Destructor Documentation

LCD_detector_ID::LCD_detector_ID const char *   ) 
 

Definition at line 20 of file LCD_detector_ID.cc.

References major, minor, and type.

00020                                                      : SIO_block( i_name )
00021 {
00022 
00023   type  = "<unknown>";
00024   major = -1;
00025   minor = -1;
00026 
00027 }

LCD_detector_ID::~LCD_detector_ID  ) 
 

Definition at line 34 of file LCD_detector_ID.cc.

00034 {}


Member Function Documentation

int LCD_detector_ID::getMajor  ) 
 

Definition at line 41 of file LCD_detector_ID.cc.

References major.

00041 { return major; }

int LCD_detector_ID::getMinor  ) 
 

Definition at line 47 of file LCD_detector_ID.cc.

References minor.

00047 { return minor; }

const char * LCD_detector_ID::getType  ) 
 

Definition at line 53 of file LCD_detector_ID.cc.

References type.

00053 { return type.c_str(); }

void LCD_detector_ID::setMajor int   ) 
 

Definition at line 60 of file LCD_detector_ID.cc.

References major.

Referenced by LCDG4_SIOglobal::LCDG4_SIOglobal().

00060 { major = i_major; return; }

void LCD_detector_ID::setMinor int   ) 
 

Definition at line 67 of file LCD_detector_ID.cc.

References minor.

Referenced by LCDG4_SIOglobal::LCDG4_SIOglobal().

00067 { minor = i_minor; return; }

void LCD_detector_ID::setType char *   ) 
 

Definition at line 74 of file LCD_detector_ID.cc.

Referenced by LCDG4_SIOglobal::LCDG4_SIOglobal().

00077 {
00078 
00079   //
00080   // Check for presence of input string.
00081   //
00082   if( i_type == NULL )
00083     return;
00084 
00085   //
00086   // Save it!
00087   //
00088   type = i_type;
00089 
00090   //
00091   // That's all folks!
00092   //
00093   return;
00094 }

unsigned int LCD_detector_ID::version  )  [virtual]
 

Implements SIO_block.

Definition at line 162 of file LCD_detector_ID.cc.

References LCD_DETECTOR_ID_MAJOR, LCD_DETECTOR_ID_MINOR, and SIO_VERSION_ENCODE.

00163 { return( SIO_VERSION_ENCODE( LCD_DETECTOR_ID_MAJOR,
00164                               LCD_DETECTOR_ID_MINOR ) ); }

unsigned int LCD_detector_ID::xfer SIO_stream ,
SIO_operation  ,
unsigned  int
[virtual]
 

Implements SIO_block.

Definition at line 101 of file LCD_detector_ID.cc.

References SIO_BLOCK_SUCCESS, SIO_DATA, SIO_OP_READ, SIO_OP_WRITE, and SIO_operation.

00106 {
00107   if(version) ; // make compiler happy
00108   int
00109     nchr;
00110 
00111   char
00112     *temp;
00113 
00114   unsigned int
00115     status;
00116 
00117   //
00118   // Determine the length of the type name.
00119   //
00120   if( op == SIO_OP_WRITE )
00121     nchr = type.size();
00122 
00123   SIO_DATA( stream, &nchr, 1 );
00124 
00125   //
00126   // Transfer the type name.
00127   //
00128   if(      op == SIO_OP_WRITE )
00129     {
00130       SIO_DATA( stream, const_cast<char*>(type.c_str()), nchr );
00131     }
00132 
00133   else if( op == SIO_OP_READ  )
00134     {
00135       temp = static_cast<char*>(malloc( nchr + 1 ));
00136       SIO_DATA( stream, temp, nchr );
00137       temp[nchr] = '\0';
00138       type = temp;
00139       free( temp );
00140     }
00141 
00142   //
00143   // The rest is easy.
00144   //
00145   SIO_DATA( stream, &major, 1 );
00146   SIO_DATA( stream, &minor, 1 );
00147 
00148   //
00149   // That's all folks!
00150   //
00151   return( SIO_BLOCK_SUCCESS );
00152 }


Member Data Documentation

int LCD_detector_ID::major [private]
 

Definition at line 36 of file LCD_detector_ID.hh.

Referenced by getMajor(), LCD_detector_ID(), and setMajor().

int LCD_detector_ID::minor [private]
 

Definition at line 37 of file LCD_detector_ID.hh.

Referenced by getMinor(), LCD_detector_ID(), and setMinor().

std::string LCD_detector_ID::type [private]
 

Definition at line 38 of file LCD_detector_ID.hh.

Referenced by getType(), and LCD_detector_ID().


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:04 2004 for LCDG4 by doxygen 1.3.4