SoNodeKitListPart(3)

๐Ÿ“ฆ version 2.5.0, in fedora 43, fedora 44

๐Ÿ’– SoNodeKitListPart(3) ๐Ÿ’–

okay bestie, welcome to the manual page for SoNodeKitListPart โ€” it lives in the Library Functions Manual (section 3, iykyk), and it is literally a container node. it's a long one, so we're doing this in three parts, and this is part one. buckle up ๐ŸŽ€


โœจ NAME โœจ

SoNodeKitListPart โ€” the SoNodeKitListPart class is a container node. that's it, that's the name, slay ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

#include <Inventor/nodekits/SoNodeKitListPart.h>

Inherits SoNode. yes queen, she comes from SoNode, we love a lineage ๐Ÿ‘‘


๐ŸŒธ Public Member Functions ๐ŸŒธ

  • virtual SoType getTypeId (void) const โ€” the classic type-id getter, but virtual
  • SoNodeKitListPart (void) โ€” the constructor, no args, just vibes
  • SoType getContainerType (void) const โ€” tells you what kind of container she's being rn
  • void setContainerType (SoType newContainerType) โ€” swaps the container behaviour to whatever SoType you hand her
  • const SoTypeList & getChildTypes (void) const โ€” the list of child types, by const ref, don't touch
  • void addChildType (SoType typeToAdd) โ€” adds one more allowed child type to the list
  • SbBool isTypePermitted (SoType typeToCheck) const โ€” is this type allowed in here? yes/no
  • SbBool isChildPermitted (const SoNode *child) const โ€” is this actual node allowed in here? yes/no
  • void containerSet (const char *fieldDataString) โ€” sets the container via a field data string
  • void lockTypes (void) โ€” locks the type list so nobody can mess with it anymore ๐Ÿ”’
  • SbBool isTypeLocked (void) const โ€” are the types locked? asking for a friend
  • void addChild (SoNode *child) โ€” add a child node
  • void insertChild (SoNode *child, int childIndex) โ€” insert a child at a specific index
  • SoNode * getChild (int index) const โ€” grab the child at that index
  • int findChild (SoNode *child) const โ€” find that child's index
  • int getNumChildren (void) const โ€” how many children do we have, bestie
  • void removeChild (int index) โ€” remove the child at this index
  • void removeChild (SoNode *child) โ€” or remove this specific child
  • void replaceChild (int index, SoNode *newChild) โ€” swap out the child at that index for a new one
  • void replaceChild (SoNode *oldChild, SoNode *newChild) โ€” or swap this old child for a new one
  • virtual SbBool affectsState (void) const โ€” does this node touch the traversal state?
  • virtual void doAction (SoAction *action) โ€” runs an action
  • virtual void callback (SoCallbackAction *action) โ€” callback action time
  • virtual void GLRender (SoGLRenderAction *action) โ€” render it, glow it up โœจ
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action) โ€” bounding box action
  • virtual void getMatrix (SoGetMatrixAction *action) โ€” matrix action
  • virtual void handleEvent (SoHandleEventAction *action) โ€” event handling, she's listening
  • virtual void pick (SoPickAction *action) โ€” pick action
  • virtual void search (SoSearchAction *action) โ€” search action
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) โ€” primitive count action
  • virtual SoChildList * getChildren (void) const โ€” returns the child list pointer

๐Ÿ’œ Public Member Functions inherited from SoNode ๐Ÿ’œ

  • void setOverride (const SbBool state)
  • SbBool isOverride (void) const
  • void setNodeType (const NodeType type)
  • NodeType getNodeType (void) const
  • virtual SoNode * copy (SbBool copyconnections=0) const
  • virtual void GLRenderBelowPath (SoGLRenderAction *action)
  • virtual void GLRenderInPath (SoGLRenderAction *action)
  • virtual void GLRenderOffPath (SoGLRenderAction *action)
  • virtual void rayPick (SoRayPickAction *action)
  • virtual void write (SoWriteAction *action)
  • virtual void audioRender (SoAudioRenderAction *action)
  • virtual void grabEventsSetup (void)
  • virtual void grabEventsCleanup (void)
  • virtual void startNotify (void)
  • virtual void notify (SoNotList *l)
  • uint32_t getNodeId (void) const
  • virtual void writeInstance (SoOutput *out)
  • virtual SoNode * addToCopyDict (void) const
  • virtual SoFieldContainer * copyThroughConnection (void) const

