What's the best way to have a unlimited...

Developers
Anonymous
2011-04-05
2013-06-06
  • Anonymous - 2011-04-05

    Is creating it with capacity of -1 good enough? I guess it'll never be full.

    Any concerns about this type of slots?

     
  • Katie Russell

    Katie Russell - 2011-04-08

    Sorry, what is 'it' ?
    I think maybe a word was forgotten from the title or I am missing context.

     
  • Anonymous - 2011-04-08

    Not sure why it was shortened. I'm talking about an unlimited capacity slot.

     
  • Katie Russell

    Katie Russell - 2011-04-10

    The javadoc says:

            /**
         * Returns the maximum amount of objects that can be stored at the slot.
         * When there is no limit we use the -1 value.
         *
         * @return the maximum amount of objects that can be stored at the slot.
         */
        public int getCapacity() {
            return capacity;
        }
    

    And the constructor for deserialization sets -1 as default.

    Also for anyone else interested to read related chat, the question was answered at http://stendhalgame.org/chat/2011-04-05.html  23:31 and
    http://stendhalgame.org/chat/2011-04-09.html 22:46

    Javy_Dreamer, I am not sure what concerns you mean. You can experiment with tests on slots and objects as in tests/marauroa/common/game/

     
  • Anonymous - 2011-04-10

    I just wanted to know if there were any concerns with this type of slot as they are stored, potentially, in the database. Can they run out of space for the RPObject?

    There are no methods in RPClass for using the default -1 slot. That's why I asked.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks