protected override void GenerateMethod(Node node, StreamWriter stream, string indent)
        {
            base.GenerateMethod(node, stream, indent);

            DecoratorWeight decoratorWeight = node as DecoratorWeight;

            Debug.Check(decoratorWeight != null);

            if (decoratorWeight.Weight != null)
            {
                stream.WriteLine("{0}\t\tprotected override int GetWeight(Agent pAgent)", indent);
                stream.WriteLine("{0}\t\t{{", indent);

                string retStr = VariableCsExporter.GenerateCode(decoratorWeight.Weight, stream, indent + "\t\t\t", string.Empty, string.Empty, string.Empty);

                stream.WriteLine("{0}\t\t\treturn {1};", indent, retStr);
                stream.WriteLine("{0}\t\t}}", indent);
            }
        }
        protected override void GenerateMethod(Node node, StreamWriter stream, string indent)
        {
            base.GenerateMethod(node, stream, indent);

            DecoratorWeight decoratorWeight = node as DecoratorWeight;

            if (decoratorWeight == null)
            {
                return;
            }

            if (decoratorWeight.Weight != null)
            {
                stream.WriteLine("{0}\t\tvirtual int GetWeight(Agent* pAgent) const", indent);
                stream.WriteLine("{0}\t\t{{", indent);
                stream.WriteLine("{0}\t\t\tBEHAVIAC_UNUSED_VAR(pAgent);", indent);

                string retStr = VariableCppExporter.GenerateCode(decoratorWeight.Weight, false, stream, indent + "\t\t\t", string.Empty, string.Empty, string.Empty);

                stream.WriteLine("{0}\t\t\treturn {1};", indent, retStr);
                stream.WriteLine("{0}\t\t}}", indent);
            }
        }
        protected override bool ShouldGenerateClass(Node node)
        {
            DecoratorWeight decoratorWeight = node as DecoratorWeight;

            return(decoratorWeight != null);
        }