๐Ÿฉท Public Member Functions inherited from SoFieldContainer ๐Ÿฉท

  • void setToDefaults (void)
  • SbBool hasDefaultValues (void) const
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)
  • SbBool set (const char *const fielddata)
  • void get (SbString &fielddata)
  • virtual int getFields (SoFieldList &l) const
  • virtual int getAllFields (SoFieldList &l) const
  • virtual SoField * getField (const SbName &name) const
  • virtual SoField * getEventIn (const SbName &name) const
  • virtual SoField * getEventOut (const SbName &name) const
  • SbBool getFieldName (const SoField *const field, SbName &name) const
  • SbBool enableNotify (const SbBool flag)
  • SbBool isNotifyEnabled (void) const
  • SbBool set (const char *fielddata, SoInput *in)
  • void get (SbString &fielddata, SoOutput *out)
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval)
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)
  • SbBool getIsBuiltIn (void) const
  • void setUserData (void *userdata) const
  • void * getUserData (void) const

๐ŸŒˆ Public Member Functions inherited from SoBase ๐ŸŒˆ

  • void ref (void) const
  • void unref (void) const
  • void unrefNoDelete (void) const
  • int32_t getRefCount (void) const
  • void touch (void)
  • SbBool isOfType (SoType type) const
  • virtual SbName getName (void) const
  • virtual void setName (const SbName &newname)
  • void addAuditor (void *const auditor, const SoNotRec::Type type)
  • void removeAuditor (void *const auditor, const SoNotRec::Type type)
  • const SoAuditorList & getAuditors (void) const
  • SbBool shouldWrite (void)
  • void assertAlive (void) const

โญ Static Public Member Functions โญ

  • static SoType getClassTypeId (void)
  • static void initClass (void)

๐Ÿงš Static Public Member Functions inherited from SoNode ๐Ÿงš

  • static uint32_t getCompatibilityTypes (const SoType &nodetype)
  • static SoType getClassTypeId (void)
  • static SoNode * getByName (const SbName &name)
  • static int getByName (const SbName &name, SoNodeList &l)
  • static void initClass (void)
  • static void initClasses (void)
  • static uint32_t getNextNodeId (void)
  • static int getActionMethodIndex (const SoType type)
  • static void getBoundingBoxS (SoAction *action, SoNode *node)
  • static void GLRenderS (SoAction *action, SoNode *node)
  • static void callbackS (SoAction *action, SoNode *node)
  • static void getMatrixS (SoAction *action, SoNode *node)
  • static void handleEventS (SoAction *action, SoNode *node)
  • static void pickS (SoAction *action, SoNode *node)
  • static void rayPickS (SoAction *action, SoNode *node)
  • static void searchS (SoAction *action, SoNode *node)
  • static void writeS (SoAction *action, SoNode *node)
  • static void audioRenderS (SoAction *action, SoNode *node)
  • static void getPrimitiveCountS (SoAction *action, SoNode *node)

๐Ÿ“ Static Public Member Functions inherited from SoFieldContainer ๐Ÿ“

  • static void initClass (void)
  • static SoType getClassTypeId (void)
  • static void initCopyDict (void)
  • static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)
  • static SoFieldContainer * checkCopy (const SoFieldContainer *orig)
  • static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)
  • static void copyDone (void)

๐ŸŒธ Static Public Member Functions inherited from SoBase ๐ŸŒธ

  • static void initClass (void)
  • static SoType getClassTypeId (void)
  • static void addName (SoBase *const base, const char *const name)
  • static void removeName (SoBase *const base, const char *const name)
  • static void incrementCurrentWriteCounter (void)
  • static void decrementCurrentWriteCounter (void)
  • static SoBase * getNamedBase (const SbName &name, SoType type)
  • static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)
  • static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)
  • static void setInstancePrefix (const SbString &c)
  • static void setTraceRefs (SbBool trace)
  • static SbBool getTraceRefs (void)
  • static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)
  • static SbBool readRoute (SoInput *in)

๐Ÿ’… Protected Member Functions ๐Ÿ’…

  • virtual const SoFieldData * getFieldData (void) const
  • virtual ~SoNodeKitListPart ()
  • SoGroup * getContainerNode (void)
  • virtual SbBool readInstance (SoInput *in, unsigned short flags)
  • virtual void copyContents (const SoFieldContainer *fromFC, SbBool copyConnections)

๐Ÿ’œ Protected Member Functions inherited from SoNode ๐Ÿ’œ

  • SoNode (void)
  • virtual ~SoNode ()

