g4tools  5.4.0
Public Member Functions | Static Public Member Functions | List of all members
tools::rroot::vector3 Class Reference
Inheritance diagram for tools::rroot::vector3:
Inheritance graph
[legend]
Collaboration diagram for tools::rroot::vector3:
Collaboration graph
[legend]

Public Member Functions

virtual void * cast (const std::string &a_class) const
 
virtual const std::string & s_cls () const
 
virtual irocopy () const
 
virtual void * cast (cid a_class) const
 
virtual bool stream (buffer &a_buffer)
 
 vector3 ()
 
virtual ~vector3 ()
 
 vector3 (const vector3 &a_from)
 
vector3operator= (const vector3 &a_from)
 
double x () const
 
double y () const
 
double z () const
 
- Public Member Functions inherited from tools::rroot::iro
virtual ~iro ()
 

Static Public Member Functions

static const std::string & s_class ()
 
static cid id_class ()
 

Detailed Description

Definition at line 14 of file vector3.

Constructor & Destructor Documentation

◆ vector3() [1/2]

tools::rroot::vector3::vector3 ( )
inline

Definition at line 59 of file vector3.

59  :m_x(0),m_y(0),m_z(0){
60 #ifdef TOOLS_MEM
61  mem::increment(s_class().c_str());
62 #endif
63  }

◆ ~vector3()

virtual tools::rroot::vector3::~vector3 ( )
inlinevirtual

Definition at line 64 of file vector3.

64  {
65 #ifdef TOOLS_MEM
66  mem::decrement(s_class().c_str());
67 #endif
68  }

◆ vector3() [2/2]

tools::rroot::vector3::vector3 ( const vector3 a_from)
inline

Definition at line 70 of file vector3.

71  :parent(a_from)
72  ,m_x(a_from.m_x),m_y(a_from.m_y),m_z(a_from.m_z)
73  {}

Member Function Documentation

◆ cast() [1/2]

virtual void* tools::rroot::vector3::cast ( cid  a_class) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 35 of file vector3.

35  {
36  if(void* p = cmp_cast<vector3>(this,a_class)) {return p;}
37  else return 0;
38  }

◆ cast() [2/2]

virtual void* tools::rroot::vector3::cast ( const std::string &  a_class) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 27 of file vector3.

27  {
28  if(void* p = cmp_cast<vector3>(this,a_class)) return p;
29  return 0;
30  }

◆ copy()

virtual iro* tools::rroot::vector3::copy ( ) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 32 of file vector3.

32 {return new vector3(*this);}

◆ id_class()

static cid tools::rroot::vector3::id_class ( )
inlinestatic

Definition at line 34 of file vector3.

34 {return vector3_cid();}

◆ operator=()

vector3& tools::rroot::vector3::operator= ( const vector3 a_from)
inline

Definition at line 74 of file vector3.

74  {
75  m_x = a_from.m_x;
76  m_y = a_from.m_y;
77  m_z = a_from.m_z;
78  return *this;
79  }

◆ s_class()

static const std::string& tools::rroot::vector3::s_class ( )
inlinestatic

Definition at line 22 of file vector3.

22  {
23  static const std::string s_v("tools::rroot::vector3");
24  return s_v;
25  }

◆ s_cls()

virtual const std::string& tools::rroot::vector3::s_cls ( ) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 31 of file vector3.

31 {return s_class();}

◆ stream()

virtual bool tools::rroot::vector3::stream ( buffer a_buffer)
inlinevirtual

Implements tools::rroot::iro.

Definition at line 40 of file vector3.

40  {
41  unsigned int s, c;
42  short v;
43  if(!a_buffer.read_version(v,s,c)) return false;
44 
45  //printf("debug : tools::rroot::vector3::stream : version %d\n",v);
46 
47  {uint32 id,bits;
48  if(!Object_stream(a_buffer,id,bits)) return false;}
49 
50  if(!a_buffer.read(m_x)) return false;
51  if(!a_buffer.read(m_y)) return false;
52  if(!a_buffer.read(m_z)) return false;
53 
54  if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
55  return true;
56  }

◆ x()

double tools::rroot::vector3::x ( ) const
inline

Definition at line 81 of file vector3.

81 {return m_x;}

◆ y()

double tools::rroot::vector3::y ( ) const
inline

Definition at line 82 of file vector3.

82 {return m_y;}

◆ z()

double tools::rroot::vector3::z ( ) const
inline

Definition at line 83 of file vector3.

83 {return m_z;}

The documentation for this class was generated from the following file:
tools::rroot::Object_stream
bool Object_stream(buffer &a_buffer, uint32 &a_id, uint32 &a_bits)
Definition: object:12
tools::rroot::vector3::s_class
static const std::string & s_class()
Definition: vector3:22
tools::rroot::vector3::vector3
vector3()
Definition: vector3:59
tools::rroot::vector3_cid
cid vector3_cid()
Definition: cids:51
tools::uint32
unsigned int uint32
Definition: typedefs:71