Go to the documentation of this file.
64 componentIDPos_(componentIDPos) {
128 const string procName =
"SlotField::addSocketEncoding";
172 const string procName =
"SlotField::socketEncoding";
173 throw OutOfRange(__FILE__, __LINE__, procName);
189 for (SocketEncodingTable::const_iterator iter =
encodings_.begin();
211 for (SocketEncodingTable::const_iterator iter =
encodings_.begin();
240 const string procName =
"SlotField::setNoOperationEncoding";
311 for (
int i = 0; i < encodings; i++) {
313 int encodingWidth = encoding.
width();
314 if (encodingWidth >
width) {
315 width = encodingWidth;
346 const string procName =
"SlotField::childField";
347 throw OutOfRange(__FILE__, __LINE__, procName);
363 const string procName =
"SlotField::loadState";
368 for (
int i = 0; i < state->
childCount(); i++) {
378 __FILE__, __LINE__, procName, exception.
errorMessage());
NOPEncoding & noOperationEncoding() const
BinaryEncoding::Position componentIDPos_
Position of the socket and bridge IDs within the field.
virtual ObjectState * saveState() const
bool hasSocketEncoding(const std::string &socket) const
virtual ObjectState * saveState() const
virtual int childFieldCount() const
bool hasNoOperationEncoding() const
virtual int width() const
void setName(const std::string &name)
static NullNOPEncoding & instance()
SocketEncoding & socketEncoding(int index) const
void removeSocketEncoding(SocketEncoding &encoding)
virtual ObjectState * saveState() const
void setNoOperationEncoding(NOPEncoding &encoding)
#define assert(condition)
SlotField * parent() const
virtual int width() const
void clearNoOperationEncoding()
static const std::string OSNAME_SOCKET_ENCODING
ObjectState name for socket encoding.
SocketEncodingTable encodings_
The container for socket encodings.
std::string socketName() const
void clearSocketEncodings()
InstructionField * parent() const
virtual int width() const
NOPEncoding * nopEncoding_
The NOP encoding.
ObjectState * child(int index) const
void addChild(ObjectState *child)
unsigned int encoding() const
BinaryEncoding::Position componentIDPosition() const
void unsetNoOperationEncoding()
static NullSocketEncoding & instance()
std::string errorMessage() const
void addSocketEncoding(SocketEncoding &encoding)
virtual InstructionField & childField(int position) const
static const std::string OSNAME_SLOT_FIELD
ObjectState name for slot field.
SlotField * parent() const
virtual void loadState(const ObjectState *state)
static bool canAddComponentEncoding(SlotField &field, unsigned int encoding, unsigned int extraBits)
int socketEncodingCount() const
int intAttribute(const std::string &name) const
static const std::string OSNAME_NOP_ENCODING
ObjectState name for NOP encoding.
static const std::string OSKEY_COMPONENT_ID_POSITION
ObjectState attribute key for component ID position.
SlotField(BinaryEncoding::Position componentIDPos, MoveSlot &parent)
MoveSlot * parent() const
unsigned int extraBits() const
void setAttribute(const std::string &name, const std::string &value)
virtual void loadState(const ObjectState *state)