๐Ÿฆ‹ Protected Member Functions inherited from SoFieldContainer ๐Ÿฆ‹

  • SoFieldContainer (void)
  • ~SoFieldContainer ()

๐ŸŽ€ Protected Member Functions inherited from SoBase ๐ŸŽ€

  • SoBase (void)
  • virtual ~SoBase ()
  • virtual void destroy (void)
  • SbBool hasMultipleWriteRefs (void) const
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const
  • void writeFooter (SoOutput *out) const
  • virtual const char * getFileFormatName (void) const

๐Ÿ”ฅ Static Protected Member Functions ๐Ÿ”ฅ

  • static const SoFieldData ** getFieldDataPtr (void)

โœจ Static Protected Member Functions inherited from SoNode โœจ

  • static const SoFieldData ** getFieldDataPtr (void)
  • static void setNextActionMethodIndex (int index)
  • static int getNextActionMethodIndex (void)
  • static void incNextActionMethodIndex (void)
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)

๐ŸŒˆ Static Protected Member Functions inherited from SoBase ๐ŸŒˆ

  • static uint32_t getCurrentWriteCounter (void)
  • static void staticDataLock (void)
  • static void staticDataUnlock (void)

๐Ÿ‘‘ Protected Attributes ๐Ÿ‘‘

  • SoChildList * children

๐Ÿ’– Protected Attributes inherited from SoNode ๐Ÿ’–

  • uint32_t uniqueId

๐ŸŒธ Protected Attributes inherited from SoFieldContainer ๐ŸŒธ

  • SbBool isBuiltIn

๐Ÿซถ Friends ๐Ÿซถ

  • class SoBaseKit โ€” bestie privileges, she gets to see the internals

๐Ÿงš Additional Inherited Members ๐Ÿงš

๐ŸŒŸ Public Types inherited from SoNode ๐ŸŒŸ

enum NodeType { INVENTOR = 0x0000, VRML1 = 0x0001, VRML2 = 0x0002,
    INVENTOR_1 = 0x0004, INVENTOR_2_0 = 0x0008, INVENTOR_2_1 = 0x0010,
    INVENTOR_2_5 = 0x0020, INVENTOR_2_6 = 0x0040, COIN_1_0 = 0x0080,
    COIN_2_0 = 0x0100, EXTENSION = 0x0200, COIN_2_2 = 0x0400, COIN_2_3 =
    0x0800, COIN_2_4 = 0x1000, INVENTOR_5_0 = 0x2000, COIN_2_5 = 0x4000
}

๐ŸŽ€ Protected Types inherited from SoBase ๐ŸŽ€

enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }

โญ Static Protected Attributes inherited from SoNode โญ

  • static uint32_t nextUniqueId = 0
  • static int nextActionMethodIndex = 0

๐ŸŒธ Detailed Description ๐ŸŒธ

okay so, the SoNodeKitListPart class is a container node. periodt.

this node is basically just a container node but with these differences versus the other group nodes:

  1. it is possible to make a list of which node class types are allowed as children.
  2. you can freely select which kind of group node behaviour you want this container to have. Default is to act like an SoGroup node, but by using SoNodeKitListPart::setContainerType(), you can change the behaviour to be like a separator, a switch or whatever else you have of node types inheriting SoGroup.

๐Ÿฆ‹ See also ๐Ÿฆ‹

SoGroup, SoSeparator, SoSwitch


๐ŸŽ€ Constructor & Destructor Documentation ๐ŸŽ€

๐Ÿ’œ SoNodeKitListPart::SoNodeKitListPart (void ) ๐Ÿ’œ

Constructor. she's born ๐Ÿ’…

References children, SoBase::getName(), and SoNodeKitListPart().

Referenced by getFieldData(), initClass(), and SoNodeKitListPart().

๐Ÿ’œ SoNodeKitListPart::~SoNodeKitListPart () [protected], [virtual] ๐Ÿ’œ

Destructor. she's leaving, but make it protected and virtual ๐Ÿ˜ญ

References children.


โœจ Member Function Documentation โœจ

๐ŸŒŸ SoType SoNodeKitListPart::getTypeId (void ) const [virtual] ๐ŸŒŸ

Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and "downward" casting.

Usage example:

void foo(SoNode * node)
{
  if (node->getTypeId() == SoFile::getClassTypeId()) {
    SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
  }
  else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
    SoGroup * group = (SoGroup *)node;  // safe downward cast, knows the type
  }
}

okay that's part one bestie, don't go anywhere โ€” there's more coming ๐Ÿ’–โœจ

