original_docstring: returns a copy of the current node.
docstring: returns a copy of the current node.
docstring_tokens: returns a copy of the current node .
code: def copy_node(self, res_opt: Optional['ResolveOptions'] = None) -> 'CdmObject':
          """returns a copy of the current node."""
          res_opt = res_opt if res_opt is not None else ResolveOptions(wrt_doc=self)
  
          # instead of copying the entire context tree, just the current node
          copy = CdmAttributeContext(self.ctx, self.name)
          copy.type = self.type
          copy.in_document = res_opt.wrt_doc  # CdmDocumentDefinition
  
          if self.parent:
              copy.parent = CdmAttributeContextReference(self.ctx, None)
              copy.parent.explicit_reference = self.parent.explicit_reference  # yes, just take the old pointer, will fix all later
  
          if self.definition:
              copy.definition = self.definition.copy(res_opt)
              copy.definition.owner = self.definition.owner
  
          # make space for content, but no copy, done by caller
          copy.contents = CdmCollection(self.ctx, copy, CdmObjectType.ATTRIBUTE_REF)
  
          if self.lineage:
              for lin in self.lineage:
                  copy._add_lineage(lin.explicit_reference, False)  # use explicitref to cause new ref to be allocated
          self._copy_def(res_opt, copy)
  
          if res_opt._map_old_ctx_to_new_ctx is not None:
              res_opt._map_old_ctx_to_new_ctx[copy] = copy  # so we can find every node, not only the replaced ones
  
          return copy
code_tokens: def copy_node ( self , res_opt : Optional [ 'ResolveOptions' ] = None ) -> 'CdmObject' : res_opt = res_opt if res_opt is not None else ResolveOptions ( wrt_doc = self ) copy = CdmAttributeContext ( self . ctx , self . name ) copy . type = self . type copy . in_document = res_opt . wrt_doc if self . parent : copy . parent = CdmAttributeContextReference ( self . ctx , None ) copy . parent . explicit_reference = self . parent . explicit_reference if self . definition : copy . definition = self . definition . copy ( res_opt ) copy . definition . owner = self . definition . owner copy . contents = CdmCollection ( self . ctx , copy , CdmObjectType . ATTRIBUTE_REF ) if self . lineage : for lin in self . lineage : copy . _add_lineage ( lin . explicit_reference , False ) self . _copy_def ( res_opt , copy ) if res_opt . _map_old_ctx_to_new_ctx is not None : res_opt . _map_old_ctx_to_new_ctx [ copy ] = copy return copy
short_docstring: returns a copy of the current node.
short_docstring_tokens: returns a copy of the current node .
comment: """returns a copy of the current node."""$SEP$# instead of copying the entire context tree, just the current node$SEP$# CdmDocumentDefinition$SEP$# yes, just take the old pointer, will fix all later$SEP$# make space for content, but no copy, done by caller$SEP$# use explicitref to cause new ref to be allocated$SEP$# so we can find every node, not only the replaced ones