Yosokumo::Cell Class Reference

Represents a Value with an associated key or name. More...

#include <Cell.h>

Collaboration diagram for Yosokumo::Cell:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Cell ()
 Initializes a newly created Cell object with default values:
 Cell (uint64_t nameOrKey, const Value &value)
 Initializes a newly created Cell object with key and value specified by the input parameter.
bool operator== (const Cell &rhs) const
 Equality operator - compare two Cells for equality.
bool operator!= (const Cell &rhs) const
 Inequality operator - compare two Cells for inequality.
void setName (uint64_t name)
 Set the name of the cell.
uint64_t getName () const
 Return the name of the cell.
void setKey (uint64_t key)
 Set the key of the cell.
uint64_t getKey () const
 Return the key of the cell.
void setValue (const Value &value)
 Set the value of the cell.
Value getValue () const
 Return the value of the cell.
std::string toString () const
 Return a string representation of this Cell.

Private Attributes

uint64_t nameOrKey
 A name or a key, depending on the context in which the cell appears.
Value value
 The value of the cell.

Detailed Description

Represents a Value with an associated key or name.

Definition at line 19 of file Cell.h.


Constructor & Destructor Documentation

Cell::Cell (  ) 

Initializes a newly created Cell object with default values:

Definition at line 13 of file Cell.cpp.

References nameOrKey, and value.

Cell::Cell ( uint64_t  nameOrKey,
const Value value 
)

Initializes a newly created Cell object with key and value specified by the input parameter.

Parameters:
nameOrKey the name or key of the cell.
value the value of the cell.

Definition at line 19 of file Cell.cpp.


Member Function Documentation

uint64_t Cell::getKey (  )  const

Return the key of the cell.

Returns:
the key of the cell.

Definition at line 44 of file Cell.cpp.

References nameOrKey.

uint64_t Cell::getName (  )  const

Return the name of the cell.

Returns:
the name of the cell.

Definition at line 34 of file Cell.cpp.

References nameOrKey.

Referenced by Yosokumo::YosokumoProtobuf::makeProtobufCellFromCell().

Value Cell::getValue (  )  const

Return the value of the cell.

Returns:
the value of the cell.

Definition at line 54 of file Cell.cpp.

References value.

Referenced by Yosokumo::YosokumoProtobuf::makeProtobufCellFromCell().

bool Cell::operator!= ( const Cell rhs  )  const

Inequality operator - compare two Cells for inequality.

Parameters:
rhs the righthand side of the inequality.
Returns:
true if and only if this Cells and the righthand side Cells are not identically equal.

Definition at line 70 of file Cell.cpp.

bool Cell::operator== ( const Cell rhs  )  const

Equality operator - compare two Cells for equality.

Parameters:
rhs the righthand side of the equality.
Returns:
true if and only if this Cells and the righthand side Cells are identically equal.

Definition at line 61 of file Cell.cpp.

References nameOrKey, and value.

void Cell::setKey ( uint64_t  key  ) 

Set the key of the cell.

Parameters:
key the new key to assign to the cell.

Definition at line 39 of file Cell.cpp.

References nameOrKey.

void Cell::setName ( uint64_t  name  ) 

Set the name of the cell.

Parameters:
name the new name to assign to the cell.

Definition at line 29 of file Cell.cpp.

References nameOrKey.

Referenced by Yosokumo::YosokumoProtobuf::makeCellFromProtobufCell().

void Cell::setValue ( const Value value  ) 

Set the value of the cell.

Parameters:
value the new value to assign to the cell.

Definition at line 49 of file Cell.cpp.

Referenced by Yosokumo::YosokumoProtobuf::makeCellFromProtobufCell().

std::string Cell::toString (  )  const

Return a string representation of this Cell.

Returns:
the string representation of this Cell.

Definition at line 75 of file Cell.cpp.

References nameOrKey, Yosokumo::Value::toString(), and value.

Referenced by Yosokumo::Specimen::toString(), and Yosokumo::CellBlock::toString().


Member Data Documentation

uint64_t Yosokumo::Cell::nameOrKey [private]

A name or a key, depending on the context in which the cell appears.

Definition at line 24 of file Cell.h.

Referenced by Cell(), getKey(), getName(), operator==(), setKey(), setName(), and toString().

The value of the cell.

Definition at line 28 of file Cell.h.

Referenced by Cell(), getValue(), operator==(), and toString().


The documentation for this class was generated from the following files:
Generated on Mon May 13 09:19:11 2013 for C++ Yosokumo API by  doxygen 1.6.3