Okay so for the application programmers out there who wanna extend the library with new nodes, engines, nodekits, draggers or whatever else โ€” this method needs to be overridden in all subclasses, no exceptions bestie. It's typically done as part of setting up the full type system for your extension classes, which is usually accomplished by using the pre-defined macros available through, for instance, Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. โœจ

For more info on writing Coin extensions, go peek at the class documentation of the toplevel superclasses for the various class groups. ๐Ÿ“š

Implements SoBase.


const SoFieldData * SoNodeKitListPart::getFieldData (void ) const โ€” [protected], [virtual]

Hands you back a pointer to the class-wide field data storage object for this instance. And if there are no fields present? You get NULL. That's it, that's the vibe. ๐Ÿซถ

Reimplemented from SoFieldContainer.

๐Ÿ”— refs: SoNodeKitListPart().


void SoNodeKitListPart::initClass (void ) โ€” [static]

Does the initialization that's common to all objects of the SoNodeKitListPart class. Setting up the type system is in there, among other things. ๐Ÿ‘‘

๐Ÿ”— refs: SoAudioRenderAction::addMethod(), SoBase::getClassTypeId(), and SoNodeKitListPart().

๐Ÿ’Œ referenced by: SoNodeKit::init().


SoType SoNodeKitListPart::getContainerType (void ) const

Returns the type id for the list container. The default is SoGroup. ๐ŸŽ€


void SoNodeKitListPart::setContainerType (SoType newContainerType)

Changes the behaviour of this container node. Heads up: newContainerType must be derived from SoGroup.

๐Ÿ”— refs: SoGroup::addChild(), children, SoType::createInstance(), SbPList::getLength(), SoType::getName(), SbName::getString(), SoType::isDerivedFrom(), SoDebugError::post(), and SoDebugError::postInfo().


const SoTypeList & SoNodeKitListPart::getChildTypes (void ) const

Returns a list of all the types that are allowed as children of this node. Default behaviour is to allow all nodetypes. ๐ŸŒˆ

๐Ÿ”— refs: SoTypeList::append().


void SoNodeKitListPart::addChildType (SoType typeToAdd)

Adds one more node class type that should be allowed to be used in the node list. ๐Ÿ’…

Note: the default single SoNode type in the list will be removed upon the first call to this method. Gone. Poof. โœจ

๐Ÿ”— refs: SoTypeList::append(), SoType::getName(), SbName::getString(), and SoDebugError::post().


SbBool SoNodeKitListPart::isTypePermitted (SoType typeToCheck) const

Returns TRUE if nodes of the typeToCheck class type can be added to the list. ๐Ÿ’–

๐Ÿ”— refs: SoType::isDerivedFrom().

๐Ÿ’Œ referenced by: isChildPermitted().


SbBool SoNodeKitListPart::isChildPermitted (const SoNode * child) const

Returns TRUE if child has a class type that's permitted to be in the list. ๐Ÿฆ‹

๐Ÿ”— refs: SoBase::getTypeId(), isTypePermitted(), and SoNode::SoNode().

๐Ÿ’Œ referenced by: addChild(), insertChild(), replaceChild(), and replaceChild().


void SoNodeKitListPart::containerSet (const char * fieldDataString)

Calls set() on the container node with fieldDataString. Simple as. โญ


void SoNodeKitListPart::lockTypes (void )

Locks the type list so no more node class types can be added by using addChildType(), and locks the container type so it can no longer be changed by setContainerType(). ๐Ÿ”’ The vibes are officially sealed.


SbBool SoNodeKitListPart::isTypeLocked (void ) const

Returns TRUE if the list of allowable node types and the container type have both been locked. ๐Ÿ‘‘


void SoNodeKitListPart::addChild (SoNode * child)

Adds child to the internal list of children, if it's of a type that's permitted to be added. Otherwise? Not today, bestie. ๐Ÿ™ˆ

๐Ÿ”— refs: SoType::getName(), SbName::getString(), SoBase::getTypeId(), isChildPermitted(), SoDebugError::post(), and SoNode::SoNode().

๐Ÿ’Œ referenced by: SoBaseKit::setAnyPart().


void SoNodeKitListPart::insertChild (SoNode * child, int childIndex)

Inserts child in the internal list of children at position childIndex, if it's of a type permitted to be added. ๐Ÿ“

๐Ÿ”— refs: SoType::getName(), SbName::getString(), SoBase::getTypeId(), isChildPermitted(), SoDebugError::post(), and SoNode::SoNode().


SoNode * SoNodeKitListPart::getChild (int index) const

Returns the child node at position index. ๐ŸŽ€

๐Ÿ’Œ referenced by: SoBaseKit::createPathToAnyPart(), SoBaseKit::getAnyPart(), SoBaseKit::set(), and SoBaseKit::set().


int SoNodeKitListPart::findChild (SoNode * child) const

Returns the position index of child in the list of children. ๐Ÿ”

๐Ÿ”— refs: SoNode::SoNode().

๐Ÿ’Œ referenced by: SoBaseKit::getPartString().


int SoNodeKitListPart::getNumChildren (void ) const

Returns the number of children. Math! Counting! Iconic. ๐Ÿ”ข

๐Ÿ’Œ referenced by: SoBaseKit::createPathToAnyPart(), SoBaseKit::getAnyPart(), SoBaseKit::set(), SoBaseKit::set(), SoBaseKit::setAnyPart(), and SoBaseKit::setDefaultOnNonWritingFields().


void SoNodeKitListPart::removeChild (int index)

Removes the child at position index. Bye bestie ๐Ÿ‘‹


void SoNodeKitListPart::removeChild (SoNode * child)

Removes child from the list of children. ๐Ÿซถ

๐Ÿ”— refs: SoNode::SoNode().


void SoNodeKitListPart::replaceChild (int index, SoNode * newChild)

Replaces the child at index with newChild, if newChild is of a permitted type. Glow up swap โœจ

๐Ÿ”— refs: SoType::getName(), SbName::getString(), SoBase::getTypeId(), isChildPermitted(), SoDebugError::post(), and SoNode::SoNode().

๐Ÿ’Œ referenced by: SoBaseKit::setAnyPart().


void SoNodeKitListPart::replaceChild (SoNode * oldChild, SoNode * newChild)

Replaces oldChild with newChild, if newChild is of a permitted type. ๐Ÿ’–

๐Ÿ”— refs: SoType::getName(), SbName::getString(), SoBase::getTypeId(), isChildPermitted(), SoDebugError::post(), and SoNode::SoNode().


SbBool SoNodeKitListPart::affectsState (void ) const โ€” [virtual]

Returns TRUE if the node could have any effect on the state during traversal. ๐Ÿ‘€

If it returns FALSE, no data in the traversal-state will change from the pre-traversal state to the post-traversal state. The SoSeparator node will for instance return FALSE, since it pushes and pops the state before and after traversal of its children. All SoShape nodes will also return FALSE, because just pushing out geometry data to the rendering engine won't affect the actual rendering state.

The default method returns TRUE, on a "better safe than sorry" philosophy. ๐Ÿ˜Œ

Reimplemented from SoNode.


void SoNodeKitListPart::doAction (SoAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. Passing the aux cord, fr fr. ๐ŸŽง

Reimplemented from SoNode.

๐Ÿ”— refs: children, and SoAction::getPathCode().

๐Ÿ’Œ referenced by: callback(), getPrimitiveCount(), GLRender(), handleEvent(), pick(), and search().


void SoNodeKitListPart::callback (SoCallbackAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. โžก๏ธ

Reimplemented from SoNode.

๐Ÿ”— refs: doAction().


void SoNodeKitListPart::GLRender (SoGLRenderAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. ๐ŸŽจ

Reimplemented from SoNode.

๐Ÿ”— refs: doAction().


void SoNodeKitListPart::getBoundingBox (SoGetBoundingBoxAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. ๐Ÿ“ฆ

Reimplemented from SoNode.

๐Ÿ”— refs: children, SoGetBoundingBoxAction::getCenter(), SoAction::getPathCode(), SoGetBoundingBoxAction::isCenterSet(), SoGetBoundingBoxAction::resetCenter(), and SoGetBoundingBoxAction::setCenter().


void SoNodeKitListPart::getMatrix (SoGetMatrixAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. ๐Ÿงฎ

Reimplemented from SoNode.

๐Ÿ”— refs: children, and SoAction::getPathCode().


void SoNodeKitListPart::handleEvent (SoHandleEventAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. ๐Ÿ–ฑ๏ธ

Reimplemented from SoNode.

๐Ÿ”— refs: doAction().


void SoNodeKitListPart::pick (SoPickAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. ๐ŸŽฏ

Reimplemented from SoNode.

๐Ÿ”— refs: doAction().


void SoNodeKitListPart::search (SoSearchAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. ๐Ÿ”Ž

Reimplemented from SoNode.

๐Ÿ”— refs: doAction(), SoSearchAction::isFound(), and SoNode::search().


void SoNodeKitListPart::getPrimitiveCount (SoGetPrimitiveCountAction * action) โ€” [virtual]

This just "forwards" the call to the same method at the container node. ๐Ÿ”ข

Reimplemented from SoNode.

๐Ÿ”— refs: doAction().


SoChildList * SoNodeKitListPart::getChildren (void ) const โ€” [virtual]

This just "forwards" the call to the same method at the container node. ๐Ÿซถ

Reimplemented from SoNode.

๐Ÿ”— refs: children.


SoGroup * SoNodeKitListPart::getContainerNode (void ) โ€” [protected]

Returns the SoGroup container which is the parent of all the children that have been added. It's giving... proud parent energy. ๐Ÿ‘‘

๐Ÿ’Œ referenced by: SoBaseKit::createPathToAnyPart(), SoBaseKit::getContainerNode(), and SoBaseKit::setDefaultOnNonWritingFields().


SbBool SoNodeKitListPart::readInstance (SoInput * in, unsigned short flags) โ€” [protected], [virtual]

This method is mainly intended for internal use during file import operations. ๐Ÿคซ

It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistant representation of an instance of this class type.

TRUE or FALSE is returned, depending on whether the instantiation and configuration of the new object of this class type went ok or not. The import process should be robust and handle corrupted input streams by returning FALSE. ๐Ÿ˜ญ

flags is used internally during binary import when reading user extension nodes, group nodes or engines.

Reimplemented from SoNode.

๐Ÿ”— refs: SoNode::readInstance().


void SoNodeKitListPart::copyContents (const SoFieldContainer * from, SbBool copyconnections) โ€” [protected], [virtual]

Makes a deep copy of all data of from into this instance, except external scenegraph references if copyconnections is FALSE. ๐Ÿซถ

This is the protected method that should be overridden by extension node / engine / dragger / whatever subclasses which needs to account for internal data that are not handled automatically.

For copying nodes from application code, you should not invoke this function directly โ€” instead call the SoNode::copy() function:

SoNode * mynewnode = templatenode->copy();

The same also goes for engines. ๐Ÿ‘‘

Make sure that when you override the copyContents() method in your extension class that you also make it call upwards to it's parent superclass in the inheritance hierarchy, because copyContents() in for instance SoNode and SoFieldContainer does important work. It should go something like this:

void
MyCoinExtensionNode::copyContents(const SoFieldContainer * from,
                                  SbBool copyconnections)
{
  // let parent superclasses do their thing (copy fields, copy
  // instance name, etc etc)
  SoNode::copyContents(from, copyconnections);

  // [..then copy internal data..]
}

...and it's a glow-up of SoNode::copyContents() too, plus it leans on SoFieldContainer::SoFieldContainer() while it's at it.

Basically: bestie, the parent class already had a version of this, and this one said "not me redoing the whole thing but cuter." โœจ


๐ŸŽ€ Member Data Documentation ๐ŸŽ€

๐Ÿ’… SoChildList* SoNodeKitListPart::children [protected]

Okay so this one is internal, like the library's private group chat. The docs are literally like "this API member is considered internal to the library, as it is not likely to be of interest to the application programmer."

Translation: it's giving backstage pass energy. ๐Ÿซถ Unless you're the one maintaining Coin itself, you do not need to be here. No cap.

It's referenced by a whole little friend group, and they are:

  • doAction()
  • getBoundingBox()
  • getChildren()
  • getMatrix()
  • setContainerType()
  • SoNodeKitListPart()
  • ~SoNodeKitListPart()

Like damn, children is the main character of this file. Everyone keeps pulling up. ๐Ÿ‘‘

Heads up bestie: [protected] means you can't just grab it from outside. It's not yours. Respect the boundary. ๐Ÿ’–

๐ŸŒˆ Author ๐ŸŒˆ

Generated automatically by Doxygen for Coin from the source code.

(So nobody wrote this prose by hand โ€” a robot read the source and typed it up. Which is honestly so real of it. ๐Ÿค–โœจ)


And that's a wrap on SoNodeKitListPart(3), bestie! ๐Ÿ’–๐Ÿฆ‹ This whole page lives in Coin, Version 2.5.0, filed under SoNodeKitListPart(3) โ€” go forth and node-kit responsibly. Periodt. ๐Ÿ’…๐ŸŒธ

๐Ÿ“ฆ where this page comes from